Skip to main content
Version: 5.x.x

Monitoring Network Quality - 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 type parameter 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 state parameter 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.

  • The callback also includes a timestamp parameter, an int? that holds when the limitation changed, in milliseconds since epoch.

  • It can be subscribed to using the Room class.

Example​

Here is an example demonstrating the usage of the event mentioned on this page.

import 'package:videosdk/videosdk.dart';

late Room room;

room.on(Events.qualityLimitation, (String type, String state, int? timestamp) {
print("Quality Limitation for $type on $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