GCKRemoteMediaClient 类

GCKRemoteMediaClient 类参考

概览

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

此类提供与已弃用的 GCKMediaControlChannel(它封装了该类)相同的功能,但具有更便捷的 API。主要区别如下:

  • 每个请求都由一个 GCKRequest 对象表示,该对象可通过专用委托进行跟踪。
  • GCKRemoteMediaClient 支持多个监听器,而不是单个委托。
开始时间
3.0

此类继承 NSObject。

实例方法摘要

(void) - addListener:
 向此对象的监听器列表添加监听器。更多…
 
(void) - removeListener:
 从相应对象的监听器列表中移除监听器。更多…
 
(GCKRequest *) - loadMedia:
 加载并开始播放新的媒体内容。更多…
 
(GCKRequest *) - loadMedia:autoplay:
 加载新的媒体项并可选择开始播放。更多…
 
(GCKRequest *) - loadMedia:autoplay:playPosition:
 加载新的媒体项并可选择开始播放。更多…
 
(GCKRequest *) - loadMedia:autoplay:playPosition:customData:
 加载新的媒体项并可选择开始播放。更多…
 
(GCKRequest *) - loadMedia:autoplay:playPosition:activeTrackIDs:
 加载新的媒体项并可选择开始播放。更多…
 
(GCKRequest *) - loadMedia:autoplay:playPosition:activeTrackIDs:customData:
 加载新的媒体项并可选择开始播放。更多…
 
(GCKRequest *) - setActiveTrackIDs:
 设置有效轨道。更多…
 
(GCKRequest *) - setTextTrackStyle:
 设置文本轨道样式。更多…
 
(GCKRequest *) - pause
 暂停播放当前媒体项。更多…
 
(GCKRequest *) - pauseWithCustomData:
 暂停播放当前媒体项。更多…
 
(GCKRequest *) - stop
 停止播放当前媒体项。更多…
 
(GCKRequest *) - stopWithCustomData:
 停止播放当前媒体项。更多…
 
(GCKRequest *) - play
 开始(或继续)播放当前媒体项。更多…
 
(GCKRequest *) - playWithCustomData:
 开始(或继续)播放当前媒体项。更多…
 
(GCKRequest *) - seekToTimeInterval:
 在当前媒体项中搜索新位置。更多…
 
(GCKRequest *) - seekToTimeInterval:resumeState:
 在当前媒体项中搜索新位置。更多…
 
(GCKRequest *) - seekToTimeInterval:resumeState:customData:
 在当前媒体项中搜索新位置。更多…
 
(GCKRequest *) - queueLoadItems:startIndex:repeatMode:
 加载新的媒体内容队列,并可选择开始播放。更多…
 
(GCKRequest *) - queueLoadItems:startIndex:repeatMode:customData:
 加载新的媒体内容队列,并可选择开始播放。更多…
 
(GCKRequest *) - queueLoadItems:startIndex:playPosition:repeatMode:customData:
 加载新的媒体内容队列,并可选择开始播放。更多…
 
(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
 返回根据上次收到的流信息和自该更新以来经过的实际时间计算出的近似流位置。更多…
 
(void) - notifyDidStartMediaSession
 由子类在媒体会话开始时(即在远程播放器上成功加载新媒体后)调用。更多…
 
(void) - notifyDidUpdateMediaStatus
 由子类在客户端的 mediaStatus 对象发生任何更改时调用。更多…
 
(void) - notifyDidUpdateQueue
 由子类在客户端管理的媒体队列发生任何变化时调用。更多…
 
(void) - notifyDidUpdatePreloadStatus
 当客户端的 GCKMediaStatus::preloadedItemID 发生 mediaStatus 更改时,由子类调用。更多…
 
(void) - notifyDidUpdateMetadata
 供子类在元数据发生更改时调用。更多…
 

房源摘要

BOOL connected
 一个标志,用于指示相应对象是否已连接到会话。更多…
 
GCKMediaStatusmediaStatus
 媒体控制通道报告的当前媒体状态。更多…
 
NSTimeInterval timeSinceLastMediaStatusUpdate
 自上次收到媒体状态更新以来经过的时间。更多…
 
id< GCKRemoteMediaClientAdInfoParserDelegateadInfoParserDelegate
 一种能够从 GCKMediaStatus 对象中的自定义数据提取广告插播信息的委托。更多…
 

方法详细信息

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

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

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

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

Parameters
listenerThe listener to remove.
- (GCKRequest *) loadMedia: (GCKMediaInformation *)  mediaInfo

加载并开始播放新的媒体内容。

Parameters
mediaInfoAn object describing the media item to load.
返回
用于跟踪相应请求的 GCKRequest 对象。
- (GCKRequest *) loadMedia: (GCKMediaInformation *)  mediaInfo
autoplay: (BOOL)  autoplay 

加载新的媒体项并选择性地开始播放。

Parameters
mediaInfoAn object describing the media item to load.
autoplayWhether playback should start immediately.
返回
用于跟踪相应请求的 GCKRequest 对象。
- (GCKRequest *) loadMedia: (GCKMediaInformation *)  mediaInfo
autoplay: (BOOL)  autoplay
playPosition: (NSTimeInterval)  playPosition 

加载新的媒体项并选择性地开始播放。

Parameters
mediaInfoAn object describing the media item to load.
autoplayWhether playback should start immediately.
playPositionThe initial playback position.
返回
用于跟踪相应请求的 GCKRequest 对象。
- (GCKRequest *) loadMedia: (GCKMediaInformation *)  mediaInfo
autoplay: (BOOL)  autoplay
playPosition: (NSTimeInterval)  playPosition
customData: (id __nullable)  customData 

加载新的媒体项并选择性地开始播放。

Parameters
mediaInfoAn object describing 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 对象。
- (GCKRequest *) loadMedia: (GCKMediaInformation *)  mediaInfo
autoplay: (BOOL)  autoplay
playPosition: (NSTimeInterval)  playPosition
activeTrackIDs: (NSArray< NSNumber * > *__nullable)  activeTrackIDs 

加载新的媒体项并选择性地开始播放。

Parameters
mediaInfoAn object describing 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 对象。
- (GCKRequest *) loadMedia: (GCKMediaInformation *)  mediaInfo
autoplay: (BOOL)  autoplay
playPosition: (NSTimeInterval)  playPosition
activeTrackIDs: (NSArray< NSNumber * > *__nullable)  activeTrackIDs
customData: (id __nullable)  customData 

加载新的媒体项并选择性地开始播放。

Parameters
mediaInfoAn object describing 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 对象。
- (GCKRequest *) setActiveTrackIDs: (NSArray< NSNumber * > *__nullable)  activeTrackIDs

设置有效轨道。

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

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

设置文本轨道样式。

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

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

暂停播放当前媒体项。

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

返回
用于跟踪相应请求的 GCKRequest 对象。
- (GCKRequest *) pauseWithCustomData: (id __nullable)  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: (id __nullable)  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: (id __nullable)  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 *) seekToTimeInterval: (NSTimeInterval)  position

在当前媒体项中搜索新位置。

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

Parameters
positionThe new position from the beginning of the stream.
返回
用于跟踪相应请求的 GCKRequest 对象。
- (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 对象。
- (GCKRequest *) seekToTimeInterval: (NSTimeInterval)  position
resumeState: (GCKMediaResumeState resumeState
customData: (id __nullable)  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 对象。
- (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 对象。
- (GCKRequest *) queueLoadItems: (NSArray< GCKMediaQueueItem * > *)  queueItems
startIndex: (NSUInteger)  startIndex
repeatMode: (GCKMediaRepeatMode repeatMode
customData: (id __nullable)  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 对象。
- (GCKRequest *) queueLoadItems: (NSArray< GCKMediaQueueItem * > *)  queueItems
startIndex: (NSUInteger)  startIndex
playPosition: (NSTimeInterval)  playPosition
repeatMode: (GCKMediaRepeatMode repeatMode
customData: (id __nullable)  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 对象。
- (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: (id __nullable)  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: (id __nullable)  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: (id __nullable)  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: (id __nullable)  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: (id __nullable)  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: (id __nullable)  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: (id __nullable)  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: (id __nullable)  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: (id __nullable)  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。

- (void) notifyDidStartMediaSession

由子类在媒体会话开始时(即在远程播放器上成功加载新媒体后)调用。

由类别 GCKRemoteMediaClient(Protected) 提供。

- (void) notifyDidUpdateMediaStatus

由子类在客户端的 mediaStatus 对象发生任何更改时调用。

由类别 GCKRemoteMediaClient(Protected) 提供。

- (void) notifyDidUpdateQueue

由子类在客户端管理的媒体队列发生任何变化时调用。

由类别 GCKRemoteMediaClient(Protected) 提供。

- (void) notifyDidUpdatePreloadStatus

当客户端的 GCKMediaStatus::preloadedItemID 发生 mediaStatus 更改时,由子类调用。

由类别 GCKRemoteMediaClient(Protected) 提供。

- (void) notifyDidUpdateMetadata

供子类在元数据发生更改时调用。

由类别 GCKRemoteMediaClient(Protected) 提供。

媒体资源详情

- (BOOL) connected
readnonatomicassign

一个标志,用于指示相应对象是否已连接到会话。

- (GCKMediaStatus*) mediaStatus
readnonatomicstrong

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

- (NSTimeInterval) timeSinceLastMediaStatusUpdate
readnonatomicassign

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

如果状态请求目前正在进行中,则此值为 0。

- (id<GCKRemoteMediaClientAdInfoParserDelegate>) adInfoParserDelegate
readwritenonatomicweak

一种能够从 GCKMediaStatus 对象中的自定义数据提取广告插播信息的委托。

Deprecated:
请改用 GCKAdBreakStatus