Skip to main content

player_seek_video

Function player_seek_video 

Source
pub async fn player_seek_video(
    player: State<'_, PlayerStateWrapper>,
    repository_manager: State<'_, RepositoryManagerWrapper>,
    repository_handle: String,
    position: f64,
    media_source_id: Option<String>,
    audio_stream_index: Option<i32>,
    use_html5: bool,
) -> Result<VideoSeekResponse, String>
Expand description

Smart video seeking that decides between native and server-side seeking

This command analyzes the current video stream and automatically chooses the best seeking strategy:

  • HLS streams (.m3u8): Use native seeking
  • Direct play streams: Use native seeking
  • Transcoded non-HLS: Request new stream URL from server starting at seek position

For native (non-HTML5) backends, this command handles the entire stream reload internally. For HTML5 backends, it returns the new URL for the frontend to handle.