GCKMediaStatus 類別
繼承 NSObject。實作 <NS copy>。
- (instancetype) initWithSessionID: |
|
(NSInteger) |
mediaSessionID |
mediaInformation: |
|
(nullable GCKMediaInformation *) |
mediaInformation |
|
|
| |
指定初始化器。
- Parameters
-
mediaSessionID | The media session ID. |
mediaInformation | The media information. |
- (BOOL) isMediaCommandSupported: |
|
(NSInteger) |
command |
|
- (NSInteger) queueIndexForItemID: |
|
(NSUInteger) |
itemID |
|
傳回播放佇列中有指定項目 ID 的項目索引,如果佇列中沒有此項目,則傳回 -1。
- (const NSInteger) kGCKMediaCommandPause |
- (const NSInteger) kGCKMediaCommandSeek |
- (const NSInteger) kGCKMediaCommandSetVolume |
標記 (位元遮罩),指出可變更媒體項目的音訊音量。
- (const NSInteger) kGCKMediaCommandToggleMute |
旗標 (位元遮罩) 表示媒體項目的音訊可以設為靜音。
- (const NSInteger) kGCKMediaCommandSkipForward |
- (const NSInteger) kGCKMediaCommandSkipBackward |
- (const NSInteger) kGCKMediaCommandQueueNext |
這個標記 (位元遮罩) 表示媒體項目支援移至佇列中的下一個項目。
- (const NSInteger) kGCKMediaCommandQueuePrevious |
這個標記 (位元遮罩) 表示媒體項目支援移至佇列中的上一個項目。
- (const NSInteger) kGCKMediaCommandQueueShuffle |
旗標 (位元遮罩),指出媒體項目支援隨機播放功能。
- 開始時間
- 4.4.5
- (const NSInteger) kGCKMediaCommandSkipAd |
標記 (位元遮罩),指出媒體項目支援略過廣告。
- 開始時間
- 4.4.5
- (const NSInteger) kGCKMediaCommandQueueRepeatAll |
旗標 (位元遮罩) 表示媒體項目的佇列支援無限期的重複情況。
- 開始時間
- 4.4.5
- (const NSInteger) kGCKMediaCommandQueueRepeatOne |
旗標 (位元遮罩),指出媒體項目支援無限期重複。
- 開始時間
- 4.4.5
- (const NSInteger) kGCKMediaCommandQueueRepeat |
旗標 (位元遮罩) 表示媒體項目及其佇列支援無限期重複。
佇列中的項目。
- 開始時間
- 4.4.5
- (const NSInteger) kGCKMediaCommandEditTracks |
旗標 (位元遮罩) 會指出媒體項目的軌跡可供編輯。
- 開始時間
- 4.4.5
- (const NSInteger) kGCKMediaCommandSetPlaybackRate |
旗標 (位元遮罩) 指出可設定媒體項目的播放率。
- 開始時間
- 4.4.5
- (const NSInteger) kGCKMediaCommandLike |
旗標 (位元遮罩) 指出使用者可以表示喜歡媒體項目。
- 開始時間
- 4.4.5
- (const NSInteger) kGCKMediaCommandDislike |
旗標 (位元遮罩) 指出使用者可以不喜歡某個媒體項目。
- 開始時間
- 4.4.5
- (const NSInteger) kGCKMediaCommandFollow |
標記 (位元遮罩),指出使用者可以追蹤媒體項目建立者。
- 開始時間
- 4.4.5
- (const NSInteger) kGCKMediaCommandUnfollow |
旗標 (位元遮罩) :指出使用者可以取消追蹤媒體項目建立者。
- 開始時間
- 4.4.5
- (const NSInteger) kGCKMediaCommandStreamTransfer |
旗標 (位元遮罩) 表示媒體項目支援串流傳輸。
- 開始時間
- 4.4.5
- (NSInteger) mediaSessionID |
|
readnonatomicassign |
目前的媒體工作階段 ID (如果有的話),否則為 0。
- (GCKMediaPlayerState) playerState |
|
readnonatomicassign |
目前閒置的原因。
只有在播放器狀態是 GCKMediaPlayerStateIdle 時,這個值才有意義。
取得目前的串流播放速率。
如果串流向後跳轉,則為負值;如果串流暫停,則為 0;如果串流正常播放,則為 1;如果串流向前跳,則值為 1。
- (NSTimeInterval) streamPosition |
|
readnonatomicassign |
目前的串流位置,以串流開始時的 NSTimeInterval 值表示。
- (NSUInteger) currentItemID |
|
readnonatomicassign |
- (BOOL) queueHasCurrentItem |
|
readnonatomicassign |
- (BOOL) queueHasNextItem |
|
readnonatomicassign |
- (BOOL) queueHasPreviousItem |
|
readnonatomicassign |
- (BOOL) queueHasLoadingItem |
|
readnonatomicassign |
- (NSUInteger) preloadedItemID |
|
readnonatomicassign |
- (NSUInteger) loadingItemID |
|
readnonatomicassign |
- (NSArray<NSNumber *>*) activeTrackIDs |
|
readnonatomicstrong |
- (NSUInteger) queueItemCount |
|
readnonatomicassign |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2023-12-02 (世界標準時間)。
[null,null,["上次更新時間:2023-12-02 (世界標準時間)。"],[[["The `GCKMediaStatus` class provides comprehensive information about the current playback status, including media details, playback state, and volume."],["Developers can use this class to manage the playback queue, access information about live streams and ad playback, and handle custom data."],["The class offers methods for checking supported media commands and retrieving specific items within the queue."],["`GCKMediaStatus` includes various properties that expose attributes like media session ID, player state, stream position, active track IDs, and more."],["This class is crucial for building interactive Cast experiences within iOS applications, enabling developers to monitor and control media playback on receiver devices."]]],["The `GCKMediaStatus` class manages media status, providing information like session ID, player state, playback rate, and volume. It supports media control commands (pause, seek, mute, skip, queue navigation, etc.). The class allows checking if specific commands are supported and retrieving queue items by index or ID. It also offers properties detailing current item, queue status, and ad playback status. Additionally, the class has the ability to obtain and manage data for queue and stream such as `queueData` and `liveSeekableRange`.\n"]]