Hi I am havign some trouble detecting when the audio has finished playing.
I see that there is a promis returned in the $cordovaMedia code but I can seem to get it working.
Does anyone have any poiners ?
Thanks
Keith
Hi I am havign some trouble detecting when the audio has finished playing.
I see that there is a promis returned in the $cordovaMedia code but I can seem to get it working.
Does anyone have any poiners ?
Thanks
Keith
I am still stuck with this, I thought it would be best to watch’mediaStatus’ but it always returns null.
{"media":{"id":"3cb5b248-3953-d330-ec82-15a0a7fac800","src":"/android_asset/www/test.mp3","_duration":11.311,"_position":8.96},"mediaStatus":null,"promise":{}} at file:///android_asset/www/js/controllers.js:755
Just my 50 cents… if( _position == _duration ) seems like it should be finished?
No experience on this particular plugin though
Thanks even that hack won’t work as once the file finishes playing _position gets set set to -1
_position":-0.001
Regardless on would expect mediaStatus to reflect the status !
Why not check for _position == -0.001 then? Start checking when it’s not -0.001 and stop checking (assume it’s finished?) when it’s -0.001 again?
Of course, it would be nice if there was a method or property for this on the media play plugin wrapper of ngcordova