make it so the audio plays with the image

master
Aevann 2024-10-27 23:23:06 +03:00
parent eb12b58372
commit 20d77332c2
1 changed files with 1 additions and 1 deletions

View File

@ -39,7 +39,7 @@
{% set image_src = SITE_FULL_IMAGES ~ "/assets/events/homoween/images/jumpscares/" ~ listdir("files/assets/events/homoween/images/jumpscares")|random ~ "?x=45" %} {% set image_src = SITE_FULL_IMAGES ~ "/assets/events/homoween/images/jumpscares/" ~ listdir("files/assets/events/homoween/images/jumpscares")|random ~ "?x=45" %}
<img src="{{image_src}}" id="jumpscare-img" style="display: none"> <img src="{{image_src}}" id="jumpscare-img" style="display: none">
{% set audio_src = "/assets/events/homoween/audio/jumpscares/" ~ listdir("files/assets/events/homoween/audio/jumpscares")|random ~ "?x=45" %} {% set audio_src = "/assets/events/homoween/audio/jumpscares/" ~ listdir("files/assets/events/homoween/audio/jumpscares")|random ~ "?x=45" %}
<audio id="jumpscare-audio" preload="none" src="{{audio_src}}"></audio> <audio id="jumpscare-audio" src="{{audio_src}}"></audio>
<script defer src="{{'events/homoween/js/jumpscare.js' | asset}}"></script> <script defer src="{{'events/homoween/js/jumpscare.js' | asset}}"></script>
{% endif %} {% endif %}