nosnia-audio-recorder 0.7.6 → 0.7.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ios/NosniaAudioRecorder.mm +11 -2
- package/package.json +1 -1
|
@@ -209,9 +209,12 @@ RCT_EXPORT_METHOD(startRecording:(NSDictionary *)options
|
|
|
209
209
|
}
|
|
210
210
|
}
|
|
211
211
|
|
|
212
|
-
// Set audio mode to
|
|
212
|
+
// Set audio mode to default for recording
|
|
213
213
|
NSError *modeError = nil;
|
|
214
|
-
[audioSession setMode:
|
|
214
|
+
[audioSession setMode:AVAudioSessionModeDefault error:&modeError];
|
|
215
|
+
if (modeError) {
|
|
216
|
+
NSLog(@"Warning: Failed to set audio mode: %@", modeError.description);
|
|
217
|
+
}
|
|
215
218
|
|
|
216
219
|
// Activate audio session
|
|
217
220
|
NSError *activateError = nil;
|
|
@@ -283,14 +286,19 @@ RCT_EXPORT_METHOD(startRecording:(NSDictionary *)options
|
|
|
283
286
|
BOOL recordStarted = NO;
|
|
284
287
|
|
|
285
288
|
// Try to prepare recorder first
|
|
289
|
+
NSLog(@"[NosniaAudioRecorder] Preparing to record with settings: %@", _audioRecorder.settings);
|
|
286
290
|
if (![_audioRecorder prepareToRecord]) {
|
|
291
|
+
NSLog(@"[NosniaAudioRecorder] Failed to prepare audio recorder");
|
|
287
292
|
reject(@"PREPARE_ERROR", @"Failed to prepare audio recorder for recording", nil);
|
|
288
293
|
_audioRecorder = nil;
|
|
289
294
|
return;
|
|
290
295
|
}
|
|
296
|
+
NSLog(@"[NosniaAudioRecorder] Recorder prepared successfully");
|
|
291
297
|
|
|
298
|
+
NSLog(@"[NosniaAudioRecorder] Attempting to start recording from URL: %@", _recordingURL);
|
|
292
299
|
recordStarted = [_audioRecorder record];
|
|
293
300
|
if (!recordStarted) {
|
|
301
|
+
NSLog(@"[NosniaAudioRecorder] Failed to start recording. Recorder is recording: %d", _audioRecorder.recording);
|
|
294
302
|
NSString *errorMsg = [NSString stringWithFormat:
|
|
295
303
|
@"Failed to start recording. Recorder state: %ld, URL: %@, Settings: %@",
|
|
296
304
|
(long)_audioRecorder.recording,
|
|
@@ -300,6 +308,7 @@ RCT_EXPORT_METHOD(startRecording:(NSDictionary *)options
|
|
|
300
308
|
_audioRecorder = nil;
|
|
301
309
|
return;
|
|
302
310
|
}
|
|
311
|
+
NSLog(@"[NosniaAudioRecorder] Recording started successfully");
|
|
303
312
|
|
|
304
313
|
_isRecording = YES;
|
|
305
314
|
[self startProgressTimer];
|
package/package.json
CHANGED