While using getUserMedia API to access camera in desktop it will open web camera.of course it is help to video communication.but which camera is invoked when it is used in mobile device.Front cam or Rear cam?.is there needed code for selecting camera?
相关问题
- Is there a limit to how many levels you can nest i
- How to toggle on Order in ReactJS
- void before promise syntax
- Keeping track of variable instances
- Can php detect if javascript is on or not?
There's a solution where the user can select one of the cameras.
Enable rear camera with HTML5
By evaluating
sourceInfo.facing
from the following code, you can select a camera ('user' or 'environment') (which works on current chrome >= 30): https://simpl.info/getusermedia/sources/The answer is yes, for Android as a default camera, the front(user) caerma is up.So i propose this script to choose between the Front and the Rear Camera
Unfortunately, you cannot (yet?) select this via the code.
Mozilla Firefox beta: When the user accepts to share camera, he/she also select what camera to share.
Chrome beta: I have only been able to use the face camera. Could be configurable, but I do not know how…
EDIT: In chrome it's possible to select the back facing camera programmatically. See the next answer by Probot in this thread.