Skip to content

Commit 97255c0

Browse files
committed
Set up how options will work with ice trickle
1 parent a65b115 commit 97255c0

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
@@ -717,6 +717,10 @@ func (pc *PeerConnection) CreateOffer(options *OfferOptions) (SessionDescription
717717
return SessionDescription{}, err
718718
}
719719

720+
if options.ICETricklingSupported {
721+
descr.WithICETrickleAdvertised()
722+
}
723+
720724
offer = SessionDescription{
721725
Type: SDPTypeOffer,
722726
SDP: string(sdpBytes),
@@ -835,7 +839,7 @@ func (pc *PeerConnection) createICETransport() *ICETransport {
835839
// CreateAnswer starts the PeerConnection and generates the localDescription.
836840
//
837841
//nolint:cyclop
838-
func (pc *PeerConnection) CreateAnswer(*AnswerOptions) (SessionDescription, error) {
842+
func (pc *PeerConnection) CreateAnswer(options *AnswerOptions) (SessionDescription, error) {
839843
useIdentity := pc.idpLoginURL != nil
840844
remoteDesc := pc.RemoteDescription()
841845
switch {
@@ -875,6 +879,10 @@ func (pc *PeerConnection) CreateAnswer(*AnswerOptions) (SessionDescription, erro
875879
return SessionDescription{}, err
876880
}
877881

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

0 commit comments

Comments
 (0)