How do I monitor Video API call quality in real-time? How do I monitor Video API call quality in real-time?

How do I monitor Video API call quality in real-time?

Vonage API Support

Objective

To understand the Vonage Video APIs that enable real-time monitoring of call quality.

Applies To

  • Vonage Video API
  • JS SDK
  • CPU performance
  • MOS
  • Call quality

Procedure

Vonage Video web client SDK provides APIs that allow developers to monitor changes in call quality. By detecting these changes, developers can tune their applications in real-time and continuously give users the most optimal call experience.

  1. Detecting CPU performance changes

    You can detect changes in the device's CPU load by monitoring the Session cpuPerformanceChanged event. The event contains a cpuPerformanceState property, which is set to one of the following values.

    'nominal' — The device can take on additional work.
    'fair' — The device can still take on additional work, however battery-life may get reduced; additionally, for devices with fans, the fans may become active and audible.
    'serious' — The device is stressed, so throttling of resources (e.g., CPU) may occur.
    'critical' — The device is extremely stressed; if not alleviated, issues may occur.

    In response to this event, an application can notify users about resource consumption or disable computationally expensive processes, such as video transformers.

    Vonage Video API Opentok Environment

    Vonage Video API Unified Environment

    Important: This API has limited availability. cpuPerformanceChanged is currently only available for Chrome 125+, Edge 125+, and Opera 111+.

  2. Mean Opinion Score (MOS)

    You can use the Subscriber qualityScoreChanged event to monitor changes in audio and video quality. The event contains two properties: audioQualityScore and videoQualityScore. The quality of experience that a user perceives from a service can be rated using Mean Opinion Score (MOS). The values range from 5 to 1, with the integer values corresponding to Excellent | Good | Fair | Poor | Bad.

    5 (Excellent) — A hypothetical upper limit to the best quality a user can experience.
    4 (Good) — A more attainable rating. Vonage users can expect to receive this level of quality.
    3 (Fair) — Quality is OK.
    2 (Poor) — Quality is unacceptable.
    1 (Bad) — Quality is horrible.

    In response to these events, your application can (optionally) notify the client of network conditions resulting in degraded call quality.

    Vonage Video API Opentok Environment

    Vonage Video API Unified Environment

Additional Information

For more information on real-time monitoring of call quality and code snippets to optimize the application based on these events, please refer to the following docs:

Here's the reference sample application: In-Call-Monitoring, which demonstrates the qualityScoreChanged (based on the subscriber's audio/video MOS) and cpuPerformanceChanged (real-time indication of device performance related to CPU pressure) events.