feat: enhance stream URL handling and add initial offset support in VideoPlayer
This commit is contained in:
@@ -158,10 +158,14 @@ impl IMediaProvider for JellyfinMediaProvider {
|
||||
/// Requests H.264 video + AAC audio in an MP4 container so that all
|
||||
/// major browsers can play it natively. Jellyfin will direct-play if the
|
||||
/// source already matches; otherwise it transcodes on the fly.
|
||||
/// A high `VideoBitRate` (40 Mbps) preserves quality on local networks.
|
||||
/// The API key is embedded in the URL so the player needs no separate auth.
|
||||
///
|
||||
/// Note: the caller (stream proxy route) may append `StartTimeTicks` to
|
||||
/// seek to the correct broadcast offset before returning the URL to the client.
|
||||
async fn get_stream_url(&self, item_id: &MediaItemId) -> DomainResult<String> {
|
||||
Ok(format!(
|
||||
"{}/Videos/{}/stream?videoCodec=h264&audioCodec=aac&container=mp4&api_key={}",
|
||||
"{}/Videos/{}/stream?videoCodec=h264&audioCodec=aac&container=mp4&VideoBitRate=40000000&api_key={}",
|
||||
self.config.base_url,
|
||||
item_id.as_ref(),
|
||||
self.config.api_key,
|
||||
|
||||
Reference in New Issue
Block a user