Handle Large Rooms - Android
In a room with many participants, receive and render only what is on screen, and lower the quality of what matters less. These practices keep CPU, memory and bandwidth in check.
User Interface Optimization
In large rooms, show only the participants that matter on screen.
Recommended Practices:
Limit Visible Participants: Display only a limited number of participants on screen at any given time, adapting the view based on screen size. Use pagination to allow users to browse or switch between additional participants. For example, you could display only users whose video stream is enabled, or you could choose to display all active speakers. This approach helps manage screen space efficiently, ensuring that the most relevant participants are visible without overwhelming the interface.Prioritize Active Speakers: Ensure all active speakers are displayed on the screen to highlight who is currently talking, helping participants stay engaged and aware of ongoing discussions. To identify which participant is speaking, you can use the onSpeakerChanged() event.
Optimizing Media Streams
In large video calls, receive and render only the media you show.
Recommended Practices:
Receive Only the Media You Show: PassautoConsume = falsetoVideoSDK.createRoom(). A participant's mic and camera are then not received until you callconsumeMicStreams()orconsumeWebcamStreams()on that participant, for example fromonParticipantJoined(), and again fromonMediaStatusChanged()when they turn their media on. CallstopConsumingWebcamStreams()when a participant's tile leaves the screen. These aresuspendfunctions, so call them from a coroutine. See Selective Subscription for a full example.Pause Streams for Non-Visible Participants: To optimize performance, pause the video and/or audio streams of participants who are not currently visible on the screen. This reduces unnecessary resource consumption.Resume Streams When Visible: Once a participant comes into view, resume their stream to provide an uninterrupted experience as they appear on the screen.
For detailed setup instructions on pausing and resuming streams, check out our in-depth documentation here.
Media Stream Quality Adjustment
In large rooms, managing media stream quality is essential to balance performance and user experience.
Recommended Practices:
High Quality for Active Speakers: CallsetQuality(VideoQuality.HIGH)on each active speaker'sParticipant, so their video arrives at the highest quality.Lower Quality for Non-Speaking Participants: CallsetQuality(VideoQuality.LOW)on the other participants to save bandwidth and CPU.Lower the Quality You Send When No One Watches: PassdynaCast = truetoVideoSDK.createRoom(). The server then lowers the quality of the camera stream you send while no one is watching its larger layers, and raises it again when someone is. It only works when the camera sends multiple layers:multiStreamon and the VP8 codec.
setQuality() is a suspend function, so call it from a coroutine. It takes a VideoQuality: HIGH, MEDIUM or LOW. It sets the quality you receive from a remote participant, and does nothing on the local participant.
Check out the documentation for the setQuality() method here
Got a Question? Ask us on discord

