mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-04-21 07:32:02 +00:00
fix: Player - selected check before video.load
Signed-off-by: Lachezar Lechev <lachezar@ambire.com>
This commit is contained in:
parent
0bec58b158
commit
3c2f8cb89b
1 changed files with 3 additions and 2 deletions
|
|
@ -322,7 +322,8 @@ const Player = ({ urlParams, queryParams }) => {
|
||||||
setError(null);
|
setError(null);
|
||||||
video.unload();
|
video.unload();
|
||||||
|
|
||||||
if (player.stream?.type === 'Ready' && streamingServer.settings?.type !== 'Loading') {
|
// 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,
|
||||||
|
|
@ -358,7 +359,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, forceTranscoding, casting]);
|
}, [streamingServer.baseUrl, player.selected, player.selected, 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