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.
@@ -209,9 +209,12 @@ RCT_EXPORT_METHOD(startRecording:(NSDictionary *)options
209
209
  }
210
210
  }
211
211
 
212
- // Set audio mode to measurement for recording
212
+ // Set audio mode to default for recording
213
213
  NSError *modeError = nil;
214
- [audioSession setMode:AVAudioSessionModeMeasurement error:&modeError];
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nosnia-audio-recorder",
3
- "version": "0.7.6",
3
+ "version": "0.7.7",
4
4
  "description": "This is a modern audio recorder which actually works cross platform",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",