MPMoviePlayerViewController观察到'_serverConnectionDiedNotification' [英] MPMoviePlayerViewController observes '_serverConnectionDiedNotification'
问题描述
在使用MPMoviePlayerViewController时,出现如下错误通知和应用程序崩溃.
While working with MPMoviePlayerViewController I am getting an error notification as below and the App Crashes.
_serverConnectionDiedNotification.信息-通知=错误域= AVFoundationErrorDomain代码= -11819无法完成操作" UserInfo = 0x5dfcb0 {NSLocalizedRecoverySuggestion =稍后再试.,NSLocalizedDescription =无法完成操作},AVPlayer =,currentTime = 0.00
_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] * 由于未捕获的异常"NSInvalidArgumentException"而终止应用程序,原因:一个AVPlayerItem不能与多个实例相关联的AVPlayer'
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?
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?
推荐答案
播放视频时出现日历提醒时,我遇到了类似的问题.通过不使用应用音频会话为我解决了此问题:
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;
它与以下错误有关,没有看到_serverConnectionDiedNotification:
it is related to the following error, did NOT see the _serverConnectionDiedNotification:
AVPlayerItem cannot be associated with more than one instance of AVPlayer
这篇关于MPMoviePlayerViewController观察到'_serverConnectionDiedNotification'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!