Skip to content

Commit

Permalink
remove duplicate stopVideo
Browse files Browse the repository at this point in the history
  • Loading branch information
YushraJewon committed Oct 21, 2024
1 parent f591ce9 commit b646c69
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions src/ios/SimpleCameraPreview.m
Original file line number Diff line number Diff line change
Expand Up @@ -400,19 +400,6 @@ - (void)stopVideoCapture:(CDVInvokedUrlCommand*)command {
}
}

- (void)stopVideoCapture:(CDVInvokedUrlCommand*)command {
if (self.sessionManager == nil || !self.sessionManager.movieFileOutput.isRecording) {
CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:@"Session not initialized or not recording"];
[self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
} else {
[self.sessionManager stopRecording];
if (captureTimer != nil) {
[captureTimer invalidate];
captureTimer = nil;
}
}
}

- (NSString*)generateThumbnailForVideoAtURL:(NSURL *)videoURL {
AVAsset *asset = [AVAsset assetWithURL:videoURL];
AVAssetImageGenerator *imageGenerator = [[AVAssetImageGenerator alloc] initWithAsset:asset];
Expand Down

0 comments on commit b646c69

Please sign in to comment.