Copy link to clipboard
Copied
Hi everyone,
I've inserted a video component in my HTML5 canvas.
Now, I want to automatically pause the video before it ends.
Moreover I'd like to add a button in order to make it play from that point onwards.
Unfortunately actions like this.play() and this.stop() do not work.
There should be some tricky code that allows to control the video player.
How is this possible?
Thank you in advance
Sorry, there's no tricky code, just very simple code:
document.getElementById("myvideo").pause();
document.getElementById("myvideo").play();
Copy link to clipboard
Copied
Sorry, there's no tricky code, just very simple code:
document.getElementById("myvideo").pause();
document.getElementById("myvideo").play();
Copy link to clipboard
Copied
hi
I tested this using a button called 'stopvideo' created in my HTML file that does works perfectly: