GCKRemoteMediaClient Class

GCKRemoteMediaClient Class Reference

Overview

A class for controlling media playback on a Cast receiver.

An instance of this object is available as the property GCKSession::remoteMediaClient .

Since
3.0

Inherits NSObject.

Instance Method Summary

(void) 
Adds a listener to this object's list of listeners. More...
(void) 
Removes a listener from this object's list of listeners. More...
Loads and starts playback of a media item or a queue of media items with a request data. More...
Loads and starts playback of a new media item with default options. More...
Loads and starts playback of a new media item with the specified options. More...
Loads and optionally starts playback of a new media item. More...
Loads and optionally starts playback of a new media item. More...
Loads and optionally starts playback of a new media item. More...
Loads and optionally starts playback of a new media item. More...
Loads and optionally starts playback of a new media item. More...
Sets the playback rate for the current media session. More...
Sets the playback rate for the current media session. More...
Sets the active tracks. More...
Sets the text track style. More...
( GCKRequest *) 
Pauses playback of the current media item. More...
Pauses playback of the current media item. More...
( GCKRequest *) 
- stop
Stops playback of the current media item. More...
Stops playback of the current media item. More...
( GCKRequest *) 
- play
Begins (or resumes) playback of the current media item. More...
Begins (or resumes) playback of the current media item. More...
( GCKRequest *) 
Sends a request to skip the playing ad. More...
Seeks to a new position within the current media item. More...
Seeks to a new position within the current media item. More...
Seeks to a new position within the current media item. More...
Seeks to a new position within the current media item. More...
Requests the list of item IDs for the queue. More...
Requests complete information for the queue items with the given item IDs. More...
Loads and optionally starts playback of a new queue of media items. More...
Loads and optionally starts playback of a new queue of media items. More...
Loads and optionally starts playback of a new queue of media items. More...
Loads and optionally starts playback of a new queue of media items. More...
Inserts a list of new media items into the queue. More...
Inserts a list of new media items into the queue. More...
A convenience method that inserts a single item into the queue. More...
A convenience method that inserts a single item into the queue and makes it the current item. More...
A convenience method that inserts a single item into the queue and makes it the current item. More...
Updates the queue. More...
Updates the queue. More...
Removes a list of media items from the queue. More...
Removes a list of media items from the queue. More...
A convenience method that removes a single item from the queue. More...
Reorders a list of media items in the queue. More...
Reorder a list of media items in the queue. More...
A convenience method that moves a single item in the queue. More...
Jumps to the item with the specified ID in the queue. More...
Jumps to the item with the specified ID in the queue. More...
Jumps to the item with the specified ID in the queue. More...
Moves to the next item in the queue. More...
Moves to the previous item in the queue. More...
Sets the queue repeat mode. More...
Sets the stream volume. More...
Sets the stream volume. More...
Sets whether the stream is muted. More...
Sets whether the stream is muted. More...
Requests updated media status information from the receiver. More...
(NSTimeInterval) 
Returns the approximate stream position as calculated from the last received stream information and the elapsed wall-time since that update. More...
(NSTimeInterval) 
Returns the approximate start position of seekable range as calculated from the last received stream information and the elapsed wall-time since that update. More...
(NSTimeInterval) 
Returns the approximate end position of seekable range as calculated from the last received stream information and the elapsed wall-time since that update. More...
To be called by subclasses whenever a media session begins, namely, right after new media has been successfully loaded on the remote player. More...
To be called by subclasses whenever the mediaStatus object of the client changes. More...
To be called by subclasses whenever the media queue managed by the client changes. More...
To be called by subclasses whenever the GCKMediaStatus::preloadedItemID of the client's GCKMediaStatus changes. More...
To be called by subclasses whenever the metadata changes. More...
To be called by subclasses whenever the list of media queue item IDs is received. More...
To be called by subclasses whenever a contiguous sequence of queue items has been inserted into the queue. More...
To be called by subclasses whenever existing queue items have been updated in the queue. More...
To be called by subclasses whenever a contiguous sequence of queue items has been removed from the queue. More...
To be called by a subclass whenever queue items have been received. More...

Property Summary

BOOL 
A flag that indicates whether this object is connected to a session. More...
The current media status, as reported by the media control channel. More...
The media queue. More...
The amount of time that has passed since the last media status update was received. More...
A flag that indicates whether this client is playing a live stream. More...
A delegate capable of extracting ad break information from the custom data in a GCKMediaStatus object. More...

Method Detail

- (void) addListener: (id< GCKRemoteMediaClientListener >)  listener

Adds a listener to this object's list of listeners.

The added listener is weakly held, and should be retained to avoid unexpected deallocation.

Parameters
listener
The listener to add.
- (void) removeListener: (id< GCKRemoteMediaClientListener >)  listener

Removes a listener from this object's list of listeners.

Parameters
listener
The listener to remove.
- ( GCKRequest *) loadMediaWithLoadRequestData: ( GCKMediaLoadRequestData *)  requestData

Loads and starts playback of a media item or a queue of media items with a request data.

Parameters
requestData
Describes the media load request.
Returns
The GCKRequest object for tracking this request.
Since
4.4.1
- ( GCKRequest *) loadMedia: ( GCKMediaInformation *)  mediaInfo

Loads and starts playback of a new media item with default options.

It is recommended to use loadMediaWithLoadRequestData: instead, which is an advanced load command supporting loading a single item or a queue with additional options.

Parameters
mediaInfo
Describes the media item to load.
Returns
The GCKRequest object for tracking this request.
- ( GCKRequest *) loadMedia: ( GCKMediaInformation *)  mediaInfo
withOptions: ( GCKMediaLoadOptions *)  options

Loads and starts playback of a new media item with the specified options.

It is recommended to use loadMediaWithLoadRequestData: instead, which is an advanced load command supporting loading a single item or a queue with additional options.

Parameters
mediaInfo Describes the media item to load.
options The load options for this request.
Returns
The GCKRequest object for tracking this request.
Since
4.0
- ( GCKRequest *) loadMedia: ( GCKMediaInformation *)  mediaInfo
autoplay: (BOOL)  autoplay

Loads and optionally starts playback of a new media item.

Parameters
mediaInfo Describes the media item to load.
autoplay Whether playback should start immediately.
Returns
The GCKRequest object for tracking this request.
Deprecated:
Use loadMediaWithLoadRequestData:.
- ( GCKRequest *) loadMedia: ( GCKMediaInformation *)  mediaInfo
autoplay: (BOOL)  autoplay
playPosition: (NSTimeInterval)  playPosition

Loads and optionally starts playback of a new media item.

Parameters
mediaInfo Describes the media item to load.
autoplay Whether playback should start immediately.
playPosition The initial playback position.
Returns
The GCKRequest object for tracking this request.
Deprecated:
Use loadMediaWithLoadRequestData:.
- ( GCKRequest *) loadMedia: ( GCKMediaInformation *)  mediaInfo
autoplay: (BOOL)  autoplay
playPosition: (NSTimeInterval)  playPosition
customData: (nullable id)  customData

Loads and optionally starts playback of a new media item.

Parameters
mediaInfo Describes the media item to load.
autoplay Whether playback should start immediately.
playPosition The initial playback position.
customData 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 .
Returns
The GCKRequest object for tracking this request.
Deprecated:
Use loadMediaWithLoadRequestData:.
- ( GCKRequest *) loadMedia: ( GCKMediaInformation *)  mediaInfo
autoplay: (BOOL)  autoplay
playPosition: (NSTimeInterval)  playPosition
activeTrackIDs: (nullable NSArray< NSNumber * > *)  activeTrackIDs

Loads and optionally starts playback of a new media item.

Parameters
mediaInfo Describes the media item to load.
autoplay Whether playback should start immediately.
playPosition The initial playback position.
activeTrackIDs An array of integers specifying the active tracks. May be nil .
Returns
The GCKRequest object for tracking this request.
Deprecated:
Use loadMediaWithLoadRequestData:.
- ( GCKRequest *) loadMedia: ( GCKMediaInformation *)  mediaInfo
autoplay: (BOOL)  autoplay
playPosition: (NSTimeInterval)  playPosition
activeTrackIDs: (nullable NSArray< NSNumber * > *)  activeTrackIDs
customData: (nullable id)  customData

Loads and optionally starts playback of a new media item.

Parameters
mediaInfo Describes the media item to load.
autoplay Whether playback should start immediately.
playPosition The initial playback position.
activeTrackIDs An array of integers specifying the active tracks. May be nil .
customData 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 .
Returns
The GCKRequest object for tracking this request.
Deprecated:
Use loadMediaWithLoadRequestData:.
- ( GCKRequest *) setPlaybackRate: (float)  playbackRate

Sets the playback rate for the current media session.

Parameters
playbackRate
The new playback rate.
Returns
The GCKRequest object for tracking this request.
Since
4.0
- ( GCKRequest *) setPlaybackRate: (float)  playbackRate
customData: (nullable id)  customData

Sets the playback rate for the current media session.

Parameters
playbackRate The new playback rate, which must be between GCKMediaLoadOptions::kGCKMediaMinPlaybackRate and GCKMediaLoadOptions::kGCKMediaMaxPlaybackRate.
customData 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 .
Returns
The GCKRequest object for tracking this request.
Since
4.0
- ( GCKRequest *) setActiveTrackIDs: (nullable NSArray< NSNumber * > *)  activeTrackIDs

Sets the active tracks.

The request will fail if there is no current media status.

Parameters
activeTrackIDs
An array of integers specifying the active tracks. May be empty or nil to disable any currently active tracks.
Returns
The GCKRequest object for tracking this request.
- ( GCKRequest *) setTextTrackStyle: (nullable GCKMediaTextTrackStyle *)  textTrackStyle

Sets the text track style.

The request will fail if there is no current media status.

Parameters
textTrackStyle
The text track style. The style will not be changed if this is nil .
Returns
The GCKRequest object for tracking this request.
- ( GCKRequest *) pause

Pauses playback of the current media item.

The request will fail if there is no current media status.

Returns
The GCKRequest object for tracking this request.
- ( GCKRequest *) pauseWithCustomData: (nullable id)  customData

Pauses playback of the current media item.

The request will fail if there is no current media status.

Parameters
customData
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 .
Returns
The GCKRequest object for tracking this request.
- ( GCKRequest *) stop

Stops playback of the current media item.

If a queue is currently loaded, it will be removed. The request will fail if there is no current media status.

Returns
The GCKRequest object for tracking this request.
- ( GCKRequest *) stopWithCustomData: (nullable id)  customData

Stops playback of the current media item.

If a queue is currently loaded, it will be removed. The request will fail if there is no current media status.

Parameters
customData
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 .
Returns
The GCKRequest object for tracking this request.
- ( GCKRequest *) play

Begins (or resumes) playback of the current media item.

Playback always begins at the beginning of the stream. The request will fail if there is no current media status.

Returns
The GCKRequest object for tracking this request.
- ( GCKRequest *) playWithCustomData: (nullable id)  customData

Begins (or resumes) playback of the current media item.

Playback always begins at the beginning of the stream. The request will fail if there is no current media status.

Parameters
customData
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 .
Returns
The GCKRequest object for tracking this request.
- ( GCKRequest *) skipAd

Sends a request to skip the playing ad.

Returns
The GCKRequest object for tracking this request.
Since
4.3
- ( GCKRequest *) seekWithOptions: ( GCKMediaSeekOptions *)  options

Seeks to a new position within the current media item.

The request will fail if there is no current media status.

Parameters
options
The seek options for the request.
Returns
The GCKRequest object for tracking this request.
Since
4.0
- ( GCKRequest *) seekToTimeInterval: (NSTimeInterval)  position

Seeks to a new position within the current media item.

The request will fail if there is no current media status.

Parameters
position
The new position from the beginning of the stream.
Returns
The GCKRequest object for tracking this request.
Deprecated:
Use seekWithOptions:.
- ( GCKRequest *) seekToTimeInterval: (NSTimeInterval)  position
resumeState: (GCKMediaResumeState)  resumeState

Seeks to a new position within the current media item.

The request will fail if there is no current media status.

Parameters
position The new position interval from the beginning of the stream.
resumeState The action to take after the seek operation has finished.
Returns
The GCKRequest object for tracking this request.
Deprecated:
Use seekWithOptions:.
- ( GCKRequest *) seekToTimeInterval: (NSTimeInterval)  position
resumeState: (GCKMediaResumeState)  resumeState
customData: (nullable id)  customData

Seeks to a new position within the current media item.

The request will fail if there is no current media status.

Parameters
position The new position from the beginning of the stream.
resumeState The action to take after the seek operation has finished.
customData 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 .
Returns
The GCKRequest object for tracking this request.
Deprecated:
Use seekWithOptions:.
- ( GCKRequest *) queueFetchItemIDs

Requests the list of item IDs for the queue.

The results are passed to the delegate callback GCKRemoteMediaClientDelegate::remoteMediaClient:didReceiveQueueItemIDs:.

Returns
The GCKRequest object for tracking this request.
Since
4.1
- ( GCKRequest *) queueFetchItemsForIDs: (NSArray< NSNumber * > *)  queueItemIDs

Requests complete information for the queue items with the given item IDs.

The results are passed to the delegate callback GCKRemoteMediaClientDelegate::remoteMediaClient:didReceiveQueueItems:.

Returns
The GCKRequest object for tracking this request.
Since
4.1
- ( GCKRequest *) queueLoadItems: (NSArray< GCKMediaQueueItem * > *)  queueItems
startIndex: (NSUInteger)  startIndex
repeatMode: ( GCKMediaRepeatMode repeatMode

Loads and optionally starts playback of a new queue of media items.

Parameters
queueItems An array of GCKMediaQueueItem instances to load. Must not be nil or empty.
startIndex The index of the item in the items array that should be played first.
repeatMode The repeat mode for playing the queue.
Returns
The GCKRequest object for tracking this request.
Deprecated:
Use loadMediaWithLoadRequestData:.
- ( GCKRequest *) queueLoadItems: (NSArray< GCKMediaQueueItem * > *)  queueItems
startIndex: (NSUInteger)  startIndex
repeatMode: ( GCKMediaRepeatMode repeatMode
customData: (nullable id)  customData

Loads and optionally starts playback of a new queue of media items.

Parameters
queueItems An array of GCKMediaQueueItem instances to load. Must not be nil or empty.
startIndex The index of the item in the items array that should be played first.
repeatMode The repeat mode for playing the queue.
customData 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 .
Returns
The GCKRequest object for tracking this request.
Deprecated:
Use loadMediaWithLoadRequestData:.
- ( GCKRequest *) queueLoadItems: (NSArray< GCKMediaQueueItem * > *)  queueItems
startIndex: (NSUInteger)  startIndex
playPosition: (NSTimeInterval)  playPosition
repeatMode: ( GCKMediaRepeatMode repeatMode
customData: (nullable id)  customData

Loads and optionally starts playback of a new queue of media items.

Parameters
queueItems An array of GCKMediaQueueItem instances to load. Must not be nil or empty.
startIndex The index of the item in the items array that should be played first.
playPosition The initial playback position for the item when it is first played, relative to the beginning of the stream. This value is ignored when the same item is played again, for example when the queue repeats, or the item is later jumped to. In those cases the item's startTime is used.
repeatMode The repeat mode for playing the queue.
customData 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 .
Returns
The GCKRequest object for tracking this request.
Deprecated:
Use loadMediaWithLoadRequestData:.
- ( GCKRequest *) queueLoadItems: (NSArray< GCKMediaQueueItem * > *)  queueItems
withOptions: ( GCKMediaQueueLoadOptions *)  options

Loads and optionally starts playback of a new queue of media items.

It is recommended to use loadMediaWithLoadRequestData: instead, which is an advanced load command supporting loading a single item or a queue with additional options.

Parameters
queueItems An array of GCKMediaQueueItem instances to load. Must not be nil or empty.
options The load options used to load the queue items, as defined by GCKMediaQueueLoadOptions
Since
4.3.1
- ( GCKRequest *) queueInsertItems: (NSArray< GCKMediaQueueItem * > *)  queueItems
beforeItemWithID: (NSUInteger)  beforeItemID

Inserts a list of new media items into the queue.

Parameters
queueItems An array of GCKMediaQueueItem instances to insert. Must not be nil or empty.
beforeItemID The ID of the item that will be located immediately after the inserted list. If the value is kGCKMediaQueueInvalidItemID , the inserted list will be appended to the end of the queue.
Returns
The GCKRequest object for tracking this request.
- ( GCKRequest *) queueInsertItems: (NSArray< GCKMediaQueueItem * > *)  queueItems
beforeItemWithID: (NSUInteger)  beforeItemID
customData: (nullable id)  customData

Inserts a list of new media items into the queue.

Parameters
queueItems An array of GCKMediaQueueItem instances to insert. Must not be nil or empty.
beforeItemID ID of the item that will be located immediately after the inserted list. If the value is kGCKMediaQueueInvalidItemID , the inserted list will be appended to the end of the queue.
customData 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 .
Returns
The GCKRequest object for tracking this request.
- ( GCKRequest *) queueInsertItem: ( GCKMediaQueueItem *)  item
beforeItemWithID: (NSUInteger)  beforeItemID

A convenience method that inserts a single item into the queue.

Parameters
item The item to insert.
beforeItemID The ID of the item that will be located immediately after the inserted item. If the value is kGCKMediaQueueInvalidItemID , or does not refer to any item currently in the queue, the inserted item will be appended to the end of the queue.
Returns
The GCKRequest object for tracking this request.
- ( GCKRequest *) queueInsertAndPlayItem: ( GCKMediaQueueItem *)  item
beforeItemWithID: (NSUInteger)  beforeItemID

A convenience method that inserts a single item into the queue and makes it the current item.

Parameters
item The item to insert.
beforeItemID The ID of the item that will be located immediately after the inserted item. If the value is kGCKMediaQueueInvalidItemID , or does not refer to any item currently in the queue, the inserted item will be appended to the end of the queue.
Returns
The GCKRequest object for tracking this request.
- ( GCKRequest *) queueInsertAndPlayItem: ( GCKMediaQueueItem *)  item
beforeItemWithID: (NSUInteger)  beforeItemID
playPosition: (NSTimeInterval)  playPosition
customData: (nullable id)  customData

A convenience method that inserts a single item into the queue and makes it the current item.

Parameters
item The item to insert.
beforeItemID The ID of the item that will be located immediately after the inserted item. If the value is kGCKMediaQueueInvalidItemID , or does not refer to any item currently in the queue, the inserted item will be appended to the end of the queue.
playPosition The initial playback position for the item when it is first played, relative to the beginning of the stream. This value is ignored when the same item is played again, for example when the queue repeats, or the item is later jumped to. In those cases the item's startTime is used.
customData 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 .
Returns
The GCKRequest object for tracking this request.
- ( GCKRequest *) queueUpdateItems: (NSArray< GCKMediaQueueItem * > *)  queueItems

Updates the queue.

Parameters
queueItems
The list of updated items.
Returns
The GCKRequest object for tracking this request.
- ( GCKRequest *) queueUpdateItems: (NSArray< GCKMediaQueueItem * > *)  queueItems
customData: (nullable id)  customData

Updates the queue.

Parameters
queueItems The list of updated items.
customData 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 .
Returns
The GCKRequest object for tracking this request.
- ( GCKRequest *) queueRemoveItemsWithIDs: (NSArray< NSNumber * > *)  itemIDs

Removes a list of media items from the queue.

If the queue becomes empty as a result, the current media session will be terminated.

Parameters
itemIDs
An array of media item IDs identifying the items to remove. Must not be nil or empty.
Returns
The GCKRequest object for tracking this request.
- ( GCKRequest *) queueRemoveItemsWithIDs: (NSArray< NSNumber * > *)  itemIDs
customData: (nullable id)  customData

Removes a list of media items from the queue.

If the queue becomes empty as a result, the current media session will be terminated.

Parameters
itemIDs An array of media item IDs identifying the items to remove. Must not be nil or empty.
customData 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 .
Returns
The GCKRequest object for tracking this request.
- ( GCKRequest *) queueRemoveItemWithID: (NSUInteger)  itemID

A convenience method that removes a single item from the queue.

Parameters
itemID
The ID of the item to remove.
Returns
The GCKRequest object for tracking this request.
- ( GCKRequest *) queueReorderItemsWithIDs: (NSArray< NSNumber * > *)  queueItemIDs
insertBeforeItemWithID: (NSUInteger)  beforeItemID

Reorders a list of media items in the queue.

Parameters
queueItemIDs An array of media item IDs identifying the items to reorder. Must not be nil or empty.
beforeItemID ID of the item that will be located immediately after the reordered list. If the value is kGCKMediaQueueInvalidItemID , or does not refer to any item currently in the queue, the reordered list will be appended at the end of the queue.
Returns
The GCKRequest object for tracking this request.
- ( GCKRequest *) queueReorderItemsWithIDs: (NSArray< NSNumber * > *)  queueItemIDs
insertBeforeItemWithID: (NSUInteger)  beforeItemID
customData: (nullable id)  customData

Reorder a list of media items in the queue.

Parameters
queueItemIDs An array of media item IDs identifying the items to reorder. Must not be nil or empty.
beforeItemID The ID of the item that will be located immediately after the reordered list. If the value is kGCKMediaQueueInvalidItemID , or does not refer to any item currently in the queue, the reordered list will be moved to the end of the queue.
customData 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 .
Returns
The GCKRequest object for tracking this request.
- ( GCKRequest *) queueMoveItemWithID: (NSUInteger)  itemID
beforeItemWithID: (NSUInteger)  beforeItemID

A convenience method that moves a single item in the queue.

Parameters
itemID The ID of the item to move.
beforeItemID The ID of the item that will be located immediately after the reordered list. If the value is kGCKMediaQueueInvalidItemID , or does not refer to any item currently in the queue, the item will be moved to the end of the queue.
Returns
The GCKRequest object for tracking this request.
- ( GCKRequest *) queueJumpToItemWithID: (NSUInteger)  itemID

Jumps to the item with the specified ID in the queue.

Parameters
itemID
The ID of the item to jump to.
Returns
The GCKRequest object for tracking this request.
- ( GCKRequest *) queueJumpToItemWithID: (NSUInteger)  itemID
customData: (nullable id)  customData

Jumps to the item with the specified ID in the queue.

Parameters
itemID The ID of the item to jump to.
customData 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 .
Returns
The GCKRequest object for tracking this request.
- ( GCKRequest *) queueJumpToItemWithID: (NSUInteger)  itemID
playPosition: (NSTimeInterval)  playPosition
customData: (nullable id)  customData

Jumps to the item with the specified ID in the queue.

Parameters
itemID The ID of the item to jump to.
playPosition The initial playback position for the item when it is first played, relative to the beginning of the stream. This value is ignored when the same item is played again, for example when the queue repeats, or the item is later jumped to. In those cases the item's startTime is used.
customData 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 .
Returns
The GCKRequest object for tracking this request.
- ( GCKRequest *) queueNextItem

Moves to the next item in the queue.

Returns
The GCKRequest object for tracking this request.
- ( GCKRequest *) queuePreviousItem

Moves to the previous item in the queue.

Returns
The GCKRequest object for tracking this request.
- ( GCKRequest *) queueSetRepeatMode: ( GCKMediaRepeatMode repeatMode

Sets the queue repeat mode.

Parameters
repeatMode
The new repeat mode.
Returns
The GCKRequest object for tracking this request.
- ( GCKRequest *) setStreamVolume: (float)  volume

Sets the stream volume.

The request will fail if there is no current media session.

Parameters
volume
The new volume, in the range [0.0 - 1.0].
Returns
The GCKRequest object for tracking this request.
- ( GCKRequest *) setStreamVolume: (float)  volume
customData: (nullable id)  customData

Sets the stream volume.

The request will fail if there is no current media session.

Parameters
volume The new volume, in the range [0.0 - 1.0].
customData 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 .
Returns
The GCKRequest object for tracking this request.
- ( GCKRequest *) setStreamMuted: (BOOL)  muted

Sets whether the stream is muted.

The request will fail if there is no current media session.

Parameters
muted
Whether the stream should be muted or unmuted.
Returns
The GCKRequest object for tracking this request.
- ( GCKRequest *) setStreamMuted: (BOOL)  muted
customData: (nullable id)  customData

Sets whether the stream is muted.

The request will fail if there is no current media session.

Parameters
muted Whether the stream should be muted or unmuted.
customData 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 .
Returns
The GCKRequest object for tracking this request.
- ( GCKRequest *) requestStatus

Requests updated media status information from the receiver.

Returns
The GCKRequest object for tracking this request.
- (NSTimeInterval) approximateStreamPosition

Returns the approximate stream position as calculated from the last received stream information and the elapsed wall-time since that update.

Returns 0 if the channel is not connected or if no media is currently loaded.

- (NSTimeInterval) approximateLiveSeekableRangeStart

Returns the approximate start position of seekable range as calculated from the last received stream information and the elapsed wall-time since that update.

Returns 0 if the channel is not connected or if no media is currently loaded. Returns kGCKInvalidTimeInterval if the stream is not live stream or there is no seekable range.

Since
4.4.1
- (NSTimeInterval) approximateLiveSeekableRangeEnd

Returns the approximate end position of seekable range as calculated from the last received stream information and the elapsed wall-time since that update.

Returns 0 if the channel is not connected or if no media is currently loaded. Returns kGCKInvalidTimeInterval if the stream is not live stream or there is no seekable range.

Since
4.4.1
- (void) notifyDidStartMediaSession

To be called by subclasses whenever a media session begins, namely, right after new media has been successfully loaded on the remote player.

Provided by category GCKRemoteMediaClient(Protected) .

- (void) notifyDidUpdateMediaStatus

To be called by subclasses whenever the mediaStatus object of the client changes.

Provided by category GCKRemoteMediaClient(Protected) .

- (void) notifyDidUpdateQueue

To be called by subclasses whenever the media queue managed by the client changes.

Provided by category GCKRemoteMediaClient(Protected) .

- (void) notifyDidUpdatePreloadStatus

To be called by subclasses whenever the GCKMediaStatus::preloadedItemID of the client's GCKMediaStatus changes.

Provided by category GCKRemoteMediaClient(Protected) .

- (void) notifyDidUpdateMetadata

To be called by subclasses whenever the metadata changes.

Provided by category GCKRemoteMediaClient(Protected) .

- (void) notifyDidReceiveQueueItemIDs: (NSArray< NSNumber * > *)  itemIDs

To be called by subclasses whenever the list of media queue item IDs is received.

Parameters
itemIDs
The list of queue item IDs.
Since
4.1

Provided by category GCKRemoteMediaClient(Protected) .

- (void) notifyDidInsertQueueItemsWithIDs: (NSArray< NSNumber * > *)  itemIDs
beforeItemWithID: ( GCKMediaQueueItemID beforeItemID

To be called by subclasses whenever a contiguous sequence of queue items has been inserted into the queue.

Parameters
itemIDs The list of queue item IDs identifying the items that were inserted.
beforeItemID The ID of the queue item in front of which the new items were inserted, or kGCKInvalidQueueItemID if the items were appended to the end of the queue.
Since
4.1

Provided by category GCKRemoteMediaClient(Protected) .

- (void) notifyDidUpdateQueueItemsWithIDs: (NSArray< NSNumber * > *)  itemIDs

To be called by subclasses whenever existing queue items have been updated in the queue.

Parameters
itemIDs
The list of queue item IDs identifying the items that were updated.
Since
4.1

Provided by category GCKRemoteMediaClient(Protected) .

- (void) notifyDidRemoveQueueItemsWithIDs: (NSArray< NSNumber * > *)  itemIDs

To be called by subclasses whenever a contiguous sequence of queue items has been removed from the queue.

Parameters
itemIDs
The list of queue item IDs identifying the items that were removed.
Since
4.1

Provided by category GCKRemoteMediaClient(Protected) .

- (void) notifyDidReceiveQueueItems: (NSArray< GCKMediaQueueItem * > *)  items

To be called by a subclass whenever queue items have been received.

Parameters
items
The list of queue items.
Since
4.1

Provided by category GCKRemoteMediaClient(Protected) .

Property Detail

- (BOOL) connected
read nonatomic assign

A flag that indicates whether this object is connected to a session.

- ( GCKMediaStatus *) mediaStatus
read nonatomic strong

The current media status, as reported by the media control channel.

- ( GCKMediaQueue *) mediaQueue
read nonatomic strong

The media queue.

Since
4.3.4
- (NSTimeInterval) timeSinceLastMediaStatusUpdate
read nonatomic assign

The amount of time that has passed since the last media status update was received.

If a media status has not been received yet this value will be NAN.

- (BOOL) playingLiveStream
read nonatomic assign

A flag that indicates whether this client is playing a live stream.

Since
4.4.1
- (id< GCKRemoteMediaClientAdInfoParserDelegate >) adInfoParserDelegate
read write nonatomic weak

A delegate capable of extracting ad break information from the custom data in a GCKMediaStatus object.

Deprecated:
Use GCKAdBreakStatus instead.
Create a Mobile Website
View Site in Mobile | Classic
Share by: