Need this public as it is used from elsewhere (#804)
This commit is contained in:
@@ -132,7 +132,7 @@ func (t *MediaTrackSubscriptions) SetMuted(muted bool) {
|
|||||||
// This will queue up the current state, but subscriber
|
// This will queue up the current state, but subscriber
|
||||||
// driven changes could update it.
|
// driven changes could update it.
|
||||||
if !muted {
|
if !muted {
|
||||||
t.updateQualityChange(true)
|
t.UpdateQualityChange(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
// update mute of all subscribed tracks
|
// update mute of all subscribed tracks
|
||||||
@@ -648,7 +648,7 @@ func (t *MediaTrackSubscriptions) notifySubscriberMaxQuality(subscriberID liveki
|
|||||||
}
|
}
|
||||||
t.maxQualityLock.Unlock()
|
t.maxQualityLock.Unlock()
|
||||||
|
|
||||||
t.updateQualityChange(false)
|
t.UpdateQualityChange(false)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t *MediaTrackSubscriptions) NotifySubscriberNodeMaxQuality(nodeID livekit.NodeID, qualities []types.SubscribedCodecQuality) {
|
func (t *MediaTrackSubscriptions) NotifySubscriberNodeMaxQuality(nodeID livekit.NodeID, qualities []types.SubscribedCodecQuality) {
|
||||||
@@ -694,10 +694,10 @@ func (t *MediaTrackSubscriptions) NotifySubscriberNodeMaxQuality(nodeID livekit.
|
|||||||
}
|
}
|
||||||
t.maxQualityLock.Unlock()
|
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 {
|
if t.params.MediaTrack.Kind() != livekit.TrackType_VIDEO {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -774,7 +774,7 @@ func (t *MediaTrackSubscriptions) updateQualityChange(force bool) {
|
|||||||
// if quality downgrade (or become OFF), delay notify to publisher if needed
|
// if quality downgrade (or become OFF), delay notify to publisher if needed
|
||||||
if len(qualityDowngrades) > 0 && !force {
|
if len(qualityDowngrades) > 0 && !force {
|
||||||
t.maxSubscribedQualityDebounce(func() {
|
t.maxSubscribedQualityDebounce(func() {
|
||||||
t.updateQualityChange(true)
|
t.UpdateQualityChange(true)
|
||||||
})
|
})
|
||||||
|
|
||||||
// no quality upgrades
|
// no quality upgrades
|
||||||
@@ -836,7 +836,7 @@ func (t *MediaTrackSubscriptions) startMaxQualityTimer(force bool) {
|
|||||||
|
|
||||||
t.maxQualityTimer = time.AfterFunc(initialQualityUpdateWait, func() {
|
t.maxQualityTimer = time.AfterFunc(initialQualityUpdateWait, func() {
|
||||||
t.stopMaxQualityTimer()
|
t.stopMaxQualityTimer()
|
||||||
t.updateQualityChange(force)
|
t.UpdateQualityChange(force)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user