Fix deprecated method in web demo.
This commit is contained in:
parent
cb0de2ce66
commit
0c07bba31e
|
@ -217,9 +217,11 @@ limitations under the License.
|
|||
$("#trainingChk").bootstrapToggle('off');
|
||||
$("#peopleInVideo").html("");
|
||||
|
||||
if (navigator.getUserMedia) {
|
||||
if (navigator.mediaDevices.getUserMedia) {
|
||||
var videoSelector = {video : true};
|
||||
navigator.getUserMedia(videoSelector, umSuccess, function() {
|
||||
navigator.mediaDevices.getUserMedia(videoSelector)
|
||||
.then(umSuccess)
|
||||
.catch(function() {
|
||||
alert("Error fetching video from webcam");
|
||||
});
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue