Skip to content

Commit fb5eb14

Browse files
ValorZardJoeTurki
authored andcommitted
Add ice trickle support
1 parent c395deb commit fb5eb14

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

jsep.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ const (
2323
AttrKeyConnectionSetup = "setup"
2424
AttrKeyMID = "mid"
2525
AttrKeyICELite = "ice-lite"
26+
AttrKeyICEOptions = "ice-options"
2627
AttrKeyRTCPMux = "rtcp-mux"
2728
AttrKeyRTCPRsize = "rtcp-rsize"
2829
AttrKeyInactive = "inactive"
@@ -113,6 +114,14 @@ func (s *SessionDescription) WithValueAttribute(key, value string) *SessionDescr
113114
return s
114115
}
115116

117+
// WithICETrickleAdvertised advertises ICE trickle support in the session description.
118+
// See https://datatracker.ietf.org/doc/html/rfc9429#section-5.2.1
119+
func (s *SessionDescription) WithICETrickleAdvertised() *SessionDescription {
120+
s.WithValueAttribute(AttrKeyICEOptions, "trickle ice2")
121+
122+
return s
123+
}
124+
116125
// WithFingerprint adds a fingerprint to the session description.
117126
func (s *SessionDescription) WithFingerprint(algorithm, value string) *SessionDescription {
118127
return s.WithValueAttribute("fingerprint", algorithm+" "+value)

0 commit comments

Comments
 (0)