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() { ...@@ -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() { ...@@ -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();
......
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