【发布时间】:2013-08-21 07:44:42
【问题描述】:
我正在尝试使用 MPMoviePlayerController 播放电影。当我调用播放方法时,我正在崩溃。
*** Terminating app due to uncaught exception 'NSRangeException', reason: 'Cannot remove an observer <MPAVController 0x15786750> for the key path "currentItem" from <MPAVPlaylistManager 0x15787750> because it is not registered as an observer.'
*** First throw call stack:
(0x2f148ed3 0x391716c7 0x2f148e15 0x2fa7227f 0x2fa71ca7 0x30393977 0x3038d5ef 0x303889d5 0x3036a36b 0x3036c6bb 0x2f10ae79 0x2f07eb81 0x2fa463c5 0x2fa4acc7 0x303ef943 0x39672103 0x396720ef 0x396749a9 0x2f1135b9 0x2f111e85 0x2f07c541 0x2f07c323 0x33b10343 0x316957b5 0x3a719 0x3a6a0)
libc++abi.dylib: terminating with uncaught exception of type NSException
我不确定发生了什么,因为我没有从MPAVPlaylistManager 为currentItem 设置任何 KVO 观察者,这是一个内部类。
其他人有这个问题吗?
【问题讨论】:
-
粘贴您尝试过的代码?
-
您在此处看到的问题是由您的代码问题触发的,即使您的代码不使用 KVO 等 - 播放器在内部使用。这似乎是对播放器的不正确初始化或过早拆除。没有看到您的代码,我们几乎无法提供任何进一步的帮助。
标签: ios objective-c mpmovieplayercontroller mpmovieplayer