I encountered an issue when dealing with the webrtcrecorder JS sample, which uses the following code in symple.player.webrtc.js to set the video src URL:
navigator.getUserMedia(this.userMediaConstraints,
function (localStream) { // success
// Play the local video stream and create the SDP offer.
self.video.src = URL.createObjectURL(localStream);
self.pc.addStream(localStream);
self.pc.createOffer(
function(desc) { // success
Symple.log('symple:webrtc: offer', desc);
self._onLocalSDP(desc);
},
function(err) { // error
Symple.log('symple:webrtc: offer failed', err);
});
// Store the active local stream
self.activeStream = localStream;
},
function(err) { // error
self.setError('getUserMedia() failed: ' + err);
});
I now get an error on self.video.src = URL.createObjectURL(localStream);:
Uncaught TypeError: Failed to execute 'createObjectURL' on 'URL': No function was found that matched the signature provided.
Apparently this functionality (of creating a URL from a MediaStream) is now deprecated and has been removed from current versions of Chrome and Firefox as of mid/late 2018. See https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL for details. Apparently the new recommended approach is to set the srcObject property to the localStream directly:
I encountered an issue when dealing with the webrtcrecorder JS sample, which uses the following code in
symple.player.webrtc.js
to set the video src URL:I now get an error on
self.video.src = URL.createObjectURL(localStream);
:Uncaught TypeError: Failed to execute 'createObjectURL' on 'URL': No function was found that matched the signature provided.
Apparently this functionality (of creating a URL from a MediaStream) is now deprecated and has been removed from current versions of Chrome and Firefox as of mid/late 2018. See https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL for details. Apparently the new recommended approach is to set the
srcObject
property to the localStream directly: