ExampleHTML5AudioStreaming icon indicating copy to clipboard operation
ExampleHTML5AudioStreaming copied to clipboard

Android loop playing

Open Alkashi opened this issue 10 years ago • 2 comments

Hi,

I'm trying to play a playlist composed by many mp3. When an mp3 plays arrive at the end, I want the other mp3 in stack plays automatically. For that, I listent to the "ended" event and play the following mp3 when it's fired.

On iOS, everything works fine and the followings mp3 are played event if the iPhone is locked and the screen turned off.

On Android, it works only when the app is foreground and the screen turned on. When the screen if off, the event is fired but the following mp3 is never played.

Do you have an idea on how to solve the issue on Android ?

Alkashi avatar Jul 04 '15 10:07 Alkashi

I've noticed the same in my own app. Going to try the Cordova media plugin to see if it behaves differently to the html5 audio element, but would also be interested to here if there is a known way to work around this.

Cheers Gaven

On 4 Jul 2015, at 6:07 pm, Alkashi [email protected] wrote:

Hi,

I'm trying to play a playlist composed by many mp3. When an mp3 plays arrive at the end, I want the other mp3 in stack plays automatically. For that, I listent to the "ended" event and play the following mp3 when it's fired.

On iOS, everything works fine and the followings mp3 are played event if the iPhone is locked and the screen turned off.

On Android, it works only when the app is foreground and the screen turned on. When the screen if off, the event is fired but the following mp3 is never played.

Do you have an idea on how to solve the issue on Android ?

— Reply to this email directly or view it on GitHub.

ghenry22 avatar Jul 04 '15 13:07 ghenry22

I've ever try with the media plugin and it works well with some adjustments.

But if someone has an idea about this issue...

Alkashi avatar Jul 04 '15 19:07 Alkashi