Skip to content

Commit

Permalink
Account for unavailable mediaDevices
Browse files Browse the repository at this point in the history
  • Loading branch information
brianpeiris committed Dec 23, 2019
1 parent 229d8f7 commit 0cb97d6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions js/SketchController.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export default class SketchController {

_setupVideoPassthrough() {
this._domMonitor = document.getElementById("monitor");
if (navigator.mediaDevices) {
navigator.mediaDevices
.getUserMedia({ video: true })
.then(stream => {
Expand All @@ -43,6 +44,7 @@ export default class SketchController {
.catch(e => {
console.info("Could not get video passthrough", e);
});
}
}

_initializeSketch() {
Expand Down

0 comments on commit 0cb97d6

Please sign in to comment.