Skip to content

Commit

Permalink
Add navigator.mediaDevices.getUserMedia to condition
Browse files Browse the repository at this point in the history
In this way, we'll use it just as soon as it is available.
  • Loading branch information
Caleb Ely committed Apr 30, 2016
1 parent b6fdb4e commit 0918b97
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,9 @@ function startup() {
}

// Get the appropriate WebRTC implementation
navigator.getMedia = navigator.getUserMedia || navigator.webkitGetUserMedia;
navigator.getMedia = navigator.mediaDevices.getUserMedia ||
navigator.getUserMedia ||
navigator.webkitGetUserMedia;

navigator.getMedia({ video: true },
function(stream) {
Expand Down

0 comments on commit 0918b97

Please sign in to comment.