Fix error thrown by player after player is unmounted

This commit is contained in:
Gabe Kangas
2022-10-08 17:51:12 -07:00
parent 083df79ae6
commit 23b5468ed4

View File

@@ -288,6 +288,13 @@ export const OwncastPlayer: FC<OwncastPlayerProps> = ({ source, online }) => {
}
}, [clockSkew]);
useEffect(
() => () => {
stopLatencyCompensator();
},
[],
);
return (
<div style={{ display: 'grid' }}>
{online && (