Browse Source

Do not break if peer element could not be found.

pull/39/head
Simon Eisenmann 12 years ago
parent
commit
2a04801a88
  1. 8
      static/js/services/videolayout.js

8
static/js/services/videolayout.js

@ -31,9 +31,11 @@ define(["jquery", "underscore", "modernizr"], function($, _, Modernizr) { @@ -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;

Loading…
Cancel
Save