GCKMediaStatus Class

GCKMediaStatus Class Reference

Overview

A class that holds status information about some media.

Inherits NSObject. Implements <NSCopying>.

Instance Method Summary

(instancetype) - initWithSessionID:mediaInformation:
 Designated initializer. More...
 
(BOOL) - isMediaCommandSupported:
 Checks if the stream supports a given control command. More...
 
(nullable GCKMediaQueueItem *) - queueItemAtIndex:
 Returns the item at the specified index in the playback queue. More...
 
(nullable GCKMediaQueueItem *) - 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...
 
const NSInteger kGCKMediaCommandQueueShuffle
 A flag (bitmask) indicating that a media item supports shuffling. More...
 
const NSInteger kGCKMediaCommandSkipAd
 A flag (bitmask) indicating that a media item supports ad skipping. More...
 
const NSInteger kGCKMediaCommandQueueRepeatAll
 A flag (bitmask) indicating that a media item's queue supports indefinite repetition. More...
 
const NSInteger kGCKMediaCommandQueueRepeatOne
 A flag (bitmask) indicating that a media item supports indefinite repetition. More...
 
const NSInteger kGCKMediaCommandQueueRepeat
 A flag (bitmask) indicating that a media item and its queue support indefinite repetition. More...
 
const NSInteger kGCKMediaCommandEditTracks
 A flag (bitmask) indicating that a media item's tracks are editable. More...
 
const NSInteger kGCKMediaCommandSetPlaybackRate
 A flag (bitmask) indicating that a media item's playback rate is configurable. More...
 
const NSInteger kGCKMediaCommandLike
 A flag (bitmask) indicating that a media item can be liked by a user. More...
 
const NSInteger kGCKMediaCommandDislike
 A flag (bitmask) indicating that a media item can be disliked by a user. More...
 
const NSInteger kGCKMediaCommandFollow
 A flag (bitmask) indicating that a media item's creator can be followed by a user. More...
 
const NSInteger kGCKMediaCommandUnfollow
 A flag (bitmask) indicating that a media item's creator can be unfollowed by a user. More...
 
const NSInteger kGCKMediaCommandStreamTransfer
 A flag (bitmask) indicating that a media item supports stream transfer. 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...
 
BOOL queueHasNextItem
 Checks if there is an item after the currently playing item in the queue. 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...
 
GCKMediaLiveSeekableRangeliveSeekableRange
 The seekable range of a stream. More...
 
GCKMediaQueueDataqueueData
 The media queue's metadata. More...
 
NSUInteger queueItemCount
 Returns the number of items in the playback queue. More...
 

Method Detail

- (instancetype) initWithSessionID: (NSInteger)  mediaSessionID
mediaInformation: (nullable GCKMediaInformation *)  mediaInformation 

Designated initializer.

Parameters
mediaSessionIDThe media session ID.
mediaInformationThe media information.
- (BOOL) isMediaCommandSupported: (NSInteger)  command

Checks if the stream supports a given control command.

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

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

- (nullable GCKMediaQueueItem *) 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.

- (const NSInteger) kGCKMediaCommandQueuePrevious

A flag (bitmask) indicating that a media item supports moving to the previous item in the queue.

- (const NSInteger) kGCKMediaCommandQueueShuffle

A flag (bitmask) indicating that a media item supports shuffling.

Since
4.4.5
- (const NSInteger) kGCKMediaCommandSkipAd

A flag (bitmask) indicating that a media item supports ad skipping.

Since
4.4.5
- (const NSInteger) kGCKMediaCommandQueueRepeatAll

A flag (bitmask) indicating that a media item's queue supports indefinite repetition.

Since
4.4.5
- (const NSInteger) kGCKMediaCommandQueueRepeatOne

A flag (bitmask) indicating that a media item supports indefinite repetition.

Since
4.4.5
- (const NSInteger) kGCKMediaCommandQueueRepeat

A flag (bitmask) indicating that a media item and its queue support indefinite repetition.

queued items.

Since
4.4.5
- (const NSInteger) kGCKMediaCommandEditTracks

A flag (bitmask) indicating that a media item's tracks are editable.

Since
4.4.5
- (const NSInteger) kGCKMediaCommandSetPlaybackRate

A flag (bitmask) indicating that a media item's playback rate is configurable.

Since
4.4.5
- (const NSInteger) kGCKMediaCommandLike

A flag (bitmask) indicating that a media item can be liked by a user.

Since
4.4.5
- (const NSInteger) kGCKMediaCommandDislike

A flag (bitmask) indicating that a media item can be disliked by a user.

Since
4.4.5
- (const NSInteger) kGCKMediaCommandFollow

A flag (bitmask) indicating that a media item's creator can be followed by a user.

Since
4.4.5
- (const NSInteger) kGCKMediaCommandUnfollow

A flag (bitmask) indicating that a media item's creator can be unfollowed by a user.

Since
4.4.5
- (const NSInteger) kGCKMediaCommandStreamTransfer

A flag (bitmask) indicating that a media item supports stream transfer.

Since
4.4.5

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 positive 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
readnonatomicweak

The current queue item, if any.

- (BOOL) queueHasNextItem
readnonatomicassign

Checks if there is an item after the currently playing item in the queue.

- (GCKMediaQueueItem*) nextQueueItem
readnonatomicweak

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
- (GCKMediaLiveSeekableRange*) liveSeekableRange
readnonatomicassign

The seekable range of a stream.

Since
4.4.1
- (GCKMediaQueueData*) queueData
readnonatomicassign

The media queue's metadata.

Since
4.4.1
- (NSUInteger) queueItemCount
readnonatomicassign

Returns the number of items in the playback queue.