ソースを参照

fix(TPC): Do not update encodings for non-simulcast sources.

dev1
Jaya Allamsetty 4年前
コミット
767cb3f7ad
1個のファイルの変更13行の追加1行の削除
  1. 13
    1
      modules/RTC/TPCUtils.js

+ 13
- 1
modules/RTC/TPCUtils.js ファイルの表示

@@ -3,6 +3,7 @@ import transform from 'sdp-transform';
3 3
 
4 4
 import * as MediaType from '../../service/RTC/MediaType';
5 5
 import RTCEvents from '../../service/RTC/RTCEvents';
6
+import VideoType from '../../service/RTC/VideoType';
6 7
 import browser from '../browser';
7 8
 
8 9
 const logger = getLogger(__filename);
@@ -446,7 +447,18 @@ export class TPCUtils {
446 447
      * @returns {void}
447 448
      */
448 449
     updateEncodingsResolution(parameters) {
449
-        if (!(parameters && parameters.encodings && Array.isArray(parameters.encodings))) {
450
+        if (!(parameters
451
+            && parameters.encodings
452
+            && Array.isArray(parameters.encodings)
453
+            && this.pc.isSimulcastOn())) {
454
+            return;
455
+        }
456
+        const localVideoTrack = this.pc.getLocalVideoTrack();
457
+
458
+        // Ignore desktop tracks when simulcast is disabled for screenshare.
459
+        if (localVideoTrack
460
+            && localVideoTrack.videoType === VideoType.DESKTOP
461
+            && this.pc.options.capScreenshareBitrate) {
450 462
             return;
451 463
         }
452 464
 

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