1
Fork 0

Disable checkbox on media failure in setLocal and SharedMedia.

This commit is contained in:
Juliusz Chroboczek 2020-05-01 12:38:22 +02:00
parent 5715182978
commit 1f50b42ee0
1 changed files with 4 additions and 0 deletions

View File

@ -217,6 +217,8 @@ async function setLocalMedia() {
stream = await navigator.mediaDevices.getUserMedia(constraints); stream = await navigator.mediaDevices.getUserMedia(constraints);
} catch(e) { } catch(e) {
console.error(e); console.error(e);
document.getElementById('presenterbox').checked = false;
await setLocalMedia();
return; return;
} }
localMediaId = await newUpStream(); localMediaId = await newUpStream();
@ -259,6 +261,8 @@ async function setShareMedia() {
stream = await navigator.mediaDevices.getDisplayMedia({}); stream = await navigator.mediaDevices.getDisplayMedia({});
} catch(e) { } catch(e) {
console.error(e); console.error(e);
document.getElementById('sharebox').checked = false;
await setShareMedia();
return; return;
} }
shareMediaId = await newUpStream(); shareMediaId = await newUpStream();