Skip to content

Commit

Permalink
utility to for connection quality higher
Browse files Browse the repository at this point in the history
  • Loading branch information
boks1971 committed Oct 14, 2024
1 parent 6e7157c commit 5e7ef52
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 5e7ef52

Please sign in to comment.