Issue with streaming audio

I’m working on an Ionic app to play the streaming audio stream of a small internet radio station. It only needs to compile to Android.

I’m currently using the audio tag:

<audio #stream src="http://live.str3am.com:3010/live"></audio>

That works well, but only for about 10 minutes, and then it stops. I think the buffer runs out.

Is there a way to make the stream rebuffer? Or to specify a buffer size? Or otherwise continue playing? Or maybe there’s some other method I should be using to play the stream?

Thanks for any help.

Hi… I have the same problem, you can fix this? How?
I would appreciate your help

I never did find a solution. It stops playing after about 8 minutes. I think because the app isn’t allowed to run for long in the background.

Maybe there’s a way to queue the audio and leave it running somehow?

I’d love to find a solution, it makes the app basically useless.

we are in the same then, I hope someone can help us…
Here I found something but it is not the definitive solution: [Ionic-4] How to exclude my ionic app from the android Battery Optimization

Hello again! I have good news, I was able to fix it. Very simple, just install this: https://ionicframework.com/docs/native/background-mode

And then add in providers “BackgroundMode”
I hope you can solve it, greetings!

1 Like

@matigcba: thank you! Working perfectly now.

Here’s the app by the way: