Skip to content

Commit d8926a4

Browse files
ValorZardJoeTurki
authored andcommitted
Set up how options will work with ice trickle
1 parent e1ee006 commit d8926a4

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

peerconnection.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -718,6 +718,10 @@ func (pc *PeerConnection) CreateOffer(options *OfferOptions) (SessionDescription
718718
return SessionDescription{}, err
719719
}
720720

721+
if options.ICETricklingSupported {
722+
descr.WithICETrickleAdvertised()
723+
}
724+
721725
offer = SessionDescription{
722726
Type: SDPTypeOffer,
723727
SDP: string(sdpBytes),
@@ -836,7 +840,7 @@ func (pc *PeerConnection) createICETransport() *ICETransport {
836840
// CreateAnswer starts the PeerConnection and generates the localDescription.
837841
//
838842
//nolint:cyclop
839-
func (pc *PeerConnection) CreateAnswer(*AnswerOptions) (SessionDescription, error) {
843+
func (pc *PeerConnection) CreateAnswer(options *AnswerOptions) (SessionDescription, error) {
840844
useIdentity := pc.idpLoginURL != nil
841845
remoteDesc := pc.RemoteDescription()
842846
switch {
@@ -876,6 +880,10 @@ func (pc *PeerConnection) CreateAnswer(*AnswerOptions) (SessionDescription, erro
876880
return SessionDescription{}, err
877881
}
878882

883+
if options.ICETricklingSupported {
884+
descr.WithICETrickleAdvertised()
885+
}
886+
879887
desc := SessionDescription{
880888
Type: SDPTypeAnswer,
881889
SDP: string(sdpBytes),

0 commit comments

Comments
 (0)