只有Ipad-Exception说电影播放器​​有错误的激活状态

时间:2015-04-18 07:55:59

标签: ios iphone

Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'movie player <MPMoviePlayerControllerNew: 0x7ce3d230> has wrong activation state (1)'
*** First throw call stack:
(

4   MediaPlayer                         0x01968ef3 - [MPMoviePlayerControllerNew _moviePlayerDidBecomeActiveNotification:] + 239

5   Foundation                          0x03055c49 __57-[NSNotificationCenter addObserver:selector:name:object:]_block_invoke + 40

6   CoreFoundation                      0x03bef4a4 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 20

7   CoreFoundation                      0x03add03b _CFXNotificationPost + 3051

8   Foundation                          0x03045246 -[NSNotificationCenter postNotificationName:object:userInfo:] + 98

tNotificationName:object:userInfo:] + 98
9   MediaPlayer                         0x0196bd96 -[MPMoviePlayerControllerNew _postNotificationName:object:userInfo:] + 133
10  MediaPlayer                         0x0196bd01 -        [MPMoviePlayerControllerNew _postNotificationName:object:] + 68

我不知道为什么这个问题只发生在Ipad而不是iphone中? 任何人,如果他们可以帮助..我应该怎么做才能删除?

1 个答案:

答案 0 :(得分:0)

我能够通过在每次用户请求播放歌曲时调用的方法中使用下面提到的代码来解决此问题

if ([MoviePlayer isPreparedToPlay]) {
            [MoviePlayer stop];
        }