# GCKUIMediaController Class

[Instance Methods](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#pub-methods) \| [Properties](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#properties) GCKUIMediaController Class Reference

## Overview

A controller for UI views that are used to control or display the status of media playback on a Cast receiver.

The calling application registers its media-related UI controls with the controller by setting the appropriate properties. The controller then responds to touch events on the controls by issuing the appropriate media commands to the receiver, and updates the controls based on status information and media metadata received from the receiver. The controller automatically enables and disables the UI controls as appropriate for the current session and media player state. It additionally disables all of the controls while a request is in progress.

See [GCKUIMediaControllerDelegate](https://developers.google.com/cast/docs/reference/ios/protocol_g_c_k_u_i_media_controller_delegate-p "The GCKUIMediaController delegate protocol. ") for the delegate protocol.

Since
:   3.0

Inherits NSObject.

|---|---|
| ## Instance Method Summary ||
| (instancetype) | - [init](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#a13105fd31eb814058541045694bfba63) |
|   | Initializes an instance. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#a13105fd31eb814058541045694bfba63) |
|   ||
| (void) | - [bindLabel:toMetadataKey:](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#a0c200f8fc86f80ce2cca37d4c68570d6) |
|   | Binds a [**UILabel**](https://goo.gl/POkr7n) to a metadata key. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#a0c200f8fc86f80ce2cca37d4c68570d6) |
|   ||
| (void) | - [bindLabel:toMetadataKey:withFormatter:](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#afc0a0463b84a708895e30334e9d5ada9) |
|   | Binds a [**UILabel**](https://goo.gl/POkr7n) to a metadata key. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#afc0a0463b84a708895e30334e9d5ada9) |
|   ||
| (void) | - [bindTextView:toMetadataKey:](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#aac07e6c9eeaba8f3e11581dfa3944e83) |
|   | Binds a [**UITextView**](https://goo.gl/ncWBFi) to a metadata key. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#aac07e6c9eeaba8f3e11581dfa3944e83) |
|   ||
| (void) | - [bindTextView:toMetadataKey:withFormatter:](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#aa2178180c804bf249319380e9cd9d36e) |
|   | Binds a [**UITextView**](https://goo.gl/ncWBFi) to a metadata key. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#aa2178180c804bf249319380e9cd9d36e) |
|   ||
| (void) | - [bindImageView:toImageHints:](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#a2fe6ef4026cf58cb2509bc88e8f9a4c5) |
|   | Binds a [**UIImageView**](https://goo.gl/8Eb8FS) to a [GCKUIImageHints](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_image_hints "An object that provides hints to a GCKUIImagePicker about the type and size of an image to be selecte...") instance. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#a2fe6ef4026cf58cb2509bc88e8f9a4c5) |
|   ||
| (void) | - [bindControlView:toRewindForTime:](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#a7d1d2112e6cdb11676f169a6b557020e) |
|   | Binds a `UIControl` to rewind playback of the current item by the passed value as seconds. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#a7d1d2112e6cdb11676f169a6b557020e) |
|   ||
| (void) | - [bindControlView:toForwardForTime:](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#a203bb492805cdc8e97865190a8220a33) |
|   | Binds a `UIControl` to forward playback of the current item by the passed value as seconds. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#a203bb492805cdc8e97865190a8220a33) |
|   ||
| (void) | - [unbindView:](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#a76431304d082ce85fb9a1af4be85a004) |
|   | Unbinds the specified view. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#a76431304d082ce85fb9a1af4be85a004) |
|   ||
| (void) | - [unbindAllViews](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#a45b82f188f86040ed26e3ac65f276ede) |
|   | Unbinds all bound views. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#a45b82f188f86040ed26e3ac65f276ede) |
|   ||
| ([GCKMediaRepeatMode](https://developers.google.com/cast/docs/reference/ios/g_c_k_media_common_8h#aad72b610da8ac7e1785975bd5f251406)) | - [cycleRepeatMode](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#a95aebba061fe81882590d11c850d441a) |
|   | Changes the repeat mode for the queue to the next mode in the cycle: [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#a95aebba061fe81882590d11c850d441a) |
|   ||
| (void) | - [selectTracks](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#af4f300c896e31b92b6d7be8f6d74e381) |
|   | A convenience method for displaying the media track selection UI. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#af4f300c896e31b92b6d7be8f6d74e381) |
|   ||
| (void) | - [skipAd](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#afa6bac90bd04697c04429d4d12341d1b) |
|   | Sends and monitors the skip ad request. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#afa6bac90bd04697c04429d4d12341d1b) |
|   ||

|---|---|
| ## Property Summary ||
| id\< [GCKUIMediaControllerDelegate](https://developers.google.com/cast/docs/reference/ios/protocol_g_c_k_u_i_media_controller_delegate-p) \> | [delegate](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#a96f6d9658c73f254c1a92847f003b716) |
|   | The delegate for receiving notificatiosn from the [GCKUIMediaController](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller "A controller for UI views that are used to control or display the status of media playback on a Cast ..."). [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#a96f6d9658c73f254c1a92847f003b716) |
|   ||
| [GCKSession](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_session) \* | [session](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#ad67730071071cfcaf6ed464499f4f762) |
|   | The session that is associated with this controller. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#ad67730071071cfcaf6ed464499f4f762) |
|   ||
| BOOL | [mediaLoaded](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#abd4e9ea701f349a25bb7eb052412c041) |
|   | Whether there is media currently loaded (or loading) on the receiver. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#abd4e9ea701f349a25bb7eb052412c041) |
|   ||
| BOOL | [hasCurrentQueueItem](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#adcd5a6def6e3f3276bf2c0725b963852) |
|   | Whether there is a current item in the queue. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#adcd5a6def6e3f3276bf2c0725b963852) |
|   ||
| BOOL | [hasLoadingQueueItem](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#aa23f7874b1e634ba5e66ad895928c6ba) |
|   | Whether there is an item being preloaded in the queue. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#aa23f7874b1e634ba5e66ad895928c6ba) |
|   ||
| GCKMediaPlayerState | [lastKnownPlayerState](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#a9b23683aee1efdc17a91ff5a5f6ef727) |
|   | The latest known media player state. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#a9b23683aee1efdc17a91ff5a5f6ef727) |
|   ||
| NSTimeInterval | [lastKnownStreamPosition](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#a33079ce4e9d9ade209c33e0a0149270a) |
|   | The latest known media stream position. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#a33079ce4e9d9ade209c33e0a0149270a) |
|   ||
| UIButton \* | [playButton](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#aff382663db72802dab2a36420e8162e5) |
|   | A "play" button. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#aff382663db72802dab2a36420e8162e5) |
|   ||
| UIButton \* | [pauseButton](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#a66e64230d9acb7f6e0a0034286dc4f6f) |
|   | A "pause" button. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#a66e64230d9acb7f6e0a0034286dc4f6f) |
|   ||
| [GCKUIMultistateButton](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_multistate_button) \* | [playPauseToggleButton](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#aeb3a557a6bf645d2ff0d2abefad5e929) |
|   | A "play/pause" toggle button. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#aeb3a557a6bf645d2ff0d2abefad5e929) |
|   ||
| [GCKUIPlayPauseToggleController](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_play_pause_toggle_controller) \* | [playPauseToggleController](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#a7dfecd722e535a2821235a29e7f2a9f0) |
|   | A "play/pause" toggle controller. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#a7dfecd722e535a2821235a29e7f2a9f0) |
|   ||
| UIButton \* | [stopButton](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#af0fca84449d7b5a743cfaa35c9837ecd) |
|   | A "stop" button. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#af0fca84449d7b5a743cfaa35c9837ecd) |
|   ||
| UIButton \* | [forward30SecondsButton](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#af65b4489534c8a2413642d45601f5114) |
|   | A button for seeking 30 seconds forward in the currently playing media item. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#af65b4489534c8a2413642d45601f5114) |
|   ||
| UIButton \* | [rewind30SecondsButton](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#a967f0d0412debb1122218cd7a3032696) |
|   | A button for seeking 30 seconds back in the currently playing media item. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#a967f0d0412debb1122218cd7a3032696) |
|   ||
| UIButton \* | [pauseQueueButton](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#a0254771843bbd87c3d83c6d6313bc038) |
|   | A button for pausing queue playback once the current item finishes playing. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#a0254771843bbd87c3d83c6d6313bc038) |
|   ||
| UIButton \* | [nextButton](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#a95b7a03df2bd0415a5109c84e36f18c5) |
|   | A "next" button. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#a95b7a03df2bd0415a5109c84e36f18c5) |
|   ||
| UIButton \* | [previousButton](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#a310fcb88041028650eb26fd58bd6086c) |
|   | A "previous" button. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#a310fcb88041028650eb26fd58bd6086c) |
|   ||
| [GCKUIMultistateButton](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_multistate_button) \* | [repeatModeButton](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#aba998f08e7a22b1a3004bceab09626d1) |
|   | A button for cycling through the available queue repeat modes. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#aba998f08e7a22b1a3004bceab09626d1) |
|   ||
| UISlider \* | [streamPositionSlider](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#a966dcdf42029ef49fa45c207719f3080) |
|   | A slider for displaying and changing the current stream position. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#a966dcdf42029ef49fa45c207719f3080) |
|   ||
| UIProgressView \* | [streamProgressView](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#a840b3784c224ab01d95d91c56cee6aa8) |
|   | A view for displaying the current stream progress. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#a840b3784c224ab01d95d91c56cee6aa8) |
|   ||
| UILabel \* | [streamPositionLabel](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#a1f507fa4b29f5b4f536448990621bce4) |
|   | A label for displaying the current stream position, in minutes and seconds. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#a1f507fa4b29f5b4f536448990621bce4) |
|   ||
| UILabel \* | [streamDurationLabel](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#a009e0d6a0ca8485dbbb3e6cbdf75b34b) |
|   | A label for displaying the current stream duration, in minutes and seconds. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#a009e0d6a0ca8485dbbb3e6cbdf75b34b) |
|   ||
| UILabel \* | [streamTimeRemainingLabel](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#a69e4ab24fd5f70bb68f9fc1ab9ed1331) |
|   | A label for displaying the remaining stream time (the duration minus the position), in minutes and seconds. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#a69e4ab24fd5f70bb68f9fc1ab9ed1331) |
|   ||
| [GCKUIStreamPositionController](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_stream_position_controller) \* | [streamPositionController](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#a77a4659359cff6da1ff74d3f947d4295) |
|   | A stream posdition controller. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#a77a4659359cff6da1ff74d3f947d4295) |
|   ||
| [GCKUIPlaybackRateController](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_playback_rate_controller) \* | [playbackRateController](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#a71c1d096b0dc5234f9b6fdd79ef38a5e) |
|   | A stream playback rate controller. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#a71c1d096b0dc5234f9b6fdd79ef38a5e) |
|   ||
| BOOL | [displayTimeRemainingAsNegativeValue](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#a6552bae7e6f6f5faeda20a6bc08f2b48) |
|   | Whether remaining stream time will be displayed as a negative value, for example, "-1:23:45". [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#a6552bae7e6f6f5faeda20a6bc08f2b48) |
|   ||
| BOOL | [hideStreamPositionControlsForLiveContent](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#a68e89ae8f92af71cd2b45beb82e5d49f) |
|   | Whether stream position controls (including the stream position slider, the stream position label, the stream duration label, and the stream progress view) should be hidden for live content. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#a68e89ae8f92af71cd2b45beb82e5d49f) |
|   ||
| UIButton \* | [tracksButton](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#a6414a43036ac0b8f7b7ceaafe0d9458f) |
|   | A button for selecting audio tracks and/or closed captions or subtitles. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#a6414a43036ac0b8f7b7ceaafe0d9458f) |
|   ||
| UILabel \* | [smartSubtitleLabel](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#a756f4fda29401737e02d5847729936a0) |
|   | A label for displaying a subtitle for the currently loaded media. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#a756f4fda29401737e02d5847729936a0) |
|   ||
| UIActivityIndicatorView \* | [mediaLoadingIndicator](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#abed391cd0bc5c923e4859d5964616087) |
|   | An activity indicator view for indicating that the media is in a loading state. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#abed391cd0bc5c923e4859d5964616087) |
|   ||
| UILabel \* | [skipAdLabel](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#a9baea7f6a52143bf16ff1d054b9c675a) |
|   | A label for displaying the amount of time left until the ad can be skipped. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#a9baea7f6a52143bf16ff1d054b9c675a) |
|   ||
| UIButton \* | [skipAdButton](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#acab00dbad152aed4f0722b1e39f4dcc4) |
|   | A button for skipping the current ad. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller#acab00dbad152aed4f0722b1e39f4dcc4) |
|   ||

## Method Detail

|---|---|---|---|
| - (instancetype) init |   |   |   |

Initializes an instance.

|---|---|---|---|
| - (void) bindLabel: |   | (UILabel \*) | *label* |
| toMetadataKey: |   | (NSString \*) | *key* |
|   |   |   |   |

Binds a [**UILabel**](https://goo.gl/POkr7n) to a metadata key.

The view will display the current value of the corresponding metadata field.

See [GCKMediaMetadata](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_media_metadata "A container for media metadata. ") for a list of predefined metadata keys.

Parameters
:

    |---|---|
    | label | The [**UILabel**](https://goo.gl/POkr7n) that will display the value. |
    | key | The metadata key. |


|---|---|---|---|
| - (void) bindLabel: |   | (UILabel \*) | *label* |
| toMetadataKey: |   | (NSString \*) | *key* |
| withFormatter: |   | ([GCKUIValueFormatter](https://developers.google.com/cast/docs/reference/ios/g_c_k_u_i_media_controller_8h#a242c6aa3a97fda98bcad480512884cba)) | *formatter* |
|   |   |   |   |

Binds a [**UILabel**](https://goo.gl/POkr7n) to a metadata key.

The view will display the current value of the corresponding metadata field.

See [GCKMediaMetadata](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_media_metadata "A container for media metadata. ") for a list of predefined metadata keys.

Parameters
:

    |---|---|
    | label | The [**UILabel**](https://goo.gl/POkr7n) that will display the value. |
    | key | The metadata key. |
    | formatter | A block that will produce the desired string representation of the value. |


|---|---|---|---|
| - (void) bindTextView: |   | (UITextView \*) | *textView* |
| toMetadataKey: |   | (NSString \*) | *key* |
|   |   |   |   |

Binds a [**UITextView**](https://goo.gl/ncWBFi) to a metadata key.

The view will display the current value of the corresponding metadata field.

See [GCKMediaMetadata](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_media_metadata "A container for media metadata. ") for a list of predefined metadata keys.

Parameters
:

    |---|---|
    | textView | The [**UITextView**](https://goo.gl/ncWBFi) that will display the value. |
    | key | The metadata key. |


|---|---|---|---|
| - (void) bindTextView: |   | (UITextView \*) | *textView* |
| toMetadataKey: |   | (NSString \*) | *key* |
| withFormatter: |   | ([GCKUIValueFormatter](https://developers.google.com/cast/docs/reference/ios/g_c_k_u_i_media_controller_8h#a242c6aa3a97fda98bcad480512884cba)) | *formatter* |
|   |   |   |   |

Binds a [**UITextView**](https://goo.gl/ncWBFi) to a metadata key.

The view will display the current value of the corresponding metadata field.

See [GCKMediaMetadata](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_media_metadata "A container for media metadata. ") for a list of predefined metadata keys.

Parameters
:

    |---|---|
    | textView | The [**UITextView**](https://goo.gl/ncWBFi) that will display the value. |
    | key | The metadata key. |
    | formatter | A block that will produce the desired string representation of the value. |


|---|---|---|---|
| - (void) bindImageView: |   | (UIImageView \*) | *imageView* |
| toImageHints: |   | ([GCKUIImageHints](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_image_hints) \*) | *imageHints* |
|   |   |   |   |

Binds a [**UIImageView**](https://goo.gl/8Eb8FS) to a [GCKUIImageHints](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_image_hints "An object that provides hints to a GCKUIImagePicker about the type and size of an image to be selecte...") instance.

The currently installed [GCKUIImagePicker](https://developers.google.com/cast/docs/reference/ios/protocol_g_c_k_u_i_image_picker-p "An object used for selecting an image for a given purpose from a GCKMediaMetadata object...") will be used to select an image from the metadata for the view.

Parameters
:

    |---|---|
    | imageView | The [**UIImageView**](https://goo.gl/8Eb8FS) that will display the selected image. |
    | imageHints | The image hints. |


|---|---|---|---|
| - (void) bindControlView: |   | (UIControl \*) | *control* |
| toRewindForTime: |   | (NSTimeInterval) | *rewindSeconds* |
|   |   |   |   |

Binds a `UIControl` to rewind playback of the current item by the passed value as seconds.

The view will be updated based on `https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_cast_session` state, the remote playback state and whether it is a livestream. A target is also added to the `UIControl` to capture `UIControlEventTouchUpInside` event. Do not add target of this type on the `UIControl`. To capture the event use the `https://developers.google.com/cast/docs/reference/ios/protocol_g_c_k_u_i_media_controller_delegate-p` methods instead.

Parameters
:

    |---|---|
    | control | The UI element that the user interacts with. Typically this would be an instance of `UIButton`. |
    | rewindSeconds | The number of seconds to rewind the media. |


|---|---|---|---|
| - (void) bindControlView: |   | (UIControl \*) | *control* |
| toForwardForTime: |   | (NSTimeInterval) | *forwardSeconds* |
|   |   |   |   |

Binds a `UIControl` to forward playback of the current item by the passed value as seconds.

The view will be updated based on `https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_cast_session` state, the remote playback state and whether it is a livestream. A target is also added to the `UIControl` to capture `UIControlEventTouchUpInside` event. Do not add target of this type on the `UIControl`. To capture the event use the `https://developers.google.com/cast/docs/reference/ios/protocol_g_c_k_u_i_media_controller_delegate-p` methods instead.

Parameters
:

    |---|---|
    | control | The UI element that the user interacts with. Typically this would be an instance of `UIButton`. |
    | forwardSeconds | The number of seconds to skip the media. |


|---|---|---|---|---|
| - (void) unbindView: |   | (UIView \*) | *view* |   |

Unbinds the specified view.

Parameters
:

    |---|---|
    | view | The view to unbind. |


|---|---|---|---|
| - (void) unbindAllViews |   |   |   |

Unbinds all bound views.

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

Changes the repeat mode for the queue to the next mode in the cycle:

[GCKMediaRepeatModeOff](https://developers.google.com/cast/docs/reference/ios/g_c_k_media_common_8h#aad72b610da8ac7e1785975bd5f251406a33da7481895a55310fdcf1670cb30299) → [GCKMediaRepeatModeAll](https://developers.google.com/cast/docs/reference/ios/g_c_k_media_common_8h#aad72b610da8ac7e1785975bd5f251406aa2bb146f64f9f7067cc9b819dbd55d2b) → [GCKMediaRepeatModeSingle](https://developers.google.com/cast/docs/reference/ios/g_c_k_media_common_8h#aad72b610da8ac7e1785975bd5f251406a6c835238547a4ba67cd7db743fc71174) → [GCKMediaRepeatModeAllAndShuffle](https://developers.google.com/cast/docs/reference/ios/g_c_k_media_common_8h#aad72b610da8ac7e1785975bd5f251406ab5a91eea7a66bec4f621b6e423080641)

Returns
:   The new repeat mode.

|---|---|---|---|
| - (void) selectTracks |   |   |   |

A convenience method for displaying the media track selection UI.

|---|---|---|---|
| - (void) skipAd |   |   |   |

Sends and monitors the skip ad request.

Since
:   4.3

## Property Detail

|---|---|
| |---| | - (id\<[GCKUIMediaControllerDelegate](https://developers.google.com/cast/docs/reference/ios/protocol_g_c_k_u_i_media_controller_delegate-p)\>) delegate | | readwritenonatomicweak |

The delegate for receiving notificatiosn from the [GCKUIMediaController](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller "A controller for UI views that are used to control or display the status of media playback on a Cast ...").

|---|---|
| |---| | - ([GCKSession](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_session)\*) session | | readnonatomicstrong |

The session that is associated with this controller.

|---|---|
| |---| | - (BOOL) mediaLoaded | | readnonatomicassign |

Whether there is media currently loaded (or loading) on the receiver.

If no Cast session is active, this will be `NO`.

|---|---|
| |---| | - (BOOL) hasCurrentQueueItem | | readnonatomicassign |

Whether there is a current item in the queue.

|---|---|
| |---| | - (BOOL) hasLoadingQueueItem | | readnonatomicassign |

Whether there is an item being preloaded in the queue.

|---|---|
| |---| | - (GCKMediaPlayerState) lastKnownPlayerState | | readnonatomicassign |

The latest known media player state.

If no Cast session is active, this will be player state just before the last session ended. If there was no prior session, this will be GCKMediaPlayerStateUnknown.

|---|---|
| |---| | - (NSTimeInterval) lastKnownStreamPosition | | readnonatomicassign |

The latest known media stream position.

If no Cast session is active, this will be the stream position of the media just before the last session ended. If there was no prior session, this will be [kGCKInvalidTimeInterval](https://developers.google.com/cast/docs/reference/ios/g_c_k_media_common_8h#abe8984fca7b61be2470630190b919c3b).

|---|---|
| |---| | - (UIButton\*) playButton | | readwritenonatomicweak |

A "play" button.

When the button is tapped, playback of the currently loaded media is started or resumed on the receiver. The button will be disabled if playback is already in progress, or if there is no media currently loaded, or if there is no Cast session currently active.

|---|---|
| |---| | - (UIButton\*) pauseButton | | readwritenonatomicweak |

A "pause" button.

When the button is tapped, playback of the currently loaded media is paused on the receiver. The button will be disabled if the currently loaded media does not support pausing, or if playback is not currently in progress, or if there is no media currently loaded, or if there is no Cast session currently active.

|---|---|
| |---| | - ([GCKUIMultistateButton](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_multistate_button)\*) playPauseToggleButton | | readwritenonatomicweak |

A "play/pause" toggle button.

The caller should set appropriate icons for the button's [GCKUIButtonStatePlay](https://developers.google.com/cast/docs/reference/ios/g_c_k_u_i_media_controller_8h#a031a756ae20de4f4f73a354a863038c0), [GCKUIButtonStatePlayLive](https://developers.google.com/cast/docs/reference/ios/g_c_k_u_i_media_controller_8h#adae3f123ccdb7b0631e038960c9fd597), and [GCKUIButtonStatePause](https://developers.google.com/cast/docs/reference/ios/g_c_k_u_i_media_controller_8h#ac3d1cb84e09b22e0ec35fb14bd45df9b) button states, namely, a "pause" icon for the play state, a "stop" icon for the play-live state, and a "play" icon for the pause state. The button state is automatically updated to reflect the current playback state on the receiver. When the button is tapped, playback of the currently loaded media is paused or resumed on the receiver. The button will be disabled if the currently loaded media does not support pausing, or if playback is not currently in progress or paused, or if there is no media currently loaded, or if there is no Cast session currently active.

|---|---|
| |---| | - ([GCKUIPlayPauseToggleController](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_play_pause_toggle_controller)\*) playPauseToggleController | | readwritenonatomicstrong |

A "play/pause" toggle controller.

Used as a stand-in for a custom, application-supplied play/pause toggle UI. See [GCKUIPlayPauseToggleController](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_play_pause_toggle_controller "A class that can be used to implement a custom play/pause toggle UI, in situations where a GCKUIMulti...") for details.

Since
:   3.4

|---|---|
| |---| | - (UIButton\*) stopButton | | readwritenonatomicweak |

A "stop" button.

When the button is tapped, playback of the currently loaded media is stopped on the receiver. The button will be disabled if there is no media currently loaded, or if there is no Cast session currently active.

|---|---|
| |---| | - (UIButton\*) forward30SecondsButton | | readwritenonatomicweak |

A button for seeking 30 seconds forward in the currently playing media item.

The button will be disabled if there is no media currently loaded, or if there is no Cast session currently active.

|---|---|
| |---| | - (UIButton\*) rewind30SecondsButton | | readwritenonatomicweak |

A button for seeking 30 seconds back in the currently playing media item.

The button will be disabled if there is no media currently loaded, or if there is no Cast session currently active.

|---|---|
| |---| | - (UIButton\*) pauseQueueButton | | readwritenonatomicweak |

A button for pausing queue playback once the current item finishes playing.

|---|---|
| |---| | - (UIButton\*) nextButton | | readwritenonatomicweak |

A "next" button.

When the button is tapped, playback moves to the next media item in the queue. The button will be disabled if the operation is not supported, or if there is no media currently loaded, or if there is no Cast session currently active.

|---|---|
| |---| | - (UIButton\*) previousButton | | readwritenonatomicweak |

A "previous" button.

When the button is tapped, playback moves to the previous media item in the queue. The button will be disabled if the operation is not supported, or if there is no media currently loaded, or if there is no Cast session currently active.

|---|---|
| |---| | - ([GCKUIMultistateButton](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_multistate_button)\*) repeatModeButton | | readwritenonatomicweak |

A button for cycling through the available queue repeat modes.

(See [GCKMediaRepeatMode](https://developers.google.com/cast/docs/reference/ios/g_c_k_media_common_8h#aad72b610da8ac7e1785975bd5f251406).) The caller should set appropriate icons for the button's [GCKUIButtonStateRepeatOff](https://developers.google.com/cast/docs/reference/ios/g_c_k_u_i_media_controller_8h#a9cf4203fa067d71629f939f72a65682b), [GCKUIButtonStateRepeatSingle](https://developers.google.com/cast/docs/reference/ios/g_c_k_u_i_media_controller_8h#a2e2c5c1592347626406bf211d14f6708), [GCKUIButtonStateRepeatAll](https://developers.google.com/cast/docs/reference/ios/g_c_k_u_i_media_controller_8h#a1d35bcffd00e85be5f109ddaa2785cf8), and [GCKUIButtonStateShuffle](https://developers.google.com/cast/docs/reference/ios/g_c_k_u_i_media_controller_8h#a2b43202a94dafaafd2521a57cd30ba46) button states. The button state is automatically updated to reflect the current queue repeat mode on the receiver. Tapping on the button cycles to the next repeat mode, in the order:

[GCKMediaRepeatModeOff](https://developers.google.com/cast/docs/reference/ios/g_c_k_media_common_8h#aad72b610da8ac7e1785975bd5f251406a33da7481895a55310fdcf1670cb30299) → [GCKMediaRepeatModeAll](https://developers.google.com/cast/docs/reference/ios/g_c_k_media_common_8h#aad72b610da8ac7e1785975bd5f251406aa2bb146f64f9f7067cc9b819dbd55d2b) → [GCKMediaRepeatModeSingle](https://developers.google.com/cast/docs/reference/ios/g_c_k_media_common_8h#aad72b610da8ac7e1785975bd5f251406a6c835238547a4ba67cd7db743fc71174) → [GCKMediaRepeatModeAllAndShuffle](https://developers.google.com/cast/docs/reference/ios/g_c_k_media_common_8h#aad72b610da8ac7e1785975bd5f251406ab5a91eea7a66bec4f621b6e423080641)

The button will be disabled if there is no Cast session currently active.

|---|---|
| |---| | - (UISlider\*) streamPositionSlider | | readwritenonatomicweak |

A slider for displaying and changing the current stream position.

When the slider's value is changed by the user, the stream position of the currently loaded media is updated on the receiver. While playback of media is in progress on the receiver, the slider's value is updated in realtime to reflect the current stream position. The slider will be disabled if the currently loaded media does not support seeking, or if there is no media currently loaded, or if there is no Cast session currently active.

|---|---|
| |---| | - (UIProgressView\*) streamProgressView | | readwritenonatomicweak |

A view for displaying the current stream progress.

While playback of media is in progress on the receiver, the views's value is updated in realtime to reflect the current stream position. The view will be disabled if the currently loaded media is a live stream, or if there is no media currently loaded, or if there is no Cast session currently active.

|---|---|
| |---| | - (UILabel\*) streamPositionLabel | | readwritenonatomicweak |

A label for displaying the current stream position, in minutes and seconds.

If there is no media currently loaded, or if there is no Cast session currently active, the label displays a localized form of "--:--".

|---|---|
| |---| | - (UILabel\*) streamDurationLabel | | readwritenonatomicweak |

A label for displaying the current stream duration, in minutes and seconds.

If the currently loaded media does not have a duration (for example, if it is a live stream), or if there is no media currently loaded, or if there is no Cast session currently active, the label displays a localized form of "--:--".

|---|---|
| |---| | - (UILabel\*) streamTimeRemainingLabel | | readwritenonatomicweak |

A label for displaying the remaining stream time (the duration minus the position), in minutes and seconds.

If the currently loaded media does not have a duration (for example, if it is a live stream), or if there is no media currently loaded, or if there is no Cast session currently active, the label displays a localized form of "--:--".

|---|---|
| |---| | - ([GCKUIStreamPositionController](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_stream_position_controller)\*) streamPositionController | | readwritenonatomicstrong |

A stream posdition controller.

Used as a stand-in for a custom, application-supplied stream position and/or seek UI. See [GCKUIStreamPositionController](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_stream_position_controller "A class that can be used to implement a custom stream position and/or seek UI, in situations where or...") for details.

Since
:   3.4

|---|---|
| |---| | - ([GCKUIPlaybackRateController](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_playback_rate_controller)\*) playbackRateController | | readwritenonatomicstrong |

A stream playback rate controller.

See [GCKUIPlaybackRateController](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_playback_rate_controller "A class that can be used to implement a custom stream playback rate UI. ") for details.

Since
:   4.0

|---|---|
| |---| | - (BOOL) displayTimeRemainingAsNegativeValue | | readwritenonatomicassign |

Whether remaining stream time will be displayed as a negative value, for example, "-1:23:45".

By default this property is set to `YES`.

|---|---|
| |---| | - (BOOL) hideStreamPositionControlsForLiveContent | | readwritenonatomicassign |

Whether stream position controls (including the stream position slider, the stream position label, the stream duration label, and the stream progress view) should be hidden for live content.

The default value is `NO`.

Since
:   4.0

|---|---|
| |---| | - (UIButton\*) tracksButton | | readwritenonatomicweak |

A button for selecting audio tracks and/or closed captions or subtitles.

When the button is tapped, the media tracks selection UI is displayed to the user. The button will be disabled if the currently loaded media does not have any selectable media tracks, or if there is no media currently loaded, or if there is no Cast session currently active.

|---|---|
| |---| | - (UILabel\*) smartSubtitleLabel | | readwritenonatomicweak |

A label for displaying a subtitle for the currently loaded media.

If there is no subtitle field explicitly set in the metadata, the label will display the most appropriate metadata field based on the media type, for example the studio name for a movie or the artist name for a music track.

|---|---|
| |---| | - (UIActivityIndicatorView\*) mediaLoadingIndicator | | readwritenonatomicweak |

An activity indicator view for indicating that the media is in a loading state.

|---|---|
| |---| | - (UILabel\*) skipAdLabel | | readwritenonatomicweak |

A label for displaying the amount of time left until the ad can be skipped.

Since
:   4.3

|---|---|
| |---| | - (UIButton\*) skipAdButton | | readwritenonatomicweak |

A button for skipping the current ad.

Since
:   4.3