Skip to main content

determine_video_seek_strategy

Function determine_video_seek_strategy 

Source
pub fn determine_video_seek_strategy(
    is_local: bool,
    seeks_transcoded_in_place: bool,
    needs_transcoding: bool,
    use_html5: bool,
) -> VideoSeekStrategy
Expand description

Determine the video seek strategy based on stream characteristics.

This is a pure function extracted for testability.

ยงArguments

  • is_local - Whether the file is a local download
  • seeks_transcoded_in_place - Whether the engine rendering this stream can seek a server-side transcode without re-opening it. Declared by the engine via Capabilities, never inferred from the URL or the renderer.
  • needs_transcoding - Whether the content needs transcoding
  • use_html5 - Whether frontend is using HTML5 video element