This repository was archived by the owner on Sep 19, 2024. It is now read-only.
Commit 49d3642 1 parent 8279c8a commit 49d3642 Copy full SHA for 49d3642
File tree 1 file changed +4
-5
lines changed
1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -497,17 +497,19 @@ export class MembraneWebRTC {
497
497
let transceiverConfig : RTCRtpTransceiverInit ;
498
498
499
499
if ( trackContext . simulcastConfig . enabled ) {
500
- console . log ( trackContext ) ;
501
500
transceiverConfig =
502
501
track . kind === "audio" ? { direction : "sendonly" } : simulcastTransceiverConfig ;
502
+ let disabledTrackEncodings : TrackEncoding [ ] = [ ] ;
503
503
transceiverConfig . sendEncodings ?. forEach ( ( encoding ) => {
504
504
if (
505
505
trackContext . simulcastConfig . active_encodings . includes ( encoding . rid ! as TrackEncoding )
506
506
) {
507
507
encoding . active = true ;
508
+ } else {
509
+ disabledTrackEncodings . push ( encoding . rid ! as TrackEncoding ) ;
508
510
}
509
511
} ) ;
510
- this . disabledTrackEncodings . set ( trackContext . trackId , [ ] ) ;
512
+ this . disabledTrackEncodings . set ( trackContext . trackId , disabledTrackEncodings ) ;
511
513
} else {
512
514
transceiverConfig = {
513
515
direction : "sendonly" ,
@@ -522,9 +524,6 @@ export class MembraneWebRTC {
522
524
transceiverConfig . sendEncodings ! [ 0 ] . maxBitrate = trackContext . maxBandwidth * 1024 ; // convert to bps;
523
525
}
524
526
}
525
-
526
- console . log ( transceiverConfig ) ;
527
-
528
527
this . connection ! . addTransceiver ( track , transceiverConfig ) ;
529
528
} ;
530
529
You can’t perform that action at this time.
0 commit comments