GCKMediaStatus Class
A class that holds status information about some media.
Inherits NSObject. Implements <NSCopying>.
- (BOOL) queueHasNextItem |
|
|
|
Checks if there is an item after the currently playing item in the queue.
- (instancetype) initWithSessionID: |
|
(NSInteger) |
mediaSessionID |
mediaInformation: |
|
(GCKMediaInformation *__nullable) |
mediaInformation |
|
|
| |
Designated initializer.
- Parameters
-
mediaSessionID | The media session ID. |
mediaInformation | The media information. |
- (BOOL) isMediaCommandSupported: |
|
(NSInteger) |
command |
|
Checks if the stream supports a given control command.
- (NSUInteger) queueItemCount |
|
|
|
Returns the number of items in the playback queue.
Returns the item at the specified index in the playback queue.
Returns the item with the given item ID in the playback queue.
- (NSInteger) queueIndexForItemID: |
|
(NSUInteger) |
itemID |
|
Returns the index of the item with the given item ID in the playback queue, or -1 if there is no such item in the queue.
- (const NSInteger) kGCKMediaCommandPause |
A flag (bitmask) indicating that a media item can be paused.
- (const NSInteger) kGCKMediaCommandSeek |
A flag (bitmask) indicating that a media item supports seeking.
- (const NSInteger) kGCKMediaCommandSetVolume |
A flag (bitmask) indicating that a media item's audio volume can be changed.
- (const NSInteger) kGCKMediaCommandToggleMute |
A flag (bitmask) indicating that a media item's audio can be muted.
- (const NSInteger) kGCKMediaCommandSkipForward |
A flag (bitmask) indicating that a media item supports skipping forward.
- (const NSInteger) kGCKMediaCommandSkipBackward |
A flag (bitmask) indicating that a media item supports skipping backward.
- (const NSInteger) kGCKMediaCommandQueueNext |
A flag (bitmask) indicating that a media item supports moving to the next item in the queue.
- Deprecated:
- This flag is currently not implemented.
- (const NSInteger) kGCKMediaCommandQueuePrevious |
A flag (bitmask) indicating that a media item supports moving to the previous item in the queue.
- Deprecated:
- This flag is currently not implemented.
- (NSInteger) mediaSessionID |
|
readnonatomicassign |
The current media session ID, if any; otherwise 0.
The current player state.
The current idle reason.
This value is only meaningful if the player state is GCKMediaPlayerStateIdle.
Gets the current stream playback rate.
This will be negative if the stream is seeking backwards, 0 if the stream is paused, 1 if the stream is playing normally, and some other postive value if the stream is seeking forwards.
- (NSTimeInterval) streamPosition |
|
readnonatomicassign |
The current stream position, as an NSTimeInterval from the start of the stream.
The current queue repeat mode.
- (NSUInteger) currentItemID |
|
readnonatomicassign |
The ID of the current queue item, if any.
- (BOOL) queueHasCurrentItem |
|
readnonatomicassign |
Whether there is a current item in the queue.
The current queue item, if any.
The next queue item, if any.
- (BOOL) queueHasPreviousItem |
|
readnonatomicassign |
Whether there is an item before the currently playing item in the queue.
- (BOOL) queueHasLoadingItem |
|
readnonatomicassign |
Whether there is an item being preloaded in the queue.
- (NSUInteger) preloadedItemID |
|
readnonatomicassign |
The ID of the item that is currently preloaded, if any.
- (NSUInteger) loadingItemID |
|
readnonatomicassign |
The ID of the item that is currently loading, if any.
- (NSArray<NSNumber *>*) activeTrackIDs |
|
readnonatomicstrong |
The list of active track IDs.
The video information, if any.
- Since
- 3.3
Any custom data that is associated with the media status.
The current ad playback status.
- Since
- 3.3
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-18 UTC.
[null,null,["Last updated 2024-09-18 UTC."],[[["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."]]],[]]