I rebuilt an old audiofade script ( GitHub - kamblack/AudioFade: jQuery plugin for manipulating audio as you scroll · GitHub ) by using vanilla-js and adding a play button. This works fine in a local html-only setup but I have difficulties with referencing the audio files in a correct way in the panel. To make the thing work I write the HTML-code directly into the panel.
I would like to store the sound files in my page folder. Lets say my page structure is site/content/subpage/sound/xy.mp3 – how do I reference it? Do I need the whole link or is it enough with a relative path?
Here is the relevant part of the code, written in the panel, but it doesn’t work so far:
<audio loop id="scrollaudio" src="https://www.fischhobel.de/inhalt/wolke/sound/planeten.mp3"></audio>
<audio loop id="scrollaudio2" src="https://www.fischhobel.de/inhalt/wolke/sound/verloren.mp3"></audio>
<audio loop id="scrollaudio3" src="https://www.fischhobel.de/inhalt/wolke/sound/purr.mp3"></audio>
<audio loop id="scrollaudio4" src="https://www.fischhobel.de/inhalt/wolke/sound/noise.mp3"></audio>
<audio loop id="scrollaudio5" src="https://www.fischhobel.de/inhalt/wolke/sound/co1.mp3"></audio>
<audio loop id="scrollaudio6" src="https://www.fischhobel.de/inhalt/wolke/sound/ahu.mp3"></audio>
<audio loop id="scrollaudio7" src="https://www.fischhobel.de/inhalt/wolke/sound/autopanasonic.mp3"></audio>
<audio loop id="scrollaudio8" src="https://www.fischhobel.de/inhalt/wolke/sound/voices3.mp3"></audio>
<audio loop id="scrollaudio9" src="https://www.fischhobel.de/inhalt/wolke/sound/theremin.mp3"></audio>
<audio id="scrollaudio10" src="https://www.fischhobel.de/inhalt/wolke/sound/chormix.mp3"></audio>
Here is the page: https://www.fischhobel.de/wolke
What am I doing wrong?