Too many getUserMedia requests

peripheralbehavior

This unusually high number of media requests may indicate a bug in the application's logic or inefficient media handling.

Description

GetUserMedia or GetDisplayMedia API have 2 goals:

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

Once the stream is captured, there is no need to request it again except when the device changes. Doing many requests could be a bug in the application or due to a malicious code injected from a different domain such as a browser extension.

What do we do here?

We count the number of getUserMedia requests and mark an observation if the value is greater or equals to 500.