webrtc-java
webrtc-java copied to clipboard
Ignored codec preferences
Describe the bug I need to restrict codec specification that used in SDP negotiation so I set a List<RTCRtpCodecCapability> containing only one 'opus' to an instance of 'RTCRtpTransceiver' but underlying library ignores this. I got SDP offer having all default codecs. I saw JNI class 'JNI_RTCRtpTransceiver.cpp' has commented lines 144-148 it might be a reason.
To Reproduce Steps to reproduce the behavior:
val audioCodecs = listOf(factory.getRtpReceiverCapabilities(MediaType.AUDIO)
.codecs
.first { it.name.contains("opus") }!!)
.
.
.
val audionTransceiver = peerConnection.addTransceiver(audioTrack, audioInit)
audionTransceiver.codecPreferences = audioCodecs
Expected behavior SDP offer has only 'opus' as a preferred codec
Desktop (please complete the following information):
- OS: mac os
- Version 0.6.0:macos-x86_64
Remarks: Is it really need to comment those lines?