Skip to content

Commit a520524

Browse files
stephanrotolanteSean-Der
authored andcommitted
Skip some checks when BUNDLE group value is found
Resolves #2621
1 parent b2af663 commit a520524

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

sdp.go

+13-3
Original file line numberDiff line numberDiff line change
@@ -709,8 +709,13 @@ func extractFingerprint(desc *sdp.SessionDescription) (string, string, error) {
709709
return "", "", ErrSessionDescriptionNoFingerprint
710710
}
711711

712+
// https://github.com/pion/webrtc/issues/2621
713+
groupAttribue, _ := desc.Attribute(sdp.AttrKeyGroup)
714+
715+
isBundled := strings.Contains(groupAttribue, "BUNDLE")
716+
712717
for _, m := range fingerprints {
713-
if m != fingerprints[0] {
718+
if m != fingerprints[0] && !isBundled {
714719
return "", "", ErrSessionDescriptionConflictingFingerprints
715720
}
716721
}
@@ -769,14 +774,19 @@ func extractICEDetails(desc *sdp.SessionDescription, log logging.LeveledLogger)
769774
return "", "", nil, ErrSessionDescriptionMissingIcePwd
770775
}
771776

777+
// https://github.com/pion/webrtc/issues/2621
778+
groupAttribue, _ := desc.Attribute(sdp.AttrKeyGroup)
779+
780+
isBundled := strings.Contains(groupAttribue, "BUNDLE")
781+
772782
for _, m := range remoteUfrags {
773-
if m != remoteUfrags[0] {
783+
if m != remoteUfrags[0] && !isBundled {
774784
return "", "", nil, ErrSessionDescriptionConflictingIceUfrag
775785
}
776786
}
777787

778788
for _, m := range remotePwds {
779-
if m != remotePwds[0] {
789+
if m != remotePwds[0] && !isBundled {
780790
return "", "", nil, ErrSessionDescriptionConflictingIcePwd
781791
}
782792
}

0 commit comments

Comments
 (0)