3

Trying to use Android application for WebRTC Based on APpRtcDemo. When connecting from Chrome 34 Everythings works fine, But When I use Chrome 35 for video call f got this error.

 onSetFailure: Failed to set remote offer sdp: Called with SDP without SDES crypto.

Here media constraints, which I'm trying to use

sdpMediaConstraints = new MediaConstraints();
sdpMediaConstraints.mandatory.add(new MediaConstraints.KeyValuePair("OfferToReceiveAudio", "true"));        
sdpMediaConstraints.mandatory.add(new MediaConstraints.KeyValuePair("OfferToReceiveVideo", "true"));
sdpMediaConstraints.optional.add(new MediaConstraints.KeyValuePair("DtlsSrtpKeyAgreement", "true"));

Here is Code setting remote description

    pc.setRemoteDescription(sdpObserver, new SessionDescription(
            SessionDescription.Type.OFFER, description.toString()));
pahan40
  • 139
  • 2
  • 10

1 Answers1

3

The problem was fixed by adding constraint to creation of Peerconnection object.

DtlsSrtpKeyAgreement:true


pc = factory.createPeerConnection(iceServers, constraints, pcObserver);

where constraints has DtlsSrtpKeyAgreement:true key value.

pahan40
  • 139
  • 2
  • 10