Experimental
There is no property supported by all browsers to detect whether a video track originated from a user- or environment-facing camera device.
For this reason, we use the facingMode
property when available, but will fall back on a string-based analysis of the device label to determine the facing mode.
If both methods fail, the default facing mode will be used.
Try to analyze the local track to determine the facing mode of a track.