nsinvalidargumentexception'原因'一个avplayeritem不能与一个以上avplayer实例相关联' [英] nsinvalidargumentexception' reason 'an avplayeritem cannot be associated with more than one instance of avplayer'

查看:89
本文介绍了nsinvalidargumentexception'原因'一个avplayeritem不能与一个以上avplayer实例相关联'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用

MPMoviePlayerController

MPMoviePlayerController

用于播放视频,在此,我使用了自定义搜索栏来跳转视频.但是当我连续进行向前和向后搜索时,应用程序崩溃并抛出以下错误:

for play video and in this I used custom seek bar to jump video. but when I continuously do the seeking forward and rewind then application crashed and throw below error:

nsinvalidargumentexception'原因'avplayeritem不能为 与多个avplayer实例相关联

nsinvalidargumentexception' reason 'an avplayeritem cannot be associated with more than one instance of avplayer'

所以请提出建议.

谢谢

推荐答案

出现相同的问题,请在设置SourceType后尝试设置ContentURL,如下所示,

Had same issue, try setting ContentURL after Setting the SourceType like below,

moviePlayerController_ = [[MPMoviePlayerViewController alloc] init];
moviePlayerController_.movieSourceType = MPMovieSourceTypeStreaming;
[moviePlayerController_.moviePlayer setContentURL:url];

来源: devforums.apple.com/message/467199

这篇关于nsinvalidargumentexception'原因'一个avplayeritem不能与一个以上avplayer实例相关联'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆