# GCKMediaStatus Class

[Instance Methods](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#pub-methods) \| [Public Attributes](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#pub-attribs) \| [Properties](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#properties) GCKMediaStatus Class Reference

## Overview

A class that holds status information about some media.

Inherits NSObject. Implements \<NSCopying\>.

|---|---|
| ## Instance Method Summary ||
| (BOOL) | - [queueHasNextItem](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#add5b06cf95bd6d91da06dae74f47ead5) |
|   | Checks if there is an item after the currently playing item in the queue. [More...](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#add5b06cf95bd6d91da06dae74f47ead5) |
|   ||
| (instancetype) | - [initWithSessionID:mediaInformation:](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#aadd4dda67a6f8838489022998c5474d1) |
|   | Designated initializer. [More...](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#aadd4dda67a6f8838489022998c5474d1) |
|   ||
| (BOOL) | - [isMediaCommandSupported:](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#aa612708df493352fed3c5930898c666d) |
|   | Checks if the stream supports a given control command. [More...](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#aa612708df493352fed3c5930898c666d) |
|   ||
| (NSUInteger) | - [queueItemCount](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#a2ba0ff0a3da66b18520c2858388bc58d) |
|   | Returns the number of items in the playback queue. [More...](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#a2ba0ff0a3da66b18520c2858388bc58d) |
|   ||
| ([GCKMediaQueueItem](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_queue_item) \*__nullable) | - [queueItemAtIndex:](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#ad1417e02dca50f0cfd5841c614bd41fa) |
|   | Returns the item at the specified index in the playback queue. [More...](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#ad1417e02dca50f0cfd5841c614bd41fa) |
|   ||
| ([GCKMediaQueueItem](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_queue_item) \*__nullable) | - [queueItemWithItemID:](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#a37f3c48f1135d9d6e13ffe9488866dcf) |
|   | Returns the item with the given item ID in the playback queue. [More...](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#a37f3c48f1135d9d6e13ffe9488866dcf) |
|   ||
| (NSInteger) | - [queueIndexForItemID:](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#ac0407f801af92ae8803d89fbcd56da36) |
|   | Returns the index of the item with the given item ID in the playback queue, or -1 if there is no such item in the queue. [More...](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#ac0407f801af92ae8803d89fbcd56da36) |
|   ||

|---|---|
| ## Public Attributes ||
| const NSInteger | [kGCKMediaCommandPause](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#a79650b352abd354507df724f9512d3f7) |
|   | A flag (bitmask) indicating that a media item can be paused. [More...](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#a79650b352abd354507df724f9512d3f7) |
|   ||
| const NSInteger | [kGCKMediaCommandSeek](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#a27092a9597121812a8f574a3125e8f8a) |
|   | A flag (bitmask) indicating that a media item supports seeking. [More...](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#a27092a9597121812a8f574a3125e8f8a) |
|   ||
| const NSInteger | [kGCKMediaCommandSetVolume](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#a709bac813198b4cb1c6da24c1dedbda8) |
|   | A flag (bitmask) indicating that a media item's audio volume can be changed. [More...](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#a709bac813198b4cb1c6da24c1dedbda8) |
|   ||
| const NSInteger | [kGCKMediaCommandToggleMute](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#a07d51a9ccfeb248503892694d72e2820) |
|   | A flag (bitmask) indicating that a media item's audio can be muted. [More...](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#a07d51a9ccfeb248503892694d72e2820) |
|   ||
| const NSInteger | [kGCKMediaCommandSkipForward](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#ac6d35162cc60f760e2caa1b4440361f2) |
|   | A flag (bitmask) indicating that a media item supports skipping forward. [More...](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#ac6d35162cc60f760e2caa1b4440361f2) |
|   ||
| const NSInteger | [kGCKMediaCommandSkipBackward](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#a910ec17cc395ec810301de3a262ebc25) |
|   | A flag (bitmask) indicating that a media item supports skipping backward. [More...](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#a910ec17cc395ec810301de3a262ebc25) |
|   ||
| const NSInteger | [kGCKMediaCommandQueueNext](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#a5772c175c394be170163042e9662ba1d) |
|   | A flag (bitmask) indicating that a media item supports moving to the next item in the queue. [More...](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#a5772c175c394be170163042e9662ba1d) |
|   ||
| const NSInteger | [kGCKMediaCommandQueuePrevious](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#a64ba3e065c907417cfc0e308dfde9ca5) |
|   | A flag (bitmask) indicating that a media item supports moving to the previous item in the queue. [More...](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#a64ba3e065c907417cfc0e308dfde9ca5) |
|   ||

|---|---|
| ## Property Summary ||
| NSInteger | [mediaSessionID](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#a45e3eb39e674f5d0dbfd78deef77a1e6) |
|   | The current media session ID, if any; otherwise 0. [More...](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#a45e3eb39e674f5d0dbfd78deef77a1e6) |
|   ||
| [GCKMediaPlayerState](https://developers.google.com/cast/v3/reference/ios/g_c_k_media_status_8h#ae2742cc7441bbceea50f19ab3b6a68f9) | [playerState](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#aee0632f2c4a651a5b8973a36e43f4429) |
|   | The current player state. [More...](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#aee0632f2c4a651a5b8973a36e43f4429) |
|   ||
| BOOL | [playingAd](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#ae859327cb01f11a65ffd8a34b2078db3) |
|   | Indicates whether the receiver is currently playing an ad. [More...](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#ae859327cb01f11a65ffd8a34b2078db3) |
|   ||
| [GCKMediaPlayerIdleReason](https://developers.google.com/cast/v3/reference/ios/g_c_k_media_status_8h#a12c410307dde5e7658c51c851ef4bf3f) | [idleReason](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#ae186966cff73637b9f6fe25036e0cb88) |
|   | The current idle reason. [More...](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#ae186966cff73637b9f6fe25036e0cb88) |
|   ||
| float | [playbackRate](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#a9120445178e50940979efbc1a30446df) |
|   | Gets the current stream playback rate. [More...](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#a9120445178e50940979efbc1a30446df) |
|   ||
| [GCKMediaInformation](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_information) \* | [mediaInformation](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#ad47718ad712890353e1dd1feff0d4995) |
|   | The [GCKMediaInformation](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_information "A class that aggregates information about a media item. ") for this item. [More...](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#ad47718ad712890353e1dd1feff0d4995) |
|   ||
| NSTimeInterval | [streamPosition](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#abefec3bbfed12540324997955d6ef320) |
|   | The current stream position, as an NSTimeInterval from the start of the stream. [More...](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#abefec3bbfed12540324997955d6ef320) |
|   ||
| float | [volume](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#ab654427994344ddc9a4f9b8e7f0211d7) |
|   | The stream's volume. [More...](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#ab654427994344ddc9a4f9b8e7f0211d7) |
|   ||
| BOOL | [isMuted](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#a2dcaedc0f57134f1b6bc04d3d053ff71) |
|   | The stream's mute state. [More...](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#a2dcaedc0f57134f1b6bc04d3d053ff71) |
|   ||
| [GCKMediaRepeatMode](https://developers.google.com/cast/v3/reference/ios/g_c_k_media_common_8h#aad72b610da8ac7e1785975bd5f251406) | [queueRepeatMode](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#ae08d7ba84c83fbb3bb6406410ab16923) |
|   | The current queue repeat mode. [More...](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#ae08d7ba84c83fbb3bb6406410ab16923) |
|   ||
| NSUInteger | [currentItemID](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#a1818b62cd378f6648d06042dce494c58) |
|   | The ID of the current queue item, if any. [More...](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#a1818b62cd378f6648d06042dce494c58) |
|   ||
| BOOL | [queueHasCurrentItem](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#ade1e8ae4f24eb671eacaa1d4a1126f9f) |
|   | Whether there is a current item in the queue. [More...](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#ade1e8ae4f24eb671eacaa1d4a1126f9f) |
|   ||
| [GCKMediaQueueItem](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_queue_item) \* | [currentQueueItem](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#a088db362397602527929ac372f427ae0) |
|   | The current queue item, if any. [More...](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#a088db362397602527929ac372f427ae0) |
|   ||
| [GCKMediaQueueItem](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_queue_item) \* | [nextQueueItem](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#ae79dae87514ffbfbaa8ff28f3aade914) |
|   | The next queue item, if any. [More...](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#ae79dae87514ffbfbaa8ff28f3aade914) |
|   ||
| BOOL | [queueHasPreviousItem](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#a9f2b96e46d019ad0462fcab45e7a3a6e) |
|   | Whether there is an item before the currently playing item in the queue. [More...](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#a9f2b96e46d019ad0462fcab45e7a3a6e) |
|   ||
| BOOL | [queueHasLoadingItem](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#accef5fcd8abd914164b414b5973b848a) |
|   | Whether there is an item being preloaded in the queue. [More...](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#accef5fcd8abd914164b414b5973b848a) |
|   ||
| NSUInteger | [preloadedItemID](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#aca544cb983806b859c0d62c6e1438150) |
|   | The ID of the item that is currently preloaded, if any. [More...](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#aca544cb983806b859c0d62c6e1438150) |
|   ||
| NSUInteger | [loadingItemID](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#a0676da67792f35cbea8de2bc9015b05d) |
|   | The ID of the item that is currently loading, if any. [More...](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#a0676da67792f35cbea8de2bc9015b05d) |
|   ||
| NSArray\< NSNumber \* \> \* | [activeTrackIDs](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#a56b43ac0a3e971eb16ffe71dbb431182) |
|   | The list of active track IDs. [More...](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#a56b43ac0a3e971eb16ffe71dbb431182) |
|   ||
| [GCKVideoInfo](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_video_info) \* | [videoInfo](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#afda90a92cefa41acec3d1c47013cee6f) |
|   | The video information, if any. [More...](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#afda90a92cefa41acec3d1c47013cee6f) |
|   ||
| id | [customData](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#a8cae9ca8d42c56fb580d9056a3ec9d86) |
|   | Any custom data that is associated with the media status. [More...](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#a8cae9ca8d42c56fb580d9056a3ec9d86) |
|   ||
| [GCKAdBreakStatus](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_ad_break_status) \* | [adBreakStatus](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#aa71b3c76bc241f698b432df9b2d88794) |
|   | The current ad playback status. [More...](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#aa71b3c76bc241f698b432df9b2d88794) |
|   ||

## Method Detail

|---|---|---|---|
| - (BOOL) queueHasNextItem |   |   |   |

Checks if there is an item after the currently playing item in the queue.

|---|---|---|---|
| - (instancetype) initWithSessionID: |   | (NSInteger) | *mediaSessionID* |
| mediaInformation: |   | ([GCKMediaInformation](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_information) \*__nullable) | *mediaInformation* |
|   |   |   |   |

Designated initializer.

Parameters
:

    |---|---|
    | mediaSessionID | The media session ID. |
    | mediaInformation | The media information. |


|---|---|---|---|---|
| - (BOOL) isMediaCommandSupported: |   | (NSInteger) | *command* |   |

Checks if the stream supports a given control command.

|---|---|---|---|
| - (NSUInteger) queueItemCount |   |   |   |

Returns the number of items in the playback queue.

|---|---|---|---|---|
| - ([GCKMediaQueueItem](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_queue_item) \*__nullable) queueItemAtIndex: |   | (NSUInteger) | *index* |   |

Returns the item at the specified index in the playback queue.

|---|---|---|---|---|
| - ([GCKMediaQueueItem](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_queue_item) \*__nullable) queueItemWithItemID: |   | (NSUInteger) | *itemID* |   |

Returns the item with the given item ID in the playback queue.

|---|---|---|---|---|
| - (NSInteger) queueIndexForItemID: |   | (NSUInteger) | *itemID* |   |

Returns the index of the item with the given item ID in the playback queue, or -1 if there is no such item in the queue.

## Member Data Documentation

|---|
| - (const NSInteger) kGCKMediaCommandPause |

A flag (bitmask) indicating that a media item can be paused.

|---|
| - (const NSInteger) kGCKMediaCommandSeek |

A flag (bitmask) indicating that a media item supports seeking.

|---|
| - (const NSInteger) kGCKMediaCommandSetVolume |

A flag (bitmask) indicating that a media item's audio volume can be changed.

|---|
| - (const NSInteger) kGCKMediaCommandToggleMute |

A flag (bitmask) indicating that a media item's audio can be muted.

|---|
| - (const NSInteger) kGCKMediaCommandSkipForward |

A flag (bitmask) indicating that a media item supports skipping forward.

|---|
| - (const NSInteger) kGCKMediaCommandSkipBackward |

A flag (bitmask) indicating that a media item supports skipping backward.

|---|
| - (const NSInteger) kGCKMediaCommandQueueNext |

A flag (bitmask) indicating that a media item supports moving to the next item in the queue.

**[Deprecated:](https://developers.google.com/cast/v3/reference/ios/deprecated#_deprecated000031)**
:   This flag is currently not implemented.

|---|
| - (const NSInteger) kGCKMediaCommandQueuePrevious |

A flag (bitmask) indicating that a media item supports moving to the previous item in the queue.

**[Deprecated:](https://developers.google.com/cast/v3/reference/ios/deprecated#_deprecated000032)**
:   This flag is currently not implemented.

## Property Detail

|---|---|
| |---| | - (NSInteger) mediaSessionID | | readnonatomicassign |

The current media session ID, if any; otherwise 0.

|---|---|
| |---| | - ([GCKMediaPlayerState](https://developers.google.com/cast/v3/reference/ios/g_c_k_media_status_8h#ae2742cc7441bbceea50f19ab3b6a68f9)) playerState | | readnonatomicassign |

The current player state.

|---|---|
| |---| | - (BOOL) playingAd | | readnonatomicassign |

Indicates whether the receiver is currently playing an ad.

**[Deprecated:](https://developers.google.com/cast/v3/reference/ios/deprecated#_deprecated000033)**
:   Use [adBreakStatus](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_status#aa71b3c76bc241f698b432df9b2d88794) instead.

|---|---|
| |---| | - ([GCKMediaPlayerIdleReason](https://developers.google.com/cast/v3/reference/ios/g_c_k_media_status_8h#a12c410307dde5e7658c51c851ef4bf3f)) idleReason | | readnonatomicassign |

The current idle reason.

This value is only meaningful if the player state is GCKMediaPlayerStateIdle.

|---|---|
| |---| | - (float) playbackRate | | readnonatomicassign |

Gets the current stream playback rate.

This will be negative if the stream is seeking backwards, 0 if the stream is paused, 1 if the stream is playing normally, and some other postive value if the stream is seeking forwards.

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

The [GCKMediaInformation](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_information "A class that aggregates information about a media item. ") for this item.

|---|---|
| |---| | - (NSTimeInterval) streamPosition | | readnonatomicassign |

The current stream position, as an NSTimeInterval from the start of the stream.

|---|---|
| |---| | - (float) volume | | readnonatomicassign |

The stream's volume.

|---|---|
| |---| | - (BOOL) isMuted | | readnonatomicassign |

The stream's mute state.

|---|---|
| |---| | - ([GCKMediaRepeatMode](https://developers.google.com/cast/v3/reference/ios/g_c_k_media_common_8h#aad72b610da8ac7e1785975bd5f251406)) queueRepeatMode | | readnonatomicassign |

The current queue repeat mode.

|---|---|
| |---| | - (NSUInteger) currentItemID | | readnonatomicassign |

The ID of the current queue item, if any.

|---|---|
| |---| | - (BOOL) queueHasCurrentItem | | readnonatomicassign |

Whether there is a current item in the queue.

|---|---|
| |---| | - ([GCKMediaQueueItem](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_queue_item)\*) currentQueueItem | | readnonatomicassign |

The current queue item, if any.

|---|---|
| |---| | - ([GCKMediaQueueItem](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_media_queue_item)\*) nextQueueItem | | readnonatomicassign |

The next queue item, if any.

|---|---|
| |---| | - (BOOL) queueHasPreviousItem | | readnonatomicassign |

Whether there is an item before the currently playing item in the queue.

|---|---|
| |---| | - (BOOL) queueHasLoadingItem | | readnonatomicassign |

Whether there is an item being preloaded in the queue.

|---|---|
| |---| | - (NSUInteger) preloadedItemID | | readnonatomicassign |

The ID of the item that is currently preloaded, if any.

|---|---|
| |---| | - (NSUInteger) loadingItemID | | readnonatomicassign |

The ID of the item that is currently loading, if any.

|---|---|
| |---| | - (NSArray\<NSNumber \*\>\*) activeTrackIDs | | readnonatomicstrong |

The list of active track IDs.

|---|---|
| |---| | - ([GCKVideoInfo](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_video_info)\*) videoInfo | | readnonatomicstrong |

The video information, if any.

Since
:   3.3

|---|---|
| |---| | - (id) customData | | readnonatomicstrong |

Any custom data that is associated with the media status.

|---|---|
| |---| | - ([GCKAdBreakStatus](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_ad_break_status)\*) adBreakStatus | | readnonatomicstrong |

The current ad playback status.

Since
:   3.3