瀏覽代碼

fix(lastN): Return the correct lastN value for the conference.

dev1
Jaya Allamsetty 4 年之前
父節點
當前提交
dfe8007418
共有 2 個文件被更改,包括 11 次插入2 次删除
  1. 2
    2
      JitsiConference.js
  2. 9
    0
      modules/qualitycontrol/ReceiveVideoController.js

+ 2
- 2
JitsiConference.js 查看文件

1369
  * @returns {number}
1369
  * @returns {number}
1370
  */
1370
  */
1371
 JitsiConference.prototype.getLastN = function() {
1371
 JitsiConference.prototype.getLastN = function() {
1372
-    return this.rtc.getLastN();
1372
+    return this.receiveVideoController.getLastN();
1373
 };
1373
 };
1374
 
1374
 
1375
 /**
1375
 /**
3033
 
3033
 
3034
         // Sync up video transfer active in case p2pJingleSession not existed
3034
         // Sync up video transfer active in case p2pJingleSession not existed
3035
         // when the lastN value was being adjusted.
3035
         // when the lastN value was being adjusted.
3036
-        const isVideoActive = this.rtc.getLastN() !== 0;
3036
+        const isVideoActive = this.getLastN() !== 0;
3037
 
3037
 
3038
         this.p2pJingleSession
3038
         this.p2pJingleSession
3039
             .setMediaTransferActive(true, isVideoActive)
3039
             .setMediaTransferActive(true, isVideoActive)

+ 9
- 0
modules/qualitycontrol/ReceiveVideoController.js 查看文件

183
         this._maxFrameHeight && mediaSession.setReceiverVideoConstraint(this._maxFrameHeight);
183
         this._maxFrameHeight && mediaSession.setReceiverVideoConstraint(this._maxFrameHeight);
184
     }
184
     }
185
 
185
 
186
+    /**
187
+     * Returns the lastN value for the conference.
188
+     *
189
+     * @returns {number}
190
+     */
191
+    getLastN() {
192
+        return this._lastN;
193
+    }
194
+
186
     /**
195
     /**
187
      * Elects the participants with the given ids to be the selected participants in order to always receive video
196
      * Elects the participants with the given ids to be the selected participants in order to always receive video
188
      * for this participant (even when last n is enabled).
197
      * for this participant (even when last n is enabled).

Loading…
取消
儲存