Closed sthapa1 closed 2 years ago
add this to your Bridge.js
switchCamera: NativeModules.NativeMobileSDKBridge.switchCamera
then in NativeMobileSDKBridge.m
add this just after the setCameraOn function for ios
RCT_EXPORT_METHOD(switchCamera:(BOOL)isOn)
{
[meetingSession.audioVideo switchCamera];
}
For android, in NativeMobileSDKBridge.kt
add this
@ReactMethod
fun switchCamera() {
logger.info(TAG, "Called switchCamera")
meetingSession?.audioVideo?.switchCamera()
}
As mentioned by @Beos24vi react native does not expose all the method native sdk supports, so you would have to expose it. Feel free to open any PR to add support. Thanks!
I can't see any api on react native chime demo for flipping device camera to rear or front. Is there any way to do this?