Template:Home/NowPlaying2: Difference between revisions

Template page
No edit summary
Tag: Reverted
No edit summary
Tag: Manual revert
 
(8 intermediate revisions by the same user not shown)
Line 27: Line 27:
button.addEventListener("click", playNext);
button.addEventListener("click", playNext);


async function playNext() {
function playNext() {
   var justPlayedVideo = shuffledList.shift();
   var justPlayedVideo = shuffledList.shift();
   shuffledList.push(justPlayedVideo);
   shuffledList.push(justPlayedVideo);
  player.src = ''
  await new Promise(r => setTimeout(r, 1000));
   player.src = shuffledList[0];
   player.src = shuffledList[0];
   video.load()
   video.load()

Latest revision as of 10:39, 13 September 2023

Now Playing