feat: [VID-315] allow filtering participants using filter object #1655
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds support for filtering participants using a filter object instead of a predicate. Filter object looks something like this:
(For more examples of what kinds of operators we allow, see
filters.test.ts
.)Filtering is supported for a subset of participant properties:
SpeakerLayout
andPaginatedGridLayout
now accept filter objects in theirfilterParticipants
prop:This is particularly useful for the composite app, because a filter object (unlike a predicate) can be passed in configuration. So the new optional configuration option is added to the composite app:
participant.filter
. It is supported by built-in layouts.