瀏覽代碼

Fixes problem with resetting focusedVideoInfo when participant leaves the room. Fixes error when display name is processed after participant has left.

master
paweldomas 10 年之前
父節點
當前提交
b038d276c9
共有 3 個檔案被更改,包括 22194 行新增22206 行删除
  1. 1
    1
      index.html
  2. 22184
    22204
      libs/app.bundle.js
  3. 9
    1
      modules/UI/videolayout/VideoLayout.js

+ 1
- 1
index.html 查看文件

@@ -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=81"></script>
22
+    <script src="libs/app.bundle.js?v=82"></script>
23 23
     <script src="analytics.js?v=1"></script><!-- google analytics plugin -->
24 24
     <link rel="stylesheet" href="css/font.css?v=7"/>
25 25
     <link rel="stylesheet" href="css/toastr.css?v=1">

+ 22184
- 22204
libs/app.bundle.js
文件差異過大導致無法顯示
查看文件


+ 9
- 1
modules/UI/videolayout/VideoLayout.js 查看文件

@@ -186,6 +186,13 @@ function getCameraVideoSize(videoWidth,
186 186
  * Sets the display name for the given video span id.
187 187
  */
188 188
 function setDisplayName(videoSpanId, displayName, key) {
189
+
190
+    if (!$('#' + videoSpanId).length) {
191
+        console.warn(
192
+            "Unable to set displayName - " + videoSpanId + " does not exist");
193
+        return;
194
+    }
195
+
189 196
     var nameSpan = $('#' + videoSpanId + '>span.displayname');
190 197
     var defaultLocalDisplayName = APP.translation.generateTranslatonHTML(
191 198
         interfaceConfig.DEFAULT_LOCAL_DISPLAY_NAME);
@@ -2281,7 +2288,8 @@ var VideoLayout = (function (my) {
2281 2288
 
2282 2289
     my.participantLeft = function (jid) {
2283 2290
         // Unlock large video
2284
-        if (focusedVideoInfo && focusedVideoInfo.jid === jid)
2291
+        var resourceJid = Strophe.getResourceFromJid(jid);
2292
+        if (focusedVideoInfo && focusedVideoInfo.resourceJid === resourceJid)
2285 2293
         {
2286 2294
             console.info("Focused video owner has left the conference");
2287 2295
             focusedVideoInfo = null;

Loading…
取消
儲存