AVPlayer doesn't resume playback on endinterruption on iPhone but does so on iPad

后端 未结 2 1655
小蘑菇
小蘑菇 2021-01-06 20:31

I\'m writing a radio app for both iPhone and iPad and am running into some weird behaviour when handling pausing and playing the audio with interruptions. I\'m using the AVA

相关标签:
2条回答
  • 2021-01-06 20:58

    It turns out that this is a known bug in iOS, which requires some careful work-arounds in the applicationDidBecomeActive to handle beginInterruption. Sadly, I couldn't figure out another solution.

    0 讨论(0)
  • 2021-01-06 21:15

    I had the same issue. Issue disappeared after I implemented remote control event handling. I called [[UIApplication sharedApplication] beginReceivingRemoteControlEvents];when starting playback.

    0 讨论(0)
提交回复
热议问题