MediaPlugin 3.4.4 not detecting when audio has finished playing

I used to be able to detect when audio has finished playing by subscribing to, now it is undefined. Is there a newer/better way of detecting when audio is done playing or is this a bug?

I need to be able to move perform other actions when a song has finished playing.

//detect when audio has finished playing
isFinished() {
       return this.file.init.then(() => {
           console.log('finished playing song!');

Could you please provide a link to the plugin you are using (and the Ionic Native documentation if you are using it)?

Please also try to format your code as code in your post.

Here is the link to the native plugin,
and a reference to the conversation discussing how to detect when a media is finished playing.

Iā€™m currently just checking status Media.MEDIA_STOPPED

Thanks @Sujan12

1 Like