media_element-property-media_playing

1.0.0 • Public • Published

mediaPlaying

Simple function to detect if a video or audio file is actually playing

Example


let video = document.createElement("video");
video.src = "big-buck-bunny.mp4"
video.play();

document.getElementsByTagName("body")[0].appendChild(video);

if(video.playing === false){
  console.log("not playing");
}else{
  console.log("playing");
}

Package Sidebar

Install

npm i media_element-property-media_playing

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

2.28 kB

Total Files

4

Last publish

Collaborators

  • webciter