HTML5 video javascript controls - restart video
To have a proper stop
functionality you could do the following:
var video = document.getElementById('vidId');
// or video = $('.video-selector')[0];
video.pause();
video.currentTime = 0;
video.load();
Note: This is the only version that worked for me in chrome using nodejs
(meteorjs
) in the backend, serving webm
, mp4
, ogg
files
Set the currentTime
property back to 0
.