ModernAVPlayer
ModernAVPlayer copied to clipboard
Pausing of playback when going into the native iOS camera app
In iOS12 the playback stops when the user opens the camera app.
This happens due to AudioSession receiving a notification thatrouteAudioChanged
acts on, the reason being .unknown
which will change the state of the player to paused.
This is unintended behaviour. An interruption should only happen if the camera goes to video mode. We have tested this a fair bit and the issue is not present in iOS13. We have run tests with leaving out the check for .unknown
, in line 205 of PlayingState.swift. Everything still works fine without that check, as InterruptionAudioService will act as intended with proper handling of going to the video mode.
I hope that you will have time soon to attend this minor correction. If wanted I could prepare a pull-request with this change :-)
Hi,
thanks for this. Any pull request is welcome ! I may check this in the few days anyway..
I don't have anymore iOS 12 device, so I can't check anything about this. If you have time to check and prepare a PR, should be nice.
thanks