Skip to main content

## resume_position

# Function resume_position

Source

    pub fn resume_position(requested: Option<f64>, engine_position: f64) -> f64

Expand description

Where to resume after re-opening the stream for a track change.

`requested` is what the caller supplied; `engine_position` is where the engine itself says it is. The caller wins when it has something real to say, and the engine answers otherwise — which is the whole point: position is the player’s to know, not the UI’s to remember.

The native path proved why. It has no `<video>` element, so the frontend sent `null`, the command defaulted to `0.0`, and switching audio track re-opened the stream at the beginning of the film — the track changed and the viewer lost their place. A non-finite or negative value is treated the same as absent rather than passed through to a backend that would reject it.

TRACES: UR-021, UR-005 | IR-019, DR-024, DR-258 | UT-233