mirror of
https://github.com/livekit/livekit.git
synced 2026-08-27 22:34:25 +00:00
Only send connection quality updates for protocol 5+
This commit is contained in:
@@ -722,6 +722,9 @@ func (r *Room) connectionQualityWorker() {
|
||||
}
|
||||
|
||||
for _, op := range participants {
|
||||
if !op.ProtocolVersion().SupportsConnectionQuality() {
|
||||
continue
|
||||
}
|
||||
update := &livekit.ConnectionQualityUpdate{}
|
||||
|
||||
// send to user itself
|
||||
|
||||
@@ -30,3 +30,8 @@ func (v ProtocolVersion) SupportsSpeakerChanged() bool {
|
||||
func (v ProtocolVersion) SupportsTransceiverReuse() bool {
|
||||
return v > 3
|
||||
}
|
||||
|
||||
// SupportsConnectionQuality - avoid sending frequent ConnectionQuality updates for lower protocol versions
|
||||
func (v ProtocolVersion) SupportsConnectionQuality() bool {
|
||||
return v > 4
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user