Package-level declarations
Properties
Sorts participants by their ParticipantState.joinedAt, earliest first. Nulls last.
Sorts participants by name ascending.
Sorts participants by their ParticipantState.userId ascending (string compare).
Sorts participants flagged as dominant speaker before the rest.
Sorts participants currently publishing audio first.
Sorts participants currently publishing video first.
Sorts participants with a raised-hand reaction first.
Sorts screen-sharing participants first.
Sorts participants currently speaking before silent ones.
Functions
Sorts participants who have a reaction matching type first.
Returns a comparator that prioritizes participants holding any of roles.
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.
Combines multiple comparators in priority order. The first comparator that returns a non-zero result determines the ordering; subsequent comparators are skipped for that pair. Mirrors combineComparators from stream-video-js.
Returns a comparator that delegates to comparator only when predicate returns true for the pair, otherwise returns 0 (preserving order). Mirrors conditional from stream-video-js.
Wraps comparator so it only applies when at least one participant in a pair has visibility state VisibilityOnScreenState.INVISIBLE. When both are VisibilityOnScreenState.VISIBLE (or VisibilityOnScreenState.UNKNOWN) the pair is left in place (returns 0). This is the speaker-layout / default-grid stability guarantee.
Wraps comparator so it applies when at least one participant has visibility state VisibilityOnScreenState.INVISIBLE or VisibilityOnScreenState.UNKNOWN. Stricter than ifInvisible — useful for continuous-scroll grids where off-screen tiles may report UNKNOWN before they ever render. Visible/visible pairs return 0.