How can I always turn on the back device camera to show the WebAR scene?

All things relating to the ARToolKit Javascript port and its use and development.
iceleaf
Posts: 3
Joined: Tue Sep 20, 2016 7:48 am

How can I always turn on the back device camera to show the WebAR scene?

Postby iceleaf » Mon Dec 05, 2016 1:30 am

I try to set up the AR scene in three.js.
I use "jsartoolkit" to do that.
As the example,
https://artoolkit.github.io/jsartoolkit5/examples/barcode_threejs.html

I load a JSON model into the AR scene, and it does work.
Now I wonder how could I do to change the camera?
When I open the AR webpage, it always turn on the front device camera of my mobile phone.
I want to use the back device camera to show my WebAR scene.
How should I do?
I am a javascript beginner, so I need a simple example to learn.
I need help.....

MrDaniel
Posts: 212
Joined: Wed Nov 18, 2015 9:07 pm

Re: How can I always turn on the back device camera to show the WebAR scene?

Postby MrDaniel » Mon Dec 12, 2016 1:57 pm

Hello IceLeaf,

Here is a link to the solution to this problem.

http://stackoverflow.com/questions/1848 ... nt-or-rear

iceleaf
Posts: 3
Joined: Tue Sep 20, 2016 7:48 am

Re: How can I always turn on the back device camera to show the WebAR scene?

Postby iceleaf » Thu Dec 15, 2016 9:58 am

Hello MrDaniel,

Thank you for your reply.
However I still do not understand how to solve the problem.
It is too difficult to me..........

Could you show me how to modify the example ?....
Thank you so much!

iceleaf
Posts: 3
Joined: Tue Sep 20, 2016 7:48 am

Re: How can I always turn on the back device camera to show the WebAR scene?

Postby iceleaf » Tue Dec 20, 2016 9:12 am

Now I know how to change the active camera.
In this example, I realize how it does work.
https://simpl.info/getusermedia/sources/

In this case, I can select a camera by changing the "deviceId" of camera.

However, In this AR example.
https://artoolkit.github.io/jsartoolkit ... reejs.html
The active camera is chosen by "facingMode"

I try to change the camera by deviceId, but it does not work.

I need more help.....

MrDaniel
Posts: 212
Joined: Wed Nov 18, 2015 9:07 pm

Re: How can I always turn on the back device camera to show the WebAR scene?

Postby MrDaniel » Tue Jan 03, 2017 12:18 pm

Any updates on the progress here? Other users have successfully used the deviceID


Return to “JSARToolKit”

Who is online

Users browsing this forum: No registered users and 1 guest