Set video source to null on cleanup

This commit is contained in:
Nick Mowen 2022-10-21 09:57:30 -06:00
parent c6a1e5ab9f
commit 97b314431d

View File

@ -59,6 +59,8 @@ export default function WebRtcPlayer({ camera, width, height }) {
pc.addTransceiver('audio', { direction: 'recvonly' });
return () => {
const video = document.getElementById('video');
video.srcObject = null;
pc.close();
ws.close();
};