Skip to main content

determine_video_seek_strategy

Function determine_video_seek_strategy 

Source
pub fn determine_video_seek_strategy(
    is_local: bool,
    is_hls: 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
  • is_hls - Whether the stream URL contains “.m3u8” (HLS stream)
  • needs_transcoding - Whether the content needs transcoding
  • use_html5 - Whether frontend is using HTML5 video element