supersaiyan
supersaiyan

Reputation: 1730

Rewinding HTML 5 video each time the page is loaded

I want to make sure my HTML 5 videos start running from the beginning when the user enters a page.

At the moment, the first video is running fine, but if the user closes the pop-up while playing the video will start from where the user left it when they open the pop-up again.

Upvotes: 0

Views: 55

Answers (1)

NullPoiиteя
NullPoiиteя

Reputation: 57322

try siomething like

document.getElementById('vid').onload = function(){
    this.currentTime = 0;
};

Upvotes: 2

Related Questions