reduce quality when not active

This commit is contained in:
Samuel Newman
2024-07-31 19:31:29 +02:00
parent 837bf48deb
commit 6e98dbef9d
@@ -113,6 +113,15 @@ export function VideoPlayer({
}
}, [source, hls])
// use minimal quality when not active
useEffect(() => {
if (active) {
hls.nextLevel = -1
} else {
hls.nextLevel = 0
}
}, [hls, active])
const enterFullscreen = useCallback(() => {
if (containerRef.current) {
containerRef.current.requestFullscreen()