ios – MPMoviePlayerViewController观察’_serverConnectionDiedNotification’

使用MPMoviePlayerViewController时,我收到错误通知,如下所示,应用程序崩溃.

_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’

这不会发生.我观察了所有MpMoviePlayerController通知,但无法观察到此错误.它与服务器连接有关吗?如何观察serverConnectionDiedNotification?

最佳答案 播放视频时出现日历提醒时出现类似问题.它是通过不使用应用程序音频会话为我解决的:

moviePlayer.useApplicationAudioSession = NO;

编辑:
它与以下错误有关,没有看到_serverConnectionDiedNotification:

AVPlayerItem cannot be associated with more than one instance of AVPlayer
点赞