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
No known key found for this signature in database
GPG Key ID: 9A56337728BC81EA

View File

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