Skip to content

Commit

Permalink
fix(ios): handle video transcoding cancel exception
Browse files Browse the repository at this point in the history
  • Loading branch information
guimarca committed Jan 18, 2020
1 parent 6feaa95 commit 6f06bef
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/ios/CDVCamera.m
Original file line number Diff line number Diff line change
Expand Up @@ -512,8 +512,13 @@ - (void)resultForImage:(CDVPictureOptions*)options info:(NSDictionary*)info comp

- (CDVPluginResult*)resultForVideo:(NSDictionary*)info
{
NSString* moviePath = [[info objectForKey:UIImagePickerControllerMediaURL] absoluteString];
return [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:moviePath];
@try {
NSString* moviePath = [[info objectForKey:UIImagePickerControllerMediaURL] absoluteString];
return [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:moviePath];
} @catch (NSException *exception) {
NSLog(@"Camera.resultForVideo: error retrieving file path");
return [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:@""];
}
}

- (void)imagePickerController:(UIImagePickerController*)picker didFinishPickingMediaWithInfo:(NSDictionary*)info
Expand Down

0 comments on commit 6f06bef

Please sign in to comment.