nosnia-audio-recorder 0.9.3 → 0.9.4

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.
@@ -56,6 +56,20 @@ RCT_EXPORT_MODULE(NosniaAudioRecorder)
56
56
 
57
57
  NSLog(@"[NosniaAudioRecorder] Starting progress timer");
58
58
 
59
+ // Send initial duration event immediately
60
+ if (_audioRecorder && _isRecording) {
61
+ NSTimeInterval currentTime = _audioRecorder.currentTime;
62
+ NSLog(@"[NosniaAudioRecorder] Sending initial progress: duration=%f ms", currentTime * 1000);
63
+
64
+ dispatch_async(dispatch_get_main_queue(), ^{
65
+ [self sendEventWithName:@"onRecordingProgress"
66
+ body:@{
67
+ @"duration": @(currentTime * 1000),
68
+ @"isRecording": @(self->_audioRecorder.isRecording)
69
+ }];
70
+ });
71
+ }
72
+
59
73
  _progressTimer = [NSTimer scheduledTimerWithTimeInterval:0.1
60
74
  repeats:YES
61
75
  block:^(NSTimer * _Nonnull timer) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nosnia-audio-recorder",
3
- "version": "0.9.3",
3
+ "version": "0.9.4",
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",