This is an automated email from the ASF dual-hosted git repository.
erisu pushed a commit to branch master
in repository
https://gitbox.apache.org/repos/asf/cordova-plugin-media-capture.git
The following commit(s) were added to refs/heads/master by this push:
new 8547af0 fix(ios): set category before creating AVAudioRecorder (#269)
8547af0 is described below
commit 8547af0f25701b2c02ca99a6ffbad20b4f1aadc9
Author: Ken Naito <[email protected]>
AuthorDate: Thu Jul 20 15:52:51 2023 +0900
fix(ios): set category before creating AVAudioRecorder (#269)
---
src/ios/CDVCapture.m | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/ios/CDVCapture.m b/src/ios/CDVCapture.m
index 24e111f..d777a06 100644
--- a/src/ios/CDVCapture.m
+++ b/src/ios/CDVCapture.m
@@ -735,6 +735,8 @@
}
}
+ [self.avSession setCategory:AVAudioSessionCategoryPlayAndRecord
error:&error];
+
// create file to record to in temporary dir
NSString* docsPath = [NSTemporaryDirectory()stringByStandardizingPath];
// use file system temporary directory
@@ -793,7 +795,6 @@
__weak CDVAudioRecorderViewController* weakSelf = self;
void (^startRecording)(void) = ^{
- [weakSelf.avSession setCategory:AVAudioSessionCategoryRecord
error:&error];
[weakSelf.avSession setActive:YES error:&error];
if (error) {
// can't continue without active audio session
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]