iOS:AVQueuePlayer / AVPlayerItem'AVPlayerItem每次只能在播放器队列中占据一个位置。 [英] iOS: AVQueuePlayer/AVPlayerItem 'An AVPlayerItem can occupy only one position in a player's queue at a time.'

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

问题描述

我一直收到此错误:


'AVPlayerItem在
时间只能占用播放器队列中的一个位置。'


我NS登录球员项目,没有一个似乎是平等的。此外,我添加这只是为了确保:

  if([player canInsertItem:itemToAdd afterItem:nil])
[player insertItem:itemToAdd afterItem:nil];

当我不确定是否可以工作(在不同的内存位置可以有两个相同的项目)我写了一个类别方法来测试一个播放器是否包含一个项目或与它相同的东西。



我已经看过几个使用MPMoviePlayerController的人收到这个错误的帖子,但是我没有使用这个自定义类,只是

解决方案



div>

有一个类似问题



它没有被接受的答案,但似乎很多人都有同样的问题。 >
此外,请参阅Apple Dev论坛的此帖


I keep getting this error:

'An AVPlayerItem can occupy only one position in a player's queue at a time.'

I NSLog'd the players items, and none of them seem to be equal. Further, I added this just to be sure:

if([player canInsertItem:itemToAdd afterItem:nil])
 [player insertItem:itemToAdd afterItem:nil];

When I wasn't sure if that would work (can have two identical items in different memory locations) I wrote a category method to test if a player contains an item or something identical to it. Yet, I'm still getting the error.

I've seen several posts of people getting this error with MPMoviePlayerController, but I'm not using that custom class, just the out of the box AVQueuePlayer.

Any ideas on how to fix this?

解决方案

There is a similar question.

It does not have an accepted answer, but it seems like plenty of people are having the same problem.
Also, see this post from the Apple Dev Forum.

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

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