File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " livekit-client " : patch
3
+ ---
4
+
5
+ Read capapbilites from RtcRTPReceiver instead of from sender
Original file line number Diff line number Diff line change @@ -669,12 +669,13 @@ export default class RTCEngine extends (EventEmitter as new () => TypedEventEmit
669
669
kind : Track . Kind ,
670
670
videoCodec : VideoCodec ,
671
671
) {
672
- if ( ! ( 'getCapabilities' in RTCRtpSender ) ) {
672
+ if ( ! ( 'getCapabilities' in RTCRtpReceiver ) ) {
673
673
return ;
674
674
}
675
- const cap = RTCRtpSender . getCapabilities ( kind ) ;
675
+ // when setting codec preferences, the capabilites need to be read from the RTCRtpReceiver
676
+ const cap = RTCRtpReceiver . getCapabilities ( kind ) ;
676
677
if ( ! cap ) return ;
677
- this . log . debug ( 'get sender capabilities' , { ...this . logContext , cap } ) ;
678
+ this . log . debug ( 'get receiver capabilities' , { ...this . logContext , cap } ) ;
678
679
const matched : RTCRtpCodecCapability [ ] = [ ] ;
679
680
const partialMatched : RTCRtpCodecCapability [ ] = [ ] ;
680
681
const unmatched : RTCRtpCodecCapability [ ] = [ ] ;
You can’t perform that action at this time.
0 commit comments