Fix TypeError: undefined is not an object

This commit is contained in:
Lyubo Marinov 2017-02-27 23:03:48 -06:00
parent e1056126e6
commit d371a3d5fd
1 changed files with 6 additions and 0 deletions

View File

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