Commit eac7a2af authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Display a notification when local stream fails.

We used to silently fail when there was a problem with camera
permissions.  Display a notification.
parent 9a0c830a
...@@ -378,6 +378,7 @@ async function addLocalMedia(id) { ...@@ -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) { ...@@ -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;
} }
......
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