Domanda

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?

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;

I tried to call this method for two mediaInfo objects, setting autoplay only for the first one, but it still plays only one track.

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. 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.

È stato utile?

Soluzione

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.

Update: Our two receivers now support queueing, along with the Cast SDK. See our documentation for more information.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top