Explorar el Código

Fix TypeError: undefined is not an object

j8
Lyubo Marinov hace 8 años
padre
commit
d371a3d5fd
Se han modificado 1 ficheros con 6 adiciones y 0 borrados
  1. 6
    0
      modules/UI/videolayout/VideoContainer.js

+ 6
- 0
modules/UI/videolayout/VideoContainer.js Ver fichero

@@ -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 }

Loading…
Cancelar
Guardar