forked from MarseyWorld/MarseyWorld
fix fistmas song
parent
40d8fb252c
commit
710502000e
|
@ -1,4 +1,5 @@
|
|||
const audio = new Audio("{{song}}");
|
||||
const song = document.getElementById('fistmas-song').value;
|
||||
const audio = new Audio(song);
|
||||
audio.loop=true;
|
||||
|
||||
audio.play();
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
{% if not song %}
|
||||
{% set path = "assets/event/media/music" %}
|
||||
{% set song = "/" ~ path ~ "/" ~ listdir('files/' ~ path)|random() ~ '?v=45' %}
|
||||
<input hidden id="fistmas-song" value="{{song}}">
|
||||
{% endif %}
|
||||
<script defer src="{{'event/js/music.js' | asset}}"></script>
|
||||
{% endif %}
|
||||
|
|
Loading…
Reference in New Issue