Create buttons to jump to MP4 chapter points or times in a video

Hi

I used this code and it worked. When pressing a button the video jumps to a specified time and plays automatically.

var vid = document.getElementById(“video”);
vid.currentTime = 3;
vid.play();

However, when playback is over, pressing the button only takes me to a specified time but doesn’t play the video. Would the second function you provided fix this problem. I tried to include it in the code but it didn’t work.

Any ideas?

Thanks
Greg