Skip to content

Import

TypeScript
import {
AudioTrackState,
BufferState,
CastState,
NetworkState,
QualityState,
SetupState,
VisibilityState,
} from '@nomercy-entertainment/nomercy-player-core';

SetupState

Coarse lifecycle readiness. Returned by player.setupState().

MemberValueMeaning
NOT_SETUP'not-setup'setup() has not been called yet
SETTING_UP'setup'setup() is in flight
READY'ready'Setup completed, player accepts commands
DISPOSED'disposed'dispose() completed

BufferState

Buffer health derived from the active backend. Returned by player.bufferState().

MemberValueMeaning
IDLE'idle'No active media or buffer is comfortably ahead
LOADING'loading'Backend is fetching initial segments
SEEKING'seeking'A seek is in progress
STALLED'stalled'Playback stalled, buffer ran dry

NetworkState

Network connectivity state. Returned by player.networkState().

MemberValueMeaning
ONLINE'online'Network reachable and delivering acceptable bandwidth
OFFLINE'offline'No network connectivity
SLOW'slow'Online but downlink < 1.5 Mbps

VisibilityState

Tab / document visibility. Returned by player.visibilityState().

MemberValueMeaning
VISIBLE'visible'Player’s document tab is in the foreground
HIDDEN'hidden'Tab is hidden or minimised

QualityState

Quality / bitrate selection mode. Returned by player.qualityMode().

MemberValueMeaning
AUTO'auto'Adaptive bitrate, backend picks the best level
MANUAL'manual'A specific level is locked

AudioTrackState

Audio track selection mode. Returned by player.audioTrackMode().

MemberValueMeaning
DEFAULT'default'Backend’s default track is active
MANUAL'manual'A track was explicitly chosen

CastState

Cast / handoff state. Returned by player.castState() and carried on the castState event.

MemberValueMeaning
UNAVAILABLE'unavailable'No Cast/AirPlay/RemotePlayback APIs present
AVAILABLE'available'At least one device is reachable; no active session
CONNECTING'connecting'A session is being established
CONNECTED'connected'Session is active
DISCONNECTED'disconnected'Session was active but has ended

See also