ModernAVPlayer icon indicating copy to clipboard operation
ModernAVPlayer copied to clipboard

Pausing of playback when going into the native iOS camera app

Open DSandfeld opened this issue 5 years ago • 2 comments

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 :-)

DSandfeld avatar Nov 01 '19 12:11 DSandfeld

Hi,

thanks for this. Any pull request is welcome ! I may check this in the few days anyway..

raphrel avatar Nov 01 '19 14:11 raphrel

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

raphrel avatar May 21 '20 21:05 raphrel