# GCKMediaLoadRequestData Class

[Properties](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_media_load_request_data#properties) GCKMediaLoadRequestData Class Reference

## Overview

Media load request data.

This class is used by load media commands in `https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_remote_media_client` 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 ||
| [GCKMediaInformation](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_media_information) \* | [mediaInformation](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_media_load_request_data#af55e02553c9894f8a38e3dab82a00404) |
|   | The media item to load. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_media_load_request_data#af55e02553c9894f8a38e3dab82a00404) |
|   ||
| [GCKMediaQueueData](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_media_queue_data) \* | [queueData](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_media_load_request_data#a58f91047fcdba6fb0ecce91ee20fe9bb) |
|   | The metadata of media item or queue. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_media_load_request_data#a58f91047fcdba6fb0ecce91ee20fe9bb) |
|   ||
| NSNumber \* | [autoplay](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_media_load_request_data#acc90ebe7df0923f5492947786615ed4a) |
|   | The flag that indicates whether playback starts immediately after loaded. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_media_load_request_data#acc90ebe7df0923f5492947786615ed4a) |
|   ||
| NSTimeInterval | [startTime](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_media_load_request_data#aa48d23f314020e521038be90719e1e28) |
|   | The initial playback position. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_media_load_request_data#aa48d23f314020e521038be90719e1e28) |
|   ||
| float | [playbackRate](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_media_load_request_data#a31dc167c650c8d1b83d6ff2677583b58) |
|   | The playback rate. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_media_load_request_data#a31dc167c650c8d1b83d6ff2677583b58) |
|   ||
| NSArray\< NSNumber \* \> \* | [activeTrackIDs](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_media_load_request_data#a78ffa5184ac444395862f2efa759f754) |
|   | An array of integers specifying the active tracks. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_media_load_request_data#a78ffa5184ac444395862f2efa759f754) |
|   ||
| id | [customData](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_media_load_request_data#afd73e211218c86906a0e390b9fc9d77e) |
|   | Custom application-specific data to pass along with the request. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_media_load_request_data#afd73e211218c86906a0e390b9fc9d77e) |
|   ||
| NSString \* | [credentials](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_media_load_request_data#acca62f6094168318baa42d594422520b) |
|   | The user credentials for the media item being loaded. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_media_load_request_data#acca62f6094168318baa42d594422520b) |
|   ||
| NSString \* | [credentialsType](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_media_load_request_data#a594ff18bac9c6228c488827235fdff39) |
|   | The type of user credentials specified in [GCKMediaLoadRequestData::credentials](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_media_load_request_data#acca62f6094168318baa42d594422520b "The user credentials for the media item being loaded. "). [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_media_load_request_data#a594ff18bac9c6228c488827235fdff39) |
|   ||
| NSString \* | [atvCredentials](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_media_load_request_data#a9da55c876103275709991de3b72ab9f7) |
|   | The alternate Android TV credentials for the media item being loaded. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_media_load_request_data#a9da55c876103275709991de3b72ab9f7) |
|   ||
| NSString \* | [atvCredentialsType](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_media_load_request_data#a973bb8ac80f5c79d0d018e143d717c68) |
|   | The type of Android TV credentials specified in [GCKMediaLoadRequestData::atvCredentials](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_media_load_request_data#a9da55c876103275709991de3b72ab9f7 "The alternate Android TV credentials for the media item being loaded. "). [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_media_load_request_data#a973bb8ac80f5c79d0d018e143d717c68) |
|   ||

## Property Detail

|---|---|
| |---| | - ([GCKMediaInformation](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_media_information)\*) mediaInformation | | readnonatomiccopy |

The media item to load.

|---|---|
| |---| | - ([GCKMediaQueueData](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_media_queue_data)\*) 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](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_media_queue_item) to be loaded in `queueData`. Only when this field is `nil`, the `autoplay` property of individual [GCKMediaQueueItem](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_media_queue_item) 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](https://developers.google.com/cast/docs/reference/ios/g_c_k_media_common_8h#abe8984fca7b61be2470630190b919c3b), 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**](https://goo.gl/0vd4Q2), 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](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_media_load_request_data#acca62f6094168318baa42d594422520b "The user credentials for the media item being loaded. ").

|---|---|
| |---| | - (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](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_media_load_request_data#acca62f6094168318baa42d594422520b "The user credentials for the media item being loaded. ") 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](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_media_load_request_data#a9da55c876103275709991de3b72ab9f7 "The alternate Android TV credentials for the media item being loaded. ").

If set, this credentials type will override the value set in [GCKMediaLoadRequestData::credentialsType](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_media_load_request_data#a594ff18bac9c6228c488827235fdff39 "The type of user credentials specified in GCKMediaLoadRequestData::credentials. ") if the receiver is an Android TV app. On the receiver side, these credentials can be accessed from [MediaLoadRequestData#getCredentialsType]().

Since
:   4.7.0