File tree Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 11package webrtc
22
3+ import "github.com/pion/dtls/v2"
4+
35const (
46 // Unknown defines default public constant to use for "enum" like struct
57 // comparisons when no value was defined.
@@ -23,3 +25,7 @@ const (
2325
2426 rtpOutboundMTU = 1200
2527)
28+
29+ func defaultSrtpProtectionProfiles () []dtls.SRTPProtectionProfile {
30+ return []dtls.SRTPProtectionProfile {dtls .SRTP_AEAD_AES_128_GCM , dtls .SRTP_AES128_CM_HMAC_SHA1_80 }
31+ }
Original file line number Diff line number Diff line change @@ -306,7 +306,7 @@ func (t *DTLSTransport) Start(remoteParameters DTLSParameters) error {
306306 return t .api .settingEngine .srtpProtectionProfiles
307307 }
308308
309- return []dtls. SRTPProtectionProfile { dtls . SRTP_AEAD_AES_128_GCM , dtls . SRTP_AES128_CM_HMAC_SHA1_80 }
309+ return defaultSrtpProtectionProfiles ()
310310 }(),
311311 ClientAuth : dtls .RequireAnyClientCert ,
312312 LoggerFactory : t .api .settingEngine .LoggerFactory ,
Original file line number Diff line number Diff line change @@ -72,7 +72,8 @@ func (e *SettingEngine) DetachDataChannels() {
7272 e .detach .DataChannels = true
7373}
7474
75- // SetSRTPProtectionProfiles overrides default srtp protection profiles
75+ // SetSRTPProtectionProfiles allows the user to override the default SRTP Protection Profiles
76+ // The default srtp protection profiles are provided by the function `defaultSrtpProtectionProfiles`
7677func (e * SettingEngine ) SetSRTPProtectionProfiles (profiles ... dtls.SRTPProtectionProfile ) {
7778 e .srtpProtectionProfiles = profiles
7879}
You can’t perform that action at this time.
0 commit comments