Live quality management
When users participate in a live event, network connection may fluctuate throughout the event, affecting the streaming quality. In such case, you might want to notify users of their network quality, rather than having the event interrupted without any alert.
Sendbird Live provides functionalities to configure the quality of video streaming during a live event, and to notify the users whenever the connection quality changes throughout the event.
Video streaming settings
When streaming video content as hosts, it is essential to consider the fluctuations in network conditions that may occur during the stream. You can allow hosts to set and adjust their video quality settings through
Note: The video quality settings are needed only when the live event's
typeis set to
video. Each host in the event can configure their own settings according to their preference.
While WebRTC automatically adjusts the media quality based on the available network capacity, there are instances where fine-tuning specific properties becomes necessary to align with the purpose and requirements of the event.
For example, in conference event streams, emphasis may be placed on video resolutions to ensure clear visuals, while in sport event streams, the focus might be on maintaining a higher video frame rate to capture fast-paced action accurately.
When starting the stream as hosts, set the following three parameters in
List of the MediaOptions parameters
Specifies the video resolution that the WebRTC stream uses.
Specifies the frames per second for the WebRTC Video stream.
Specifies a degradation preference to prioritize a specific aspect of the stream.
Note: Before setting these parameters, check the supported
fpson your device. If you set a
fpsvalue that is not supported by the device, or don't set either of the two, the system will automatically set an approximate value.
Adjust the settings during streaming
While the initial configuration sets the video quality constraints, it's important to note that WebRTC's adaptive nature adjusts the media quality based on network conditions as well.
However, if you find the need to make real-time adjustments to the video quality during the live event, use the
This function allows you to modify the current resolution, FPS, or other quality parameters on the fly to better adapt to changing network conditions or specific event requirements. By dynamically adjusting these constraints, you can ensure a smooth streaming experience for the audience.
Connection quality indicator
You can notify both hosts and participants whenever there is a change in their network connection status during the live event. To do so, listen to events related to the connection quality change through
ConnectionQualityDelegate and create an indicator to inform the status to the users.
To detect changes in connection quality, you need to set
ConnectionQualityDelegate and select a monitoring mode by calling the
setConnectionQualityDelegate() method. Whenever there is a change in connection quality, the
didConnectionQualityUpdate method will be called according to the specified mode.
List of the monitoring modes
Monitors the connection quality every three seconds after the
Monitors the changes in connection quality level which can call the
When the listener is no longer needed, remove it and all previous settings by calling the
The connection quality data can vary by each host and participant in a live event, and this can be quantified and analyzed by
While you have flexibility to define connection quality value ranges that correspond to different quality levels, here’s a general guideline for interpreting these ranges and setting up the corresponding enumeration values.
How to read ConnectionMetrics
|Packet Lost Rate
|Round Trip Time
0ms - 150ms
Based on the
ConnectionQuality enum, you can assess the current quality of the streaming and implement appropriate actions to improve it. For example, you might display a quality degradation alert to the user if the connection quality drops below average.