Preventing the client for using/sending resolution data from/to remote participants
This commit is contained in:
parent
330597182c
commit
6ae35fb21d
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue