-
public final class ParticipantComparatorsKt
-
-
Field Summary
Fields Modifier and Type Field Description private final static <ERROR CLASS><ParticipantState>dominantSpeakerprivate final static <ERROR CLASS><ParticipantState>speakingprivate final static <ERROR CLASS><ParticipantState>screenSharingprivate final static <ERROR CLASS><ParticipantState>publishingVideoprivate final static <ERROR CLASS><ParticipantState>publishingAudioprivate final static <ERROR CLASS><ParticipantState>raisedHandprivate final static <ERROR CLASS><ParticipantState>byNameprivate final static <ERROR CLASS><ParticipantState>byUserIdprivate final static <ERROR CLASS><ParticipantState>byJoinedAt
-
Method Summary
Modifier and Type Method Description final <ERROR CLASS><ParticipantState>getDominantSpeaker()Sorts participants flagged as dominant speaker before the rest. final <ERROR CLASS><ParticipantState>getSpeaking()Sorts participants currently speaking before silent ones. final <ERROR CLASS><ParticipantState>getScreenSharing()Sorts screen-sharing participants first. final <ERROR CLASS><ParticipantState>getPublishingVideo()Sorts participants currently publishing video first. final <ERROR CLASS><ParticipantState>getPublishingAudio()Sorts participants currently publishing audio first. final <ERROR CLASS><ParticipantState>getRaisedHand()Sorts participants with a raised-hand reaction first. final <ERROR CLASS><ParticipantState>getByName()Sorts participants by name ascending. final <ERROR CLASS><ParticipantState>getByUserId()Sorts participants by their ParticipantState.userId ascending (string compare). final <ERROR CLASS><ParticipantState>getByJoinedAt()Sorts participants by their ParticipantState.joinedAt, earliest first. final static <ERROR CLASS><ParticipantState>byReactionType(String type)Sorts participants who have a reaction matching type first. final static <ERROR CLASS><ParticipantState>bySourcePriority(ParticipantSource sources)Returns a comparator that prioritizes participants whose ParticipantState.source matches one of sources, in the given order. final static <ERROR CLASS><ParticipantState>byRole(String roles)Returns a comparator that prioritizes participants holding any of roles. -
-
Method Detail
-
getDominantSpeaker
final <ERROR CLASS><ParticipantState> getDominantSpeaker()
Sorts participants flagged as dominant speaker before the rest.
-
getSpeaking
final <ERROR CLASS><ParticipantState> getSpeaking()
Sorts participants currently speaking before silent ones.
-
getScreenSharing
final <ERROR CLASS><ParticipantState> getScreenSharing()
Sorts screen-sharing participants first.
-
getPublishingVideo
final <ERROR CLASS><ParticipantState> getPublishingVideo()
Sorts participants currently publishing video first.
-
getPublishingAudio
final <ERROR CLASS><ParticipantState> getPublishingAudio()
Sorts participants currently publishing audio first.
-
getRaisedHand
final <ERROR CLASS><ParticipantState> getRaisedHand()
Sorts participants with a raised-hand reaction first.
-
getByName
final <ERROR CLASS><ParticipantState> getByName()
Sorts participants by name ascending.
-
getByUserId
final <ERROR CLASS><ParticipantState> getByUserId()
Sorts participants by their ParticipantState.userId ascending (string compare).
Intended as a deterministic last-resort tiebreaker so participants with otherwise equal signals (no dominant-speaker, no pin, no raised hand, etc.) don't shuffle around between sort passes. Mirrors iOS's
userIdcomparator used in the trailingifInvisibleBy(userId)of every iOS preset.Note: this is lexicographic string compare — for production user IDs (UUIDs or arbitrary strings) the resulting order is meaningless to humans but is stable across re-sorts.
-
getByJoinedAt
final <ERROR CLASS><ParticipantState> getByJoinedAt()
Sorts participants by their ParticipantState.joinedAt, earliest first. Nulls last.
-
byReactionType
final static <ERROR CLASS><ParticipantState> byReactionType(String type)
Sorts participants who have a reaction matching type first.
-
bySourcePriority
final static <ERROR CLASS><ParticipantState> bySourcePriority(ParticipantSource sources)
Returns a comparator that prioritizes participants whose ParticipantState.source matches one of sources, in the given order. Sources not in the list are placed last.
Example:
bySourcePriority(RTMP, SRT, WHIP)→ RTMP first, then SRT, then WHIP, then everything else.
-
byRole
final static <ERROR CLASS><ParticipantState> byRole(String roles)
Returns a comparator that prioritizes participants holding any of roles.
-
-
-
-