close And Resize
Manages the closing and resizing of streams within a media session, adapting the layout and updating participant and stream information as needed.
Operations by Stream Type:
Audio Stream: Removes audio stream, updates active names, triggers reordering
Video Stream: Removes video from active and limited streams, updates main window
Screenshare: Stops screen sharing, restores deferred video, triggers reordering
Workflow:
Stream Identification: Finds the stream by producerId
Stream Removal: Removes from appropriate stream lists
State Updates: Updates relevant state flags and lists
UI Refresh: Triggers reordering and main window updates
Parameters
options
Options containing producer ID, media kind, and parameters
Example:
val options = CloseAndResizeOptions(
producerId = "producer-123",
kind = "video",
parameters = closeResizeParams
)
closeAndResize(options)Content copied to clipboard