hiukim / mind-ar-js

Web Augmented Reality. Image Tracking, Face Tracking. Tensorflow.js
MIT License
2.13k stars 394 forks source link

There is an selfi camera mode error in iphone. #400

Closed toysun closed 1 year ago

toysun commented 1 year ago

I tested your face module demo link by my iphone. but iphone's camera mode is not selfi(user). I tried to change camera mode by javascript, but also can't did it.

Pls check your face Tracking example in iphone. and pls teach me how to change camera mode.

carlesgutierrez commented 1 year ago

In my case I would like to active rear cámera for Android as default. I've tried to switch camera with switchCamera() but this give me error.

`Uncaught TypeError: Cannot read property 'srcObject' of undefined
    at U.stop (cdn.jsdelivr.net/npm/mind-ar@1.2.0/dist/mindar-face-three.prod.js:17)
    at U.switchCamera (cdn.jsdelivr.net/npm/mind-ar@1.2.0/dist/mindar-face-three.prod.js:22)
    at /animated-arface/moduleFaceMesh.js:27`

at mindarThree.switchCamera();

const {renderer, scene, camera} = mindarThree;
mindarThree.switchCamera();
carlesgutierrez commented 1 year ago

Did you tried with "mindarThree.switchCamera();" @toysun ? May be I'm doing it in the wrong place.

hiukim commented 1 year ago

should be fixed in v1.2.2

toysun commented 1 year ago

Thank you for your reply!

should be fixed in v1.2.2