videojs toggle play and pause by js code example
Example: video js toggle play pause
function playPause() {
var video = document.querySelector("video");
if (video.paused)
video.play();
else
video.pause();
}
function playPause() {
var video = document.querySelector("video");
if (video.paused)
video.play();
else
video.pause();
}