Home > other >  I can know if audio is playing
I can know if audio is playing

Time:07-09

I am using the cordova-plugin-media plug-in in an audio project. I wanted to ask if there is a way to know if the audio is playing or if it has started playing

CodePudding user response:

You can check the playing position of Media using

var sound = new Media(...);

setInterval(() => {console.log(sound._position);}, 10);

CodePudding user response:

Thanks Erik for the answer but what has to go is not an audio file but a stream

  • Related