Last active
August 29, 2015 14:08
-
-
Save gfranko/7139eee7d5b376a29616 to your computer and use it in GitHub Desktop.
Replay YouTube Video
This file contains 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
(function replayYouTubeVideo() { | |
var video = document.querySelector('.html5-main-video'); | |
setInterval(function() { | |
if(video.currentTime === video.duration) { | |
video.currentTime = 0; | |
} | |
}, 5000); | |
}()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment