Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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
You can’t perform that action at this time.