Skip to content

Commit

Permalink
test(mediaAspect): log to debug on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
evandrododo committed Dec 10, 2023
1 parent bc873c1 commit 8344522
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/components/WebCamVideoPlane/WebCamVideoPlane.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@ export const WebCamVideoPlane = () => {
const [userMedia, setUserMedia] = useState<MediaStream>();
// 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",
Expand Down

0 comments on commit 8344522

Please sign in to comment.