GCKMediaLoadRequestData Class

GCKMediaLoadRequestData Class Reference

Overview

Media load request data.

This class is used by load media commands in GCKRemoteMediaClient for specifying how a receiver application should load media.

To load a single item, the item to load should be specified in mediaInformation. To load a non-cloud queue, the queue information should be specified in queueData. Optionally, the information for the first item to play can be specified in mediaInformation. If the queue is a cloud queue, items in can be nil or empty, but entity needs to be specified, so that the receiver app can fetch the queue from the cloud using entity. If neither mediaInformation nor queueData is specified, load requests will fail without sending to receiver applications.

Since
4.4.1

Inherits NSObject, <NSCopying>, and <NSSecureCoding>.

Property Summary

GCKMediaInformationmediaInformation
 The media item to load. More...
 
GCKMediaQueueDataqueueData
 The metadata of media item or queue. More...
 
NSNumber * autoplay
 The flag that indicates whether playback starts immediately after loaded. More...
 
NSTimeInterval startTime
 The initial playback position. More...
 
float playbackRate
 The playback rate. More...
 
NSArray< NSNumber * > * activeTrackIDs
 An array of integers specifying the active tracks. More...
 
id customData
 Custom application-specific data to pass along with the request. More...
 
NSString * credentials
 The user credentials for the media item being loaded. More...
 
NSString * credentialsType
 The type of user credentials specified in GCKMediaLoadRequestData::credentials. More...
 
NSString * atvCredentials
 The alternate Android TV credentials for the media item being loaded. More...
 
NSString * atvCredentialsType
 The type of Android TV credentials specified in GCKMediaLoadRequestData::atvCredentials. More...
 

Property Detail

- (GCKMediaInformation*) mediaInformation
readnonatomiccopy

The media item to load.

- (GCKMediaQueueData*) queueData
readnonatomiccopy

The metadata of media item or queue.

- (NSNumber*) autoplay
readnonatomiccopy

The flag that indicates whether playback starts immediately after loaded.

The default value is @(YES).

When loading a queue by specifying the queue items in queueData, this value overrides the autoplay of the first GCKMediaQueueItem to be loaded in queueData. Only when this field is nil, the autoplay property of individual GCKMediaQueueItem in queueData will take effect.

When loading a single item by specifying the mediaInformation, this field specifies whether the playback should start upon load. If nil, playback will not start immediately.

- (NSTimeInterval) startTime
readnonatomicassign

The initial playback position.

The default value is kGCKInvalidTimeInterval, which indicates a default playback position. If playing Video-On-Demand streams, it starts from 0; if playing live streams, it starts from live edge.

- (float) playbackRate
readnonatomicassign

The playback rate.

The default value is 1.

- (NSArray<NSNumber *>*) activeTrackIDs
readnonatomicstrong

An array of integers specifying the active tracks.

The default value is nil.

- (id) customData
readnonatomicstrong

Custom application-specific data to pass along with the request.

Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil.

- (NSString*) credentials
readnonatomiccopy

The user credentials for the media item being loaded.

- (NSString*) credentialsType
readnonatomiccopy

The type of user credentials specified in GCKMediaLoadRequestData::credentials.

- (NSString*) atvCredentials
readnonatomiccopy

The alternate Android TV credentials for the media item being loaded.

If set, these credentials will override the value set in GCKMediaLoadRequestData::credentials if the receiver is an Android TV app. On the receiver side, these credentials can be accessed from MediaLoadRequestData#getCredentials.

Since
4.7.0
- (NSString*) atvCredentialsType
readnonatomiccopy

The type of Android TV credentials specified in GCKMediaLoadRequestData::atvCredentials.

If set, this credentials type will override the value set in GCKMediaLoadRequestData::credentialsType if the receiver is an Android TV app. On the receiver side, these credentials can be accessed from MediaLoadRequestData#getCredentialsType.

Since
4.7.0