Selaa lähdekoodia

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

j8
paweldomas 10 vuotta sitten
vanhempi
commit
b038d276c9
3 muutettua tiedostoa jossa 22194 lisäystä ja 22206 poistoa
  1. 1
    1
      index.html
  2. 22184
    22204
      libs/app.bundle.js
  3. 9
    1
      modules/UI/videolayout/VideoLayout.js

+ 1
- 1
index.html Näytä tiedosto

@@ -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
File diff suppressed because it is too large
Näytä tiedosto


+ 9
- 1
modules/UI/videolayout/VideoLayout.js Näytä tiedosto

@@ -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…
Peruuta
Tallenna