@@ -315,6 +315,12 @@ public class TRTCSdkManager {
}
+ public void switchCameraToFrontCamera(){
+ if (mCloud != null && mCloud.getDeviceManager() != null) {
+ mCloud.getDeviceManager().switchCamera(true);
+ }
+
/**
* TRTCAudioModeSpeakerphone
*/
@@ -204,6 +204,7 @@ public class TCLivePresenter extends BasePresenter<TCLiveRoomContract.TCLiveRoom
public void startLocalPreview(TXCloudVideoView txCloudVideoView) {
TRTCSdkManager.getInstance().startLocalPreview(txCloudVideoView);
TRTCSdkManager.getInstance().startLocalAudio();
+ TRTCSdkManager.getInstance().switchCameraToFrontCamera();