Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML5 video javascript controls - restart video

I know how to start and stop a video with play() and pause(), but how do I put a video back to the start in HTML5 using javascript? is there a way to move the pointer back to the start?

like image 752
rom Avatar asked Dec 06 '11 15:12

rom


People also ask

How do you start a video at a certain time in HTML?

document. getElementById("video1"). currentTime = 10; The Javascript statement sets the video1 video's current time to the 10-second mark.


1 Answers

Set the currentTime property back to 0.

like image 54
Quentin Avatar answered Oct 09 '22 03:10

Quentin