how to set a unified plan in semantics Webrtc android. I need to add it to SDP. I have tried below code but it's not working
rtcConfig.sdpSemantics = PeerConnection.SdpSemantics.UNIFIED_PLAN
how to set a unified plan in semantics Webrtc android. I need to add it to SDP. I have tried below code but it's not working
rtcConfig.sdpSemantics = PeerConnection.SdpSemantics.UNIFIED_PLAN
I do something like this and it works. Give it a try:
rtcConfiguration = new PeerConnection.RTCConfiguration(iceServers);
rtcConfiguration.iceTransportsType = PeerConnection.IceTransportsType.ALL;
rtcConfiguration.iceCandidatePoolSize = 2;
rtcConfiguration.bundlePolicy = PeerConnection.BundlePolicy.MAXCOMPAT;
rtcConfiguration.sdpSemantics = PeerConnection.SdpSemantics.UNIFIED_PLAN;
rtcConfiguration.continualGatheringPolicy = PeerConnection.ContinualGatheringPolicy.GATHER_CONTINUALLY;
rtcConfiguration.candidateNetworkPolicy = PeerConnection.CandidateNetworkPolicy.ALL;
In kotlin, you can do the following:
val peerConnection = peerConnectionFactory.createPeerConnection(
RTCConfiguration(iceServers).apply {
sdpSemantics = SdpSemantics.UNIFIED_PLAN
},
constraints,
observer
)