Stichy Stichy - 4 months ago 46x
Javascript Question

HTML5 reset video and play again

I'm using timesheets.js and want to play a HTML5 video when the slider is active.
I'm using this code:

if (document.getElementById("v_"
video = document.getElementById('v_'
video.currentTime = 0;;

If I'm not using "video.currentTime = 0;
it works most of the time (except when videos are too long). I have to reset the video so it plays from the beginning. Now it resets the video, but it doesn't play. Any ideas?


This solved it! I changed the video.currentTime = 0; to: