Videojs library in your project. The method will return false if " /> Videojs library in your project. The method will return false if " /> Videojs library in your project. The method will return false if " />
Chrome Extension

Videojs check if video is playing

var videoObj = videojs("video_id");

if (!videoObj.paused()) {
    console.log("Video is playing");
} else {
    console.log("Video is paused");
}

//USING .paused() function of videojs
Best JSON Validator, JSON Tree Viewer, JSON Beautifier at same place. Check how cool is the tool

To check whether a video is playing or not you can use .paused() method if you are using Videojs library in your project. The method will return false if the video is in play mode and return true if it is paused.

As in the above code snippet, we have wrapped the function inside the if-else condition and we are logging if the video is playing or not. You can write your code inside those conditions if you have any requirements.

Also, we have initialized Videojs object in our videoObj variable that will contain all the properties and methods related to Videojs player.

Search Index Data (The code snippet can also be found with below search text)

Check whether the video is in play mode using Videojs
Was this helpful?
0 Comments