change Vids
Changes the video streams on the screen based on the provided options and parameters.
This function adjusts video streams based on conditions like event type, active participants, and screen sharing status. It updates the necessary lists and variables to display the appropriate video streams.
Key Features:
Screen Sharing Handling: Adjusts streams when screen sharing is active
Participant Filtering: Removes streams without corresponding participants
Audio Loudness Sorting: Sorts streams based on audio levels if enabled
Event Type Logic: Different behavior for conference, broadcast, chat events
Pagination: Creates paginated views of streams
Breakout Room Support: Handles streams in breakout rooms
Host Prioritization: Ensures host streams are displayed appropriately
Mixed Streams: Combines video and audio-only streams
Workflow:
Initialize: Clone all parameter lists to avoid mutation
Screen Share Check: Adjust streams if screen sharing is active
Participant Filtering: Remove streams without participants
Audio Sorting: Sort by loudness if enabled
Stream Classification: Separate into video, audio-only, muted
Host Handling: Special logic for conference host
Stream Compilation: Combine streams based on display type
Pagination: Create paginated views
Breakout Rooms: Handle breakout room streams
Display: Call dispStreams to show the streams
Parameters
Options containing screen change flag and parameters
Example:
val options = ChangeVidsOptions(
screenChanged = false,
parameters = changeVidsParams
)
changeVids(options)Note:
This implementation matches the Flutter SDK logic 100%. It handles all the complex scenarios including screen sharing, breakout rooms, audio loudness sorting, and pagination.