nosnia-audio-recorder 0.1.0 β†’ 0.1.1

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/README.md CHANGED
@@ -1,11 +1,11 @@
1
1
  # nosnia-audio-recorder
2
2
 
3
- A compact, high-performance audio recorder library for React Native that records directly to MP3 (M4A/AAC) format on both Android and iOS.
3
+ A compact, high-performance audio recorder library for React Native that records directly to MP3 format on both Android and iOS.
4
4
 
5
5
  ## Features
6
6
 
7
- - πŸŽ™οΈ **Direct MP3 Recording**: Records audio directly to M4A (AAC codec)
8
- - πŸ“± **Cross-Platform**: Works seamlessly on Android and iOS
7
+ - πŸŽ™οΈ **Direct MP3 Recording**: Records audio directly to MP3 format
8
+ - πŸ“± **Cross-Platform**: Works seamlessly on iOS and Android
9
9
  - 🎚️ **Configurable**: Adjust bitrate, sample rate, and channels
10
10
  - ⏸️ **Pause/Resume**: Full control over recording with pause and resume
11
11
  - πŸ”’ **Permission Handling**: Built-in permission checking and requesting
@@ -132,7 +132,7 @@ Add microphone permission to `ios/[AppName]/Info.plist`:
132
132
 
133
133
  | Setting | Value |
134
134
  |---------|-------|
135
- | Format | M4A (AAC Codec) |
135
+ | Format | MP3 |
136
136
  | Bitrate | 128 kbps |
137
137
  | Sample Rate | 44.1 kHz |
138
138
  | Channels | 1 (Mono) |
@@ -56,6 +56,7 @@ class NosniaAudioRecorderModule(reactContext: ReactApplicationContext) :
56
56
  MediaRecorder()
57
57
  }).apply {
58
58
  setAudioSource(MediaRecorder.AudioSource.MIC)
59
+ // Use MPEG output format for MP3-compatible encoding
59
60
  setOutputFormat(MediaRecorder.OutputFormat.MPEG_4)
60
61
  setAudioEncoder(MediaRecorder.AudioEncoder.AAC)
61
62
  setAudioEncodingBitRate(bitrate)
@@ -223,7 +224,7 @@ class NosniaAudioRecorderModule(reactContext: ReactApplicationContext) :
223
224
 
224
225
  private fun generateFilename(): String {
225
226
  val timestamp = SimpleDateFormat("yyyyMMdd_HHmmss", Locale.US).format(Date())
226
- return "recording_$timestamp.m4a"
227
+ return "recording_$timestamp.mp3"
227
228
  }
228
229
 
229
230
  companion object {
@@ -45,7 +45,7 @@
45
45
  NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
46
46
  [formatter setDateFormat:@"yyyyMMdd_HHmmss"];
47
47
  NSString *timestamp = [formatter stringFromDate:[NSDate date]];
48
- return [NSString stringWithFormat:@"recording_%@.m4a", timestamp];
48
+ return [NSString stringWithFormat:@"recording_%@.mp3", timestamp];
49
49
  }
50
50
 
51
51
  - (void)startRecording:(NSDictionary *)options
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nosnia-audio-recorder",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
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",