Browse Source

Updates app.bundle.js

master
paweldomas 10 years ago
parent
commit
8fea9b76ee
2 changed files with 51 additions and 9 deletions
  1. 1
    1
      index.html
  2. 50
    8
      libs/app.bundle.js

+ 1
- 1
index.html View File

22
     <script src="libs/popover.js?v=1"></script><!-- bootstrap tooltip lib -->
22
     <script src="libs/popover.js?v=1"></script><!-- bootstrap tooltip lib -->
23
     <script src="libs/toastr.js?v=1"></script><!-- notifications lib -->
23
     <script src="libs/toastr.js?v=1"></script><!-- notifications lib -->
24
     <script src="interface_config.js?v=5"></script>
24
     <script src="interface_config.js?v=5"></script>
25
-    <script src="libs/app.bundle.js?v=125"></script>
25
+    <script src="libs/app.bundle.js?v=126"></script>
26
     <script src="analytics.js?v=1"></script><!-- google analytics plugin -->
26
     <script src="analytics.js?v=1"></script><!-- google analytics plugin -->
27
     <link rel="stylesheet" href="css/font.css?v=7"/>
27
     <link rel="stylesheet" href="css/font.css?v=7"/>
28
     <link rel="stylesheet" href="css/toastr.css?v=1">
28
     <link rel="stylesheet" href="css/toastr.css?v=1">

+ 50
- 8
libs/app.bundle.js View File

2050
 module.exports = RTCUtils;
2050
 module.exports = RTCUtils;
2051
 
2051
 
2052
 },{"../../service/RTC/Resolutions":104,"../xmpp/SDPUtil":60,"./RTCBrowserType":10,"./adapter.screenshare":12}],12:[function(require,module,exports){
2052
 },{"../../service/RTC/Resolutions":104,"../xmpp/SDPUtil":60,"./RTCBrowserType":10,"./adapter.screenshare":12}],12:[function(require,module,exports){
2053
-/*! adapterjs - v0.11.0 - 2015-06-08 */
2053
+/*! adapterjs - custom version from - 2015-08-12 */
2054
 
2054
 
2055
 // Adapter's interface.
2055
 // Adapter's interface.
2056
 var AdapterJS = AdapterJS || {};
2056
 var AdapterJS = AdapterJS || {};
2069
 // AdapterJS.options.hidePluginInstallPrompt = true;
2069
 // AdapterJS.options.hidePluginInstallPrompt = true;
2070
 
2070
 
2071
 // AdapterJS version
2071
 // AdapterJS version
2072
-AdapterJS.VERSION = '0.11.0';
2072
+AdapterJS.VERSION = '0.11.1';
2073
 
2073
 
2074
 // This function will be called when the WebRTC API is ready to be used
2074
 // This function will be called when the WebRTC API is ready to be used
2075
 // Whether it is the native implementation (Chrome, Firefox, Opera) or
2075
 // Whether it is the native implementation (Chrome, Firefox, Opera) or
2392
       try {
2392
       try {
2393
         event.cancelBubble = true;
2393
         event.cancelBubble = true;
2394
       } catch(error) { }
2394
       } catch(error) { }
2395
-    });
2396
-  }
2397
-  else {
2395
+
2396
+        var pluginInstallInterval = setInterval(function(){
2397
+            if(! isIE) {
2398
+              navigator.plugins.refresh(false);
2399
+            }
2400
+            AdapterJS.WebRTCPlugin.isPluginInstalled(
2401
+              AdapterJS.WebRTCPlugin.pluginInfo.prefix,
2402
+              AdapterJS.WebRTCPlugin.pluginInfo.plugName,
2403
+              function() {
2404
+                clearInterval(pluginInstallInterval);
2405
+                AdapterJS.WebRTCPlugin.defineWebRTCInterface()
2406
+              },
2407
+              function() { //Does nothing because not used here
2408
+              });
2409
+          } , 500);
2410
+    });   
2411
+
2412
+  }else {
2398
     c.document.close();
2413
     c.document.close();
2399
   }
2414
   }
2400
   AdapterJS.addEvent(c.document, 'click', function() {
2415
   AdapterJS.addEvent(c.document, 'click', function() {
2912
   };
2927
   };
2913
 
2928
 
2914
   AdapterJS.WebRTCPlugin.defineWebRTCInterface = function () {
2929
   AdapterJS.WebRTCPlugin.defineWebRTCInterface = function () {
2930
+    if (AdapterJS.WebRTCPlugin.pluginState ===
2931
+        AdapterJS.WebRTCPlugin.PLUGIN_STATES.READY) {
2932
+      console.error("WebRTC interface has been defined already");
2933
+      return;
2934
+    }
2915
     AdapterJS.WebRTCPlugin.pluginState = AdapterJS.WebRTCPlugin.PLUGIN_STATES.INITIALIZING;
2935
     AdapterJS.WebRTCPlugin.pluginState = AdapterJS.WebRTCPlugin.PLUGIN_STATES.INITIALIZING;
2916
 
2936
 
2917
     AdapterJS.isDefined = function (variable) {
2937
     AdapterJS.isDefined = function (variable) {
8174
         element.setAttribute("data-placement", position);
8194
         element.setAttribute("data-placement", position);
8175
         element.setAttribute("data-html", true);
8195
         element.setAttribute("data-html", true);
8176
         element.setAttribute("data-container", "body");
8196
         element.setAttribute("data-container", "body");
8197
+    },
8198
+
8199
+    /**
8200
+     * Inserts given child element as the first one into the container.
8201
+     * @param container the container to which new child element will be added
8202
+     * @param newChild the new element that will be inserted into the container
8203
+     */
8204
+    prependChild: function (container, newChild) {
8205
+        var firstChild = container.childNodes[0];
8206
+        if (firstChild) {
8207
+            container.insertBefore(newChild, firstChild);
8208
+        } else {
8209
+            container.appendChild(newChild);
8210
+        }
8177
     }
8211
     }
8178
 };
8212
 };
8179
 },{"../side_pannels/SidePanelToggler":22}],36:[function(require,module,exports){
8213
 },{"../side_pannels/SidePanelToggler":22}],36:[function(require,module,exports){
9436
     localVideo.oncontextmenu = function () { return false; };
9470
     localVideo.oncontextmenu = function () { return false; };
9437
 
9471
 
9438
     var localVideoContainer = document.getElementById('localVideoWrapper');
9472
     var localVideoContainer = document.getElementById('localVideoWrapper');
9439
-    localVideoContainer.appendChild(localVideo);
9473
+    // Put the new video always in front
9474
+    UIUtil.prependChild(localVideoContainer, localVideo);
9440
 
9475
 
9441
     var localVideoSelector = $('#' + localVideo.id);
9476
     var localVideoSelector = $('#' + localVideo.id);
9442
 
9477
 
9484
 var LargeVideo = require("./LargeVideo");
9519
 var LargeVideo = require("./LargeVideo");
9485
 var Avatar = require("../avatar/Avatar");
9520
 var Avatar = require("../avatar/Avatar");
9486
 var RTCBrowserType = require("../../RTC/RTCBrowserType");
9521
 var RTCBrowserType = require("../../RTC/RTCBrowserType");
9522
+var UIUtils = require("../util/UIUtil");
9487
 
9523
 
9488
 function RemoteVideo(peerJid, VideoLayout) {
9524
 function RemoteVideo(peerJid, VideoLayout) {
9489
     this.peerJid = peerJid;
9525
     this.peerJid = peerJid;
9691
     var streamElement = SmallVideo.createStreamElement(sid, stream);
9727
     var streamElement = SmallVideo.createStreamElement(sid, stream);
9692
     var newElementId = streamElement.id;
9728
     var newElementId = streamElement.id;
9693
 
9729
 
9694
-    this.container.appendChild(streamElement);
9730
+    // Put new stream element always in front
9731
+    UIUtils.prependChild(this.container, streamElement);
9695
 
9732
 
9696
     var sel = $('#' + newElementId);
9733
     var sel = $('#' + newElementId);
9697
     sel.hide();
9734
     sel.hide();
9892
 
9929
 
9893
 
9930
 
9894
 module.exports = RemoteVideo;
9931
 module.exports = RemoteVideo;
9895
-},{"../../RTC/RTCBrowserType":10,"../audio_levels/AudioLevels":14,"../avatar/Avatar":18,"./ConnectionIndicator":36,"./LargeVideo":37,"./SmallVideo":40}],40:[function(require,module,exports){
9932
+},{"../../RTC/RTCBrowserType":10,"../audio_levels/AudioLevels":14,"../avatar/Avatar":18,"../util/UIUtil":35,"./ConnectionIndicator":36,"./LargeVideo":37,"./SmallVideo":40}],40:[function(require,module,exports){
9896
 /* global $, APP, require */
9933
 /* global $, APP, require */
9897
 var Avatar = require("../avatar/Avatar");
9934
 var Avatar = require("../avatar/Avatar");
9898
 var UIUtil = require("../util/UIUtil");
9935
 var UIUtil = require("../util/UIUtil");
15363
         if (!isEnabled)
15400
         if (!isEnabled)
15364
             return localDescription;
15401
             return localDescription;
15365
 
15402
 
15403
+        if (!localDescription) {
15404
+            console.warn("localDescription is null or undefined");
15405
+            return localDescription;
15406
+        }
15407
+
15366
         // IF we have local video SSRC stored make sure it is replaced
15408
         // IF we have local video SSRC stored make sure it is replaced
15367
         // with old SSRC
15409
         // with old SSRC
15368
         if (localVideoSSRC) {
15410
         if (localVideoSSRC) {

Loading…
Cancel
Save