mirror of
https://github.com/livekit/livekit.git
synced 2026-08-27 22:34:25 +00:00
Separate close and stop on MediaTrackSubscriptions. (#823)
This commit is contained in:
@@ -280,7 +280,7 @@ func (t *MediaTrackReceiver) Close() {
|
||||
onclose := t.onClose
|
||||
t.lock.RUnlock()
|
||||
|
||||
t.MediaTrackSubscriptions.Stop()
|
||||
t.MediaTrackSubscriptions.Close()
|
||||
for _, f := range onclose {
|
||||
f()
|
||||
}
|
||||
|
||||
@@ -93,6 +93,10 @@ func (t *MediaTrackSubscriptions) Restart() {
|
||||
}
|
||||
|
||||
func (t *MediaTrackSubscriptions) Stop() {
|
||||
t.stopMaxQualityTimer()
|
||||
}
|
||||
|
||||
func (t *MediaTrackSubscriptions) Close() {
|
||||
t.qualityNotifyOpQueue.Stop()
|
||||
t.stopMaxQualityTimer()
|
||||
}
|
||||
|
||||
@@ -1674,7 +1674,7 @@ func (p *ParticipantImpl) mediaTrackReceived(track *webrtc.TrackRemote, rtpRecei
|
||||
p.pendingTracksLock.Lock()
|
||||
newTrack := false
|
||||
|
||||
p.params.Logger.Debugw("media track received", "track", track.ID(), "kind", track.Kind())
|
||||
p.params.Logger.Debugw("media track received", "trackID", track.ID(), "kind", track.Kind())
|
||||
var mid string
|
||||
for _, tr := range p.publisher.pc.GetTransceivers() {
|
||||
if tr.Receiver() == rtpReceiver {
|
||||
|
||||
Reference in New Issue
Block a user