diff --git a/public/js/chat.js b/public/js/chat.js index e9346c8..dc30f43 100644 --- a/public/js/chat.js +++ b/public/js/chat.js @@ -381,6 +381,9 @@ function swap() { switchStreamHelper(stream); }); } else { + + VideoChat.localVideo.srcObject.getTracks().forEach(track => track.stop()); + navigator.mediaDevices.getUserMedia({ video: true, audio: true