Do not mute when stream is paused. (#2069)
This commit is contained in:
@@ -515,6 +515,18 @@ func (s *StreamAllocator) IsBWEEnabled(downTrack *sfu.DownTrack) bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// called to check if track subscription mute can be applied
|
||||
func (s *StreamAllocator) IsSubscribeMutable(downTrack *sfu.DownTrack) bool {
|
||||
s.videoTracksMu.Lock()
|
||||
defer s.videoTracksMu.Unlock()
|
||||
|
||||
if track := s.videoTracks[livekit.TrackID(downTrack.ID())]; track != nil {
|
||||
return track.IsSubscribeMutable()
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
func (s *StreamAllocator) maybePostEventAllocateTrack(downTrack *sfu.DownTrack) {
|
||||
shouldPost := false
|
||||
s.videoTracksMu.Lock()
|
||||
|
||||
@@ -101,6 +101,10 @@ func (t *Track) SetStreamState(streamState StreamState) bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func (t *Track) IsSubscribeMutable() bool {
|
||||
return t.streamState != StreamStatePaused
|
||||
}
|
||||
|
||||
func (t *Track) SetPriority(priority uint8) bool {
|
||||
if priority == 0 {
|
||||
switch t.source {
|
||||
|
||||
Reference in New Issue
Block a user