MediaStatus
A class that holds status information about some media or media queue. The current MediaStatus can be obtained using getMediaStatus or onMediaStatusUpdated in RemoteMediaClient, or using the useMediaStatus hook.
Each media session is associated with a media queue on the receiver application. The list of media items in the current queue can be obtained from queueItems. Media items are assigned a unique item ID. Accessors for individual item and values of properties of the queue are also provided here.
currentItemId, loadingItemId and preloadedItemId tells which item is playing, which item is loading and which item has been preloaded on the receiver.
Hierarchy
- MediaStatus
Index
Properties
- activeTrackIds
- currentItemId
- customData
- idleReason
- isMuted
- liveSeekableRange
- loadingItemId
- mediaInfo
- playbackRate
- playerState
- preloadedItemId
- queueItems
- queueRepeatMode
- streamPosition
- videoInfo
- volume
Properties
Optional activeTrackIds
• activeTrackIds? : number[]
The list of active MediaTrack IDs.
Optional currentItemId
• currentItemId? : undefined | number
The itemId of the MediaQueueItem that that is currently active in the queue (it may not be playing).
Optional customData
• customData? : undefined | object
Any custom data that is associated with the media item.
Optional idleReason
• idleReason? : MediaPlayerIdleReason | null
The current idle reason. This value is only meaningful if the playerState is idle.
isMuted
• isMuted: boolean
The stream's mute state.
Optional liveSeekableRange
• liveSeekableRange? : MediaLiveSeekableRange | null
The seekable range of a live media stream. If the current media is a live stream and this property is null, then the stream is not seekable.
Optional loadingItemId
• loadingItemId? : undefined | number
The itemId of the MediaQueueItem that is currently loading (but isn't active in the queue) on the receiver.
Optional mediaInfo
• mediaInfo? : MediaInfo | null
The current media information.
playbackRate
• playbackRate: number
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.
playerState
• playerState: MediaPlayerState | null
The current player state.
Optional preloadedItemId
• preloadedItemId? : undefined | number
ID of the next MediaQueueItem, only available if it has been preloaded. On the receiver media items can be preloaded and cached temporarily in memory, so when they are loaded later on, the process is faster (as the media does not have to be fetched from the network).
queueItems
• queueItems: MediaQueueItem[]
Readonly list of items in the queue.
Optional queueRepeatMode
• queueRepeatMode? : MediaRepeatMode | null
The repeat mode for playing the queue.
streamPosition
• streamPosition: number
The current stream position from the start of the stream, in seconds
Optional videoInfo
• videoInfo? : VideoInfo | null
The video information. If the video information of the current media was not received from the cast receiver, null will be returned.
volume
• volume: number
The stream's volume, between 0.0 and 1.0
