Type Alias: PlayerStatus
type PlayerStatus = "idle" | "loading" | "buffering" | "ready" | "ended" | "error";
Defined in: packages/player/src/state.ts:36
Coarse lifecycle of a player.
startFile
┌───────────────────────────────────────────┐
│ ▼
┌────────┐ ┌─────────┐
│ idle │ │ loading │
└────────┘ └─────────┘
▲ │ │
│ endFile(stop|quit) / shutdown │ │ endFile(error)
│ / idle-active=true │ ▼
│ playbackRestart │ ┌───────┐
│ │ │ error │
│ ▼ └───────┘
│ ┌───────┐ playing && core-idle ┌───────────┐
└───────│ ready │◀───────────────────────▶│ buffering │
└───────┘ !core-idle └───────────┘
│
│ endFile(endOfFile)
▼
┌───────┐
│ ended │
└───────┘
error, ended and loading are sticky: only a new startFile (or a
shutdown) leaves them, so a late idle-active cannot erase a failure.