fix: mediaSegment not being loaded properly

This commit is contained in:
--remove-section committed 2025-12-21 14:10:27 +05:30
1 parent 6576bfe5f3
commit ef8dfbc23a
2 files changed
+8 -6

No files matched your search

+7 -5
View File
@@ -278,12 +278,14 @@ const PlayButton = ({
enable: subtitle?.enable ?? false,
},
audio: audio,
bitrate: result.mediaSource.MediaSources?.[0].Bitrate,
videoCodec: videoTrack?.[0]?.Codec,
audioCodec: audio.allTracks?.find((t) => t.Index === audio.track)
?.Codec,
bitrate: result.mediaSource.MediaSources?.[0].Bitrate ?? 0,
videoCodec: videoTrack?.[0]?.Codec ?? "",
audioCodec:
audio.allTracks?.find((t) => t.Index === audio.track)?.Codec ??
"",
isDirectPlay: isDirectPlay,
transcodingUrl: result.mediaSource.MediaSources?.[0].TranscodingUrl,
transcodingUrl:
result.mediaSource.MediaSources?.[0].TranscodingUrl ?? "",
},
playbackStream: playbackUrl,
playsessionId: result.mediaSource.PlaySessionId,
+1 -1
View File
@@ -232,7 +232,7 @@ export async function getPlaybackInfo(
},
});
const segmentsPromise = getMediaSegmentsApi(api).getItemSegments({
const segmentsPromise = await getMediaSegmentsApi(api).getItemSegments({
itemId: targetItem.Id,
});