Network Events - Flutter
VideoSDK's qualityLimitation event keeps you informed whenever media quality is affected or recovers during a room, giving you the context you need to act and keep the experience smooth for your users.
qualityLimitation
-
This event is triggered whenever a limitation on the quality of the video you send is either detected or resolved during a room.
-
The callback includes a
typeparameter that specifies the cause of the quality limitation. Possible values:CPU: Quality is reduced due to high CPU usage.BANDWIDTH: Quality is reduced due to insufficient bandwidth.CONGESTION: Quality is reduced due to network congestion.
-
The callback also includes a
stateparameter that indicates the current status of the limitation:DETECTED: A limitation has been identified.RESOLVED: The limitation has been cleared.
-
Both parameters are a
String, and their values are in upper case. -
A third parameter,
timestamp(int?), is when the limitation changed, in milliseconds since the epoch. -
It can be subscribed to using the
Roomclass.
Example
Here is an example demonstrating the usage of the event mentioned on this page.
import 'package:videosdk/videosdk.dart';
void setupRoomEventListener(Room room) {
room.on(Events.qualityLimitation, (String type, String state, int? timestamp) {
print("Quality Limitation for $type is $state at $timestamp");
});
}
API Reference
The API references for all the methods and events utilized in this guide are provided below.
Got a Question? Ask us on discord

