Skip to content

Commit

Permalink
return result after switching camera
Browse files Browse the repository at this point in the history
  • Loading branch information
parveshneedhoo committed Mar 18, 2024
1 parent 01408aa commit 7a8c118
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/ios/SimpleCameraPreview.m
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,11 @@ - (void) torchSwitch:(CDVInvokedUrlCommand*)command{

- (void) switchToUltraWideCamera:(CDVInvokedUrlCommand*)command{
NSString *device = [command.arguments objectAtIndex:0];
BOOL cameraSwitched = FALSE;
if (self.sessionManager != nil) {
[self.sessionManager switchToUltraWideCamera: device];
cameraSwitched = [self.sessionManager switchToUltraWideCamera: device];
}
CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK];
CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsBool:cameraSwitched];
[self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
}

Expand Down

0 comments on commit 7a8c118

Please sign in to comment.