排队多个媒体项目 [英] Enqueue multiple media items
问题描述
我可以将多首曲目逐个放入chromecast接收器应用程序中播放吗?
我只想播放一个简单的播放列表。因此,我排队了5条音轨,我的iOS客户端在播放第二条音轨时进入后台模式,并且我希望chromecast接收器应用播放其余3条音轨。
Can I enqueue multiple tracks to be played on a chromecast receiver app one by one? I just want to play a simple playlist. So i enqueue 5 tracks, my iOS client goes into background mode when playing the second track, and I want my chromecast receiver app to play the remaining 3 tracks. Is this possible?
实际上是对 loadMedia:autoplay:
的评论,使我认为这应该可行:
Actually it's comments to the loadMedia:autoplay:
that make me think that this should be possible:
/**
* Loads, **enqueues (at the end of the queue)**, and optionally starts playback of a new media
* item.
*
* @param mediaInfo An object describing the media item to load.
* @param autoplay Whether playback should start immediately.
* @return The request ID, or kGCKInvalidRequestID if the message could not be sent.
*/
- (NSInteger)loadMedia:(GCKMediaInformation *)mediaInfo autoplay:(BOOL)autoplay;
我尝试为两个 mediaInfo
对象,只为第一个设置自动播放,但仍只播放一个曲目。
I tried to call this method for two mediaInfo
objects, setting autoplay only for the first one, but it still plays only one track.
但是除了注释 loadMedia:autoplay:
我没有发现此队列
的任何迹象,如何获得它,如何使项目出队等,所以这只是错误的评论还是这个队列存在于某个地方?
But other than in comments loadMedia:autoplay:
I did not find any indication of this queue
, how I can get it, how I can dequeue items, etc. So is this just a wrong comment or does this queue exist somewhere?
P.S。我要的不是后台播放支持,这要感谢这个问题
P.S. It's not background playback support I am looking for, thanks to this question I know it can not be done, I just want to enqueue multiple items.
推荐答案
对该方法的评论有误,我们已经拥有一个内部错误;它将在下一版本中修复。回到您的问题,当前的样式或默认接收器不具有排队功能。您需要推出自己的自定义接收器;我们有一个 GitHub示例项目,其中显示了如何完成此操作。我们计划在将来的版本中添加此类功能,但尚未宣布具体日期。
The comment on that method is wrong and we already have an internal bug on that; it will be fixed in the next release. Back to your question, the current Styled or Default receiver do not have queuing capabilities; you need to roll out your own custom receiver; we have a GitHub sample project that shows how it can be done. We have plans to add such functionality in the future releases but no date is yet announced for that.
更新:我们的两个接收器现在支持队列以及Cast SDK。有关更多信息,请参见我们的文档。
Update: Our two receivers now support queueing, along with the Cast SDK. See our documentation for more information.
这篇关于排队多个媒体项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!