'Is it possible to record the rear-facing ('environment') camera using react-media-recorder?

I am having an issue recording with react-media-recorder using the rear facing camera. This is how I have initialised useMediaRecorder and props:

 const {
    status,
    startRecording,
    stopRecording,
    mediaBlobUrl,
  } = useReactMediaRecorder({
     video:{
    facingMode:{exact: "environment"} 
   },
  audio: true, blobPropertyBag: {
    type: "video/mp4"
  }
});

My question is:

is it possible to record the rear-facing camera using react-media-recorder? and if not is there any other way to implement this functionality?

Thanks



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source