mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-04-21 11:42:05 +00:00
fix: Player - video.load hook needs player.stream
Signed-off-by: Lachezar Lechev <lachezar@ambire.com>
This commit is contained in:
parent
924cd715d2
commit
3c8d62f3b6
1 changed files with 2 additions and 2 deletions
|
|
@ -323,7 +323,7 @@ const Player = ({ urlParams, queryParams }) => {
|
||||||
setError(null);
|
setError(null);
|
||||||
video.unload();
|
video.unload();
|
||||||
|
|
||||||
if (player.stream?.type === 'Ready' && streamingServer.settings?.type !== 'Loading') {
|
if (player.selected && player.stream?.type === 'Ready' && streamingServer.settings?.type !== 'Loading') {
|
||||||
video.load({
|
video.load({
|
||||||
stream: {
|
stream: {
|
||||||
...player.stream.content,
|
...player.stream.content,
|
||||||
|
|
@ -361,7 +361,7 @@ const Player = ({ urlParams, queryParams }) => {
|
||||||
shellTransport: services.shell.active ? services.shell.transport : null,
|
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(() => {
|
React.useEffect(() => {
|
||||||
if (video.state.stream !== null) {
|
if (video.state.stream !== null) {
|
||||||
const tracks = player.subtitles.map((subtitles) => ({
|
const tracks = player.subtitles.map((subtitles) => ({
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue