Reputation: 23
I have tried the following example of the web camera in firefox and chrome (https://jsfiddle.net/codepo8/agaRe/4/).
function(stream) {
if (navigator.mozGetUserMedia) {
video.mozSrcObject = stream;
} else {
var vendorURL = window.URL || window.webkitURL;
video.src = vendorURL ? vendorURL.createObjectURL(stream) : stream;
}
video.play();
},
Today firefox has been updated to version 58 and the example has stopped working.
However, in chrome it is still working.
Could you help me?
Upvotes: 0
Views: 318
Reputation: 42430
The non-standard mozSrcObject
was removed in Firefox 58 in favor of srcObject
.
Also, other lines in this function are wrong. See this other answer. All you need these days are:
function(stream) {
video.srcObject = stream;
video.play();
},
This works in all browsers that support WebRTC.
Upvotes: 1