Need this public as it is used from elsewhere (#804)

This commit is contained in:
Raja Subramanian
2022-07-03 11:03:26 +05:30
committed by GitHub
parent 1428ab3713
commit 5704a7bfca
+6 -6
View File
@@ -132,7 +132,7 @@ func (t *MediaTrackSubscriptions) SetMuted(muted bool) {
// This will queue up the current state, but subscriber
// driven changes could update it.
if !muted {
t.updateQualityChange(true)
t.UpdateQualityChange(true)
}
// update mute of all subscribed tracks
@@ -648,7 +648,7 @@ func (t *MediaTrackSubscriptions) notifySubscriberMaxQuality(subscriberID liveki
}
t.maxQualityLock.Unlock()
t.updateQualityChange(false)
t.UpdateQualityChange(false)
}
func (t *MediaTrackSubscriptions) NotifySubscriberNodeMaxQuality(nodeID livekit.NodeID, qualities []types.SubscribedCodecQuality) {
@@ -694,10 +694,10 @@ func (t *MediaTrackSubscriptions) NotifySubscriberNodeMaxQuality(nodeID livekit.
}
t.maxQualityLock.Unlock()
t.updateQualityChange(false)
t.UpdateQualityChange(false)
}
func (t *MediaTrackSubscriptions) updateQualityChange(force bool) {
func (t *MediaTrackSubscriptions) UpdateQualityChange(force bool) {
if t.params.MediaTrack.Kind() != livekit.TrackType_VIDEO {
return
}
@@ -774,7 +774,7 @@ func (t *MediaTrackSubscriptions) updateQualityChange(force bool) {
// if quality downgrade (or become OFF), delay notify to publisher if needed
if len(qualityDowngrades) > 0 && !force {
t.maxSubscribedQualityDebounce(func() {
t.updateQualityChange(true)
t.UpdateQualityChange(true)
})
// no quality upgrades
@@ -836,7 +836,7 @@ func (t *MediaTrackSubscriptions) startMaxQualityTimer(force bool) {
t.maxQualityTimer = time.AfterFunc(initialQualityUpdateWait, func() {
t.stopMaxQualityTimer()
t.updateQualityChange(force)
t.UpdateQualityChange(force)
})
}