3.6.0 MobileVLCKit for iOS.
iOS 18.1.1 (but I think also down to 16.1)
I am using MobileVLCKit in my App everything is playing really well. I can continue to play the audio even if the App is backgrounded or the Lock Screen on the phone has activated.
While the App is backgrounded most of the time VLCMediaPlayer changes status to VLCMediaPlayerStateBuffering, it is still playing well...
There is one big problem and that is when my App is backgrounded (while it is still playing) and another App starts using the audio on the iPhone.
When my app is foregrounded once again, VLCMediaPlayer it is still thinking it is playing and still has the status of VLCMediaPlayerStateBuffering but there is no audio happening from my App. If I then try to pause or stop VLCMediaPlayer the current media, nothing happens. I cannot get VLCMediaPlayer to return to a paused or stopped state. It's like VLCMediaPlayer has hung...
If I try to set a new VLCMedia instance with VLCMediaPlayer that doesn't work either.
So far, I've been forced to delete the existing VLCMediaPlayer instance and create a new VLCMediaPlayer instance. However I cannot determine if there was some audio playing on another app (while my app is backgrounded and was playing) so I cannot be sure if I need to do such a drastic thing. Besides, the audio will cut out and restart every time I bring the app into the foreground, so the listening experience isn't great.
I've tried to find out how the low level VLC code is notified it should stop playing audio but so far haven't found how it is doing it, or if it is doing it at all!
Can anyone provide any pointers for this?