fix: Player - video.load hook needs player.stream

Signed-off-by: Lachezar Lechev <lachezar@ambire.com>
This commit is contained in:
Lachezar Lechev 2025-11-27 13:03:29 +02:00
parent 924cd715d2
commit 3c8d62f3b6
No known key found for this signature in database
GPG key ID: 69BDCB3ED8CE8037

View file

@ -323,7 +323,7 @@ const Player = ({ urlParams, queryParams }) => {
setError(null);
video.unload();
if (player.stream?.type === 'Ready' && streamingServer.settings?.type !== 'Loading') {
if (player.selected && player.stream?.type === 'Ready' && streamingServer.settings?.type !== 'Loading') {
video.load({
stream: {
...player.stream.content,
@ -361,7 +361,7 @@ const Player = ({ urlParams, queryParams }) => {
shellTransport: services.shell.active ? services.shell.transport : null,
});
}
}, [streamingServer.baseUrl, player.selected, player.selected, forceTranscoding, casting]);
}, [streamingServer.baseUrl, player.selected, player.stream, forceTranscoding, casting]);
React.useEffect(() => {
if (video.state.stream !== null) {
const tracks = player.subtitles.map((subtitles) => ({