Skip to content

Commit

Permalink
Merge pull request #88 from spoonconsulting/ios-startrecording
Browse files Browse the repository at this point in the history
Correct startRecording
  • Loading branch information
YushraJewon authored Oct 4, 2024
2 parents b5e53fb + 6efaa99 commit 7d11f9b
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 6 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## [2.0.30](https://github.com/spoonconsulting/cordova-plugin-simple-camera-preview/compare/2.0.29...2.0.30) (2024-09-10)
* **iOS:** Pause video on when app is in background

## [2.0.29](https://github.com/spoonconsulting/cordova-plugin-simple-camera-preview/compare/2.0.28...2.0.29) (2024-09-10)
* **iOS:** StartRecording

## [2.0.28](https://github.com/spoonconsulting/cordova-plugin-simple-camera-preview/compare/2.0.27...2.0.28) (2024-09-10)
* **iOS:** Add video ability for iOS

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@spoonconsulting/cordova-plugin-simple-camera-preview",
"version": "2.0.28",
"version": "2.0.30",
"description": "Cordova plugin that allows camera interaction from HTML code for showing camera preview below or on top of the HTML.",
"keywords": [
"cordova",
Expand Down
2 changes: 1 addition & 1 deletion plugin.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>

<plugin id="@spoonconsulting/cordova-plugin-simple-camera-preview" version="2.0.28" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">
<plugin id="@spoonconsulting/cordova-plugin-simple-camera-preview" version="2.0.30" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">

<name>cordova-plugin-simple-camera-preview</name>
<description>Cordova plugin that allows camera interaction from HTML code. Show camera preview popup on top of the HTML.</description>
Expand Down
2 changes: 1 addition & 1 deletion src/ios/CameraRenderController.m
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ - (void) viewWillAppear:(BOOL)animated {
}

- (void)onAppWillResignActive {
if (!self.sessionManager.session.running){
if (self.sessionManager.session.running){
[self.sessionManager stopRecording];
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/ios/SimpleCameraPreview.m
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ - (void)startVideoCapture:(CDVInvokedUrlCommand*)command {
NSString* uniqueFileName = [NSString stringWithFormat:@"%@.mp4",[[NSUUID UUID] UUIDString]];
NSString *dataPath = [libraryDirectory stringByAppendingPathComponent:uniqueFileName];
NSURL *fileURL = [NSURL fileURLWithPath:dataPath];
[self.sessionManager startRecordingToOutputFileURL:fileURL recordingDelegate:self];
[self.sessionManager startRecording:fileURL recordingDelegate:self];
} else {
CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:@"Session not initialized or already recording"];
[self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
Expand Down

0 comments on commit 7d11f9b

Please sign in to comment.