1
Fork 0
mirror of https://github.com/jech/galene.git synced 2024-11-22 16:45:58 +01:00

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

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();