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

6.6k Views Asked by At

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()));
1

There are 1 best solutions below

0
On

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.