-
-
Save haraldmartin/41810 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var loadedCount = 0; | |
function onYouTubePlayerReady(playerId) { | |
if (++loadedCount == 4) { | |
document.getElementById('player1').setVolume(0); // 50% | |
document.getElementById('player2').setVolume(70); // 70% | |
document.getElementById('player3').setVolume(100); // 100% | |
document.getElementById('player4').setVolume(100); // 100% | |
setTimeout(playAll, 100); // vänta 0.1 sekunder innan alla börjar laddas | |
setTimeout(pauseAll, 1100); // vänta 1.1 sekunder innan alla pausas igen (så de hinner laddas in) | |
setTimeout(restartAll, 3000); // vänta in 3 sekunder innan den riktiga, time:ade starten börjar | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment