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
 子類別隨時可呼叫此方法,瞭解用戶端媒體狀態物件的變更。更多...
 
(void) - notifyDidUpdateQueue
 子類別隨時可呼叫此方法,前提是客戶管理的媒體佇列發生變更。更多...
 
(void) - notifyDidUpdatePreloadStatus
 每當用戶端 mediaStatus 的 GCKMediaStatus::preloadedItemID 變更時,子類別就會呼叫這個方法。更多...
 
(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

子類別隨時可呼叫此方法,瞭解用戶端媒體狀態物件的變更。

提供者:類別 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