0

i need to access to smartphone back-camera through NavigatorUsermedia.getUsermedia(). I found some articles that use only front-camera, without choice.

Some ideas? I know that Camera API are not yet supported from no browser.

2 Answers2

0

I hope this link helps you.

Also with the example.

Community
  • 1
  • 1
Rudy Setiady
  • 76
  • 1
  • 3
0

In the constraints of getUserMedia() use this for front camera:

{ audio: true, video: { facingMode: "user" } }

or this for rear camera:

{ audio: true, video: { facingMode: { exact: "environment" } } }

I hope this helps.

Mendy
  • 7,612
  • 5
  • 28
  • 42