How can I check status of a HTML5 vide element? I need to toggle play/pause the video element.
1 Answer
There are few methods like below,
var myVideo=document.getElementById("video1");
if (myVideo.paused) {
myVideo.play();
}
else {
myVideo.pause();
}
have a look at complete working example here.