ソースを参照

Fixes locking at WaitForPluginReady with Temasys plugin install detection.

master
paweldomas 9年前
コミット
cb024be2d6
1個のファイルの変更10行の追加2行の削除
  1. 10
    2
      modules/RTC/adapter.screenshare.js

+ 10
- 2
modules/RTC/adapter.screenshare.js ファイルの表示

1
-/*! adapterjs - v0.11.1 - 2015-07-28 */
1
+/*! adapterjs - custom version from - 2015-08-12 */
2
 
2
 
3
 // Adapter's interface.
3
 // Adapter's interface.
4
 var AdapterJS = AdapterJS || {};
4
 var AdapterJS = AdapterJS || {};
348
             AdapterJS.WebRTCPlugin.isPluginInstalled(
348
             AdapterJS.WebRTCPlugin.isPluginInstalled(
349
               AdapterJS.WebRTCPlugin.pluginInfo.prefix,
349
               AdapterJS.WebRTCPlugin.pluginInfo.prefix,
350
               AdapterJS.WebRTCPlugin.pluginInfo.plugName,
350
               AdapterJS.WebRTCPlugin.pluginInfo.plugName,
351
-              AdapterJS.WebRTCPlugin.defineWebRTCInterface,
351
+              function() {
352
+                clearInterval(pluginInstallInterval);
353
+                AdapterJS.WebRTCPlugin.defineWebRTCInterface()
354
+              },
352
               function() { //Does nothing because not used here
355
               function() { //Does nothing because not used here
353
               });
356
               });
354
           } , 500);
357
           } , 500);
872
   };
875
   };
873
 
876
 
874
   AdapterJS.WebRTCPlugin.defineWebRTCInterface = function () {
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
     AdapterJS.WebRTCPlugin.pluginState = AdapterJS.WebRTCPlugin.PLUGIN_STATES.INITIALIZING;
883
     AdapterJS.WebRTCPlugin.pluginState = AdapterJS.WebRTCPlugin.PLUGIN_STATES.INITIALIZING;
876
 
884
 
877
     AdapterJS.isDefined = function (variable) {
885
     AdapterJS.isDefined = function (variable) {

読み込み中…
キャンセル
保存