diff --git a/peerconnection_go_test.go b/peerconnection_go_test.go index 1123edf8fed..8a554a2633e 100644 --- a/peerconnection_go_test.go +++ b/peerconnection_go_test.go @@ -1397,6 +1397,7 @@ func TestTransceiverCreatedByRemoteSdpHasSameCodecOrderAsRemote(t *testing.T) { o=- 4596489990601351948 2 IN IP4 127.0.0.1 s=- t=0 0 +a=group:BUNDLE video-0 video-1 m=video 60323 UDP/TLS/RTP/SAVPF 98 94 106 a=ice-ufrag:1/MvHwjAyVf27aLu a=ice-pwd:3dBU7cFOBl120v33cynDvN1E @@ -1457,6 +1458,7 @@ a=fmtp:125 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42e01 o=- 4596489990601351948 2 IN IP4 127.0.0.1 s=- t=0 0 +a=group:BUNDLE video-0 video-1 m=video 60323 UDP/TLS/RTP/SAVPF 98 106 a=ice-ufrag:1/MvHwjAyVf27aLu a=ice-pwd:3dBU7cFOBl120v33cynDvN1E diff --git a/sdp.go b/sdp.go index f1b59940b10..b66840f274f 100644 --- a/sdp.go +++ b/sdp.go @@ -715,8 +715,13 @@ func extractFingerprint(desc *sdp.SessionDescription) (string, string, error) { return "", "", ErrSessionDescriptionNoFingerprint } - for _, m := range fingerprints { - if m != fingerprints[0] { + // https://github.com/pion/webrtc/issues/2621 + groupAttribue, _ := desc.Attribute(sdp.AttrKeyGroup) + + isBundled := strings.Contains(groupAttribue, "BUNDLE") + + if !isBundled { + if len(fingerprints) != 1 { return "", "", ErrSessionDescriptionConflictingFingerprints } } @@ -775,14 +780,15 @@ func extractICEDetails(desc *sdp.SessionDescription, log logging.LeveledLogger) return "", "", nil, ErrSessionDescriptionMissingIcePwd } - for _, m := range remoteUfrags { - if m != remoteUfrags[0] { - return "", "", nil, ErrSessionDescriptionConflictingIceUfrag - } - } + // https://github.com/pion/webrtc/issues/2621 + groupAttribue, _ := desc.Attribute(sdp.AttrKeyGroup) + + isBundled := strings.Contains(groupAttribue, "BUNDLE") - for _, m := range remotePwds { - if m != remotePwds[0] { + if !isBundled { + if len(remoteUfrags) != 1 { + return "", "", nil, ErrSessionDescriptionConflictingIceUfrag + } else if len(remotePwds) != 1 { return "", "", nil, ErrSessionDescriptionConflictingIcePwd } }