mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-03-11 21:27:05 +00:00
close menus if data becomes unavailable
This commit is contained in:
parent
5cc640871c
commit
51ec3588bc
1 changed files with 10 additions and 0 deletions
|
|
@ -238,6 +238,16 @@ const Player = ({ urlParams }) => {
|
|||
updateLibraryItemState(videoState.time, videoState.duration);
|
||||
}
|
||||
}, [videoState.time, videoState.duration]);
|
||||
React.useEffect(() => {
|
||||
if (!Array.isArray(videoState.subtitlesTracks) || videoState.subtitlesTracks.length === 0) {
|
||||
closeSubtitlesMenu();
|
||||
}
|
||||
}, [videoState.subtitlesTracks]);
|
||||
React.useEffect(() => {
|
||||
if (typeof stream !== 'object' || stream === null) {
|
||||
closeInfoMenu();
|
||||
}
|
||||
}, [stream]);
|
||||
React.useEffect(() => {
|
||||
const intervalId = setInterval(pushToLibrary, 30000);
|
||||
return () => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue