@siteed/expo-audio-stream 1.9.0 → 1.9.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/CHANGELOG.md CHANGED
@@ -8,24 +8,31 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
8
8
  ## [Unreleased]
9
9
 
10
10
 
11
+ ## [1.9.1] - 2025-01-12
12
+ - ios potentially missing compressed file info ([88a628c](https://github.com/deeeed/expo-audio-stream/commit/88a628c35f2bfd626a2a5de1eb6950efd814619d))
13
+
11
14
  ## [1.9.0] - 2025-01-11
12
15
  - feat(web-audio): optimize memory usage and streaming performance for web audio recording (#75) ([7b93e12](https://github.com/deeeed/expo-audio-stream/commit/7b93e12aae4bc0599b06b48ca34a60f65587fc75))
13
16
 
17
+
14
18
  ## [1.8.0] - 2025-01-10
15
19
  - feat(audio): implement audio compression support ([ff4e060](https://github.com/deeeed/expo-audio-stream/commit/ff4e060fef1061804c1cc0126d4344d2d50daa9a))
16
20
 
17
21
 
22
+
18
23
  ## [1.7.2] - 2025-01-07
19
24
  - fix(audio-stream): correct WAV header handling in web audio recording ([9ba7de5](https://github.com/deeeed/expo-audio-stream/commit/9ba7de5b96ca4cc937dea261c80d3fda9c99e8f4))
20
25
 
21
26
 
22
27
 
28
+
23
29
  ## [1.7.1] - 2025-01-07
24
30
  - update notification to avoid triggering new alerts (#71) ([32dcfc5](https://github.com/deeeed/expo-audio-stream/commit/32dcfc55daf3236babefc17016f329c177d466fd))
25
31
 
26
32
 
27
33
 
28
34
 
35
+
29
36
  ## [1.7.0] - 2025-01-05
30
37
  - feat(playground): enhance app configuration and build setup for production deployment (#58) ([929d443](https://github.com/deeeed/expo-audio-stream/commit/929d443145378b1430d215db5c00b13758420e2b))
31
38
  - chore(expo-audio-stream): release @siteed/expo-audio-stream@1.6.1 ([084e8ad](https://github.com/deeeed/expo-audio-stream/commit/084e8adb91da7874c9e608b55d9c7b2ffd7a8327))
@@ -38,6 +45,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
38
45
 
39
46
 
40
47
 
48
+
41
49
  ## [1.6.1] - 2024-12-11
42
50
  - chore(expo-audio-stream): remove git commit step from publish script ([4a772ce](https://github.com/deeeed/expo-audio-stream/commit/4a772ce93bb7405d9b8e981f46bdf8941a71ecfe))
43
51
  - chore: more publishing automation ([3693021](https://github.com/deeeed/expo-audio-stream/commit/369302107f9dca9dddd8ae68e6214481a39976ac))
@@ -54,6 +62,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
54
62
 
55
63
 
56
64
 
65
+
57
66
  ## [1.5.0] - 2024-12-10
58
67
  - UNPUBLISHED because of a bug in the build system
59
68
 
@@ -63,6 +72,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
63
72
 
64
73
 
65
74
 
75
+
66
76
  ## [1.4.0] - 2024-12-05
67
77
  - chore: remove unusded dependencies ([ad81dd5](https://github.com/deeeed/expo-audio-stream/commit/ad81dd560c93dd1d04995a323a4ae72d4de20f3e))
68
78
 
@@ -72,6 +82,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
72
82
 
73
83
 
74
84
 
85
+
75
86
  ## [1.3.1] - 2024-12-05
76
87
  - feat(web): implement throttling and optimize event processing (#49) ([da28765](https://github.com/deeeed/expo-audio-stream/commit/da2876524c2c9d6e0a980fde40a0197b929d8a7f))
77
88
 
@@ -81,6 +92,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
81
92
 
82
93
 
83
94
 
95
+
84
96
  ## [1.3.0] - 2024-11-28
85
97
  ### Added
86
98
  - refactor(permissions): standardize permission status response structure across platforms (#44) ([7c9c800](https://github.com/deeeed/expo-audio-stream/commit/7c9c800d83b7cea3516643371484d5e1f3b99e4c))
@@ -95,6 +107,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
95
107
 
96
108
 
97
109
 
110
+
98
111
  ## [1.2.5] - 2024-11-12
99
112
  ### Added
100
113
  - docs(license): add MIT license to all packages (6 files changed)
@@ -106,6 +119,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
106
119
 
107
120
 
108
121
 
122
+
109
123
  ## [1.2.4] - 2024-11-05
110
124
  ### Changed
111
125
  - Android minimum audio interval set to 10ms.
@@ -120,6 +134,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
120
134
 
121
135
 
122
136
 
137
+
123
138
  ## [1.2.0] - 2024-10-24
124
139
  ### Added
125
140
  - Feature: Keep device awake during recording with `keepAwake` option
@@ -134,6 +149,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
134
149
 
135
150
 
136
151
 
152
+
137
153
  ## [1.1.17] - 2024-10-21
138
154
  ### Added
139
155
  - Support bluetooth headset on ios
@@ -145,6 +161,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
145
161
 
146
162
 
147
163
 
164
+
148
165
  ## [1.0.0] - 2024-04-01
149
166
  ### Added
150
167
  - Initial release of @siteed/expo-audio-stream.
@@ -155,7 +172,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
155
172
  - Feature: Audio features extraction during recording.
156
173
  - Feature: Consistent WAV PCM recording format across all platforms.
157
174
 
158
- [unreleased]: https://github.com/deeeed/expo-audio-stream/compare/@siteed/expo-audio-stream@1.9.0...HEAD
175
+ [unreleased]: https://github.com/deeeed/expo-audio-stream/compare/@siteed/expo-audio-stream@1.9.1...HEAD
176
+ [1.9.1]: https://github.com/deeeed/expo-audio-stream/compare/@siteed/expo-audio-stream@1.9.0...@siteed/expo-audio-stream@1.9.1
159
177
  [1.9.0]: https://github.com/deeeed/expo-audio-stream/compare/@siteed/expo-audio-stream@1.8.0...@siteed/expo-audio-stream@1.9.0
160
178
  [1.8.0]: https://github.com/deeeed/expo-audio-stream/compare/@siteed/expo-audio-stream@1.7.2...@siteed/expo-audio-stream@1.8.0
161
179
  [1.7.2]: https://github.com/deeeed/expo-audio-stream/compare/@siteed/expo-audio-stream@1.7.1...@siteed/expo-audio-stream@1.7.2
@@ -410,8 +410,10 @@ class AudioStreamManager: NSObject {
410
410
  "interval": emissionInterval
411
411
  ]
412
412
 
413
- // Add compression info if enabled
414
- if settings.enableCompressedOutput, let compressedURL = compressedFileURL {
413
+ // Add compression info if enabled and file exists
414
+ if settings.enableCompressedOutput,
415
+ let compressedURL = compressedFileURL,
416
+ FileManager.default.fileExists(atPath: compressedURL.path) {
415
417
  do {
416
418
  let compressedAttributes = try FileManager.default.attributesOfItem(atPath: compressedURL.path)
417
419
  if let compressedSize = compressedAttributes[.size] as? Int64 {
@@ -550,23 +552,42 @@ class AudioStreamManager: NSObject {
550
552
 
551
553
  // Setup compressed recording if enabled
552
554
  if settings.enableCompressedOutput {
553
- let compressedSettings: [String: Any] = [
554
- AVFormatIDKey: settings.compressedFormat == "aac" ? kAudioFormatMPEG4AAC : kAudioFormatOpus,
555
- AVSampleRateKey: settings.sampleRate,
556
- AVNumberOfChannelsKey: settings.numberOfChannels,
557
- AVEncoderBitRateKey: settings.compressedBitRate,
558
- AVEncoderAudioQualityKey: AVAudioQuality.high.rawValue
559
- ]
560
-
561
- compressedFileURL = FileManager.default.temporaryDirectory
562
- .appendingPathComponent(UUID().uuidString)
563
- .appendingPathExtension(settings.compressedFormat)
555
+ do {
556
+ let compressedSettings: [String: Any] = [
557
+ AVFormatIDKey: settings.compressedFormat == "aac" ? kAudioFormatMPEG4AAC : kAudioFormatOpus,
558
+ AVSampleRateKey: settings.sampleRate,
559
+ AVNumberOfChannelsKey: settings.numberOfChannels,
560
+ AVEncoderBitRateKey: settings.compressedBitRate,
561
+ AVEncoderAudioQualityKey: AVAudioQuality.high.rawValue
562
+ ]
563
+
564
+ // Create directory if it doesn't exist
565
+ let tempDirectory = FileManager.default.temporaryDirectory
566
+ try FileManager.default.createDirectory(at: tempDirectory, withIntermediateDirectories: true)
564
567
 
565
- if let url = compressedFileURL {
566
- compressedRecorder = try AVAudioRecorder(url: url, settings: compressedSettings)
567
- compressedRecorder?.record()
568
- compressedFormat = settings.compressedFormat
569
- compressedBitRate = settings.compressedBitRate
568
+ // Create compressed file URL and ensure file exists
569
+ compressedFileURL = tempDirectory.appendingPathComponent(UUID().uuidString)
570
+ .appendingPathExtension(settings.compressedFormat)
571
+
572
+ if let url = compressedFileURL {
573
+ // Create empty file first
574
+ FileManager.default.createFile(atPath: url.path, contents: nil)
575
+
576
+ // Then initialize recorder
577
+ compressedRecorder = try AVAudioRecorder(url: url, settings: compressedSettings)
578
+ if let recorder = compressedRecorder {
579
+ recorder.prepareToRecord()
580
+ recorder.record()
581
+ compressedFormat = settings.compressedFormat
582
+ compressedBitRate = settings.compressedBitRate
583
+ Logger.debug("Compressed recording initialized at: \(url.path)")
584
+ }
585
+ }
586
+ } catch {
587
+ Logger.debug("Failed to setup compressed recording: \(error)")
588
+ // Don't fail the entire recording if compression fails
589
+ compressedFileURL = nil
590
+ compressedRecorder = nil
570
591
  }
571
592
  }
572
593
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@siteed/expo-audio-stream",
3
- "version": "1.9.0",
3
+ "version": "1.9.1",
4
4
  "description": "stream audio crossplatform",
5
5
  "license": "MIT",
6
6
  "main": "build/index.js",