Skip to content

Commit

Permalink
change option name to captureDevice
Browse files Browse the repository at this point in the history
  • Loading branch information
dinitri committed Mar 6, 2024
1 parent 0850316 commit edfbc79
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/ios/CameraSessionManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ - (void) setupSession:(NSString *)defaultCamera completion:(void(^)(BOOL started
self.defaultCamera = AVCaptureDevicePositionBack;
}
AVCaptureDevice *videoDevice;
if ([options[@"ulw"] isEqual: @"active"]) {
if ([options[@"captureDevice"] isEqual: @"wide-angle"]) {
// need to add check for ios version first
videoDevice = [self cameraWithPosition: self.defaultCamera captureDeviceType: AVCaptureDeviceTypeBuiltInUltraWideCamera];
}
Expand Down
6 changes: 3 additions & 3 deletions src/ios/SimpleCameraPreview.m
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ - (void) enable:(CDVInvokedUrlCommand*)command {
NSInteger targetSize = ((NSNumber*)config[@"targetSize"]).intValue;
[setupSessionOptions setValue:[NSNumber numberWithInteger:targetSize] forKey:@"targetSize"];
}
NSString *ulw = config[@"ulw"];
if (ulw != [NSNull null] && ![ulw isEqual: @""]) {
[setupSessionOptions setValue:ulw forKey:@"ulw"];
NSString *captureDevice = config[@"captureDevice"];
if (captureDevice != [NSNull null] && ![captureDevice isEqual: @""]) {
[setupSessionOptions setValue:captureDevice forKey:@"captureDevice"];
}
} @catch(NSException *exception) {
[self.commandDelegate sendPluginResult:[CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:@"targetSize not well defined"] callbackId:command.callbackId];
Expand Down

0 comments on commit edfbc79

Please sign in to comment.