This commit is contained in:
Timothy J. Baek 2024-08-23 18:22:50 +02:00
parent 8a99eaa68f
commit 7a1fecbdb3

View File

@ -766,7 +766,11 @@
let stream = await navigator.mediaDevices.getUserMedia({ audio: true }); let stream = await navigator.mediaDevices.getUserMedia({ audio: true });
// If the user grants the permission, proceed to show the call overlay // If the user grants the permission, proceed to show the call overlay
stream.getTracks().forEach((track) => track.stop()); if (stream) {
const tracks = stream.getTracks();
tracks.forEach((track) => track.stop());
}
stream = null; stream = null;
showCallOverlay.set(true); showCallOverlay.set(true);