|
@@ -1007,8 +1007,14 @@ function RTCUtils(RTCService)
|
1007
|
1007
|
this.getUserMedia = navigator.mozGetUserMedia.bind(navigator);
|
1008
|
1008
|
this.pc_constraints = {};
|
1009
|
1009
|
this.attachMediaStream = function (element, stream) {
|
1010
|
|
- console.log('Attaching', stream, ' to ', element);
|
1011
|
|
- element[0].src = URL.createObjectURL(stream);
|
|
1010
|
+ // srcObject is being standardized and FF will eventually
|
|
1011
|
+ // support that unprefixed. FF also supports the
|
|
1012
|
+ // "element.src = URL.createObjectURL(...)" combo, but that
|
|
1013
|
+ // will be deprecated in favour of srcObject.
|
|
1014
|
+ //
|
|
1015
|
+ // https://groups.google.com/forum/#!topic/mozilla.dev.media/pKOiioXonJg
|
|
1016
|
+ // https://github.com/webrtc/samples/issues/302
|
|
1017
|
+ element[0].mozSrcObject = stream;
|
1012
|
1018
|
element[0].play();
|
1013
|
1019
|
};
|
1014
|
1020
|
this.getStreamID = function (stream) {
|
|
@@ -1020,10 +1026,10 @@ function RTCUtils(RTCService)
|
1020
|
1026
|
return tracks[0].id.replace(/[\{,\}]/g,"");
|
1021
|
1027
|
};
|
1022
|
1028
|
this.getVideoSrc = function (element) {
|
1023
|
|
- return element.src;
|
|
1029
|
+ return element.mozSrcObject;
|
1024
|
1030
|
};
|
1025
|
1031
|
this.setVideoSrc = function (element, src) {
|
1026
|
|
- element.src = src;
|
|
1032
|
+ element.mozSrcObject = src;
|
1027
|
1033
|
};
|
1028
|
1034
|
RTCSessionDescription = mozRTCSessionDescription;
|
1029
|
1035
|
RTCIceCandidate = mozRTCIceCandidate;
|