GCKRemoteMediaClient 类

GCKRemoteMediaClient 类参考文档

概览

用于控制 Cast 接收器上的媒体播放的类。

此对象的一个实例可用作 GCKSession::remoteMediaClient 属性。

辛塞
3.0

此类继承 NSObject。

实例方法摘要

(void) - addListener:
 向此对象的监听器列表中添加监听器。更多...
 
(void) - removeListener:
 从此对象的监听器列表中移除监听器。更多...
 
(GCKRequest *) - loadMediaWithLoadRequestData:
 加载并开始播放包含请求数据的媒体项或媒体项队列。更多...
 
(GCKRequest *) - loadMedia:
 加载并使用默认选项开始播放新的媒体项。更多...
 
(GCKRequest *) - loadMedia:withOptions:
 加载并使用指定的选项开始播放新的媒体项。更多...
 
(GCKRequest *) - loadMedia:autoplay:
 加载新的媒体项并选择播放。更多...
 
(GCKRequest *) - loadMedia:autoplay:playPosition:
 加载新的媒体项并选择播放。更多...
 
(GCKRequest *) - loadMedia:autoplay:playPosition:customData:
 加载新的媒体项并选择播放。更多...
 
(GCKRequest *) - loadMedia:autoplay:playPosition:activeTrackIDs:
 加载新的媒体项并选择播放。更多...
 
(GCKRequest *) - loadMedia:autoplay:playPosition:activeTrackIDs:customData:
 加载新的媒体项并选择播放。更多...
 
(GCKRequest *) - setPlaybackRate:
 设置当前媒体会话的播放速率。更多...
 
(GCKRequest *) - setPlaybackRate:customData:
 设置当前媒体会话的播放速率。更多...
 
(GCKRequest *) - setActiveTrackIDs:
 设置有效曲目。更多...
 
(GCKRequest *) - setTextTrackStyle:
 设置文本轨道样式。更多...
 
(GCKRequest *) - pause
 暂停播放当前媒体项。更多...
 
(GCKRequest *) - pauseWithCustomData:
 暂停播放当前媒体项。更多...
 
(GCKRequest *) - stop
 停止播放当前媒体项。更多...
 
(GCKRequest *) - stopWithCustomData:
 停止播放当前媒体项。更多...
 
(GCKRequest *) - play
 开始(或继续)播放当前媒体项。更多...
 
(GCKRequest *) - playWithCustomData:
 开始(或继续)播放当前媒体项。更多...
 
(GCKRequest *) - skipAd
 发送请求以跳过正在播放的广告。更多...
 
(GCKRequest *) - seekWithOptions:
 跳转到当前媒体项内的新位置。更多...
 
(GCKRequest *) - seekToTimeInterval:
 跳转到当前媒体项内的新位置。更多...
 
(GCKRequest *) - seekToTimeInterval:resumeState:
 跳转到当前媒体项内的新位置。更多...
 
(GCKRequest *) - seekToTimeInterval:resumeState:customData:
 跳转到当前媒体项内的新位置。更多...
 
(GCKRequest *) - queueFetchItemIDs
 请求队列的 ID 列表。更多...
 
(GCKRequest *) - queueFetchItemsForIDs:
 请求具有指定项 ID 的队列项的完整信息。更多...
 
(GCKRequest *) - queueLoadItems:startIndex:repeatMode:
 加载新的媒体项队列,并可根据需要开始播放。更多...
 
(GCKRequest *) - queueLoadItems:startIndex:repeatMode:customData:
 加载新的媒体项队列,并可根据需要开始播放。更多...
 
(GCKRequest *) - queueLoadItems:startIndex:playPosition:repeatMode:customData:
 加载新的媒体项队列,并可根据需要开始播放。更多...
 
(GCKRequest *) - queueLoadItems:withOptions:
 加载新的媒体项队列,并可根据需要开始播放。更多...
 
(GCKRequest *) - queueInsertItems:beforeItemWithID:
 用于将新媒体项列表插入队列。更多...
 
(GCKRequest *) - queueInsertItems:beforeItemWithID:customData:
 用于将新媒体项列表插入队列。更多...
 
(GCKRequest *) - queueInsertItem:beforeItemWithID:
 一种将单个项插入队列的便捷方法。更多...
 
(GCKRequest *) - queueInsertAndPlayItem:beforeItemWithID:
 一种将单个项插入队列并使其成为当前项的便捷方法。更多...
 
(GCKRequest *) - queueInsertAndPlayItem:beforeItemWithID:playPosition:customData:
 一种将单个项插入队列并使其成为当前项的便捷方法。更多...
 
(GCKRequest *) - queueUpdateItems:
 更新队列。更多...
 
(GCKRequest *) - queueUpdateItems:customData:
 更新队列。更多...
 
(GCKRequest *) - queueRemoveItemsWithIDs:
 从队列中移除媒体项列表。更多...
 
(GCKRequest *) - queueRemoveItemsWithIDs:customData:
 从队列中移除媒体项列表。更多...
 
(GCKRequest *) - queueRemoveItemWithID:
 一种从队列中删除单项内容的便捷方法。更多...
 
(GCKRequest *) - queueReorderItemsWithIDs:insertBeforeItemWithID:
 对队列中的媒体项列表进行重新排序。更多...
 
(GCKRequest *) - queueReorderItemsWithIDs:insertBeforeItemWithID:customData:
 对队列中的媒体项列表进行重新排序。更多...
 
(GCKRequest *) - queueMoveItemWithID:beforeItemWithID:
 一种用于移动队列中单项内容的便捷方法。更多...
 
(GCKRequest *) - queueJumpToItemWithID:
 跳至队列中具有指定 ID 的内容。更多...
 
(GCKRequest *) - queueJumpToItemWithID:customData:
 跳至队列中具有指定 ID 的内容。更多...
 
(GCKRequest *) - queueJumpToItemWithID:playPosition:customData:
 跳至队列中具有指定 ID 的内容。更多...
 
(GCKRequest *) - queueNextItem
 移至队列中的下一项。更多...
 
(GCKRequest *) - queuePreviousItem
 移至队列中的上一项。更多...
 
(GCKRequest *) - queueSetRepeatMode:
 设置队列重复模式。更多...
 
(GCKRequest *) - setStreamVolume:
 设置流音量。更多...
 
(GCKRequest *) - setStreamVolume:customData:
 设置流音量。更多...
 
(GCKRequest *) - setStreamMuted:
 设置流是否静音。更多...
 
(GCKRequest *) - setStreamMuted:customData:
 设置流是否静音。更多...
 
(GCKRequest *) - requestStatus
 从接收器请求更新后的媒体状态信息。更多...
 
(NSTimeInterval) - approximateStreamPosition
 返回上次更新的信息流位置,根据上次接收的信息流信息和自更新以来所用时间。更多...
 
(NSTimeInterval) - approximateLiveSeekableRangeStart
 返回可查找范围的大致起始位置,根据上次收到的信息流信息和自更新以来所用时间。更多...
 
(NSTimeInterval) - approximateLiveSeekableRangeEnd
 返回可查找范围的大致结束位置,根据上次收到的流信息和自更新后已流逝的观看时长计算得出。更多...
 
(void) - notifyDidStartMediaSession
 每当媒体会话启动时,即在远程播放器上成功加载新媒体后立即由子类调用。更多...
 
(void) - notifyDidUpdateMediaStatus
 每当客户端的 mediaStatus 对象发生更改时,由子类调用。更多...
 
(void) - notifyDidUpdateQueue
 每当客户端管理的媒体队列发生更改时,由子类调用。更多...
 
(void) - notifyDidUpdatePreloadStatus
 每当客户端 GCKMediaStatusGCKMediaStatus::preloadedItemID 发生变化时,由子类调用。更多...
 
(void) - notifyDidUpdateMetadata
 每当元数据发生更改时,由子类调用。更多...
 
(void) - notifyDidReceiveQueueItemIDs:
 每当收到媒体队列项 ID 列表时,由子类调用。更多...
 
(void) - notifyDidInsertQueueItemsWithIDs:beforeItemWithID:
 每当有连续的队列项插入队列时,子类都会调用该方法。更多...
 
(void) - notifyDidUpdateQueueItemsWithIDs:
 当队列中的现有项已更新时,由子类调用。更多...
 
(void) - notifyDidRemoveQueueItemsWithIDs:
 每当从队列中移除队列项的连续序列时,由子类调用。更多...
 
(void) - notifyDidReceiveQueueItems:
 每当收到队列项时,由子类调用。更多...
 

属性摘要

BOOL connected
 一个标记,指示此对象是否已连接到会话。更多...
 
GCKMediaStatusmediaStatus
 媒体控制渠道报告的当前媒体状态。更多...
 
GCKMediaQueuemediaQueue
 媒体队列。更多...
 
NSTimeInterval timeSinceLastMediaStatusUpdate
 自上次收到媒体状态更新以来经过的时间。更多...
 
BOOL playingLiveStream
 此标记指示此客户端是否正在播放直播。更多...
 
id
< GCKRemoteMediaClientAdInfoParserDelegate
adInfoParserDelegate
 能够从 GCKMediaStatus 对象中的自定义数据中提取广告插播时间点信息的代理。更多...
 

方法详细信息

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

向此对象的监听器列表中添加监听器。

添加的监听器处于弱状态,应保留以避免出现意外的取消分配。

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

从此对象的监听器列表中移除监听器。

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

加载并开始播放包含请求数据的媒体项或媒体项队列。

Parameters
requestDataDescribes the media load request.
返回
用于跟踪此请求的 GCKRequest 对象。
辛塞
4.4.1
- (GCKRequest *) loadMedia: (GCKMediaInformation *)  mediaInfo

加载并使用默认选项开始播放新的媒体项。

建议改用 loadMediaWithLoadRequestData:,这是一种高级加载命令,支持加载单个项或具有其他选项的队列。

Parameters
mediaInfoDescribes the media item to load.
返回
用于跟踪此请求的 GCKRequest 对象。
- (GCKRequest *) loadMedia: (GCKMediaInformation *)  mediaInfo
withOptions: (GCKMediaLoadOptions *)  options 

加载并使用指定的选项开始播放新的媒体项。

建议改用 loadMediaWithLoadRequestData:,这是一种高级加载命令,支持加载单个项或具有其他选项的队列。

Parameters
mediaInfoDescribes the media item to load.
optionsThe load options for this request.
返回
用于跟踪此请求的 GCKRequest 对象。
辛塞
4.0
- (GCKRequest *) loadMedia: (GCKMediaInformation *)  mediaInfo
autoplay: (BOOL)  autoplay 

加载新的媒体项并选择播放。

Parameters
mediaInfoDescribes the media item to load.
autoplayWhether playback should start immediately.
返回
用于跟踪此请求的 GCKRequest 对象。
Deprecated:
使用 loadMediaWithLoadRequestData:。
- (GCKRequest *) loadMedia: (GCKMediaInformation *)  mediaInfo
autoplay: (BOOL)  autoplay
playPosition: (NSTimeInterval)  playPosition 

加载新的媒体项并选择播放。

Parameters
mediaInfoDescribes the media item to load.
autoplayWhether playback should start immediately.
playPositionThe initial playback position.
返回
用于跟踪此请求的 GCKRequest 对象。
Deprecated:
使用 loadMediaWithLoadRequestData:。
- (GCKRequest *) loadMedia: (GCKMediaInformation *)  mediaInfo
autoplay: (BOOL)  autoplay
playPosition: (NSTimeInterval)  playPosition
customData: (nullable id)  customData 

加载新的媒体项并选择播放。

Parameters
mediaInfoDescribes the media item to load.
autoplayWhether playback should start immediately.
playPositionThe initial playback position.
customDataCustom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil.
返回
用于跟踪此请求的 GCKRequest 对象。
Deprecated:
使用 loadMediaWithLoadRequestData:。
- (GCKRequest *) loadMedia: (GCKMediaInformation *)  mediaInfo
autoplay: (BOOL)  autoplay
playPosition: (NSTimeInterval)  playPosition
activeTrackIDs: (nullable NSArray< NSNumber * > *)  activeTrackIDs 

加载新的媒体项并选择播放。

Parameters
mediaInfoDescribes the media item to load.
autoplayWhether playback should start immediately.
playPositionThe initial playback position.
activeTrackIDsAn array of integers specifying the active tracks. May be nil.
返回
用于跟踪此请求的 GCKRequest 对象。
Deprecated:
使用 loadMediaWithLoadRequestData:。
- (GCKRequest *) loadMedia: (GCKMediaInformation *)  mediaInfo
autoplay: (BOOL)  autoplay
playPosition: (NSTimeInterval)  playPosition
activeTrackIDs: (nullable NSArray< NSNumber * > *)  activeTrackIDs
customData: (nullable id)  customData 

加载新的媒体项并选择播放。

Parameters
mediaInfoDescribes the media item to load.
autoplayWhether playback should start immediately.
playPositionThe initial playback position.
activeTrackIDsAn array of integers specifying the active tracks. May be nil.
customDataCustom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil.
返回
用于跟踪此请求的 GCKRequest 对象。
Deprecated:
使用 loadMediaWithLoadRequestData:。
- (GCKRequest *) setPlaybackRate: (float)  playbackRate

设置当前媒体会话的播放速率。

Parameters
playbackRateThe new playback rate.
返回
用于跟踪此请求的 GCKRequest 对象。
辛塞
4.0
- (GCKRequest *) setPlaybackRate: (float)  playbackRate
customData: (nullable id)  customData 

设置当前媒体会话的播放速率。

Parameters
playbackRateThe new playback rate, which must be between GCKMediaLoadOptions::kGCKMediaMinPlaybackRate and GCKMediaLoadOptions::kGCKMediaMaxPlaybackRate.
customDataCustom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil.
返回
用于跟踪此请求的 GCKRequest 对象。
辛塞
4.0
- (GCKRequest *) setActiveTrackIDs: (nullable NSArray< NSNumber * > *)  activeTrackIDs

设置有效曲目。

如果没有当前媒体状态,请求将失败。

Parameters
activeTrackIDsAn array of integers specifying the active tracks. May be empty or nil to disable any currently active tracks.
返回
用于跟踪此请求的 GCKRequest 对象。
- (GCKRequest *) setTextTrackStyle: (nullable GCKMediaTextTrackStyle *)  textTrackStyle

设置文本轨道样式。

如果没有当前媒体状态,请求将失败。

Parameters
textTrackStyleThe text track style. The style will not be changed if this is nil.
返回
用于跟踪此请求的 GCKRequest 对象。
- (GCKRequest *) pause

暂停播放当前媒体项。

如果没有当前媒体状态,请求将失败。

返回
用于跟踪此请求的 GCKRequest 对象。
- (GCKRequest *) pauseWithCustomData: (nullable id)  customData

暂停播放当前媒体项。

如果没有当前媒体状态,请求将失败。

Parameters
customDataCustom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil.
返回
用于跟踪此请求的 GCKRequest 对象。
- (GCKRequest *) stop

停止播放当前媒体项。

如果某个队列当前已加载,则该队列将被移除。如果没有当前媒体状态,请求将失败。

返回
用于跟踪此请求的 GCKRequest 对象。
- (GCKRequest *) stopWithCustomData: (nullable id)  customData

停止播放当前媒体项。

如果某个队列当前已加载,则该队列将被移除。如果没有当前媒体状态,请求将失败。

Parameters
customDataCustom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil.
返回
用于跟踪此请求的 GCKRequest 对象。
- (GCKRequest *) play

开始(或继续)播放当前媒体项。

播放始终从数据流的开头开始。如果没有当前媒体状态,请求将失败。

返回
用于跟踪此请求的 GCKRequest 对象。
- (GCKRequest *) playWithCustomData: (nullable id)  customData

开始(或继续)播放当前媒体项。

播放始终从数据流的开头开始。如果没有当前媒体状态,请求将失败。

Parameters
customDataCustom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil.
返回
用于跟踪此请求的 GCKRequest 对象。
- (GCKRequest *) skipAd

发送请求以跳过正在播放的广告。

返回
用于跟踪此请求的 GCKRequest 对象。
辛塞
4.3
- (GCKRequest *) seekWithOptions: (GCKMediaSeekOptions *)  options

跳转到当前媒体项内的新位置。

如果没有当前媒体状态,请求将失败。

Parameters
optionsThe seek options for the request.
返回
用于跟踪此请求的 GCKRequest 对象。
辛塞
4.0
- (GCKRequest *) seekToTimeInterval: (NSTimeInterval)  position

跳转到当前媒体项内的新位置。

如果没有当前媒体状态,请求将失败。

Parameters
positionThe new position from the beginning of the stream.
返回
用于跟踪此请求的 GCKRequest 对象。
Deprecated:
使用 findWithOptions:。
- (GCKRequest *) seekToTimeInterval: (NSTimeInterval)  position
resumeState: (GCKMediaResumeState resumeState 

跳转到当前媒体项内的新位置。

如果没有当前媒体状态,请求将失败。

Parameters
positionThe new position interval from the beginning of the stream.
resumeStateThe action to take after the seek operation has finished.
返回
用于跟踪此请求的 GCKRequest 对象。
Deprecated:
使用 findWithOptions:。
- (GCKRequest *) seekToTimeInterval: (NSTimeInterval)  position
resumeState: (GCKMediaResumeState resumeState
customData: (nullable id)  customData 

跳转到当前媒体项内的新位置。

如果没有当前媒体状态,请求将失败。

Parameters
positionThe new position from the beginning of the stream.
resumeStateThe action to take after the seek operation has finished.
customDataCustom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil.
返回
用于跟踪此请求的 GCKRequest 对象。
Deprecated:
使用 findWithOptions:。
- (GCKRequest *) queueFetchItemIDs

请求队列的 ID 列表。

结果会传递到委托回调 GCKRemoteMediaClientDelegate::remoteMediaClient:didReceiveQueueItemIDs:。

返回
用于跟踪此请求的 GCKRequest 对象。
辛塞
4.1
- (GCKRequest *) queueFetchItemsForIDs: (NSArray< NSNumber * > *)  queueItemIDs

请求具有指定项 ID 的队列项的完整信息。

结果会传递到委托回调 GCKRemoteMediaClientDelegate::remoteMediaClient:didReceiveQueueItems:。

返回
用于跟踪此请求的 GCKRequest 对象。
辛塞
4.1
- (GCKRequest *) queueLoadItems: (NSArray< GCKMediaQueueItem * > *)  queueItems
startIndex: (NSUInteger)  startIndex
repeatMode: (GCKMediaRepeatMode repeatMode 

加载新的媒体项队列,并可根据需要开始播放。

Parameters
queueItemsAn array of GCKMediaQueueItem instances to load. Must not be nil or empty.
startIndexThe index of the item in the items array that should be played first.
repeatModeThe repeat mode for playing the queue.
返回
用于跟踪此请求的 GCKRequest 对象。
Deprecated:
使用 loadMediaWithLoadRequestData:。
- (GCKRequest *) queueLoadItems: (NSArray< GCKMediaQueueItem * > *)  queueItems
startIndex: (NSUInteger)  startIndex
repeatMode: (GCKMediaRepeatMode repeatMode
customData: (nullable id)  customData 

加载新的媒体项队列,并可根据需要开始播放。

Parameters
queueItemsAn array of GCKMediaQueueItem instances to load. Must not be nil or empty.
startIndexThe index of the item in the items array that should be played first.
repeatModeThe repeat mode for playing the queue.
customDataCustom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil.
返回
用于跟踪此请求的 GCKRequest 对象。
Deprecated:
使用 loadMediaWithLoadRequestData:。
- (GCKRequest *) queueLoadItems: (NSArray< GCKMediaQueueItem * > *)  queueItems
startIndex: (NSUInteger)  startIndex
playPosition: (NSTimeInterval)  playPosition
repeatMode: (GCKMediaRepeatMode repeatMode
customData: (nullable id)  customData 

加载新的媒体项队列,并可根据需要开始播放。

Parameters
queueItemsAn array of GCKMediaQueueItem instances to load. Must not be nil or empty.
startIndexThe index of the item in the items array that should be played first.
playPositionThe 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.
repeatModeThe repeat mode for playing the queue.
customDataCustom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil.
返回
用于跟踪此请求的 GCKRequest 对象。
Deprecated:
使用 loadMediaWithLoadRequestData:。
- (GCKRequest *) queueLoadItems: (NSArray< GCKMediaQueueItem * > *)  queueItems
withOptions: (GCKMediaQueueLoadOptions *)  options 

加载新的媒体项队列,并可根据需要开始播放。

建议改用 loadMediaWithLoadRequestData:,这是一种高级加载命令,支持加载单个项或具有其他选项的队列。

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

用于将新媒体项列表插入队列。

Parameters
queueItemsAn array of GCKMediaQueueItem instances to insert. Must not be nil or empty.
beforeItemIDThe 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.
返回
用于跟踪此请求的 GCKRequest 对象。
- (GCKRequest *) queueInsertItems: (NSArray< GCKMediaQueueItem * > *)  queueItems
beforeItemWithID: (NSUInteger)  beforeItemID
customData: (nullable id)  customData 

用于将新媒体项列表插入队列。

Parameters
queueItemsAn array of GCKMediaQueueItem instances to insert. Must not be nil or empty.
beforeItemIDID 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.
customDataCustom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil.
返回
用于跟踪此请求的 GCKRequest 对象。
- (GCKRequest *) queueInsertItem: (GCKMediaQueueItem *)  item
beforeItemWithID: (NSUInteger)  beforeItemID 

一种将单个项插入队列的便捷方法。

Parameters
itemThe item to insert.
beforeItemIDThe 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.
返回
用于跟踪此请求的 GCKRequest 对象。
- (GCKRequest *) queueInsertAndPlayItem: (GCKMediaQueueItem *)  item
beforeItemWithID: (NSUInteger)  beforeItemID 

一种将单个项插入队列并使其成为当前项的便捷方法。

Parameters
itemThe item to insert.
beforeItemIDThe 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.
返回
用于跟踪此请求的 GCKRequest 对象。
- (GCKRequest *) queueInsertAndPlayItem: (GCKMediaQueueItem *)  item
beforeItemWithID: (NSUInteger)  beforeItemID
playPosition: (NSTimeInterval)  playPosition
customData: (nullable id)  customData 

一种将单个项插入队列并使其成为当前项的便捷方法。

Parameters
itemThe item to insert.
beforeItemIDThe 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.
playPositionThe 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.
customDataCustom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil.
返回
用于跟踪此请求的 GCKRequest 对象。
- (GCKRequest *) queueUpdateItems: (NSArray< GCKMediaQueueItem * > *)  queueItems

更新队列。

Parameters
queueItemsThe list of updated items.
返回
用于跟踪此请求的 GCKRequest 对象。
- (GCKRequest *) queueUpdateItems: (NSArray< GCKMediaQueueItem * > *)  queueItems
customData: (nullable id)  customData 

更新队列。

Parameters
queueItemsThe list of updated items.
customDataCustom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil.
返回
用于跟踪此请求的 GCKRequest 对象。
- (GCKRequest *) queueRemoveItemsWithIDs: (NSArray< NSNumber * > *)  itemIDs

从队列中移除媒体项列表。

如果队列因此而清空,则当前的媒体会话将被终止。

Parameters
itemIDsAn array of media item IDs identifying the items to remove. Must not be nil or empty.
返回
用于跟踪此请求的 GCKRequest 对象。
- (GCKRequest *) queueRemoveItemsWithIDs: (NSArray< NSNumber * > *)  itemIDs
customData: (nullable id)  customData 

从队列中移除媒体项列表。

如果队列因此而清空,则当前的媒体会话将被终止。

Parameters
itemIDsAn array of media item IDs identifying the items to remove. Must not be nil or empty.
customDataCustom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil.
返回
用于跟踪此请求的 GCKRequest 对象。
- (GCKRequest *) queueRemoveItemWithID: (NSUInteger)  itemID

一种从队列中删除单项内容的便捷方法。

Parameters
itemIDThe ID of the item to remove.
返回
用于跟踪此请求的 GCKRequest 对象。
- (GCKRequest *) queueReorderItemsWithIDs: (NSArray< NSNumber * > *)  queueItemIDs
insertBeforeItemWithID: (NSUInteger)  beforeItemID 

对队列中的媒体项列表进行重新排序。

Parameters
queueItemIDsAn array of media item IDs identifying the items to reorder. Must not be nil or empty.
beforeItemIDID 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.
返回
用于跟踪此请求的 GCKRequest 对象。
- (GCKRequest *) queueReorderItemsWithIDs: (NSArray< NSNumber * > *)  queueItemIDs
insertBeforeItemWithID: (NSUInteger)  beforeItemID
customData: (nullable id)  customData 

对队列中的媒体项列表进行重新排序。

Parameters
queueItemIDsAn array of media item IDs identifying the items to reorder. Must not be nil or empty.
beforeItemIDThe 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.
customDataCustom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil.
返回
用于跟踪此请求的 GCKRequest 对象。
- (GCKRequest *) queueMoveItemWithID: (NSUInteger)  itemID
beforeItemWithID: (NSUInteger)  beforeItemID 

一种用于移动队列中单项内容的便捷方法。

Parameters
itemIDThe ID of the item to move.
beforeItemIDThe 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.
返回
用于跟踪此请求的 GCKRequest 对象。
- (GCKRequest *) queueJumpToItemWithID: (NSUInteger)  itemID

跳至队列中具有指定 ID 的内容。

Parameters
itemIDThe ID of the item to jump to.
返回
用于跟踪此请求的 GCKRequest 对象。
- (GCKRequest *) queueJumpToItemWithID: (NSUInteger)  itemID
customData: (nullable id)  customData 

跳至队列中具有指定 ID 的内容。

Parameters
itemIDThe ID of the item to jump to.
customDataCustom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil.
返回
用于跟踪此请求的 GCKRequest 对象。
- (GCKRequest *) queueJumpToItemWithID: (NSUInteger)  itemID
playPosition: (NSTimeInterval)  playPosition
customData: (nullable id)  customData 

跳至队列中具有指定 ID 的内容。

Parameters
itemIDThe ID of the item to jump to.
playPositionThe 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.
customDataCustom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil.
返回
用于跟踪此请求的 GCKRequest 对象。
- (GCKRequest *) queueNextItem

移至队列中的下一项。

返回
用于跟踪此请求的 GCKRequest 对象。
- (GCKRequest *) queuePreviousItem

移至队列中的上一项。

返回
用于跟踪此请求的 GCKRequest 对象。
- (GCKRequest *) queueSetRepeatMode: (GCKMediaRepeatMode repeatMode

设置队列重复模式。

Parameters
repeatModeThe new repeat mode.
返回
用于跟踪此请求的 GCKRequest 对象。
- (GCKRequest *) setStreamVolume: (float)  volume

设置流音量。

如果没有当前媒体会话,请求将失败。

Parameters
volumeThe new volume, in the range [0.0 - 1.0].
返回
用于跟踪此请求的 GCKRequest 对象。
- (GCKRequest *) setStreamVolume: (float)  volume
customData: (nullable id)  customData 

设置流音量。

如果没有当前媒体会话,请求将失败。

Parameters
volumeThe new volume, in the range [0.0 - 1.0].
customDataCustom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil.
返回
用于跟踪此请求的 GCKRequest 对象。
- (GCKRequest *) setStreamMuted: (BOOL)  muted

设置流是否静音。

如果没有当前媒体会话,请求将失败。

Parameters
mutedWhether the stream should be muted or unmuted.
返回
用于跟踪此请求的 GCKRequest 对象。
- (GCKRequest *) setStreamMuted: (BOOL)  muted
customData: (nullable id)  customData 

设置流是否静音。

如果没有当前媒体会话,请求将失败。

Parameters
mutedWhether the stream should be muted or unmuted.
customDataCustom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil.
返回
用于跟踪此请求的 GCKRequest 对象。
- (GCKRequest *) requestStatus

从接收器请求更新后的媒体状态信息。

返回
用于跟踪此请求的 GCKRequest 对象。
- (NSTimeInterval) approximateStreamPosition

返回上次更新的信息流位置,根据上次接收的信息流信息和自更新以来所用时间。

如果频道未连接或当前未加载任何媒体,则返回 0。

- (NSTimeInterval) approximateLiveSeekableRangeStart

返回可查找范围的大致起始位置,根据上次收到的信息流信息和自更新以来所用时间。

如果频道未连接或当前未加载任何媒体,则返回 0。如果流不是实时流式传输或没有可搜索范围,则返回 kGCKInvalidTimeInterval

辛塞
4.4.1
- (NSTimeInterval) approximateLiveSeekableRangeEnd

返回可查找范围的大致结束位置,根据上次收到的流信息和自更新后已流逝的观看时长计算得出。

如果频道未连接或当前未加载任何媒体,则返回 0。如果流不是实时流式传输或没有可搜索范围,则返回 kGCKInvalidTimeInterval

辛塞
4.4.1
- (void) notifyDidStartMediaSession

每当媒体会话启动时,即在远程播放器上成功加载新媒体后立即由子类调用。

由类别“GCKRemoteMediaClient(Protected)”提供。

- (void) notifyDidUpdateMediaStatus

每当客户端的 mediaStatus 对象发生更改时,由子类调用。

由类别“GCKRemoteMediaClient(Protected)”提供。

- (void) notifyDidUpdateQueue

每当客户端管理的媒体队列发生更改时,由子类调用。

由类别“GCKRemoteMediaClient(Protected)”提供。

- (void) notifyDidUpdatePreloadStatus

每当客户端 GCKMediaStatusGCKMediaStatus::preloadedItemID 发生变化时,由子类调用。

由类别“GCKRemoteMediaClient(Protected)”提供。

- (void) notifyDidUpdateMetadata

每当元数据发生更改时,由子类调用。

由类别“GCKRemoteMediaClient(Protected)”提供。

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

每当收到媒体队列项 ID 列表时,由子类调用。

Parameters
itemIDsThe list of queue item IDs.
辛塞
4.1

由类别“GCKRemoteMediaClient(Protected)”提供。

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

每当有连续的队列项插入队列时,子类都会调用该方法。

Parameters
itemIDsThe list of queue item IDs identifying the items that were inserted.
beforeItemIDThe 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.
辛塞
4.1

由类别“GCKRemoteMediaClient(Protected)”提供。

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

当队列中的现有项已更新时,由子类调用。

Parameters
itemIDsThe list of queue item IDs identifying the items that were updated.
辛塞
4.1

由类别“GCKRemoteMediaClient(Protected)”提供。

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

每当从队列中移除队列项的连续序列时,由子类调用。

Parameters
itemIDsThe list of queue item IDs identifying the items that were removed.
辛塞
4.1

由类别“GCKRemoteMediaClient(Protected)”提供。

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

每当收到队列项时,由子类调用。

Parameters
itemsThe list of queue items.
辛塞
4.1

由类别“GCKRemoteMediaClient(Protected)”提供。

属性详情

- (BOOL) connected
readnonatomicassign

一个标记,指示此对象是否已连接到会话。

- (GCKMediaStatus*) mediaStatus
readnonatomicstrong

媒体控制渠道报告的当前媒体状态。

- (GCKMediaQueue*) mediaQueue
readnonatomicstrong

媒体队列。

辛塞
4.3.4
- (NSTimeInterval) timeSinceLastMediaStatusUpdate
readnonatomicassign

自上次收到媒体状态更新以来经过的时间。

如果未收到媒体状态,此值将为 NAN。

- (BOOL) playingLiveStream
readnonatomicassign

此标记指示此客户端是否正在播放直播。

辛塞
4.4.1
- (id<GCKRemoteMediaClientAdInfoParserDelegate>) adInfoParserDelegate
readwritenonatomicweak

能够从 GCKMediaStatus 对象中的自定义数据中提取广告插播时间点信息的代理。

Deprecated:
改用 GCKAdBreakStatus