Skip to content

Commit

Permalink
Skip some checks when BUNDLE group value is found
Browse files Browse the repository at this point in the history
Resolves #2621
  • Loading branch information
stephanrotolante committed Apr 12, 2024
1 parent 2519df3 commit 7ef4414
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions sdp.go
Original file line number Diff line number Diff line change
Expand Up @@ -709,8 +709,13 @@ func extractFingerprint(desc *sdp.SessionDescription) (string, string, error) {
return "", "", ErrSessionDescriptionNoFingerprint
}

// https://github.com/pion/webrtc/issues/2621
groupAttribue, _ := desc.Attribute(sdp.AttrKeyGroup)

isBundled := strings.Contains(groupAttribue, "BUNDLE")

for _, m := range fingerprints {
if m != fingerprints[0] {
if m != fingerprints[0] && !isBundled {
return "", "", ErrSessionDescriptionConflictingFingerprints
}
}
Expand Down Expand Up @@ -769,14 +774,19 @@ func extractICEDetails(desc *sdp.SessionDescription, log logging.LeveledLogger)
return "", "", nil, ErrSessionDescriptionMissingIcePwd
}

// https://github.com/pion/webrtc/issues/2621
groupAttribue, _ := desc.Attribute(sdp.AttrKeyGroup)

isBundled := strings.Contains(groupAttribue, "BUNDLE")

for _, m := range remoteUfrags {
if m != remoteUfrags[0] {
if m != remoteUfrags[0] && !isBundled {
return "", "", nil, ErrSessionDescriptionConflictingIceUfrag
}
}

for _, m := range remotePwds {
if m != remotePwds[0] {
if m != remotePwds[0] && !isBundled {
return "", "", nil, ErrSessionDescriptionConflictingIcePwd
}
}
Expand Down

0 comments on commit 7ef4414

Please sign in to comment.