How can I check status of a HTML5 vide element? I need to toggle play/pause the video element.
As of 2020, HTML5 video is the only widely supported video playback technology in modern browsers, with the Flash plugin being phased out.
<video>: The Video Embed element. The <video> HTML element embeds a media player which supports video playback into the document.
click(function() { var video = $("#myvideo"). get(0); video. play(); $(".
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With