Small jsmpeg and mse player fixes (#12032)

This commit is contained in:
Josh Hawkins
2024-06-17 14:54:14 -06:00
committed by GitHub
parent 4635e64b2e
commit 6c107883b5
2 changed files with 10 additions and 13 deletions

View File

@@ -260,10 +260,14 @@ function MSEPlayer({
return () => {
onDisconnect();
if (bufferTimeout) {
clearTimeout(bufferTimeout);
setBufferTimeout(undefined);
}
};
// we know that these deps are correct
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [playbackEnabled, onDisconnect, onConnect]);
}, [playbackEnabled]);
// check visibility