@siteed/expo-audio-studio 2.12.2 → 2.12.3
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,6 +8,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
10
|
|
|
11
|
+
## [2.12.3] - 2025-06-07
|
|
12
|
+
### Changed
|
|
13
|
+
- refactor(expo-audio-studio): adjust audio focus request timing in AudioRecorderManager ([317367c](https://github.com/deeeed/expo-audio-stream/commit/317367cb29fa09016aa73884f2f51e9cfdee1086))
|
|
14
|
+
- chore(expo-audio-studio): release @siteed/expo-audio-studio@2.12.2 ([14db4eb](https://github.com/deeeed/expo-audio-stream/commit/14db4ebfdeb9181e82e810d61283738d41c40a1a))
|
|
11
15
|
## [2.12.2] - 2025-06-07
|
|
12
16
|
### Changed
|
|
13
17
|
- fix: audio focus strategy implementation for Android background recording (#267) ([5b7b7ed](https://github.com/deeeed/expo-audio-stream/commit/5b7b7eda86bbd65becbe6bab44a44cdf6a1fb17d))
|
|
@@ -300,7 +304,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
300
304
|
- Feature: Audio features extraction during recording.
|
|
301
305
|
- Feature: Consistent WAV PCM recording format across all platforms.
|
|
302
306
|
|
|
303
|
-
[unreleased]: https://github.com/deeeed/expo-audio-stream/compare/@siteed/expo-audio-studio@2.12.
|
|
307
|
+
[unreleased]: https://github.com/deeeed/expo-audio-stream/compare/@siteed/expo-audio-studio@2.12.3...HEAD
|
|
308
|
+
[2.12.3]: https://github.com/deeeed/expo-audio-stream/compare/@siteed/expo-audio-studio@2.12.2...@siteed/expo-audio-studio@2.12.3
|
|
304
309
|
[2.12.2]: https://github.com/deeeed/expo-audio-stream/compare/@siteed/expo-audio-studio@2.12.1...@siteed/expo-audio-studio@2.12.2
|
|
305
310
|
[2.12.1]: https://github.com/deeeed/expo-audio-stream/compare/@siteed/expo-audio-studio@2.12.0...@siteed/expo-audio-studio@2.12.1
|
|
306
311
|
[2.12.0]: https://github.com/deeeed/expo-audio-stream/compare/@siteed/expo-audio-studio@2.11.0...@siteed/expo-audio-studio@2.12.0
|
|
@@ -479,12 +479,6 @@ class AudioRecorderManager(
|
|
|
479
479
|
return
|
|
480
480
|
}
|
|
481
481
|
|
|
482
|
-
// Request audio focus - always do this right before starting
|
|
483
|
-
if (!requestAudioFocus()) {
|
|
484
|
-
promise.reject("AUDIO_FOCUS_ERROR", "Failed to obtain audio focus", null)
|
|
485
|
-
return
|
|
486
|
-
}
|
|
487
|
-
|
|
488
482
|
// If already prepared, we can skip initialization
|
|
489
483
|
if (!isPrepared) {
|
|
490
484
|
LogUtils.d(CLASS_NAME, "Not prepared, preparing recording first")
|
|
@@ -499,7 +493,7 @@ class AudioRecorderManager(
|
|
|
499
493
|
// Check permissions
|
|
500
494
|
if (!checkPermissions(options, promise)) return
|
|
501
495
|
|
|
502
|
-
// Parse recording configuration
|
|
496
|
+
// Parse recording configuration FIRST
|
|
503
497
|
val configResult = RecordingConfig.fromMap(options)
|
|
504
498
|
if (configResult.isFailure) {
|
|
505
499
|
promise.reject(
|
|
@@ -514,6 +508,12 @@ class AudioRecorderManager(
|
|
|
514
508
|
|
|
515
509
|
recordingConfig = tempRecordingConfig
|
|
516
510
|
|
|
511
|
+
// Request audio focus AFTER config is parsed so strategy is correct
|
|
512
|
+
if (!requestAudioFocus()) {
|
|
513
|
+
promise.reject("AUDIO_FOCUS_ERROR", "Failed to obtain audio focus", null)
|
|
514
|
+
return
|
|
515
|
+
}
|
|
516
|
+
|
|
517
517
|
// Store device-related settings
|
|
518
518
|
selectedDeviceId = recordingConfig.deviceId
|
|
519
519
|
deviceDisconnectionBehavior = recordingConfig.deviceDisconnectionBehavior ?: "pause"
|
|
@@ -546,6 +546,12 @@ class AudioRecorderManager(
|
|
|
546
546
|
?: deviceDisconnectionBehavior
|
|
547
547
|
?: "pause"
|
|
548
548
|
}
|
|
549
|
+
|
|
550
|
+
// Request audio focus with current config
|
|
551
|
+
if (!requestAudioFocus()) {
|
|
552
|
+
promise.reject("AUDIO_FOCUS_ERROR", "Failed to obtain audio focus", null)
|
|
553
|
+
return
|
|
554
|
+
}
|
|
549
555
|
}
|
|
550
556
|
|
|
551
557
|
if (!startRecordingProcess(promise)) return
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@siteed/expo-audio-studio",
|
|
3
|
-
"version": "2.12.
|
|
3
|
+
"version": "2.12.3",
|
|
4
4
|
"description": "Comprehensive audio processing library for React Native and Expo with recording, analysis, visualization, and streaming capabilities across iOS, Android, and web",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "commonjs",
|