{facingMode: "environment"} camera switching doesn't work in Mobile Chrome
See original GitHub issuehi guys, I still have issue that was described in https://github.com/webrtc/adapter/issues/594 Camera don’t switched in Android Chrome (in FF and Safari everything is OK). Seem to this issue was not be fixed ?
Browsers and versions affected
Chrome for Android 66.
Steps to reproduce
var constraints = {video: {facingMode: "environment"}}
navigator.mediaDevices.getUserMedia(constraints)
or
var constraints = {video: {facingMode: {exact: "environment"}}}
navigator.mediaDevices.getUserMedia(constraints)
Expected results
Get the back-facing camera stream.
Actual results
Get the front-facing camera stream (the first code sample) or nothing — the browser does not request the permission (the second code sample).
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
HTML userMedia facingMode: "environment"doesn't work on ...
I have found that the label member of the device object contains the string back for an environment-facing camera and front for a...
Read more >Use applyConstraints facingMode to switch front/back camera ...
Once a webcam stream has been acquired on Android, it should be possible to switch between front and back camera by changing the...
Read more >MediaTrackConstraints.facingMode - Web APIs | MDN
The video source is facing toward the user; this includes, for example, the front-facing camera on a smartphone. "environment". The video source ...
Read more >How to choose between front and back camera stream
Selecting both size and facing mode In this example, we're asking for the stream that should face the environment (back camera) when possible,...
Read more >WebRTC facingMode environment not working in Android ...
I can be up to phone vendor to mark video input devices as front/back or maybe Chrome just doesn't support that in the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Just wanted to report that I am able to switch to
facingMode: { exact: "environment", }in mobile Chrome (Android 7, Chrome 67.0.3396.68). I am using the latest adapter.how can i import the adapter on angular 8?
i tried adding this code on the main.js
import 'webrtc-adapter'and
import adapter from 'webrtc-adapter';this is how i add the videoOptions
still no luck, setting the rear camera into default still not working