shorten the time cost for subscriber get media tracks (#747)
* set DownTrack's initial codec to first codec of potential codecs * faststart on subscribe
This commit is contained in:
@@ -245,7 +245,7 @@ func (t *MediaTrackSubscriptions) AddSubscriber(sub types.LocalParticipant, wr *
|
||||
// since sub will lock, run it in a goroutine to avoid deadlocks
|
||||
go func() {
|
||||
sub.AddSubscribedTrack(subTrack)
|
||||
sub.Negotiate()
|
||||
sub.Negotiate(false)
|
||||
}()
|
||||
|
||||
t.params.Telemetry.TrackSubscribed(context.Background(), subscriberID, t.params.MediaTrack.ToProto(),
|
||||
@@ -708,5 +708,5 @@ func (t *MediaTrackSubscriptions) downTrackClosed(
|
||||
}
|
||||
|
||||
sub.RemoveSubscribedTrack(subTrack)
|
||||
sub.Negotiate()
|
||||
sub.Negotiate(false)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user