mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-03 01:35:22 +03:00
Set video source to null on cleanup
This commit is contained in:
parent
c6a1e5ab9f
commit
97b314431d
@ -59,6 +59,8 @@ export default function WebRtcPlayer({ camera, width, height }) {
|
|||||||
pc.addTransceiver('audio', { direction: 'recvonly' });
|
pc.addTransceiver('audio', { direction: 'recvonly' });
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
|
const video = document.getElementById('video');
|
||||||
|
video.srcObject = null;
|
||||||
pc.close();
|
pc.close();
|
||||||
ws.close();
|
ws.close();
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user