Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"facingMode: environment" Not Working in agora-rtc-web #1451

Open
Samiddha99 opened this issue Aug 29, 2023 · 0 comments
Open

"facingMode: environment" Not Working in agora-rtc-web #1451

Samiddha99 opened this issue Aug 29, 2023 · 0 comments
Assignees
Labels
improvement Additions that make docs better

Comments

@Samiddha99
Copy link

Setting facingMode to environment in createMicrophoneAndCameraTracks() for CameraVideoTrackInitConfig, not switching the camera to back camera in mobile, it still using front camera.

I have added the below configuration in my code:

import IAgoraRTC, {
  createMicrophoneAndCameraTracks,
  MicrophoneAudioTrackInitConfig,
  CameraVideoTrackInitConfig,
} from "agora-rtc-react";

var audioTrackConfig:MicrophoneAudioTrackInitConfig = {
  AEC: true, //Enable acoustic echo cancellation
  AGC: true, // Enable audio gain control
  ANS: true, // Enable automatic noise suppression
}
var videoTrackConfig:CameraVideoTrackInitConfig = {
  facingMode: 'environment' // front or rear camera
}

const useMicrophoneAndCameraTracks = createMicrophoneAndCameraTracks(audioTrackConfig, videoTrackConfig);
const { ready, tracks } = useMicrophoneAndCameraTracks();
@atovpeko atovpeko added the improvement Additions that make docs better label Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Additions that make docs better
Projects
None yet
Development

No branches or pull requests

4 participants