Pārlūkot izejas kodu

Merge pull request #752 from jitsi/fix_gsm_bars_resolution

Preventing the client for using/sending resolution data from/to remote participants
j8
bgrozev 8 gadus atpakaļ
vecāks
revīzija
10517115c3
2 mainītis faili ar 8 papildinājumiem un 1 dzēšanām
  1. 5
    1
      conference.js
  2. 3
    0
      modules/connectionquality/connectionquality.js

+ 5
- 1
conference.js Parādīt failu

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

+ 3
- 0
modules/connectionquality/connectionquality.js Parādīt failu

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

Notiek ielāde…
Atcelt
Saglabāt