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:
commit
10517115c3
|
@ -1155,10 +1155,14 @@ export default {
|
||||||
ConnectionQuality.addListener(CQEvents.LOCALSTATS_UPDATED,
|
ConnectionQuality.addListener(CQEvents.LOCALSTATS_UPDATED,
|
||||||
(percent, stats) => {
|
(percent, stats) => {
|
||||||
APP.UI.updateLocalStats(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 {
|
try {
|
||||||
room.broadcastEndpointMessage({
|
room.broadcastEndpointMessage({
|
||||||
type: this.commands.defaults.CONNECTION_QUALITY,
|
type: this.commands.defaults.CONNECTION_QUALITY,
|
||||||
values: stats });
|
values: data });
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
reportError(e);
|
reportError(e);
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,6 +75,9 @@ export default {
|
||||||
eventEmitter.emit(CQEvents.REMOTESTATS_UPDATED, id, null, null);
|
eventEmitter.emit(CQEvents.REMOTESTATS_UPDATED, id, null, null);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// Use only the fields we need
|
||||||
|
data = {bitrate: data.bitrate, packetLoss: data.packetLoss};
|
||||||
|
|
||||||
remoteStats[id] = data;
|
remoteStats[id] = data;
|
||||||
|
|
||||||
var newVal = 100 - data.packetLoss.total;
|
var newVal = 100 - data.packetLoss.total;
|
||||||
|
|
Loading…
Reference in New Issue