Merge pull request #752 from jitsi/fix_gsm_bars_resolution

Preventing the client for using/sending resolution data from/to remote participants
This commit is contained in:
bgrozev 2016-07-28 15:37:38 -05:00 committed by GitHub
commit 10517115c3
2 changed files with 8 additions and 1 deletions

View File

@ -1155,10 +1155,14 @@ export default {
ConnectionQuality.addListener(CQEvents.LOCALSTATS_UPDATED,
(percent, stats) => {
APP.UI.updateLocalStats(percent, stats);
// Send only the data that remote participants care about.
let data = {
bitrate: stats.bitrate,
packetLoss: stats.packetLoss};
try {
room.broadcastEndpointMessage({
type: this.commands.defaults.CONNECTION_QUALITY,
values: stats });
values: data });
} catch (e) {
reportError(e);
}

View File

@ -75,6 +75,9 @@ export default {
eventEmitter.emit(CQEvents.REMOTESTATS_UPDATED, id, null, null);
return;
}
// Use only the fields we need
data = {bitrate: data.bitrate, packetLoss: data.packetLoss};
remoteStats[id] = data;
var newVal = 100 - data.packetLoss.total;