mirror of
https://github.com/jech/galene.git
synced 2024-11-10 02:35:58 +01:00
Display a notification when local stream fails.
We used to silently fail when there was a problem with camera permissions. Display a notification.
This commit is contained in:
parent
9a0c830a59
commit
eac7a2afc4
1 changed files with 2 additions and 0 deletions
|
@ -378,6 +378,7 @@ async function addLocalMedia(id) {
|
||||||
stream = await navigator.mediaDevices.getUserMedia(constraints);
|
stream = await navigator.mediaDevices.getUserMedia(constraints);
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
|
displayError(e);
|
||||||
if(old)
|
if(old)
|
||||||
delUpMedia(old);
|
delUpMedia(old);
|
||||||
return;
|
return;
|
||||||
|
@ -411,6 +412,7 @@ async function addShareMedia(setup) {
|
||||||
stream = await navigator.mediaDevices.getDisplayMedia({});
|
stream = await navigator.mediaDevices.getDisplayMedia({});
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
|
displayError(e);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue