MPMoviePlayerViewController observes '_serverC

2019-03-31 00:06发布

While working with MPMoviePlayerViewController I am getting an error notification as below and the App Crashes.

_serverConnectionDiedNotification. Info -- notification=Error Domain=AVFoundationErrorDomain Code=-11819 "Cannot Complete Action" UserInfo=0x5dfcb0 {NSLocalizedRecoverySuggestion=Try again later., NSLocalizedDescription=Cannot Complete Action}, AVPlayer = , currentTime = 0.00

2012-05-27 15:32:41.777 AnswerMania[3885:707] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'An AVPlayerItem cannot be associated with more than one instance of AVPlayer'

This is not happening always. I have observed all the MpMoviePlayerController Notifications but this error cannot be observed. Does it related to the Server Connection? How does the serverConnectionDiedNotification can be observed?

标签: ios avplayer
1条回答
你好瞎i
2楼-- · 2019-03-31 01:01

I had similar issue when calendar reminder appeared while playing video. it was solved for me by not using the app audio session:

moviePlayer.useApplicationAudioSession = NO;

EDIT: it is related to the following error, did NOT see the _serverConnectionDiedNotification:

AVPlayerItem cannot be associated with more than one instance of AVPlayer
查看更多
登录 后发表回答