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

Fix TypeError: undefined is not an object

master
Lyubo Marinov 8 лет назад
Родитель
Сommit
d371a3d5fd
1 измененных файлов: 6 добавлений и 0 удалений
  1. 6
    0
      modules/UI/videolayout/VideoContainer.js

+ 6
- 0
modules/UI/videolayout/VideoContainer.js Просмотреть файл

@@ -310,6 +310,12 @@ export class VideoContainer extends LargeContainer {
310 310
     }
311 311
 
312 312
     resize (containerWidth, containerHeight, animate = false) {
313
+        // XXX Prevent TypeError: undefined is not an object when the Web
314
+        // browser does not support WebRTC (yet).
315
+        if (this.$video.length === 0) {
316
+            return;
317
+        }
318
+
313 319
         let [width, height]
314 320
             = this.getVideoSize(containerWidth, containerHeight);
315 321
         let { horizontalIndent, verticalIndent }

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