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