Close stream when pausing

This commit is contained in:
Nick Mowen 2022-11-08 07:25:35 -07:00
parent dca6bfb9d6
commit 55f3e3aeae

View File

@ -63,6 +63,11 @@ export default function MsePlayer({ camera, width, height }) {
} }
} }
}; };
video.onpause = () => {
ws.close();
video.src = null;
}
}, [url]); }, [url]);
return ( return (