Skip to content

Take control over your live stream video by running it yourself. Streaming + chat out of the box.

Fix error thrown by player after player is unmounted

Gabe Kangas8dccee272754
diff --git a/web/components/video/OwncastPlayer/OwncastPlayer.tsx b/web/components/video/OwncastPlayer/OwncastPlayer.tsx
index f92ee9c6f8..cc3cb0ffe8 100644
--- a/web/components/video/OwncastPlayer/OwncastPlayer.tsx
+++ b/web/components/video/OwncastPlayer/OwncastPlayer.tsx
@@ -288,6 +288,13 @@ export const OwncastPlayer: FC<OwncastPlayerProps> = ({ source, online }) => {
}
}, [clockSkew]);
+ useEffect(
+ () => () => {
+ stopLatencyCompensator();
+ },
+ [],
+ );
+
return (
<div style={{ display: 'grid' }}>
{online && (