Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

Fix TypeError: undefined is not an object

Lyubo Marinovd371a3d5fd0f
diff --git a/modules/UI/videolayout/VideoContainer.js b/modules/UI/videolayout/VideoContainer.js
index d854cb9b1f..26f79cff7e 100644
--- a/modules/UI/videolayout/VideoContainer.js
+++ b/modules/UI/videolayout/VideoContainer.js
@@ -310,6 +310,12 @@ export class VideoContainer extends LargeContainer {
}
resize (containerWidth, containerHeight, animate = false) {
+ // XXX Prevent TypeError: undefined is not an object when the Web
+ // browser does not support WebRTC (yet).
+ if (this.$video.length === 0) {
+ return;
+ }
+
let [width, height]
= this.getVideoSize(containerWidth, containerHeight);
let { horizontalIndent, verticalIndent }