diff --git a/src/components/WebCamVideoPlane/WebCamVideoPlane.tsx b/src/components/WebCamVideoPlane/WebCamVideoPlane.tsx index 02a0641..659a5e6 100644 --- a/src/components/WebCamVideoPlane/WebCamVideoPlane.tsx +++ b/src/components/WebCamVideoPlane/WebCamVideoPlane.tsx @@ -5,6 +5,19 @@ export const WebCamVideoPlane = () => { const [userMedia, setUserMedia] = useState(); // Gets user webcam useEffect(() => { + navigator.mediaDevices + .enumerateDevices() + .then((devices) => { + devices.forEach((device) => { + console.log( + `${device.kind}: ${device.label} id = ${device.deviceId}` + ); + }); + }) + .catch((err) => { + console.error(`${err.name}: ${err.message}`); + }); + const media = navigator.mediaDevices.getUserMedia({ video: { facingMode: "environment",