尝试在基于WebRTC的APpRtcDemo上使用安卓应用程序。当从Chrome 34号连接时,所有事情都可以正常工作,但是当我使用Chrome 35进行视频调用时,f得到了这个错误。
onSetFailure: Failed to set remote offer sdp: Called with SDP without SDES crypto.这里有媒体限制,我正在尝试使用这些约束
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"));下面是代码设置远程描述
pc.setRemoteDescription(sdpObserver, new SessionDescription(
SessionDescription.Type.OFFER, description.toString()));发布于 2014-06-10 13:12:49
通过对Peerconnection对象的创建增加约束,解决了这个问题。
DtlsSrtpKeyAgreement:true
pc = factory.createPeerConnection(iceServers, constraints, pcObserver);其中,DtlsSrtpKeyAgreement:true约束具有键值。
https://stackoverflow.com/questions/24062340
复制相似问题