5

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
Richa Shah
  • 930
  • 3
  • 12
  • 27

2 Answers2

2

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;
atline
  • 28,355
  • 16
  • 77
  • 113
Paul Oliva
  • 139
  • 1
  • 5
0

In kotlin, you can do the following:

val peerConnection = peerConnectionFactory.createPeerConnection(
        RTCConfiguration(iceServers).apply {
            sdpSemantics = SdpSemantics.UNIFIED_PLAN
        },
        constraints,
        observer
    )
notmystyle
  • 1,056
  • 9
  • 7