fix: mediaSegment not being loaded properly
This commit is contained in:
2 files changed
+8
-6
No files matched your search
@@ -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,
|
||||
|
||||
@@ -232,7 +232,7 @@ export async function getPlaybackInfo(
|
||||
},
|
||||
});
|
||||
|
||||
const segmentsPromise = getMediaSegmentsApi(api).getItemSegments({
|
||||
const segmentsPromise = await getMediaSegmentsApi(api).getItemSegments({
|
||||
itemId: targetItem.Id,
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user