簡體   English   中英

無法設置遠程報價sdp:在沒有SDES加密的情況下使用SDP調用

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

嘗試將基於APpRtcDemo的Android應用程序用於WebRTC。 從Chrome 34連接時,一切正常,但是當我使用Chrome 35進行視頻通話時,出現此錯誤。

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

通過在對等連接對象的創建中添加約束來解決此問題。

DtlsSrtpKeyAgreement:true


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

其中約束具有DtlsSrtpKeyAgreement:true鍵值。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM