27
Views
0
Comments
[PWA Camera & Microphone] Select front/rear camera?
pwa-camera-microphone
Reactive icon
Forge asset by Ruben Goncalves
Application Type
Reactive

Hi,

I am trying to implement the module for use within a mobile application, but when I start the video stream the front camera is always used.

I found out you can select the camera by using the MediaConstraint:video:facingMode property, which is can be used in the MediaController script. Available values are 'user' (front camera), and 'environment' (rear camera).

let mediaPromise = navigator.mediaDevices.getUserMedia({ audio: isAudio, video: {facingMode: 'environment' }}); 

Is there any possibility to implement this in your module, so we can select between front and rear camera in the public video functions?

Thanks in advance.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.