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 @@ -653,12 +653,13 @@ export default class RTCEngine extends (EventEmitter as new () => TypedEventEmit
653
653
kind : Track . Kind ,
654
654
videoCodec : VideoCodec ,
655
655
) {
656
- if ( ! ( 'getCapabilities' in RTCRtpSender ) ) {
656
+ if ( ! ( 'getCapabilities' in RTCRtpReceiver ) ) {
657
657
return ;
658
658
}
659
- const cap = RTCRtpSender . getCapabilities ( kind ) ;
659
+ // when setting codec preferences, the capabilites need to be read from the RTCRtpReceiver
660
+ const cap = RTCRtpReceiver . getCapabilities ( kind ) ;
660
661
if ( ! cap ) return ;
661
- this . log . debug ( 'get sender capabilities' , { ...this . logContext , cap } ) ;
662
+ this . log . debug ( 'get receiver capabilities' , { ...this . logContext , cap } ) ;
662
663
const matched : RTCRtpCodecCapability [ ] = [ ] ;
663
664
const partialMatched : RTCRtpCodecCapability [ ] = [ ] ;
664
665
const unmatched : RTCRtpCodecCapability [ ] = [ ] ;
You can’t perform that action at this time.
0 commit comments