Separate close and stop on MediaTrackSubscriptions. (#823)
This commit is contained in:
@@ -280,7 +280,7 @@ func (t *MediaTrackReceiver) Close() {
|
|||||||
onclose := t.onClose
|
onclose := t.onClose
|
||||||
t.lock.RUnlock()
|
t.lock.RUnlock()
|
||||||
|
|
||||||
t.MediaTrackSubscriptions.Stop()
|
t.MediaTrackSubscriptions.Close()
|
||||||
for _, f := range onclose {
|
for _, f := range onclose {
|
||||||
f()
|
f()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -93,6 +93,10 @@ func (t *MediaTrackSubscriptions) Restart() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (t *MediaTrackSubscriptions) Stop() {
|
func (t *MediaTrackSubscriptions) Stop() {
|
||||||
|
t.stopMaxQualityTimer()
|
||||||
|
}
|
||||||
|
|
||||||
|
func (t *MediaTrackSubscriptions) Close() {
|
||||||
t.qualityNotifyOpQueue.Stop()
|
t.qualityNotifyOpQueue.Stop()
|
||||||
t.stopMaxQualityTimer()
|
t.stopMaxQualityTimer()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1674,7 +1674,7 @@ func (p *ParticipantImpl) mediaTrackReceived(track *webrtc.TrackRemote, rtpRecei
|
|||||||
p.pendingTracksLock.Lock()
|
p.pendingTracksLock.Lock()
|
||||||
newTrack := false
|
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
|
var mid string
|
||||||
for _, tr := range p.publisher.pc.GetTransceivers() {
|
for _, tr := range p.publisher.pc.GetTransceivers() {
|
||||||
if tr.Receiver() == rtpReceiver {
|
if tr.Receiver() == rtpReceiver {
|
||||||
|
|||||||
Reference in New Issue
Block a user