GCKMediaStatus Class

GCKMediaStatus Class Reference

Overview

A class that holds status information about some media.

Inherits NSObject. Implements <NSCopying>.

Instance Method Summary

(BOOL) - queueHasNextItem
 Checks if there is an item after the currently playing item in the queue. More...
 
(instancetype) - initWithSessionID:mediaInformation:
 Designated initializer. More...
 
(BOOL) - isMediaCommandSupported:
 Checks if the stream supports a given control command. More...
 
(NSUInteger) - queueItemCount
 Returns the number of items in the playback queue. More...
 
(GCKMediaQueueItem *__nullable) - queueItemAtIndex:
 Returns the item at the specified index in the playback queue. More...
 
(GCKMediaQueueItem *__nullable) - queueItemWithItemID:
 Returns the item with the given item ID in the playback queue. More...
 
(NSInteger) - queueIndexForItemID:
 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. More...
 

Public Attributes

const NSInteger kGCKMediaCommandPause
 A flag (bitmask) indicating that a media item can be paused. More...
 
const NSInteger kGCKMediaCommandSeek
 A flag (bitmask) indicating that a media item supports seeking. More...
 
const NSInteger kGCKMediaCommandSetVolume
 A flag (bitmask) indicating that a media item's audio volume can be changed. More...
 
const NSInteger kGCKMediaCommandToggleMute
 A flag (bitmask) indicating that a media item's audio can be muted. More...
 
const NSInteger kGCKMediaCommandSkipForward
 A flag (bitmask) indicating that a media item supports skipping forward. More...
 
const NSInteger kGCKMediaCommandSkipBackward
 A flag (bitmask) indicating that a media item supports skipping backward. More...
 
const NSInteger kGCKMediaCommandQueueNext
 A flag (bitmask) indicating that a media item supports moving to the next item in the queue. More...
 
const NSInteger kGCKMediaCommandQueuePrevious
 A flag (bitmask) indicating that a media item supports moving to the previous item in the queue. More...
 

Property Summary

NSInteger mediaSessionID
 The current media session ID, if any; otherwise 0. More...
 
GCKMediaPlayerState playerState
 The current player state. More...
 
BOOL playingAd
 Indicates whether the receiver is currently playing an ad. More...
 
GCKMediaPlayerIdleReason idleReason
 The current idle reason. More...
 
float playbackRate
 Gets the current stream playback rate. More...
 
GCKMediaInformationmediaInformation
 The GCKMediaInformation for this item. More...
 
NSTimeInterval streamPosition
 The current stream position, as an NSTimeInterval from the start of the stream. More...
 
float volume
 The stream's volume. More...
 
BOOL isMuted
 The stream's mute state. More...
 
GCKMediaRepeatMode queueRepeatMode
 The current queue repeat mode. More...
 
NSUInteger currentItemID
 The ID of the current queue item, if any. More...
 
BOOL queueHasCurrentItem
 Whether there is a current item in the queue. More...
 
GCKMediaQueueItemcurrentQueueItem
 The current queue item, if any. More...
 
GCKMediaQueueItemnextQueueItem
 The next queue item, if any. More...
 
BOOL queueHasPreviousItem
 Whether there is an item before the currently playing item in the queue. More...
 
BOOL queueHasLoadingItem
 Whether there is an item being preloaded in the queue. More...
 
NSUInteger preloadedItemID
 The ID of the item that is currently preloaded, if any. More...
 
NSUInteger loadingItemID
 The ID of the item that is currently loading, if any. More...
 
NSArray< NSNumber * > * activeTrackIDs
 The list of active track IDs. More...
 
GCKVideoInfovideoInfo
 The video information, if any. More...
 
id customData
 Any custom data that is associated with the media status. More...
 
GCKAdBreakStatusadBreakStatus
 The current ad playback status. More...
 

Method Detail

- (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
mediaSessionIDThe media session ID.
mediaInformationThe 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.

- (GCKMediaQueueItem *__nullable) queueItemAtIndex: (NSUInteger)  index

Returns the item at the specified index in the playback queue.

- (GCKMediaQueueItem *__nullable) queueItemWithItemID: (NSUInteger)  itemID

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.

Member Data Documentation

- (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.

Property Detail

- (NSInteger) mediaSessionID
readnonatomicassign

The current media session ID, if any; otherwise 0.

- (GCKMediaPlayerState) playerState
readnonatomicassign

The current player state.

- (BOOL) playingAd
readnonatomicassign

Indicates whether the receiver is currently playing an ad.

Deprecated:
Use adBreakStatus instead.
- (GCKMediaPlayerIdleReason) idleReason
readnonatomicassign

The current idle reason.

This value is only meaningful if the player state is GCKMediaPlayerStateIdle.

- (float) playbackRate
readnonatomicassign

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.

- (GCKMediaInformation*) mediaInformation
readnonatomicstrong

The GCKMediaInformation for this item.

- (NSTimeInterval) streamPosition
readnonatomicassign

The current stream position, as an NSTimeInterval from the start of the stream.

- (float) volume
readnonatomicassign

The stream's volume.

- (BOOL) isMuted
readnonatomicassign

The stream's mute state.

- (GCKMediaRepeatMode) queueRepeatMode
readnonatomicassign

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.

- (GCKMediaQueueItem*) currentQueueItem
readnonatomicassign

The current queue item, if any.

- (GCKMediaQueueItem*) nextQueueItem
readnonatomicassign

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.

- (GCKVideoInfo*) videoInfo
readnonatomicstrong

The video information, if any.

Since
3.3
- (id) customData
readnonatomicstrong

Any custom data that is associated with the media status.

- (GCKAdBreakStatus*) adBreakStatus
readnonatomicstrong

The current ad playback status.

Since
3.3