Merge pull request #1018 from jitsi/fix-gms-bars-2

Fixes cannot read property of undefined if there is no local video.
This commit is contained in:
Paweł Domas 2016-10-14 15:18:43 -05:00 committed by GitHub
commit 6148b4b229
1 changed files with 5 additions and 3 deletions

View File

@ -1302,12 +1302,14 @@ export default {
} }
room.on(ConferenceEvents.CONNECTION_STATS, function (stats) { room.on(ConferenceEvents.CONNECTION_STATS, function (stats) {
// if we say video muted we will use old method of calculating
// quality and will not depend on localVideo if it is missing
ConnectionQuality.updateLocalStats( ConnectionQuality.updateLocalStats(
stats, stats,
connectionIsInterrupted, connectionIsInterrupted,
localVideo.videoType, localVideo ? localVideo.videoType : undefined,
localVideo.isMuted(), localVideo ? localVideo.isMuted() : true,
localVideo.resolution); localVideo ? localVideo.resolution : null);
}); });
ConnectionQuality.addListener(CQEvents.LOCALSTATS_UPDATED, ConnectionQuality.addListener(CQEvents.LOCALSTATS_UPDATED,