mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-24 02:02:36 -04:00
Fix outdated qualites menu when hls instance changes
This commit is contained in:
parent
5de584d6e3
commit
7e10a9162c
@ -393,6 +393,8 @@ export const QualitiesMenu = (props: ComponentProps<typeof Menu>) => {
|
||||
// biome-ignore lint/correctness/useExhaustiveDependencies: Inculde hls in dependency array
|
||||
useEffect(() => {
|
||||
if (!hls) return;
|
||||
// Also rerender when hls instance changes
|
||||
rerender();
|
||||
hls.on(Hls.Events.LEVEL_SWITCHED, rerender);
|
||||
return () => hls?.off(Hls.Events.LEVEL_SWITCHED, rerender);
|
||||
}, [hls]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user