mix Streams
Mixes video and audio streams and participants based on specified parameters.
This function combines different categories of streams by interleaving muted and unmuted streams, while ensuring prioritized positioning for streams with specific identifiers. It creates a balanced mix of video and audio streams for optimal display.
Features:
Stream category mixing
Muted/unmuted stream interleaving
Priority-based positioning
Balanced stream distribution
Error handling
Parameters:
options Configuration options containing different stream categories
Returns:
Example Usage:
val options = MixStreamsOptions(
alVideoStreams = listOf(stream1, stream2),
nonAlVideoStreams = listOf(participant1, participant2),
refParticipants = listOf(participant1, participant2)
)
val result = mixStreams(options)
result.onSuccess { mixedStreams ->
}
result.onFailure { error ->
Logger.e("MixStreams", "Error mixing streams: ${error.message}")
}Content copied to clipboard