enable red by default (#940)

* enable red by default

* fix test case
This commit is contained in:
cnderrauber
2022-08-22 17:40:12 +08:00
committed by GitHub
parent a118d21af0
commit c20a91d2b2
5 changed files with 10 additions and 2 deletions
+4
View File
@@ -84,6 +84,10 @@ func (r *RedPrimaryReceiver) DeleteDownTrack(subscriberID livekit.ParticipantID)
r.downTrackSpreader.Free(subscriberID)
}
func (r *RedPrimaryReceiver) CanClose() bool {
return r.closed.Load() || r.downTrackSpreader.DownTrackCount() == 0
}
func (r *RedPrimaryReceiver) Close() {
r.closed.Store(true)
for _, dt := range r.downTrackSpreader.ResetAndGetDownTracks() {