Browse Source

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

j8
paweldomas 10 years ago
parent
commit
b038d276c9
3 changed files with 22194 additions and 22206 deletions
  1. 1
    1
      index.html
  2. 22184
    22204
      libs/app.bundle.js
  3. 9
    1
      modules/UI/videolayout/VideoLayout.js

+ 1
- 1
index.html View File

19
     <script src="libs/popover.js?v=1"></script><!-- bootstrap tooltip lib -->
19
     <script src="libs/popover.js?v=1"></script><!-- bootstrap tooltip lib -->
20
     <script src="libs/toastr.js?v=1"></script><!-- notifications lib -->
20
     <script src="libs/toastr.js?v=1"></script><!-- notifications lib -->
21
     <script src="interface_config.js?v=5"></script>
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
     <script src="analytics.js?v=1"></script><!-- google analytics plugin -->
23
     <script src="analytics.js?v=1"></script><!-- google analytics plugin -->
24
     <link rel="stylesheet" href="css/font.css?v=7"/>
24
     <link rel="stylesheet" href="css/font.css?v=7"/>
25
     <link rel="stylesheet" href="css/toastr.css?v=1">
25
     <link rel="stylesheet" href="css/toastr.css?v=1">

+ 22184
- 22204
libs/app.bundle.js
File diff suppressed because it is too large
View File


+ 9
- 1
modules/UI/videolayout/VideoLayout.js View File

186
  * Sets the display name for the given video span id.
186
  * Sets the display name for the given video span id.
187
  */
187
  */
188
 function setDisplayName(videoSpanId, displayName, key) {
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
     var nameSpan = $('#' + videoSpanId + '>span.displayname');
196
     var nameSpan = $('#' + videoSpanId + '>span.displayname');
190
     var defaultLocalDisplayName = APP.translation.generateTranslatonHTML(
197
     var defaultLocalDisplayName = APP.translation.generateTranslatonHTML(
191
         interfaceConfig.DEFAULT_LOCAL_DISPLAY_NAME);
198
         interfaceConfig.DEFAULT_LOCAL_DISPLAY_NAME);
2281
 
2288
 
2282
     my.participantLeft = function (jid) {
2289
     my.participantLeft = function (jid) {
2283
         // Unlock large video
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
             console.info("Focused video owner has left the conference");
2294
             console.info("Focused video owner has left the conference");
2287
             focusedVideoInfo = null;
2295
             focusedVideoInfo = null;

Loading…
Cancel
Save