Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: pion/webrtc
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: bfbf9525cd01a7b622b443422a5ec2d33220412d
Choose a base ref
..
head repository: pion/webrtc
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 1ef4789b7ec4b2af6b2fd7f19fd5864de0c879ce
Choose a head ref
Showing with 21 additions and 1 deletion.
  1. +1 −1 sdp.go
  2. +20 −0 sdp_test.go
2 changes: 1 addition & 1 deletion sdp.go
Original file line number Diff line number Diff line change
@@ -538,7 +538,7 @@ func populateSDP(d *sdp.SessionDescription, isPlanB bool, dtlsFingerprints []DTL

if isICELite {
// RFC 5245 S15.3
d = d.WithValueAttribute(sdp.AttrKeyICELite, sdp.AttrKeyICELite)
d = d.WithValueAttribute(sdp.AttrKeyICELite, "")
}

return d.WithValueAttribute(sdp.AttrKeyGroup, bundleValue), nil
20 changes: 20 additions & 0 deletions sdp_test.go
Original file line number Diff line number Diff line change
@@ -449,6 +449,26 @@ func TestPopulateSDP(t *testing.T) {
}
assert.Equal(t, true, foundVP8, "vp8 should be present in sdp")
})
t.Run("ice-lite", func(t *testing.T) {
se := SettingEngine{}
se.SetLite(true)

offerSdp, err := populateSDP(&sdp.SessionDescription{}, false, []DTLSFingerprint{}, se.sdpMediaLevelFingerprints, se.candidates.ICELite, &MediaEngine{}, connectionRoleFromDtlsRole(defaultDtlsRoleOffer), []ICECandidate{}, ICEParameters{}, []mediaSection{}, ICEGatheringStateComplete)
assert.Nil(t, err)

var found bool
// ice-lite is an session-level attribute
for _, a := range offerSdp.Attributes {
if a.Key == sdp.AttrKeyICELite {
// ice-lite does not have value (e.g. ":<value>") and it should be an empty string
if a.Value == "" {
found = true
break
}
}
}
assert.Equal(t, true, found, "ICELite key should be present")
})
}

func TestGetRIDs(t *testing.T) {