ReferenceState shape
State shape
The full payload returned by window.Moviie.getState().
The full TypeScript type returned by
getState() is reproduced below. Field
descriptions match the Properties reference.
interface PlayerState {
// Time
/** Current playback position in seconds. */
currentTime: number
/** Total duration of the video in seconds. May be 0 until metadata loads. */
duration: number
/** Furthest buffered position in seconds. */
buffered: number
/** Furthest position the viewer has actually played, in seconds. */
played: number
// Playback state
/** true when the player is paused or has not started yet. */
paused: boolean
/** true when playback has reached the end of the video. */
ended: boolean
/** true while a seek operation is in progress. */
seeking: boolean
/** true while the player is waiting for more data to continue playback. */
waiting: boolean
/** true once the `ready` event has fired. */
ready: boolean
// Volume
/** Current volume level in [0, 1]. Independent from `muted`. */
volume: number
/** true when audio is muted, regardless of the volume level. */
muted: boolean
// Display
/** true while the player is in fullscreen mode. */
fullscreen: boolean
/** true while the player is in Picture-in-Picture mode. */
pip: boolean
// Playback
/** Current playback speed multiplier (default 1). */
playbackRate: number
/** Currently selected video quality (e.g. "1080p"). null while ABR negotiates. */
playbackQuality: string | null
/** List of qualities the viewer can switch to. */
availableQualities: string[]
// Media
/** Intrinsic width of the source video in pixels. */
videoWidth: number
/** Intrinsic height of the source video in pixels. */
videoHeight: number
// Versioning
/** Player API version exposed at runtime — matches PLAYER_API_VERSION. */
version: string
}Stability
The PlayerState shape is part of the public API. Adding optional fields
is a non-breaking change. Removing or renaming fields requires a major
version bump.