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,
|
enable: subtitle?.enable ?? false,
|
||||||
},
|
},
|
||||||
audio: audio,
|
audio: audio,
|
||||||
bitrate: result.mediaSource.MediaSources?.[0].Bitrate,
|
bitrate: result.mediaSource.MediaSources?.[0].Bitrate ?? 0,
|
||||||
videoCodec: videoTrack?.[0]?.Codec,
|
videoCodec: videoTrack?.[0]?.Codec ?? "",
|
||||||
audioCodec: audio.allTracks?.find((t) => t.Index === audio.track)
|
audioCodec:
|
||||||
?.Codec,
|
audio.allTracks?.find((t) => t.Index === audio.track)?.Codec ??
|
||||||
|
"",
|
||||||
isDirectPlay: isDirectPlay,
|
isDirectPlay: isDirectPlay,
|
||||||
transcodingUrl: result.mediaSource.MediaSources?.[0].TranscodingUrl,
|
transcodingUrl:
|
||||||
|
result.mediaSource.MediaSources?.[0].TranscodingUrl ?? "",
|
||||||
},
|
},
|
||||||
playbackStream: playbackUrl,
|
playbackStream: playbackUrl,
|
||||||
playsessionId: result.mediaSource.PlaySessionId,
|
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,
|
itemId: targetItem.Id,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user