Function: reducePlayerState()
function reducePlayerState(
state: PlayerState,
event: PlayerEvent,
context: ReducerContext
): PlayerState;
Defined in: packages/player/src/state.ts:1008
The pure state reducer: (state, event, context) → state.
Every PlayerState in the system comes from here. It performs no I/O, reads
no clock, and returns the same object identity when an event changes
nothing — so onStateChange never fires spuriously.
Parameters
| Parameter | Type | Description |
|---|---|---|
state | PlayerState | The previous snapshot. |
event | PlayerEvent | One translated event (see PlayerEvent). |
context | ReducerContext | Injected clock / time-pos / current URI. |
Returns
The next snapshot, or state unchanged.