Ver código fonte

Fixes locking at WaitForPluginReady with Temasys plugin install detection.

master
paweldomas 9 anos atrás
pai
commit
cb024be2d6
1 arquivos alterados com 10 adições e 2 exclusões
  1. 10
    2
      modules/RTC/adapter.screenshare.js

+ 10
- 2
modules/RTC/adapter.screenshare.js Ver arquivo

@@ -1,4 +1,4 @@
1
-/*! adapterjs - v0.11.1 - 2015-07-28 */
1
+/*! adapterjs - custom version from - 2015-08-12 */
2 2
 
3 3
 // Adapter's interface.
4 4
 var AdapterJS = AdapterJS || {};
@@ -348,7 +348,10 @@ AdapterJS.renderNotificationBar = function (text, buttonText, buttonLink, openNe
348 348
             AdapterJS.WebRTCPlugin.isPluginInstalled(
349 349
               AdapterJS.WebRTCPlugin.pluginInfo.prefix,
350 350
               AdapterJS.WebRTCPlugin.pluginInfo.plugName,
351
-              AdapterJS.WebRTCPlugin.defineWebRTCInterface,
351
+              function() {
352
+                clearInterval(pluginInstallInterval);
353
+                AdapterJS.WebRTCPlugin.defineWebRTCInterface()
354
+              },
352 355
               function() { //Does nothing because not used here
353 356
               });
354 357
           } , 500);
@@ -872,6 +875,11 @@ if (navigator.mozGetUserMedia) {
872 875
   };
873 876
 
874 877
   AdapterJS.WebRTCPlugin.defineWebRTCInterface = function () {
878
+    if (AdapterJS.WebRTCPlugin.pluginState ===
879
+        AdapterJS.WebRTCPlugin.PLUGIN_STATES.READY) {
880
+      console.error("WebRTC interface has been defined already");
881
+      return;
882
+    }
875 883
     AdapterJS.WebRTCPlugin.pluginState = AdapterJS.WebRTCPlugin.PLUGIN_STATES.INITIALIZING;
876 884
 
877 885
     AdapterJS.isDefined = function (variable) {

Carregando…
Cancelar
Salvar