Too many camera changes

peripheraloutboundvideo

The camera has changed too many times in a short period of time. It could indicate a bug in the application’s logic.

Description

GetUserMedia or GetDisplayMedia API have 2 goals:

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

Each time this request is done, a new stream is captured that should be sent to the recipient. Doing this too many times could introduce audio glitches on each change. This could also be a bug in the application’s implementation, causing a user to attempt such frequent changes.

What do we do here?

We count how many times the camera stream changes, and we mark an observation if it is more than 6x per minute.