get Videos
Processes and updates video streams by filtering out the admin's video stream.
This function filters out the admin's video stream from the list of all video streams and updates the state variables using the provided update functions. If no admin's video stream is found, it reverts to the previous state.
Features:
Video stream filtering
Admin stream exclusion
State management
Stream list updates
Error handling
Parameters:
options Configuration options containing participants, streams, and update functions
Returns:
Example Usage:
val options = GetVideosOptions(
participants = participantList,
allVideoStreams = allStreams,
oldAllStreams = oldStreams,
adminVidID = "admin-video-id",
)
val result = getVideos(options)
result.onSuccess {
}
result.onFailure { error ->
Logger.e("GetVideos", "Error processing video streams: ${error.message}")
}Content copied to clipboard