0 Votes

Changes for page Pro White Music

Last modified by XWikiGuest on 2025/05/07 09:35

From version 29.1
edited by Ryan C
on 2025/04/28 00:52
Change comment: There is no comment for this version
To version 27.1
edited by Ryan C
on 2025/04/28 00:44
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -1,15 +1,28 @@
1 1  {{html}}
2 -<link rel="stylesheet" href="https://cdn.plyr.io/3.7.8/plyr.css" />
3 -<script src="https://cdn.plyr.io/3.7.8/plyr.polyfilled.js"></script>
2 +<select id="tracklist" onchange="changeTrack(this)">
3 + <option value="">🎵 Select a track...</option>
4 + <option value="/bin/download/Pro%20White%20Music/01%20-%20Shit%20out.mp3">01 - Shit Out</option>
5 + <option value="/bin/download/Pro%20White%20Music/02%20-%20Pride%20and%20tradition.mp3">02 - Pride and Tradition</option>
6 + <option value="/bin/download/Pro%20White%20Music/03%20-%20Land%20of%20the%20White.mp3">03 - Land of the White</option>
7 + <option value="/bin/download/Pro%20White%20Music/04%20-%20Saturday%20night.mp3">04 - Saturday Night</option>
8 + <!-- etc -->
9 +</select>
4 4  
5 -<audio id="player" controls style="width:100%;">
6 - <source src="/bin/download/Pro%20White%20Music/01%20-%20Shit%20out.mp3" type="audio/mp3" />
11 +<br><br>
12 +
13 +<audio id="player" controls style="width: 100%;">
14 + <source id="playerSource" src="" type="audio/mpeg">
15 + Your browser does not support the audio element.
7 7  </audio>
8 8  
9 9  <script>
10 -document.addEventListener('DOMContentLoaded', () => {
11 - const player = new Plyr('#player');
12 -});
19 +function changeTrack(select) {
20 + var player = document.getElementById('player');
21 + var source = document.getElementById('playerSource');
22 + source.src = select.value;
23 + player.load();
24 + player.play();
25 +}
13 13  </script>
14 14  {{/html}}
15 15  

XWiki AI Chat