Reference / @open-music-sdk/lib-preview-player / tPreviewPlayerState
Interface: tPreviewPlayerState<T>
Defined in: lib/lib-preview-player/src/player.ts:98
What a page draws a player from. Each one is frozen, and replaced by another only when something in it changed.
Type Parameters
T
T extends tPreviewable = tPreviewable
Properties
duration
readonly duration: number;Defined in: lib/lib-preview-player/src/player.ts:110
How long the current clip is, in seconds, or 0 until the element knows.
index
readonly index: number;Defined in: lib/lib-preview-player/src/player.ts:104
Where in the queue the current track is, or -1 when none is.
position
readonly position: number;Defined in: lib/lib-preview-player/src/player.ts:108
How far into the current clip the element is, in seconds.
status
readonly status: tPreviewStatus;Defined in: lib/lib-preview-player/src/player.ts:100
Where the player stands: idle, loading, playing, paused, ended or in error.
track
readonly track: T | undefined;Defined in: lib/lib-preview-player/src/player.ts:106
The current track, or undefined when none is.
tracks
readonly tracks: readonly T[];Defined in: lib/lib-preview-player/src/player.ts:102
The queue: the tracks load kept, in the order they were handed over.
volume
readonly volume: number;Defined in: lib/lib-preview-player/src/player.ts:112
The element's volume, from 0 to 1.