0 Votes

Changes for page ProWhiteMusicPlayer

Last modified by Ryan C on 2025/04/28 01:43

From version 20.1
edited by Ryan C
on 2025/04/28 01:01
Change comment: There is no comment for this version
To version 22.1
edited by Ryan C
on 2025/04/28 01:10
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -2,8 +2,19 @@
2 2  <link rel="stylesheet" href="https://cdn.plyr.io/3.7.8/plyr.css" />
3 3  <script src="https://cdn.plyr.io/3.7.8/plyr.polyfilled.js"></script>
4 4  
5 +<h2 style="text-align:center;">Final War: Glory Unending (2008)</h2>
6 +
7 +<select id="tracklist" onchange="changeTrack()" style="width:100%; margin-bottom: 20px; padding: 8px;">
8 + <option value="">🎵 Select a track...</option>
9 + <option value="/bin/download/Pro%20White%20Music/ProWhiteMusicPlayer/WebHome/01%20-%20Shit%20out.mp3">01 - Shit Out</option>
10 + <option value="/bin/download/Pro%20White%20Music/ProWhiteMusicPlayer/WebHome/02%20-%20Pride%20and%20tradition.mp3">02 - Pride and Tradition</option>
11 + <option value="/bin/download/Pro%20White%20Music/ProWhiteMusicPlayer/WebHome/03%20-%20Land%20of%20the%20White.mp3">03 - Land of the White</option>
12 + <option value="/bin/download/Pro%20White%20Music/ProWhiteMusicPlayer/WebHome/04%20-%20Saturday%20night.mp3">04 - Saturday Night</option>
13 + <!-- (etc all your songs) -->
14 +</select>
15 +
5 5  <audio id="player" controls style="width:100%;">
6 - <source src="/bin/download/Pro%20White%20Music/ProWhiteMusicPlayer/WebHome/01%20-%20Shit%20out.mp3" type="audio/mp3" />
17 + <source id="playerSource" src="" type="audio/mp3" />
7 7  </audio>
8 8  
9 9  <script>
... ... @@ -10,6 +10,18 @@
10 10  document.addEventListener('DOMContentLoaded', () => {
11 11   const player = new Plyr('#player');
12 12  });
24 +
25 +function changeTrack() {
26 + var select = document.getElementById('tracklist');
27 + var player = document.getElementById('player');
28 + var source = document.getElementById('playerSource');
29 +
30 + if (select.value) {
31 + source.src = select.value;
32 + player.load();
33 + player.play();
34 + }
35 +}
13 13  </script>
14 14  {{/html}}
15 15