Skip to content

Commit

Permalink
Merge pull request hokein#55 from TennyZhuang/patch-1
Browse files Browse the repository at this point in the history
remove deprecated getUserMedia
  • Loading branch information
hokein authored Dec 14, 2017
2 parents b721a92 + 61553a4 commit cae6e82
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions camera/app.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
navigator.webkitGetUserMedia({video: true},
function(stream) {
navigator.mediaDevices.getUserMedia({video: true})
.then(function(stream) {
document.getElementById('camera').src = URL.createObjectURL(stream);
},
function() {
}).catch(function() {
alert('could not connect stream');
}
);
});

0 comments on commit cae6e82

Please sign in to comment.