Skip to content

Instantly share code, notes, and snippets.

@gfranko
Last active August 29, 2015 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gfranko/7139eee7d5b376a29616 to your computer and use it in GitHub Desktop.
Save gfranko/7139eee7d5b376a29616 to your computer and use it in GitHub Desktop.
Replay YouTube Video
(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