Commit 1f50b42e authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Disable checkbox on media failure in setLocal and SharedMedia.

parent 57151829
......@@ -217,6 +217,8 @@ async function setLocalMedia() {
stream = await navigator.mediaDevices.getUserMedia(constraints);
} catch(e) {
console.error(e);
document.getElementById('presenterbox').checked = false;
await setLocalMedia();
return;
}
localMediaId = await newUpStream();
......@@ -259,6 +261,8 @@ async function setShareMedia() {
stream = await navigator.mediaDevices.getDisplayMedia({});
} catch(e) {
console.error(e);
document.getElementById('sharebox').checked = false;
await setShareMedia();
return;
}
shareMediaId = await newUpStream();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment