DeepARSDK / videocall-android-java

Video call using Agora.io SDK with face masks provided by DeepAR SDK
https://developer.deepar.ai
MIT License
13 stars 7 forks source link

switch camera not working #7

Closed nsgdev closed 3 years ago

nsgdev commented 3 years ago

when i am calling mRtcEngine.switchCamera(); it is giving response -1. In docs, they say 0: Success. < 0: Failure. But what is the error I couldn't find it? Please help.

JelenaKB commented 3 years ago

You can find an example of camera switching in the quickstart project, recently updated to support CameraX.

You seem to be calling an agora function to control the camera, but the camera lens should be set directly

For example:

CameraSelector cameraSelector = new CameraSelector.Builder().requireLensFacing(CameraSelector.LENS_FACING_FRONT).build();

AndroXStudiO commented 2 years ago

i am facing same problem but why?