The id of the active (visible) item, or null when the surface is empty.
ReadonlyChanged$Fires on every mutation. Replays the current state on subscribe (BehaviorSubject), so a late surface binding immediately renders what's already on the board.
The media currently on the surface, in tab order (oldest first).
The active item, or null when the surface is empty / the active id is stale.
Removes all media and resets the active item.
Sets (or, with null, clears) the fractional highlight on id. No-op if the item is absent.
Rehydrates a prior session's saved state IN PLACE (preserving this instance + its Changed$
subscribers). Tolerant by contract: malformed / incompatible JSON is ignored and the method
returns false without throwing, leaving the current state untouched.
Removes the item with id (no-op if absent). When it was active, the last remaining item becomes active.
Activates id and stamps a play request on it (the surface consumes the stamp to start
video/audio playback). No-op if the item is absent.
Makes id the active item (no-op if absent).
Serializes the state of record to a JSON string (persisted via the channel's RequestSave).
The Media channel's STATE ENGINE — a pure, framework-free model of what's on the shared Media surface: an ordered list of MediaItems plus which one is active. Mutations push the new state through Changed$ so the channel persists it and the surface re-renders. Mirrors
WhiteboardState(no Angular, tolerant (de)serialization, singleChanged$notifier).