Indicate if track is expectd to be resumed in onClose callback. (#2800)
That is the main change. Changed variable name to `isExpectedToResume` everywhere to be consistent. Planning to use the callback value in relays to determine if the down track should be closed or switched to a different up track.
This commit is contained in:
@@ -2125,7 +2125,7 @@ func (p *ParticipantImpl) addMediaTrack(signalCid string, sdpCid string, ti *liv
|
||||
}
|
||||
|
||||
trackID := livekit.TrackID(ti.Sid)
|
||||
mt.AddOnClose(func() {
|
||||
mt.AddOnClose(func(_isExpectedToRsume bool) {
|
||||
if p.supervisor != nil {
|
||||
p.supervisor.ClearPublishedTrack(trackID, mt)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user