Просмотр исходного кода

Merge branch 'bug/large-video-on-safari' of git://github.com/isymchych/jitsi-meet

master
hristoterezov 9 лет назад
Родитель
Сommit
2e7e7d2dd8
1 измененных файлов: 20 добавлений и 3 удалений
  1. 20
    3
      modules/UI/videolayout/SmallVideo.js

+ 20
- 3
modules/UI/videolayout/SmallVideo.js Просмотреть файл

@@ -320,9 +320,26 @@ SmallVideo.prototype.selectVideoElement = function () {
320 320
     if (!RTCBrowserType.isTemasysPluginUsed()) {
321 321
         return $('#' + this.videoSpanId).find(videoElem);
322 322
     } else {
323
-        return $('#' + this.videoSpanId +
324
-               (this.isLocal ? '>>' : '>') +
325
-               videoElem + '>param[value="video"]').parent();
323
+        var matching = $('#' + this.videoSpanId +
324
+                         (this.isLocal ? '>>' : '>') +
325
+                         videoElem + '>param[value="video"]');
326
+        if (matching.length < 2) {
327
+            return matching.parent();
328
+        }
329
+
330
+        // there are 2 video objects from FF
331
+        // object with id which ends with '_default' (like 'remoteVideo_default')
332
+        // doesn't contain video, so we ignore it
333
+        for (var i = 0; i < matching.length; i += 1) {
334
+            var el = matching[i].parentNode;
335
+
336
+            // check id suffix
337
+            if (el.id.substr(-8) !== '_default') {
338
+                return $(el);
339
+            }
340
+        }
341
+
342
+        return $([]);
326 343
     }
327 344
 };
328 345
 

Загрузка…
Отмена
Сохранить