cordova-plugin-backgroundaudio
cordova-plugin-backgroundaudio copied to clipboard
Playlist
Hello, i hope you can help me.
When the audio become to his finish, Media plugin give me the status MEDIA_STOPPED, then I try to play the next song in the playlist.
When my app is in focus, every works fine but if the iPad is blocked or the app is in background I recibe a Error:{"message":"","code":4}
player.media = new Media(path,
function(){},
function(error) {
if (error.code != 0) {
navigator.notification.alert("Error: " + JSON.stringify(error), function() {});
}
},
function(mediaStatus) {
if (Media.MEDIA_STOPPED == mediaStatus) {
$(document).trigger('player-stop');
}
}
});
have a similar issue. NEVER found a solution.
Currently I'm investigating to see if NativeScript will do what I need.
I'm facing what looks like the same issue within cordova-plugin-media
https://github.com/apache/cordova-plugin-media/issues/213