suragch / flutter_audio_service_demo

Companion project for Flutter audio_service tutorial
https://suragch.medium.com/background-audio-in-flutter-with-audio-service-and-just-audio-3cce17b4a7d?sk=0837a1b1773e27a4f879ff3072e90305
MIT License
57 stars 28 forks source link

Lock Screen shows Audio even after remove() #25

Closed elvisgn closed 9 months ago

elvisgn commented 9 months ago

Hi, First of all, thank you for the great article and demo.

I have a simple podcasting usecase where I just play one audio file and remove it on page dispose(). No playlists etc.

I have managed to add and remove the audio file, but I noticed that even after removing the audio file from the queue using audioHandler.remove(), it still shows up on the Lock Screen (screenshot attached)

Simulator Screenshot - iPhone 13 Pro - 2023-11-29 at 12 31 37

The buttons and progressBar work on the screen with no sound (that's obvious).

How do I completely remove the MediaItem from Lock Screen?

Thanks.

elvisgn commented 9 months ago

Hi, Looks like this is not a problem on an actual device, only on iOS simulator. Guess we can close the ticket.

Thanks.

suragch commented 9 months ago

Sorry, I was busy last week so I didn't get around to responding then. That's good to hear that it at least works on a real device. I'm not sure why there is that strange behavior on the simulator. Thank you for the follow-up comment.