瀏覽代碼

fixed switching to large video from FF on safari

j8
isymchych 10 年之前
父節點
當前提交
1d59283518
共有 1 個檔案被更改,包括 20 行新增3 行删除
  1. 20
    3
      modules/UI/videolayout/SmallVideo.js

+ 20
- 3
modules/UI/videolayout/SmallVideo.js 查看文件

320
     if (!RTCBrowserType.isTemasysPluginUsed()) {
320
     if (!RTCBrowserType.isTemasysPluginUsed()) {
321
         return $('#' + this.videoSpanId).find(videoElem);
321
         return $('#' + this.videoSpanId).find(videoElem);
322
     } else {
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
 

Loading…
取消
儲存