GCKMediaStatus 类
继承 NSObject。实现 <NSDuplicate>。
- (BOOL) queueHasNextItem |
|
|
|
- (instancetype) initWithSessionID: |
|
(NSInteger) |
mediaSessionID |
mediaInformation: |
|
(GCKMediaInformation *__nullable) |
mediaInformation |
|
|
| |
指定的初始化程序。
- Parameters
-
mediaSessionID | The media session ID. |
mediaInformation | The media information. |
- (BOOL) isMediaCommandSupported: |
|
(NSInteger) |
command |
|
- (NSUInteger) queueItemCount |
|
|
|
- (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 |
- (NSInteger) mediaSessionID |
|
readnonatomicassign |
当前的空闲原因。
仅当播放器状态为 GCKMediaPlayerStateIdle 时,此值才有意义。
获取当前的流播放速率。
如果视频流向后跳转,则此值为负;如果流暂停,则此值为 0;如果流正常播放,则为 1;如果流向前跳转,则为 此值。
- (NSTimeInterval) streamPosition |
|
readnonatomicassign |
当前流位置,以从流开头的 NSTimeInterval 表示。
- (NSUInteger) currentItemID |
|
readnonatomicassign |
- (BOOL) queueHasCurrentItem |
|
readnonatomicassign |
- (BOOL) queueHasPreviousItem |
|
readnonatomicassign |
- (BOOL) queueHasLoadingItem |
|
readnonatomicassign |
- (NSUInteger) preloadedItemID |
|
readnonatomicassign |
- (NSUInteger) loadingItemID |
|
readnonatomicassign |
- (NSArray<NSNumber *>*) activeTrackIDs |
|
readnonatomicstrong |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2022-12-06。
[null,null,["最后更新时间 (UTC):2022-12-06。"],[[["The `GCKMediaStatus` class provides comprehensive status information about media playback on a Cast receiver, including details like playback state, position, volume, and queue status."],["It offers methods to check queue status, supported media commands, and retrieve specific queue items by index or ID."],["It exposes numerous properties to access media information, session details, playback rate, volume, mute state, repeat mode, active track IDs, video information, custom data, and ad playback status."],["This class inherits from `NSObject` and conforms to the `NSCopying` protocol."],["Developers can use this class to monitor and control the playback of media content on Cast receivers."]]],["The `GCKMediaStatus` class provides information about media playback. It manages media queues, including checking for next or previous items, retrieving items by index or ID, and counting the items. It supports media control commands such as pause, seek, volume adjustment, mute, skip forward/backward, and queue navigation. Key properties include session ID, player state, playback rate, stream position, volume, and mute status. It also provides properties for current, next, preloaded and loading queue items, active track IDs and ad playback status.\n"]]