diff --git a/utils/connectionquality.go b/utils/connectionquality.go index 7187f1c0..54c2033f 100644 --- a/utils/connectionquality.go +++ b/utils/connectionquality.go @@ -30,3 +30,11 @@ func IsConnectionQualityLower(prev livekit.ConnectionQuality, curr livekit.Conne // WARNING NOTE: comparing protobuf enums directly return curr < prev } + +func IsConnectionQualityHigher(prev livekit.ConnectionQuality, curr livekit.ConnectionQuality) bool { + if IsConnectionQualityLower(prev, curr) { + return false + } + + return curr != prev +}