mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-24 02:02:36 -04:00
Reload subtitles on player ref change
This commit is contained in:
parent
a124a1a71f
commit
593dc3ca55
@ -116,8 +116,9 @@ export const Video = memo(function Video({
|
||||
if (!subtitle || !subtitles) return;
|
||||
setSubtitle(subtitles.find((x) => x.language === subtitle.language) ?? null);
|
||||
// When the video change, try to persist the subtitle language.
|
||||
// Also include the player ref, it can be initalised after the subtitles.
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [subtitles]);
|
||||
}, [subtitles, ref.current]);
|
||||
|
||||
const volume = useAtomValue(volumeAtom);
|
||||
const isMuted = useAtomValue(mutedAtom);
|
||||
|
Loading…
x
Reference in New Issue
Block a user