(Created page with "{{#get_db_data: db=DATA |query=now_playing |data=video_id=video_id }} <templatestyles src="Home/NowPlaying2/styles.css" /> <div id="now-playing" style="box-shadow: 0px 0px 14px rgb(192 14 170 / 75%), inset 0 0 14px rgb(246 21 115);"> <h2>Now Playing</h2> {{#widget:YouTube|id=tfcf5pv3VfA|}} <html> <br> <div id="button-wrap"> <button id="ytButton">Click to change Tape</button> </div> <!-- Put Your javascript here--> <script> var videoIdList = [ </html> {{#for_external_tabl...") |
No edit summary |
||
Line 1: | Line 1: | ||
{{#get_db_data: db=DATA | {{#get_db_data: db=DATA | ||
|query= | |query=now_playing2 | ||
|data= | |data=video_id2=video_id2 | ||
}} | }} | ||
<templatestyles src="Home/NowPlaying2/styles.css" /> | <templatestyles src="Home/NowPlaying2/styles.css" /> | ||
<div id="now-playing" style="box-shadow: 0px 0px 14px rgb(192 14 170 / 75%), inset 0 0 14px rgb(246 21 115);"> | <div id="now-playing" style="box-shadow: 0px 0px 14px rgb(192 14 170 / 75%), inset 0 0 14px rgb(246 21 115);"> | ||
<h2>Now Playing</h2> | <h2>Now Playing</h2> | ||
{{#widget: | {{#widget:Video|url=/images/4/46/SheWasDreaminOfBoys.mp4|caption=}} | ||
<html> | <html> | ||
<br> | <br> | ||
Line 17: | Line 17: | ||
</html> | </html> | ||
{{#for_external_table: | {{#for_external_table: | ||
"{{{ | "{{{video_id2}}}", | ||
}} | }} | ||
<html> | <html> | ||
]; | ]; | ||
var shuffledList = videoIdList.sort(() => Math.random() - 0.5); | var shuffledList = videoIdList.sort(() => Math.random() - 0.5); | ||
var button = document.querySelector("#ytButton"); | var button = document.querySelector("#ytButton"); | ||
var player = document.querySelector("# | var player = document.querySelector("#video-source"); | ||
button.addEventListener("click", playNext); | button.addEventListener("click", playNext); | ||
Line 31: | Line 30: | ||
shuffledList.push(justPlayedVideo); | shuffledList.push(justPlayedVideo); | ||
player.src = | player.src = shuffledList[0]; | ||
} | } | ||
player.src = | player.src = shuffledList[0]; | ||
</script> | </script> | ||
</html> | </html> | ||
</div> | </div> |
Revision as of 22:14, 3 August 2023
Now Playing