Fix dynacast quality for moving out tracks (#3664)
* Make sure moving out track has been unsubscribed Remove start time checking in subscription manager as We always use new track ID for republished track at #3020 so there is no race condition now. Also RemoveSubscriber for moving out tracks for safety, the subscription manager will handle the removed event but RemoveSubscriber again will not be bad. * Clear subscriber node max quality for moving out tracks
This commit is contained in:
@@ -3326,6 +3326,12 @@ func (p *ParticipantImpl) MoveToRoom(params types.MoveToRoomParams) {
|
||||
}
|
||||
|
||||
for _, track := range p.GetPublishedTracks() {
|
||||
for _, sub := range track.GetAllSubscribers() {
|
||||
track.RemoveSubscriber(sub, false)
|
||||
// clear the subscriber node max quality as the remote quality notify
|
||||
// from source room would not reach the moving out participant.
|
||||
track.(types.LocalMediaTrack).ClearSubscriberNodesMaxQuality()
|
||||
}
|
||||
trackInfo := track.ToProto()
|
||||
p.params.Telemetry.TrackUnpublished(
|
||||
context.Background(),
|
||||
|
||||
Reference in New Issue
Block a user