Returns a MediaTrackCapabilities object describing the primary audio or video track of a device's MediaStream.
Examples
The following example gets all media devices with MediaDevices.enumerateDevices(). If any of the devices are input devices then console.log(device) will print an InputDeviceInfo object to the console.
js
navigator.mediaDevices.enumerateDevices().then((devices)=>{
devices.forEach((device)=>{
console.log(device);// an InputDeviceInfo object if the device is an input device, otherwise a MediaDeviceInfo object.});});