2

APpRtcDemo に基づく WebRTC 用の Android アプリケーションを使用しようとしています。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()));
4

1 に答える 1

3

この問題は、Peerconnection オブジェクトの作成に制約を追加することで修正されました。

DtlsSrtpKeyAgreement:true


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

ここで、制約にはDtlsSrtpKeyAgreement:trueキー値があります。

于 2014-06-10T13:12:49.750 に答える