How to disable DTLS-SRTP feature in webrtc project

2,073 views
Skip to first unread message

xfengtes...@gmail.com

unread,
Sep 22, 2014, 2:59:23 AM9/22/14
to discuss...@googlegroups.com
Hi All,

As topic, I need to disable DTLS-SRTP in webrtc project for test, could you tell me how to? Thanks.

Vikas

unread,
Sep 22, 2014, 2:55:11 PM9/22/14
to discuss...@googlegroups.com
You can disable DTLS using "DtlsSrtpKeyAgreement" constraint set to false when creating peerconnection in Chrome. 

/Vikas

xfengtes...@gmail.com

unread,
Sep 24, 2014, 9:14:56 PM9/24/14
to discuss...@googlegroups.com
Dear Vikas,
Thank you.
I'm developing P2P audio/video chat application based on WebRTC native api but not broswer. So i add the code as below item-A to disable DTLS-SRTP, and check dtls_enabled_ flag in webrtcsession.cc is false as below item-B. Could you tell me what my done is right to disable DTSL-SRTP feature and just RTP? 

item-A:
    webrtc::FakeConstraints setup_constraints;
    setup_constraints.AddMandatory(webrtc::MediaConstraintsInterface::kEnableDtlsSrtp,false);
    setup_constraints.AddMandatory(webrtc::MediaConstraintsInterface::kEnableRtpDataChannels,true);
    peer_connection_ = peer_connection_factory_->CreatePeerConnection(servers,
                                                                    &setup_constraints,
                                                                    NULL,
                                                                    this);

item-B:
  // Enable DTLS by default if |dtls_identity_service| is valid.
  dtls_enabled_ = (dtls_identity_service != NULL);
  // |constraints| can override the default |dtls_enabled_| value.
  if (FindConstraint(
        constraints,
        MediaConstraintsInterface::kEnableDtlsSrtp,
        &value, NULL)) {
    dtls_enabled_ = value;
  }
  LOG(LS_INFO) << "XF_SRTP: dtls_enabled_ is " <<dtls_enabled_;



在 2014年9月23日星期二UTC+8上午2时55分11秒,Vikas写道:

Philipp Hancke

unread,
Sep 25, 2014, 12:57:03 AM9/25/14
to discuss...@googlegroups.com

--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages