You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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();
The text was updated successfully, but these errors were encountered:
Setting
facingMode
toenvironment
increateMicrophoneAndCameraTracks()
forCameraVideoTrackInitConfig
, not switching the camera to back camera in mobile, it still using front camera.I have added the below configuration in my code:
The text was updated successfully, but these errors were encountered: