Skip to main content

is_truncated_end

Function is_truncated_end 

Source
pub fn is_truncated_end(
    position: f64,
    duration: Option<f64>,
    tolerance: f64,
) -> bool
Expand description

Did this end-of-stream happen far enough short of the item’s runtime to be a truncation rather than a finish?

position and duration must be on the same timeline — for a handoff stream built with StartTimeTicks, that means the absolute position (handoff base

  • the player’s relative position) against the item’s full runtime.

An unknown or non-positive duration answers false: with nothing to compare against, the reported end is taken at face value (previous behaviour).