diff --git a/static/js/services/videolayout.js b/static/js/services/videolayout.js index e733ba3f..4a78aef7 100644 --- a/static/js/services/videolayout.js +++ b/static/js/services/videolayout.js @@ -31,9 +31,11 @@ define(["jquery", "underscore", "modernizr"], function($, _, Modernizr) { if (videos.length) { if (videos.length === 1) { var remoteVideo = peers[videos[0]].element.find("video").get(0); - size.width = remoteVideo.videoWidth; - size.height = remoteVideo.videoHeight; - console.log("Remote video size: ", size); + if (remoteVideo) { + size.width = remoteVideo.videoWidth; + size.height = remoteVideo.videoHeight; + console.log("Remote video size: ", size); + } } } return size;