Browse Source

Updates app.bundle.js.

j8
George Politis 10 years ago
parent
commit
b690f5d4a1
2 changed files with 11 additions and 5 deletions
  1. 1
    1
      index.html
  2. 10
    4
      libs/app.bundle.js

+ 1
- 1
index.html View File

@@ -19,7 +19,7 @@
19 19
     <script src="libs/popover.js?v=1"></script><!-- bootstrap tooltip lib -->
20 20
     <script src="libs/toastr.js?v=1"></script><!-- notifications lib -->
21 21
     <script src="interface_config.js?v=5"></script>
22
-    <script src="libs/app.bundle.js?v=28"></script>
22
+    <script src="libs/app.bundle.js?v=29"></script>
23 23
     <script src="analytics.js?v=1"></script><!-- google analytics plugin -->
24 24
     <link rel="stylesheet" href="css/font.css?v=6"/>
25 25
     <link rel="stylesheet" href="css/toastr.css?v=1">

+ 10
- 4
libs/app.bundle.js View File

@@ -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;

Loading…
Cancel
Save