【问题标题】:Failed to set remote offer sdp: Called with SDP without SDES crypto无法设置远程提供 sdp:使用没有 SDES 加密的 SDP 调用
【发布时间】:2014-07-26 13:45:42
【问题描述】:

尝试使用基于APPrtcDemo的Android应用程序进行WebRTC。 从 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()));

【问题讨论】:

  • 你很可能遇到了这个错误(见评论 #38)code.google.com/p/webrtc/issues/detail?id=2253
  • 我已经从trunk构建了最新版本的libjingle,但是没有帮助。
  • 目前还没有解决办法。您可以关注(星标)该错误以了解何时有可用的修复。
  • 看起来 chrome 需要 sdes 加密密钥,但提供 dtls 指纹就可以了。

标签: android webrtc libjingle dtls


【解决方案1】:

问题已通过对 Peerconnection 对象的创建添加约束来解决。

DtlsSrtpKeyAgreement:true


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

其中 constraints 具有 DtlsSrtpKeyAgreement:true 键值。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-05-09
    • 2022-01-18
    • 1970-01-01
    • 2016-10-13
    • 1970-01-01
    相关资源
    最近更新 更多