AVPlayerItem一次只能占据玩家队列中的一个位置 [英] An AVPlayerItem can occupy only one position in a player's queue at a time

查看:148
本文介绍了AVPlayerItem一次只能占据玩家队列中的一个位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试从我的临时目录播放视频时出现此错误:

Im getting this error when trying to play a video from my temp directory:

NSString *tmpDir = [NSTemporaryDirectory() stringByAppendingString:@"/"];
NSString *url = [tmpDir stringByAppendingString:videoToPlay];

MPMoviePlayerController *player =
[[MPMoviePlayerController alloc]
 initWithContentURL:[NSURL fileURLWithPath:url]];

我为什么会收到此错误"AVPlayerItem一次只能占据玩家队列中的一个位置."

Why am i getting this error "An AVPlayerItem can occupy only one position in a player's queue at a time."

该代码正确吗?我想念一些简单的东西吗?

Isnt that code correct? Am i missing something simple?

推荐答案

全部.按照此答案找到解决此问题的方法. devforums.apple.com/message/467199

All. follow this answer to find the solution to this problem. devforums.apple.com/message/467199

我正在使用IOS 5 beta 2.

I am on IOS 5 beta 2.

这篇关于AVPlayerItem一次只能占据玩家队列中的一个位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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