Close pc connection

This commit is contained in:
Nick Mowen 2022-10-21 09:47:26 -06:00
parent 6a204a839e
commit c6a1e5ab9f

View File

@ -59,6 +59,7 @@ export default function WebRtcPlayer({ camera, width, height }) {
pc.addTransceiver('audio', { direction: 'recvonly' }); pc.addTransceiver('audio', { direction: 'recvonly' });
return () => { return () => {
pc.close();
ws.close(); ws.close();
}; };
}, [url]); }, [url]);