2014-06-05 62 views
1

嘗試使用基於APpRtcDemo的WebRTC的Android應用程序。 從Chrome 34連接時,Everythings工作正常,但是當我使用Chrome 35進行視頻通話時,出現了此錯誤。無法設置遠程報價sdp:使用無SDES密碼的SDP調用

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

這很可能是您遇到此錯誤(請參閱評論#38)https://code.google.com/p/webrtc/issues/detail?id=2253 –

+0

我已經從中繼構建了最新版本的libjingle但它沒有幫助。 – pahan40

+0

還沒有解決這個問題。您可以關注(明星)錯誤以瞭解修復何時可用。 –

回答

3

的問題是固定的,加入約束創建等連接對象。

DtlsSrtpKeyAgreement:true 


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

其中約束DtlsSrtpKeyAgreement:真鍵值。