List of device labels returned by MediaDevices.enumerateDevices

Viewed 233

Calling navigator.mediaDevices.enumerateDevices in the browser returns MediaDeviceInfo for each media device present on the client. This includes deviceId, groupId, kind and label.

Filtering by kind === 'videoinput' I'm able to get a list of video cameras available.

However, the label for devices on different clients seem to vary wildly. For example, the camera on a MacBook Pro may have a label of "FaceTime HD Camera (05ac:8514)", while the label on a Pixel 3 main camera is "camera2 0, facing back".

Is there a list of which labels are returned by common client (mobile devices, laptops or USB cameras) so that I can parse them in my code & present a consistent name to the end user?

0 Answers
Related