Skip to content

Commit

Permalink
utility to for connection quality higher (#851)
Browse files Browse the repository at this point in the history
  • Loading branch information
boks1971 authored Oct 14, 2024
1 parent 6e7157c commit a3ae28b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions utils/connectionquality.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit a3ae28b

Please sign in to comment.