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:
Raja Subramanian
2024-06-17 23:51:00 +05:30
committed by GitHub
parent aa72466ac8
commit ef838e4fa2
13 changed files with 99 additions and 97 deletions
+1 -1
View File
@@ -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)
}