Skip to content

Commit

Permalink
remove deprecated getUserMedia
Browse files Browse the repository at this point in the history
  • Loading branch information
TennyZhuang authored Dec 14, 2017
1 parent b721a92 commit 61553a4
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 61553a4

Please sign in to comment.