Fix Flutter Live Streaming Radio App

Job ID: 39267479

Budget: $30 – $250 USD

I'm seeking a skilled Flutter developer to help with a problem in my live streaming radio app.
The radio app is using just_audio and the audio_service package.
The problem is when another app stops the radio and restarts it would play the buffer audio.

So to fix the problem, I used a session.interruptionEventStream.listen to listen for the pause interruption.
In the AudioPlayerHandler class, I disposed the audio player and created a new one to reset the buffer so the stream always follows the live show. I tried the stop, play methods, but then the player just loaded infinitely.

With this, it resets the player, the stream, and it would start to play, but the UI buttons and the notification buttons only work once when I stop the player, then nothing. In the notification center, once I stop the audio, the buttons are grayd out.

I tried to add the new player to the playbackEventStream, but it didn't work.
_player.playbackEventStream.map(_transformEvent).pipe(playbackState);

If you feel like you can solve the issue, feel free to write with a little explanation on how you would approach the problem.
Related categories: Mobile App Development iPhone Android Flutter