ソースを参照

fix(receiveVideoController): Do not send redundant video constraints to the bridge.

dev1
Jaya Allamsetty 4年前
コミット
93af5ada95
1個のファイルの変更8行の追加2行の削除
  1. 8
    2
      modules/qualitycontrol/ReceiveVideoController.js

+ 8
- 2
modules/qualitycontrol/ReceiveVideoController.js ファイルの表示

@@ -221,11 +221,17 @@ export class ReceiveVideoController {
221 221
         this._selectedEndpoints = ids;
222 222
 
223 223
         if (this._receiverVideoConstraints) {
224
+            // Filter out the local endpointId from the list of selected endpoints.
224 225
             const remoteEndpointIds = ids.filter(id => id !== this._conference.myUserId());
226
+            const oldConstraints = this._receiverVideoConstraints.constraints;
225 227
 
226
-            // Filter out the local endpointId from the list of selected endpoints.
227 228
             remoteEndpointIds.length && this._receiverVideoConstraints.updateSelectedEndpoints(remoteEndpointIds);
228
-            this._rtc.setNewReceiverVideoConstraints(this._receiverVideoConstraints.constraints);
229
+            const newConstraints = this._receiverVideoConstraints.constraints;
230
+
231
+            // Send bridge message only when the constraints change.
232
+            if (!isEqual(newConstraints, oldConstraints)) {
233
+                this._rtc.setNewReceiverVideoConstraints(newConstraints);
234
+            }
229 235
 
230 236
             return;
231 237
         }

読み込み中…
キャンセル
保存