WebRTC Metrics

A comprehensive overview of WebRTC statistics, derived indicators, and observable signals, to better understand call quality, connectivity, and user experience in rtcStats

Back
peripheralvideo

No specific video constraints

This request grants access to all connected video devices. To optimize quality or select a particular camera, consider adding explicit video constraints. This will also prevent selecting unintended devices.

Description

GetUserMedia or GetDisplayMedia API have 2 goals:

  1. Authorizing the browser to access a device
  2. Get the stream from this device

When no constraint is set it could lead to selecting the wrong device (eg: virtual or system default) which might not be the one the user wants. Not adding constraints allows getting a different level of quality, depending on the device or browser default settings (such as mono or stereo for a microphone).

In this case, there’s a getUserMedia for video only that has no constraints for the video.

What do we do here?

We check if there are getUserMedia requests that have the minimal constraints set like {video: true} except and by discarding the first request done for a domain.

Notes

The first getUserMedia for a domain is discarded in this check because it is mainly used to authorize the devices for enumerating the devices and collecting the device labels.

Our suggestions

  • Consider adding constraints to your calls for getUserMedia