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 {
|
for _, op := range participants {
|
||||||
|
if !op.ProtocolVersion().SupportsConnectionQuality() {
|
||||||
|
continue
|
||||||
|
}
|
||||||
update := &livekit.ConnectionQualityUpdate{}
|
update := &livekit.ConnectionQualityUpdate{}
|
||||||
|
|
||||||
// send to user itself
|
// send to user itself
|
||||||
|
|||||||
@@ -30,3 +30,8 @@ func (v ProtocolVersion) SupportsSpeakerChanged() bool {
|
|||||||
func (v ProtocolVersion) SupportsTransceiverReuse() bool {
|
func (v ProtocolVersion) SupportsTransceiverReuse() bool {
|
||||||
return v > 3
|
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