Fixes an error when clicking on a thumbnail without video.

This commit is contained in:
Lyubomir Marinov 2014-07-23 20:08:53 +03:00
parent e9a3b45316
commit 5f34f67fc5
1 changed files with 9 additions and 2 deletions

11
app.js
View File

@ -312,8 +312,15 @@ $(document).bind('remotestreamadded.jingle', function (event, data, sid) {
// Add click handler.
container.onclick = function (event) {
VideoLayout.handleVideoThumbClicked(
$('#' + container.id + '>video').get(0).src);
/*
* FIXME It turns out that videoThumb may not exist (if there is no
* actual video).
*/
var videoThumb = $('#' + container.id + '>video').get(0);
if (videoThumb)
VideoLayout.handleVideoThumbClicked(videoThumb.src);
event.preventDefault();
return false;
};