Browse Source

Do not break if peer element could not be found.

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

2
static/js/services/videolayout.js

@ -31,11 +31,13 @@ define(["jquery", "underscore", "modernizr"], function($, _, Modernizr) { @@ -31,11 +31,13 @@ define(["jquery", "underscore", "modernizr"], function($, _, Modernizr) {
if (videos.length) {
if (videos.length === 1) {
var remoteVideo = peers[videos[0]].element.find("video").get(0);
if (remoteVideo) {
size.width = remoteVideo.videoWidth;
size.height = remoteVideo.videoHeight;
console.log("Remote video size: ", size);
}
}
}
return size;
}

Loading…
Cancel
Save