expo-audio 1.0.11 → 1.0.12
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 +10 -0
- package/android/build.gradle +2 -2
- package/android/src/main/java/expo/modules/audio/AudioRecorder.kt +1 -1
- package/android/src/main/java/expo/modules/audio/AudioRecords.kt +24 -1
- package/build/Audio.types.d.ts +21 -0
- package/build/Audio.types.d.ts.map +1 -1
- package/build/Audio.types.js.map +1 -1
- package/expo-module.config.json +1 -1
- package/ios/AudioUtils.swift +7 -5
- package/local-maven-repo/expo/modules/audio/expo.modules.audio/{1.0.11/expo.modules.audio-1.0.11-sources.jar → 1.0.12/expo.modules.audio-1.0.12-sources.jar} +0 -0
- package/local-maven-repo/expo/modules/audio/expo.modules.audio/1.0.12/expo.modules.audio-1.0.12-sources.jar.md5 +1 -0
- package/local-maven-repo/expo/modules/audio/expo.modules.audio/1.0.12/expo.modules.audio-1.0.12-sources.jar.sha1 +1 -0
- package/local-maven-repo/expo/modules/audio/expo.modules.audio/1.0.12/expo.modules.audio-1.0.12-sources.jar.sha256 +1 -0
- package/local-maven-repo/expo/modules/audio/expo.modules.audio/1.0.12/expo.modules.audio-1.0.12-sources.jar.sha512 +1 -0
- package/local-maven-repo/expo/modules/audio/expo.modules.audio/1.0.12/expo.modules.audio-1.0.12.aar +0 -0
- package/local-maven-repo/expo/modules/audio/expo.modules.audio/1.0.12/expo.modules.audio-1.0.12.aar.md5 +1 -0
- package/local-maven-repo/expo/modules/audio/expo.modules.audio/1.0.12/expo.modules.audio-1.0.12.aar.sha1 +1 -0
- package/local-maven-repo/expo/modules/audio/expo.modules.audio/1.0.12/expo.modules.audio-1.0.12.aar.sha256 +1 -0
- package/local-maven-repo/expo/modules/audio/expo.modules.audio/1.0.12/expo.modules.audio-1.0.12.aar.sha512 +1 -0
- package/local-maven-repo/expo/modules/audio/expo.modules.audio/{1.0.11/expo.modules.audio-1.0.11.module → 1.0.12/expo.modules.audio-1.0.12.module} +22 -22
- package/local-maven-repo/expo/modules/audio/expo.modules.audio/1.0.12/expo.modules.audio-1.0.12.module.md5 +1 -0
- package/local-maven-repo/expo/modules/audio/expo.modules.audio/1.0.12/expo.modules.audio-1.0.12.module.sha1 +1 -0
- package/local-maven-repo/expo/modules/audio/expo.modules.audio/1.0.12/expo.modules.audio-1.0.12.module.sha256 +1 -0
- package/local-maven-repo/expo/modules/audio/expo.modules.audio/1.0.12/expo.modules.audio-1.0.12.module.sha512 +1 -0
- package/local-maven-repo/expo/modules/audio/expo.modules.audio/{1.0.11/expo.modules.audio-1.0.11.pom → 1.0.12/expo.modules.audio-1.0.12.pom} +1 -1
- package/local-maven-repo/expo/modules/audio/expo.modules.audio/1.0.12/expo.modules.audio-1.0.12.pom.md5 +1 -0
- package/local-maven-repo/expo/modules/audio/expo.modules.audio/1.0.12/expo.modules.audio-1.0.12.pom.sha1 +1 -0
- package/local-maven-repo/expo/modules/audio/expo.modules.audio/1.0.12/expo.modules.audio-1.0.12.pom.sha256 +1 -0
- package/local-maven-repo/expo/modules/audio/expo.modules.audio/1.0.12/expo.modules.audio-1.0.12.pom.sha512 +1 -0
- package/local-maven-repo/expo/modules/audio/expo.modules.audio/maven-metadata.xml +4 -4
- package/local-maven-repo/expo/modules/audio/expo.modules.audio/maven-metadata.xml.md5 +1 -1
- package/local-maven-repo/expo/modules/audio/expo.modules.audio/maven-metadata.xml.sha1 +1 -1
- package/local-maven-repo/expo/modules/audio/expo.modules.audio/maven-metadata.xml.sha256 +1 -1
- package/local-maven-repo/expo/modules/audio/expo.modules.audio/maven-metadata.xml.sha512 +1 -1
- package/package.json +2 -2
- package/src/Audio.types.ts +30 -0
- package/local-maven-repo/expo/modules/audio/expo.modules.audio/1.0.11/expo.modules.audio-1.0.11-sources.jar.md5 +0 -1
- package/local-maven-repo/expo/modules/audio/expo.modules.audio/1.0.11/expo.modules.audio-1.0.11-sources.jar.sha1 +0 -1
- package/local-maven-repo/expo/modules/audio/expo.modules.audio/1.0.11/expo.modules.audio-1.0.11-sources.jar.sha256 +0 -1
- package/local-maven-repo/expo/modules/audio/expo.modules.audio/1.0.11/expo.modules.audio-1.0.11-sources.jar.sha512 +0 -1
- package/local-maven-repo/expo/modules/audio/expo.modules.audio/1.0.11/expo.modules.audio-1.0.11.aar +0 -0
- package/local-maven-repo/expo/modules/audio/expo.modules.audio/1.0.11/expo.modules.audio-1.0.11.aar.md5 +0 -1
- package/local-maven-repo/expo/modules/audio/expo.modules.audio/1.0.11/expo.modules.audio-1.0.11.aar.sha1 +0 -1
- package/local-maven-repo/expo/modules/audio/expo.modules.audio/1.0.11/expo.modules.audio-1.0.11.aar.sha256 +0 -1
- package/local-maven-repo/expo/modules/audio/expo.modules.audio/1.0.11/expo.modules.audio-1.0.11.aar.sha512 +0 -1
- package/local-maven-repo/expo/modules/audio/expo.modules.audio/1.0.11/expo.modules.audio-1.0.11.module.md5 +0 -1
- package/local-maven-repo/expo/modules/audio/expo.modules.audio/1.0.11/expo.modules.audio-1.0.11.module.sha1 +0 -1
- package/local-maven-repo/expo/modules/audio/expo.modules.audio/1.0.11/expo.modules.audio-1.0.11.module.sha256 +0 -1
- package/local-maven-repo/expo/modules/audio/expo.modules.audio/1.0.11/expo.modules.audio-1.0.11.module.sha512 +0 -1
- package/local-maven-repo/expo/modules/audio/expo.modules.audio/1.0.11/expo.modules.audio-1.0.11.pom.md5 +0 -1
- package/local-maven-repo/expo/modules/audio/expo.modules.audio/1.0.11/expo.modules.audio-1.0.11.pom.sha1 +0 -1
- package/local-maven-repo/expo/modules/audio/expo.modules.audio/1.0.11/expo.modules.audio-1.0.11.pom.sha256 +0 -1
- package/local-maven-repo/expo/modules/audio/expo.modules.audio/1.0.11/expo.modules.audio-1.0.11.pom.sha512 +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,16 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 1.0.12 — 2025-09-16
|
|
14
|
+
|
|
15
|
+
### 🎉 New features
|
|
16
|
+
|
|
17
|
+
- [Android] Expose MediaRecorder.AudioSource on RecordingOptionsAndroid ([#38271](https://github.com/expo/expo/pull/38271) by [@vipierozan99](https://github.com/vipierozan99))
|
|
18
|
+
|
|
19
|
+
### 🐛 Bug fixes
|
|
20
|
+
|
|
21
|
+
- [iOS] Fix setting audio quality for recordings. ([#39705](https://github.com/expo/expo/pull/39705) by [@alanjhughes](https://github.com/alanjhughes))
|
|
22
|
+
|
|
13
23
|
## 1.0.11 — 2025-09-11
|
|
14
24
|
|
|
15
25
|
_This version does not introduce any user-facing changes._
|
package/android/build.gradle
CHANGED
|
@@ -4,13 +4,13 @@ plugins {
|
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
group = 'expo.modules.audio'
|
|
7
|
-
version = '1.0.
|
|
7
|
+
version = '1.0.12'
|
|
8
8
|
|
|
9
9
|
android {
|
|
10
10
|
namespace "expo.modules.audio"
|
|
11
11
|
defaultConfig {
|
|
12
12
|
versionCode 1
|
|
13
|
-
versionName "1.0.
|
|
13
|
+
versionName "1.0.12"
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
compileOptions {
|
|
@@ -181,7 +181,7 @@ class AudioRecorder(
|
|
|
181
181
|
return
|
|
182
182
|
}
|
|
183
183
|
with(recorder) {
|
|
184
|
-
setAudioSource(MediaRecorder.AudioSource.MIC)
|
|
184
|
+
setAudioSource(options.audioSource?.toAudioSource() ?: MediaRecorder.AudioSource.MIC)
|
|
185
185
|
if (options.outputFormat != null) {
|
|
186
186
|
setOutputFormat(options.outputFormat.toMediaOutputFormat())
|
|
187
187
|
} else {
|
|
@@ -26,7 +26,8 @@ data class RecordingOptions(
|
|
|
26
26
|
@Field val outputFormat: AndroidOutputFormat?,
|
|
27
27
|
@Field val audioEncoder: AndroidAudioEncoder?,
|
|
28
28
|
@Field val maxFileSize: Int?,
|
|
29
|
-
@Field val isMeteringEnabled: Boolean = false
|
|
29
|
+
@Field val isMeteringEnabled: Boolean = false,
|
|
30
|
+
@Field val audioSource: RecordingSource?
|
|
30
31
|
) : Record
|
|
31
32
|
|
|
32
33
|
enum class AndroidOutputFormat(val value: String) : Enumerable {
|
|
@@ -86,3 +87,25 @@ class RecordOptions(
|
|
|
86
87
|
@Field val atTime: Double?,
|
|
87
88
|
@Field val forDuration: Double?
|
|
88
89
|
) : Record
|
|
90
|
+
|
|
91
|
+
enum class RecordingSource(val value: String) : Enumerable {
|
|
92
|
+
CAMCORDER("camcorder"),
|
|
93
|
+
DEFAULT("default"),
|
|
94
|
+
MIC("mic"),
|
|
95
|
+
REMOTE_SUBMIX("remote_submix"),
|
|
96
|
+
UNPROCESSED("unprocessed"),
|
|
97
|
+
VOICE_COMMUNICATION("voice_communication"),
|
|
98
|
+
VOICE_PERFORMANCE("voice_performance"),
|
|
99
|
+
VOICE_RECOGNITION("voice_recognition");
|
|
100
|
+
|
|
101
|
+
fun toAudioSource() = when (this) {
|
|
102
|
+
CAMCORDER -> MediaRecorder.AudioSource.CAMCORDER
|
|
103
|
+
DEFAULT -> MediaRecorder.AudioSource.DEFAULT
|
|
104
|
+
MIC -> MediaRecorder.AudioSource.MIC
|
|
105
|
+
REMOTE_SUBMIX -> MediaRecorder.AudioSource.REMOTE_SUBMIX
|
|
106
|
+
UNPROCESSED -> MediaRecorder.AudioSource.UNPROCESSED
|
|
107
|
+
VOICE_COMMUNICATION -> MediaRecorder.AudioSource.VOICE_COMMUNICATION
|
|
108
|
+
VOICE_PERFORMANCE -> MediaRecorder.AudioSource.VOICE_PERFORMANCE
|
|
109
|
+
VOICE_RECOGNITION -> MediaRecorder.AudioSource.VOICE_RECOGNITION
|
|
110
|
+
}
|
|
111
|
+
}
|
package/build/Audio.types.d.ts
CHANGED
|
@@ -409,6 +409,10 @@ export type RecordingOptionsAndroid = {
|
|
|
409
409
|
* `65536`
|
|
410
410
|
*/
|
|
411
411
|
maxFileSize?: number;
|
|
412
|
+
/**
|
|
413
|
+
* The desired audio Source. See the [`AndroidAudioSource`](#androidaudiosource) enum for all valid values.
|
|
414
|
+
*/
|
|
415
|
+
audioSource?: RecordingSource;
|
|
412
416
|
};
|
|
413
417
|
export type AudioMode = {
|
|
414
418
|
/**
|
|
@@ -465,4 +469,21 @@ export type InterruptionMode = 'mixWithOthers' | 'doNotMix' | 'duckOthers';
|
|
|
465
469
|
* @platform android
|
|
466
470
|
*/
|
|
467
471
|
export type InterruptionModeAndroid = 'doNotMix' | 'duckOthers';
|
|
472
|
+
/**
|
|
473
|
+
* Recording source for android.
|
|
474
|
+
*
|
|
475
|
+
* An audio source defines both a default physical source of audio signal, and a recording configuration.
|
|
476
|
+
*
|
|
477
|
+
* - `camcorder`: Microphone audio source tuned for video recording, with the same orientation as the camera if available.
|
|
478
|
+
* - `default`: The default audio source.
|
|
479
|
+
* - `mic`: Microphone audio source.
|
|
480
|
+
* - `unprocessed`: Microphone audio source tuned for unprocessed (raw) sound if available, behaves like `default` otherwise.
|
|
481
|
+
* - `voice_communication`: Microphone audio source tuned for voice communications such as VoIP. It will for instance take advantage of echo cancellation or automatic gain control if available.
|
|
482
|
+
* - `voice_performance`: Source for capturing audio meant to be processed in real time and played back for live performance (e.g karaoke). The capture path will minimize latency and coupling with playback path.
|
|
483
|
+
* - `voice_recognition`: Microphone audio source tuned for voice recognition.
|
|
484
|
+
*
|
|
485
|
+
* @see https://developer.android.com/reference/android/media/MediaRecorder.AudioSource
|
|
486
|
+
* @platform android
|
|
487
|
+
*/
|
|
488
|
+
export type RecordingSource = 'camcorder' | 'default' | 'mic' | 'remote_submix' | 'unprocessed' | 'voice_communication' | 'voice_performance' | 'voice_recognition';
|
|
468
489
|
//# sourceMappingURL=Audio.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Audio.types.d.ts","sourceRoot":"","sources":["../src/Audio.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAGrE,M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MG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,WAAW,CAAC,EAAE,eAAe,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACtB;;;;OAIG;IACH,iBAAiB,EAAE,OAAO,CAAC;IAC3B;;;;OAIG;IACH,gBAAgB,EAAE,gBAAgB,CAAC;IACnC;;;;OAIG;IACH,uBAAuB,EAAE,uBAAuB,CAAC;IACjD;;;;;OAKG;IACH,eAAe,EAAE,OAAO,CAAC;IACzB;;;OAGG;IACH,sBAAsB,EAAE,OAAO,CAAC;IAChC;;;OAGG;IACH,0BAA0B,EAAE,OAAO,CAAC;CACrC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,MAAM,gBAAgB,GAAG,eAAe,GAAG,UAAU,GAAG,YAAY,CAAC;AAE3E;;;;;;;GAOG;AACH,MAAM,MAAM,uBAAuB,GAAG,UAAU,GAAG,YAAY,CAAC;AAEhE;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,eAAe,GACvB,WAAW,GACX,SAAS,GACT,KAAK,GACL,eAAe,GACf,aAAa,GACb,qBAAqB,GACrB,mBAAmB,GACnB,mBAAmB,CAAC"}
|
package/build/Audio.types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Audio.types.js","sourceRoot":"","sources":["../src/Audio.types.ts"],"names":[],"mappings":"","sourcesContent":["import { AudioQuality, IOSOutputFormat } from './RecordingConstants';\n\n// @docsMissing\nexport type AudioSource =\n | string\n | number\n | null\n | {\n /**\n * A string representing the resource identifier for the audio,\n * which could be an HTTPS address, a local file path, or the name of a static audio file resource.\n */\n uri?: string;\n /**\n * The asset ID of a local audio asset, acquired with the `require` function.\n * This property is exclusive with the `uri` property. When both are present, the `assetId` will be ignored.\n */\n assetId?: number;\n /**\n * An object representing the HTTP headers to send along with the request for a remote audio source.\n * On web requires the `Access-Control-Allow-Origin` header returned by the server to include the current domain.\n */\n headers?: Record<string, string>;\n };\n\n/**\n * Options for configuring audio player behavior.\n */\nexport type AudioPlayerOptions = {\n /**\n * How often (in milliseconds) to emit playback status updates. Defaults to 500ms.\n *\n * @example\n * ```tsx\n * import { useAudioPlayer } from 'expo-audio';\n *\n * export default function App() {\n * const player = useAudioPlayer(source);\n *\n * // High-frequency updates for smooth progress bars\n * const player = useAudioPlayer(source, { updateInterval: 100 });\n *\n * // Standard updates (default behavior)\n * const player = useAudioPlayer(source, { updateInterval: 500 });\n *\n * // Low-frequency updates for better performance\n * const player = useAudioPlayer(source, { updateInterval: 1000 });\n * }\n * ```\n *\n * @default 500ms\n *\n * @platform ios\n * @platform android\n * @platform web\n */\n updateInterval?: number;\n /**\n * If set to `true`, the system will attempt to download the resource to the device before loading.\n * This value defaults to `false`.\n *\n * Works with:\n * - Local assets from `require('path/to/file')`\n * - Remote HTTP/HTTPS URLs\n * - Asset objects\n *\n * When enabled, this ensures the audio file is fully downloaded before playback begins.\n * This can improve playback performance and reduce buffering, especially for users\n * managing multiple audio players simultaneously.\n *\n * On Android and iOS, this will download the audio file to the device's tmp directory before playback begins.\n * The system will purge the file at its discretion.\n *\n * On web, this will download the audio file to the user's device memory and make it available for the user to play.\n * The system will usually purge the file from memory after a reload or on memory pressure.\n * On web, CORS restrictions apply to the blob url, so you need to make sure the server returns the `Access-Control-Allow-Origin` header.\n *\n * @platform ios\n * @platform web\n * @platform android\n */\n downloadFirst?: boolean;\n /**\n * Determines the [cross origin policy](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/crossorigin) used by the underlying native view on web.\n * If `undefined` (default), does not use CORS at all. If set to `'anonymous'`, the audio will be loaded with CORS enabled.\n * Note that some audio may not play if CORS is enabled, depending on the CDN settings.\n * If you encounter issues, consider adjusting the `crossOrigin` property.\n *\n *\n * @platform web\n * @default undefined\n */\n crossOrigin?: 'anonymous' | 'use-credentials';\n /**\n * If set to `true`, the audio session will not be deactivated when this player pauses or finishes playback.\n * This prevents interrupting other audio sources (like videos) when the audio ends.\n *\n * Useful for sound effects that should not interfere with ongoing video playback or other audio.\n * The audio session for this player will not be deactivated automatically when the player finishes playback.\n *\n * > **Note:** If needed, you can manually deactivate the audio session using `setIsAudioActiveAsync(false)`.\n *\n * @platform ios\n * @default false\n */\n keepAudioSessionActive?: boolean;\n};\n\n/**\n * @deprecated Use `AudioPlayerOptions` instead.\n * Options for audio loading behavior.\n */\nexport type AudioLoadOptions = AudioPlayerOptions;\n\n/**\n * Represents an available audio input device for recording.\n *\n * This type describes audio input sources like built-in microphones, external microphones,\n * or other audio input devices that can be used for recording. Each input has an identifying\n * information that can be used to select the preferred recording source.\n */\nexport type RecordingInput = {\n /** Human-readable name of the audio input device. */\n name: string;\n /** Type or category of the input device (for example, 'Built-in Microphone', 'External Microphone'). */\n type: string;\n /** Unique identifier for the input device, used to select the input ('Built-in Microphone', 'External Microphone') for recording. */\n uid: string;\n};\n\n/**\n * Pitch correction quality settings for audio playback rate changes.\n *\n * When changing playback rate, pitch correction can be applied to maintain the original pitch.\n * Different quality levels offer trade-offs between processing power and audio quality.\n *\n * @platform ios\n */\nexport type PitchCorrectionQuality = 'low' | 'medium' | 'high';\n\n/**\n * Comprehensive status information for an `AudioPlayer`.\n *\n * This object contains all the current state information about audio playback,\n * including playback position, duration, loading state, and playback settings.\n * Used by `useAudioPlayerStatus()` to provide real-time status updates.\n */\nexport type AudioStatus = {\n /** Unique identifier for the player instance. */\n id: number;\n /** Current playback position in seconds. */\n currentTime: number;\n /** String representation of the player's internal playback state. */\n playbackState: string;\n /** String representation of the player's time control status (playing/paused/waiting). */\n timeControlStatus: string;\n /** Reason why the player is waiting to play (if applicable). */\n reasonForWaitingToPlay: string;\n /** Whether the player is currently muted. */\n mute: boolean;\n /** Total duration of the audio in seconds, or 0 if not yet determined. */\n duration: number;\n /** Whether the audio is currently playing. */\n playing: boolean;\n /** Whether the audio is set to loop when it reaches the end. */\n loop: boolean;\n /** Whether the audio just finished playing. */\n didJustFinish: boolean;\n /** Whether the player is currently buffering data. */\n isBuffering: boolean;\n /** Whether the audio has finished loading and is ready to play. */\n isLoaded: boolean;\n /** Current playback rate (1.0 = normal speed). */\n playbackRate: number;\n /** Whether pitch correction is enabled for rate changes. */\n shouldCorrectPitch: boolean;\n};\n\n/**\n * Status information for recording operations from the event system.\n *\n * This type represents the status data emitted by `recordingStatusUpdate` events.\n * It contains high-level information about the recording session and any errors.\n * Used internally by the event system. Most users should use `useAudioRecorderState()` instead.\n */\nexport type RecordingStatus = {\n /** Unique identifier for the recording session. */\n id: number;\n /** Whether the recording has finished (stopped). */\n isFinished: boolean;\n /** Whether an error occurred during recording. */\n hasError: boolean;\n /** Error message if an error occurred, `null` otherwise. */\n error: string | null;\n /** File URL of the completed recording, if available. */\n url: string | null;\n};\n\n/**\n * Current state information for an `AudioRecorder`.\n *\n * This object contains detailed information about the recorder's current state,\n * including recording status, duration, and technical details. This is what you get\n * when calling `recorder.getStatus()` or using `useAudioRecorderState()`.\n */\nexport type RecorderState = {\n /** Whether the recorder is ready and able to record. */\n canRecord: boolean;\n /** Whether recording is currently in progress. */\n isRecording: boolean;\n /** Duration of the current recording in milliseconds. */\n durationMillis: number;\n /** Whether the media services have been reset (typically indicates a system interruption). */\n mediaServicesDidReset: boolean;\n /** Current audio level/volume being recorded (if metering is enabled). */\n metering?: number;\n /** File URL where the recording will be saved, if available. */\n url: string | null;\n};\n\n/**\n * Audio output format options for Android recording.\n *\n * Specifies the container format for recorded audio files on Android.\n * Different formats have different compatibility and compression characteristics.\n *\n * @platform android\n */\nexport type AndroidOutputFormat =\n | 'default'\n | '3gp'\n | 'mpeg4'\n | 'amrnb'\n | 'amrwb'\n | 'aac_adts'\n | 'mpeg2ts'\n | 'webm';\n\n/**\n * Audio encoder options for Android recording.\n *\n * Specifies the audio codec used to encode recorded audio on Android.\n * Different encoders offer different quality, compression, and compatibility trade-offs.\n *\n * @platform android\n */\nexport type AndroidAudioEncoder = 'default' | 'amr_nb' | 'amr_wb' | 'aac' | 'he_aac' | 'aac_eld';\n\n/**\n * Bit rate strategies for audio encoding.\n *\n * Determines how the encoder manages bit rate during recording, affecting\n * file size consistency and quality characteristics.\n */\nexport type BitRateStrategy = 'constant' | 'longTermAverage' | 'variableConstrained' | 'variable';\n\n/**\n * Options for controlling how audio recording is started.\n */\nexport type RecordingStartOptions = {\n /**\n * The duration in seconds after which recording should automatically stop.\n * If not provided, recording continues until manually stopped.\n *\n * @platform ios\n * @platform android\n * @platform web\n */\n forDuration?: number;\n /**\n * The time in seconds to wait before starting the recording.\n * If not provided, recording starts immediately.\n *\n * **Platform behavior:**\n * - Android: Ignored, recording starts immediately\n * - iOS: Uses native AVAudioRecorder.record(atTime:) for precise timing.\n * - Web: Ignored, recording starts immediately\n *\n * > **warning** On iOS, the recording process starts immediately (you'll see status updates),\n * but actual audio capture begins after the specified delay. This is not a countdown, since\n * the recorder is active but silent during the delay period.\n *\n * @platform ios\n */\n atTime?: number;\n};\n\nexport type RecordingOptions = {\n /**\n * A boolean that determines whether audio level information will be part of the status object under the \"metering\" key.\n */\n isMeteringEnabled?: boolean;\n /**\n * The desired file extension.\n *\n * @example .caf\n */\n extension: string;\n /**\n * The desired sample rate.\n *\n * @example 44100\n */\n sampleRate: number;\n /**\n * The desired number of channels.\n *\n * @example 2\n */\n numberOfChannels: number;\n /**\n * The desired bit rate.\n *\n * @example 128000\n */\n bitRate: number;\n /**\n * Recording options for the Android platform.\n * @platform android\n */\n android: RecordingOptionsAndroid;\n /**\n * Recording options for the iOS platform.\n * @platform ios\n */\n ios: RecordingOptionsIos;\n /**\n * Recording options for the Web platform.\n * @platform web\n */\n web?: RecordingOptionsWeb;\n};\n\n/**\n * Recording options for the web.\n *\n * Web recording uses the `MediaRecorder` API, which has different capabilities\n * compared to native platforms. These options map directly to `MediaRecorder` settings.\n *\n * @platform web\n */\nexport type RecordingOptionsWeb = {\n /** MIME type for the recording (for example, 'audio/webm', 'audio/mp4'). */\n mimeType?: string;\n /** Target bits per second for the recording. */\n bitsPerSecond?: number;\n};\n\n/**\n * Recording configuration options specific to iOS.\n *\n * iOS recording uses `AVAudioRecorder` with extensive format and quality options.\n * These settings provide fine-grained control over the recording characteristics.\n *\n * @platform ios\n */\nexport type RecordingOptionsIos = {\n /**\n * The desired file extension.\n *\n * @example .caf\n */\n extension?: string;\n /**\n * The desired sample rate.\n *\n * @example 44100\n */\n sampleRate?: number;\n /**\n * The desired file format. See the [`IOSOutputFormat`](#iosoutputformat) enum for all valid values.\n */\n outputFormat?: string | IOSOutputFormat | number;\n /**\n * The desired audio quality. See the [`AudioQuality`](#audioquality) enum for all valid values.\n */\n audioQuality: AudioQuality | number;\n /**\n * The desired bit rate strategy. See the next section for an enumeration of all valid values of `bitRateStrategy`.\n */\n bitRateStrategy?: number;\n /**\n * The desired bit depth hint.\n *\n * @example 16\n */\n bitDepthHint?: number;\n /**\n * The desired PCM bit depth.\n *\n * @example 16\n */\n linearPCMBitDepth?: number;\n /**\n * A boolean describing if the PCM data should be formatted in big endian.\n */\n linearPCMIsBigEndian?: boolean;\n /**\n * A boolean describing if the PCM data should be encoded in floating point or integral values.\n */\n linearPCMIsFloat?: boolean;\n};\n\n/**\n * Recording configuration options specific to Android.\n *\n * Android recording uses `MediaRecorder` with options for format, encoder, and file constraints.\n * These settings control the output format and quality characteristics.\n *\n * @platform android\n */\nexport type RecordingOptionsAndroid = {\n /**\n * The desired file extension.\n *\n * @example .caf\n */\n extension?: string;\n /**\n * The desired sample rate.\n *\n * @example 44100\n */\n sampleRate?: number;\n /**\n * The desired file format. See the [`AndroidOutputFormat`](#androidoutputformat) enum for all valid values.\n */\n outputFormat: AndroidOutputFormat;\n /**\n * The desired audio encoder. See the [`AndroidAudioEncoder`](#androidaudioencoder) enum for all valid values.\n */\n audioEncoder: AndroidAudioEncoder;\n /**\n * The desired maximum file size in bytes, after which the recording will stop (but `stopAndUnloadAsync()` must still\n * be called after this point).\n *\n * @example\n * `65536`\n */\n maxFileSize?: number;\n};\n\nexport type AudioMode = {\n /**\n * Determines if audio playback is allowed when the device is in silent mode.\n *\n * @platform ios\n */\n playsInSilentMode: boolean;\n /**\n * Determines how the audio session interacts with other sessions.\n *\n * @platform ios\n */\n interruptionMode: InterruptionMode;\n /**\n * Determines how the audio session interacts with other sessions on Android.\n *\n * @platform android\n */\n interruptionModeAndroid: InterruptionModeAndroid;\n /**\n * Whether the audio session allows recording.\n *\n * @default false\n * @platform ios\n */\n allowsRecording: boolean;\n /**\n * Whether the audio session stays active when the app moves to the background.\n * @default false\n */\n shouldPlayInBackground: boolean;\n /**\n * Whether the audio should route through the earpiece.\n * @platform android\n */\n shouldRouteThroughEarpiece: boolean;\n};\n\n/**\n * Audio interruption behavior modes for iOS.\n *\n * Controls how your app's audio interacts with other apps' audio when interruptions occur.\n * This affects what happens when phone calls, notifications, or other apps play audio.\n *\n * @platform ios\n */\nexport type InterruptionMode = 'mixWithOthers' | 'doNotMix' | 'duckOthers';\n\n/**\n * Audio interruption behavior modes for Android.\n *\n * Controls how your app's audio interacts with other apps' audio on Android.\n * Note that Android doesn't support 'mixWithOthers' mode; audio focus is more strictly managed.\n *\n * @platform android\n */\nexport type InterruptionModeAndroid = 'doNotMix' | 'duckOthers';\n"]}
|
|
1
|
+
{"version":3,"file":"Audio.types.js","sourceRoot":"","sources":["../src/Audio.types.ts"],"names":[],"mappings":"","sourcesContent":["import { AudioQuality, IOSOutputFormat } from './RecordingConstants';\n\n// @docsMissing\nexport type AudioSource =\n | string\n | number\n | null\n | {\n /**\n * A string representing the resource identifier for the audio,\n * which could be an HTTPS address, a local file path, or the name of a static audio file resource.\n */\n uri?: string;\n /**\n * The asset ID of a local audio asset, acquired with the `require` function.\n * This property is exclusive with the `uri` property. When both are present, the `assetId` will be ignored.\n */\n assetId?: number;\n /**\n * An object representing the HTTP headers to send along with the request for a remote audio source.\n * On web requires the `Access-Control-Allow-Origin` header returned by the server to include the current domain.\n */\n headers?: Record<string, string>;\n };\n\n/**\n * Options for configuring audio player behavior.\n */\nexport type AudioPlayerOptions = {\n /**\n * How often (in milliseconds) to emit playback status updates. Defaults to 500ms.\n *\n * @example\n * ```tsx\n * import { useAudioPlayer } from 'expo-audio';\n *\n * export default function App() {\n * const player = useAudioPlayer(source);\n *\n * // High-frequency updates for smooth progress bars\n * const player = useAudioPlayer(source, { updateInterval: 100 });\n *\n * // Standard updates (default behavior)\n * const player = useAudioPlayer(source, { updateInterval: 500 });\n *\n * // Low-frequency updates for better performance\n * const player = useAudioPlayer(source, { updateInterval: 1000 });\n * }\n * ```\n *\n * @default 500ms\n *\n * @platform ios\n * @platform android\n * @platform web\n */\n updateInterval?: number;\n /**\n * If set to `true`, the system will attempt to download the resource to the device before loading.\n * This value defaults to `false`.\n *\n * Works with:\n * - Local assets from `require('path/to/file')`\n * - Remote HTTP/HTTPS URLs\n * - Asset objects\n *\n * When enabled, this ensures the audio file is fully downloaded before playback begins.\n * This can improve playback performance and reduce buffering, especially for users\n * managing multiple audio players simultaneously.\n *\n * On Android and iOS, this will download the audio file to the device's tmp directory before playback begins.\n * The system will purge the file at its discretion.\n *\n * On web, this will download the audio file to the user's device memory and make it available for the user to play.\n * The system will usually purge the file from memory after a reload or on memory pressure.\n * On web, CORS restrictions apply to the blob url, so you need to make sure the server returns the `Access-Control-Allow-Origin` header.\n *\n * @platform ios\n * @platform web\n * @platform android\n */\n downloadFirst?: boolean;\n /**\n * Determines the [cross origin policy](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/crossorigin) used by the underlying native view on web.\n * If `undefined` (default), does not use CORS at all. If set to `'anonymous'`, the audio will be loaded with CORS enabled.\n * Note that some audio may not play if CORS is enabled, depending on the CDN settings.\n * If you encounter issues, consider adjusting the `crossOrigin` property.\n *\n *\n * @platform web\n * @default undefined\n */\n crossOrigin?: 'anonymous' | 'use-credentials';\n /**\n * If set to `true`, the audio session will not be deactivated when this player pauses or finishes playback.\n * This prevents interrupting other audio sources (like videos) when the audio ends.\n *\n * Useful for sound effects that should not interfere with ongoing video playback or other audio.\n * The audio session for this player will not be deactivated automatically when the player finishes playback.\n *\n * > **Note:** If needed, you can manually deactivate the audio session using `setIsAudioActiveAsync(false)`.\n *\n * @platform ios\n * @default false\n */\n keepAudioSessionActive?: boolean;\n};\n\n/**\n * @deprecated Use `AudioPlayerOptions` instead.\n * Options for audio loading behavior.\n */\nexport type AudioLoadOptions = AudioPlayerOptions;\n\n/**\n * Represents an available audio input device for recording.\n *\n * This type describes audio input sources like built-in microphones, external microphones,\n * or other audio input devices that can be used for recording. Each input has an identifying\n * information that can be used to select the preferred recording source.\n */\nexport type RecordingInput = {\n /** Human-readable name of the audio input device. */\n name: string;\n /** Type or category of the input device (for example, 'Built-in Microphone', 'External Microphone'). */\n type: string;\n /** Unique identifier for the input device, used to select the input ('Built-in Microphone', 'External Microphone') for recording. */\n uid: string;\n};\n\n/**\n * Pitch correction quality settings for audio playback rate changes.\n *\n * When changing playback rate, pitch correction can be applied to maintain the original pitch.\n * Different quality levels offer trade-offs between processing power and audio quality.\n *\n * @platform ios\n */\nexport type PitchCorrectionQuality = 'low' | 'medium' | 'high';\n\n/**\n * Comprehensive status information for an `AudioPlayer`.\n *\n * This object contains all the current state information about audio playback,\n * including playback position, duration, loading state, and playback settings.\n * Used by `useAudioPlayerStatus()` to provide real-time status updates.\n */\nexport type AudioStatus = {\n /** Unique identifier for the player instance. */\n id: number;\n /** Current playback position in seconds. */\n currentTime: number;\n /** String representation of the player's internal playback state. */\n playbackState: string;\n /** String representation of the player's time control status (playing/paused/waiting). */\n timeControlStatus: string;\n /** Reason why the player is waiting to play (if applicable). */\n reasonForWaitingToPlay: string;\n /** Whether the player is currently muted. */\n mute: boolean;\n /** Total duration of the audio in seconds, or 0 if not yet determined. */\n duration: number;\n /** Whether the audio is currently playing. */\n playing: boolean;\n /** Whether the audio is set to loop when it reaches the end. */\n loop: boolean;\n /** Whether the audio just finished playing. */\n didJustFinish: boolean;\n /** Whether the player is currently buffering data. */\n isBuffering: boolean;\n /** Whether the audio has finished loading and is ready to play. */\n isLoaded: boolean;\n /** Current playback rate (1.0 = normal speed). */\n playbackRate: number;\n /** Whether pitch correction is enabled for rate changes. */\n shouldCorrectPitch: boolean;\n};\n\n/**\n * Status information for recording operations from the event system.\n *\n * This type represents the status data emitted by `recordingStatusUpdate` events.\n * It contains high-level information about the recording session and any errors.\n * Used internally by the event system. Most users should use `useAudioRecorderState()` instead.\n */\nexport type RecordingStatus = {\n /** Unique identifier for the recording session. */\n id: number;\n /** Whether the recording has finished (stopped). */\n isFinished: boolean;\n /** Whether an error occurred during recording. */\n hasError: boolean;\n /** Error message if an error occurred, `null` otherwise. */\n error: string | null;\n /** File URL of the completed recording, if available. */\n url: string | null;\n};\n\n/**\n * Current state information for an `AudioRecorder`.\n *\n * This object contains detailed information about the recorder's current state,\n * including recording status, duration, and technical details. This is what you get\n * when calling `recorder.getStatus()` or using `useAudioRecorderState()`.\n */\nexport type RecorderState = {\n /** Whether the recorder is ready and able to record. */\n canRecord: boolean;\n /** Whether recording is currently in progress. */\n isRecording: boolean;\n /** Duration of the current recording in milliseconds. */\n durationMillis: number;\n /** Whether the media services have been reset (typically indicates a system interruption). */\n mediaServicesDidReset: boolean;\n /** Current audio level/volume being recorded (if metering is enabled). */\n metering?: number;\n /** File URL where the recording will be saved, if available. */\n url: string | null;\n};\n\n/**\n * Audio output format options for Android recording.\n *\n * Specifies the container format for recorded audio files on Android.\n * Different formats have different compatibility and compression characteristics.\n *\n * @platform android\n */\nexport type AndroidOutputFormat =\n | 'default'\n | '3gp'\n | 'mpeg4'\n | 'amrnb'\n | 'amrwb'\n | 'aac_adts'\n | 'mpeg2ts'\n | 'webm';\n\n/**\n * Audio encoder options for Android recording.\n *\n * Specifies the audio codec used to encode recorded audio on Android.\n * Different encoders offer different quality, compression, and compatibility trade-offs.\n *\n * @platform android\n */\nexport type AndroidAudioEncoder = 'default' | 'amr_nb' | 'amr_wb' | 'aac' | 'he_aac' | 'aac_eld';\n\n/**\n * Bit rate strategies for audio encoding.\n *\n * Determines how the encoder manages bit rate during recording, affecting\n * file size consistency and quality characteristics.\n */\nexport type BitRateStrategy = 'constant' | 'longTermAverage' | 'variableConstrained' | 'variable';\n\n/**\n * Options for controlling how audio recording is started.\n */\nexport type RecordingStartOptions = {\n /**\n * The duration in seconds after which recording should automatically stop.\n * If not provided, recording continues until manually stopped.\n *\n * @platform ios\n * @platform android\n * @platform web\n */\n forDuration?: number;\n /**\n * The time in seconds to wait before starting the recording.\n * If not provided, recording starts immediately.\n *\n * **Platform behavior:**\n * - Android: Ignored, recording starts immediately\n * - iOS: Uses native AVAudioRecorder.record(atTime:) for precise timing.\n * - Web: Ignored, recording starts immediately\n *\n * > **warning** On iOS, the recording process starts immediately (you'll see status updates),\n * but actual audio capture begins after the specified delay. This is not a countdown, since\n * the recorder is active but silent during the delay period.\n *\n * @platform ios\n */\n atTime?: number;\n};\n\nexport type RecordingOptions = {\n /**\n * A boolean that determines whether audio level information will be part of the status object under the \"metering\" key.\n */\n isMeteringEnabled?: boolean;\n /**\n * The desired file extension.\n *\n * @example .caf\n */\n extension: string;\n /**\n * The desired sample rate.\n *\n * @example 44100\n */\n sampleRate: number;\n /**\n * The desired number of channels.\n *\n * @example 2\n */\n numberOfChannels: number;\n /**\n * The desired bit rate.\n *\n * @example 128000\n */\n bitRate: number;\n /**\n * Recording options for the Android platform.\n * @platform android\n */\n android: RecordingOptionsAndroid;\n /**\n * Recording options for the iOS platform.\n * @platform ios\n */\n ios: RecordingOptionsIos;\n /**\n * Recording options for the Web platform.\n * @platform web\n */\n web?: RecordingOptionsWeb;\n};\n\n/**\n * Recording options for the web.\n *\n * Web recording uses the `MediaRecorder` API, which has different capabilities\n * compared to native platforms. These options map directly to `MediaRecorder` settings.\n *\n * @platform web\n */\nexport type RecordingOptionsWeb = {\n /** MIME type for the recording (for example, 'audio/webm', 'audio/mp4'). */\n mimeType?: string;\n /** Target bits per second for the recording. */\n bitsPerSecond?: number;\n};\n\n/**\n * Recording configuration options specific to iOS.\n *\n * iOS recording uses `AVAudioRecorder` with extensive format and quality options.\n * These settings provide fine-grained control over the recording characteristics.\n *\n * @platform ios\n */\nexport type RecordingOptionsIos = {\n /**\n * The desired file extension.\n *\n * @example .caf\n */\n extension?: string;\n /**\n * The desired sample rate.\n *\n * @example 44100\n */\n sampleRate?: number;\n /**\n * The desired file format. See the [`IOSOutputFormat`](#iosoutputformat) enum for all valid values.\n */\n outputFormat?: string | IOSOutputFormat | number;\n /**\n * The desired audio quality. See the [`AudioQuality`](#audioquality) enum for all valid values.\n */\n audioQuality: AudioQuality | number;\n /**\n * The desired bit rate strategy. See the next section for an enumeration of all valid values of `bitRateStrategy`.\n */\n bitRateStrategy?: number;\n /**\n * The desired bit depth hint.\n *\n * @example 16\n */\n bitDepthHint?: number;\n /**\n * The desired PCM bit depth.\n *\n * @example 16\n */\n linearPCMBitDepth?: number;\n /**\n * A boolean describing if the PCM data should be formatted in big endian.\n */\n linearPCMIsBigEndian?: boolean;\n /**\n * A boolean describing if the PCM data should be encoded in floating point or integral values.\n */\n linearPCMIsFloat?: boolean;\n};\n\n/**\n * Recording configuration options specific to Android.\n *\n * Android recording uses `MediaRecorder` with options for format, encoder, and file constraints.\n * These settings control the output format and quality characteristics.\n *\n * @platform android\n */\nexport type RecordingOptionsAndroid = {\n /**\n * The desired file extension.\n *\n * @example .caf\n */\n extension?: string;\n /**\n * The desired sample rate.\n *\n * @example 44100\n */\n sampleRate?: number;\n /**\n * The desired file format. See the [`AndroidOutputFormat`](#androidoutputformat) enum for all valid values.\n */\n outputFormat: AndroidOutputFormat;\n /**\n * The desired audio encoder. See the [`AndroidAudioEncoder`](#androidaudioencoder) enum for all valid values.\n */\n audioEncoder: AndroidAudioEncoder;\n /**\n * The desired maximum file size in bytes, after which the recording will stop (but `stopAndUnloadAsync()` must still\n * be called after this point).\n *\n * @example\n * `65536`\n */\n maxFileSize?: number;\n /**\n * The desired audio Source. See the [`AndroidAudioSource`](#androidaudiosource) enum for all valid values.\n */\n audioSource?: RecordingSource;\n};\n\nexport type AudioMode = {\n /**\n * Determines if audio playback is allowed when the device is in silent mode.\n *\n * @platform ios\n */\n playsInSilentMode: boolean;\n /**\n * Determines how the audio session interacts with other sessions.\n *\n * @platform ios\n */\n interruptionMode: InterruptionMode;\n /**\n * Determines how the audio session interacts with other sessions on Android.\n *\n * @platform android\n */\n interruptionModeAndroid: InterruptionModeAndroid;\n /**\n * Whether the audio session allows recording.\n *\n * @default false\n * @platform ios\n */\n allowsRecording: boolean;\n /**\n * Whether the audio session stays active when the app moves to the background.\n * @default false\n */\n shouldPlayInBackground: boolean;\n /**\n * Whether the audio should route through the earpiece.\n * @platform android\n */\n shouldRouteThroughEarpiece: boolean;\n};\n\n/**\n * Audio interruption behavior modes for iOS.\n *\n * Controls how your app's audio interacts with other apps' audio when interruptions occur.\n * This affects what happens when phone calls, notifications, or other apps play audio.\n *\n * @platform ios\n */\nexport type InterruptionMode = 'mixWithOthers' | 'doNotMix' | 'duckOthers';\n\n/**\n * Audio interruption behavior modes for Android.\n *\n * Controls how your app's audio interacts with other apps' audio on Android.\n * Note that Android doesn't support 'mixWithOthers' mode; audio focus is more strictly managed.\n *\n * @platform android\n */\nexport type InterruptionModeAndroid = 'doNotMix' | 'duckOthers';\n\n/**\n * Recording source for android.\n *\n * An audio source defines both a default physical source of audio signal, and a recording configuration.\n *\n * - `camcorder`: Microphone audio source tuned for video recording, with the same orientation as the camera if available.\n * - `default`: The default audio source.\n * - `mic`: Microphone audio source.\n * - `unprocessed`: Microphone audio source tuned for unprocessed (raw) sound if available, behaves like `default` otherwise.\n * - `voice_communication`: Microphone audio source tuned for voice communications such as VoIP. It will for instance take advantage of echo cancellation or automatic gain control if available.\n * - `voice_performance`: Source for capturing audio meant to be processed in real time and played back for live performance (e.g karaoke). The capture path will minimize latency and coupling with playback path.\n * - `voice_recognition`: Microphone audio source tuned for voice recognition.\n *\n * @see https://developer.android.com/reference/android/media/MediaRecorder.AudioSource\n * @platform android\n */\nexport type RecordingSource =\n | 'camcorder'\n | 'default'\n | 'mic'\n | 'remote_submix'\n | 'unprocessed'\n | 'voice_communication'\n | 'voice_performance'\n | 'voice_recognition';\n"]}
|
package/expo-module.config.json
CHANGED
package/ios/AudioUtils.swift
CHANGED
|
@@ -125,15 +125,17 @@ struct AudioUtils {
|
|
|
125
125
|
}
|
|
126
126
|
|
|
127
127
|
static func createRecordingOptions(_ options: RecordingOptions) -> [String: Any] {
|
|
128
|
-
let strategy = options.bitRateStrategy?.toAVBitRateStrategy()
|
|
128
|
+
let strategy = options.bitRateStrategy?.toAVBitRateStrategy()
|
|
129
129
|
|
|
130
130
|
var settings = [String: Any]()
|
|
131
131
|
|
|
132
|
-
if strategy
|
|
133
|
-
settings[
|
|
134
|
-
} else {
|
|
135
|
-
settings[AVEncoderAudioQualityKey] = strategy
|
|
132
|
+
if let strategy {
|
|
133
|
+
settings[AVEncoderBitRateStrategyKey] = strategy
|
|
136
134
|
}
|
|
135
|
+
|
|
136
|
+
let usesVBRQualityKey = strategy == AVAudioBitRateStrategy_Variable || strategy == AVAudioBitRateStrategy_VariableConstrained
|
|
137
|
+
let qualityKey = usesVBRQualityKey ? AVEncoderAudioQualityForVBRKey : AVEncoderAudioQualityKey
|
|
138
|
+
settings[qualityKey] = options.audioQuality
|
|
137
139
|
settings[AVSampleRateKey] = options.sampleRate
|
|
138
140
|
settings[AVNumberOfChannelsKey] = options.numberOfChannels
|
|
139
141
|
settings[AVEncoderBitRateKey] = options.bitRate
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
94d7b4a05f7e307af241c75bda772f95
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
29ed78716e057902e69fbfda756a38c01882b631
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
6aa90872741973bfb1d3e15c5b1c5c7a66488e83d4366e7a736f362b8c0ad5e8
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
aaae2c65e7d142f805fc78cec0dd6a8605edfe17e604a79d7cfeab6500e0130756b8bbedb7b251d56935577fc56c610d516523a2618e2574c4675c629130cf5b
|
package/local-maven-repo/expo/modules/audio/expo.modules.audio/1.0.12/expo.modules.audio-1.0.12.aar
ADDED
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
87d25a3818f99aa8400c69060174cb3f
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
b0dbe2fe2550fe5f1775885a5ddf59d620bd5b1f
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
c86fd91a683e81ae8b082cd7de84179a7f8a27655523ae8f62f903d52459494c
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
83e1dd1d0e60d0f587710a9600b9d8e72fa50424ad9d81c9fac6673b80ba0921313ca5e41f61f3650ae80a0c712bbcb1fa806fbaec150baa92c533a1246e0820
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"component": {
|
|
4
4
|
"group": "expo.modules.audio",
|
|
5
5
|
"module": "expo.modules.audio",
|
|
6
|
-
"version": "1.0.
|
|
6
|
+
"version": "1.0.12",
|
|
7
7
|
"attributes": {
|
|
8
8
|
"org.gradle.status": "release"
|
|
9
9
|
}
|
|
@@ -24,13 +24,13 @@
|
|
|
24
24
|
},
|
|
25
25
|
"files": [
|
|
26
26
|
{
|
|
27
|
-
"name": "expo.modules.audio-1.0.
|
|
28
|
-
"url": "expo.modules.audio-1.0.
|
|
29
|
-
"size":
|
|
30
|
-
"sha512": "
|
|
31
|
-
"sha256": "
|
|
32
|
-
"sha1": "
|
|
33
|
-
"md5": "
|
|
27
|
+
"name": "expo.modules.audio-1.0.12.aar",
|
|
28
|
+
"url": "expo.modules.audio-1.0.12.aar",
|
|
29
|
+
"size": 212944,
|
|
30
|
+
"sha512": "83e1dd1d0e60d0f587710a9600b9d8e72fa50424ad9d81c9fac6673b80ba0921313ca5e41f61f3650ae80a0c712bbcb1fa806fbaec150baa92c533a1246e0820",
|
|
31
|
+
"sha256": "c86fd91a683e81ae8b082cd7de84179a7f8a27655523ae8f62f903d52459494c",
|
|
32
|
+
"sha1": "b0dbe2fe2550fe5f1775885a5ddf59d620bd5b1f",
|
|
33
|
+
"md5": "87d25a3818f99aa8400c69060174cb3f"
|
|
34
34
|
}
|
|
35
35
|
]
|
|
36
36
|
},
|
|
@@ -95,13 +95,13 @@
|
|
|
95
95
|
],
|
|
96
96
|
"files": [
|
|
97
97
|
{
|
|
98
|
-
"name": "expo.modules.audio-1.0.
|
|
99
|
-
"url": "expo.modules.audio-1.0.
|
|
100
|
-
"size":
|
|
101
|
-
"sha512": "
|
|
102
|
-
"sha256": "
|
|
103
|
-
"sha1": "
|
|
104
|
-
"md5": "
|
|
98
|
+
"name": "expo.modules.audio-1.0.12.aar",
|
|
99
|
+
"url": "expo.modules.audio-1.0.12.aar",
|
|
100
|
+
"size": 212944,
|
|
101
|
+
"sha512": "83e1dd1d0e60d0f587710a9600b9d8e72fa50424ad9d81c9fac6673b80ba0921313ca5e41f61f3650ae80a0c712bbcb1fa806fbaec150baa92c533a1246e0820",
|
|
102
|
+
"sha256": "c86fd91a683e81ae8b082cd7de84179a7f8a27655523ae8f62f903d52459494c",
|
|
103
|
+
"sha1": "b0dbe2fe2550fe5f1775885a5ddf59d620bd5b1f",
|
|
104
|
+
"md5": "87d25a3818f99aa8400c69060174cb3f"
|
|
105
105
|
}
|
|
106
106
|
]
|
|
107
107
|
},
|
|
@@ -115,13 +115,13 @@
|
|
|
115
115
|
},
|
|
116
116
|
"files": [
|
|
117
117
|
{
|
|
118
|
-
"name": "expo.modules.audio-1.0.
|
|
119
|
-
"url": "expo.modules.audio-1.0.
|
|
120
|
-
"size":
|
|
121
|
-
"sha512": "
|
|
122
|
-
"sha256": "
|
|
123
|
-
"sha1": "
|
|
124
|
-
"md5": "
|
|
118
|
+
"name": "expo.modules.audio-1.0.12-sources.jar",
|
|
119
|
+
"url": "expo.modules.audio-1.0.12-sources.jar",
|
|
120
|
+
"size": 13331,
|
|
121
|
+
"sha512": "aaae2c65e7d142f805fc78cec0dd6a8605edfe17e604a79d7cfeab6500e0130756b8bbedb7b251d56935577fc56c610d516523a2618e2574c4675c629130cf5b",
|
|
122
|
+
"sha256": "6aa90872741973bfb1d3e15c5b1c5c7a66488e83d4366e7a736f362b8c0ad5e8",
|
|
123
|
+
"sha1": "29ed78716e057902e69fbfda756a38c01882b631",
|
|
124
|
+
"md5": "94d7b4a05f7e307af241c75bda772f95"
|
|
125
125
|
}
|
|
126
126
|
]
|
|
127
127
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
53eac6dbc618be0fffad1c0782face2a
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
b762b56e0f2e562984d5e9ddd311873dce086f11
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
a4d8b30ad119bac9db59ba0d93bb9f508d81e06d89b6528437cd81aeaebbab52
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
11f90e4d200db1eb9681c2d8f740317fb91c0f766164be5e957bc6839a936a929703e70965e9f95649884be005a8f5e20a3832fdbb282488d8a774d01e55aae8
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<modelVersion>4.0.0</modelVersion>
|
|
10
10
|
<groupId>expo.modules.audio</groupId>
|
|
11
11
|
<artifactId>expo.modules.audio</artifactId>
|
|
12
|
-
<version>1.0.
|
|
12
|
+
<version>1.0.12</version>
|
|
13
13
|
<packaging>aar</packaging>
|
|
14
14
|
<name>expo.modules.audio</name>
|
|
15
15
|
<url>https://github.com/expo/expo</url>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
7f1d7e10a875a3f9cf0d5c37aa946002
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
fd47208099ce6f371e2082a9eedf48ce800f688c
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0ea007a46a59448864c47137d2f8900b02d29b0bf08cfd3960930e7dbb84daec
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
d29ff643de9e0c671cda23e2647eb2887ef9ed3768de497577008760bdde589beb1e601938fb562e1aad71eaae07c5c12ade72adf7d366768b213ba863b57ad9
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
<groupId>expo.modules.audio</groupId>
|
|
4
4
|
<artifactId>expo.modules.audio</artifactId>
|
|
5
5
|
<versioning>
|
|
6
|
-
<latest>1.0.
|
|
7
|
-
<release>1.0.
|
|
6
|
+
<latest>1.0.12</latest>
|
|
7
|
+
<release>1.0.12</release>
|
|
8
8
|
<versions>
|
|
9
|
-
<version>1.0.
|
|
9
|
+
<version>1.0.12</version>
|
|
10
10
|
</versions>
|
|
11
|
-
<lastUpdated>
|
|
11
|
+
<lastUpdated>20250916203518</lastUpdated>
|
|
12
12
|
</versioning>
|
|
13
13
|
</metadata>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
3ef7a2fac8f0b8aea049833e5c1353e2
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
3a2fbead273c177658b2593de6ae352a92199eaf
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
913e29769516343f10c2895de42753a1e1b9309a68e9da8091a227b3ab5d1ee0
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
5cb65fd8ac1a7cec5a644969ac2bbbb50102531885da037390a51c4f431cd19b93b12cfc6d6e1d7bd3a82222c6334f6c702e49a686b05e114adbcefc1ccbd03b
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-audio",
|
|
3
3
|
"title": "Expo Audio",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.12",
|
|
5
5
|
"description": "A cross-platform audio library for React Native and Expo apps.",
|
|
6
6
|
"main": "build/index.js",
|
|
7
7
|
"types": "build/index.d.ts",
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"react": "*",
|
|
41
41
|
"react-native": "*"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "e1bc61d046f09264a85b7730a1b7ae931b0f0af4"
|
|
44
44
|
}
|
package/src/Audio.types.ts
CHANGED
|
@@ -438,6 +438,10 @@ export type RecordingOptionsAndroid = {
|
|
|
438
438
|
* `65536`
|
|
439
439
|
*/
|
|
440
440
|
maxFileSize?: number;
|
|
441
|
+
/**
|
|
442
|
+
* The desired audio Source. See the [`AndroidAudioSource`](#androidaudiosource) enum for all valid values.
|
|
443
|
+
*/
|
|
444
|
+
audioSource?: RecordingSource;
|
|
441
445
|
};
|
|
442
446
|
|
|
443
447
|
export type AudioMode = {
|
|
@@ -497,3 +501,29 @@ export type InterruptionMode = 'mixWithOthers' | 'doNotMix' | 'duckOthers';
|
|
|
497
501
|
* @platform android
|
|
498
502
|
*/
|
|
499
503
|
export type InterruptionModeAndroid = 'doNotMix' | 'duckOthers';
|
|
504
|
+
|
|
505
|
+
/**
|
|
506
|
+
* Recording source for android.
|
|
507
|
+
*
|
|
508
|
+
* An audio source defines both a default physical source of audio signal, and a recording configuration.
|
|
509
|
+
*
|
|
510
|
+
* - `camcorder`: Microphone audio source tuned for video recording, with the same orientation as the camera if available.
|
|
511
|
+
* - `default`: The default audio source.
|
|
512
|
+
* - `mic`: Microphone audio source.
|
|
513
|
+
* - `unprocessed`: Microphone audio source tuned for unprocessed (raw) sound if available, behaves like `default` otherwise.
|
|
514
|
+
* - `voice_communication`: Microphone audio source tuned for voice communications such as VoIP. It will for instance take advantage of echo cancellation or automatic gain control if available.
|
|
515
|
+
* - `voice_performance`: Source for capturing audio meant to be processed in real time and played back for live performance (e.g karaoke). The capture path will minimize latency and coupling with playback path.
|
|
516
|
+
* - `voice_recognition`: Microphone audio source tuned for voice recognition.
|
|
517
|
+
*
|
|
518
|
+
* @see https://developer.android.com/reference/android/media/MediaRecorder.AudioSource
|
|
519
|
+
* @platform android
|
|
520
|
+
*/
|
|
521
|
+
export type RecordingSource =
|
|
522
|
+
| 'camcorder'
|
|
523
|
+
| 'default'
|
|
524
|
+
| 'mic'
|
|
525
|
+
| 'remote_submix'
|
|
526
|
+
| 'unprocessed'
|
|
527
|
+
| 'voice_communication'
|
|
528
|
+
| 'voice_performance'
|
|
529
|
+
| 'voice_recognition';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
c6d6c20a31fa3cef9d706ac8abc339dd
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
5da2cfac339b925ca12c1419c63c9fd0564e91e5
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
caf8ac9e00d60620ad5406dea94ae3865cc7b9aca65ade0a4239b84048adf494
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
071848199cd4a94d3ba77e7d173daa7888e1f87f9c3a0c8e260bc3dffdd91b785511c8bad75eeeb2e7d91a5f1a590b3ed12afe49cbe7792761d65c450ac91ba7
|
package/local-maven-repo/expo/modules/audio/expo.modules.audio/1.0.11/expo.modules.audio-1.0.11.aar
DELETED
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
78fe69479d33f3cbe1d8da2189f869d6
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
ca1aba4a3d4243d3966de88e39e4e90eedcba4d8
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
b56a832f68990c2f3ca012d48d8ee8d6778f4f47acacc94b89344967c84a582f
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
4bdeeec9d891db2149d60b686fab63409b547e27e0102a9c57ca29dad420c2ac572fc05bfe77667545a9e0eddc0ab8f8f9d296460470ba6d49c615f049c6f376
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
fe8a521ca10d8aec8ad1bf8f183c11f8
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
00973d10a83c971d71e461989f45d0188aa3ee21
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
be70def7a68366f5a25ede2950b5945261d76c38012ed10adbb437009f82dcb1
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
bbcdc038c5afa64f6d0b0a9770e7647b9a08c1018bf9a23ea09420ca93697353b5196bdef1e319ec40f7a3fc8a880aa513b8d9117cb7e5e17c097c4a6daa865a
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
a1295d62598975da0ea3673b0f540a44
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
598e7087e073f7cb7986e43fa2f2f7943deacb6b
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
cf53321bc14b97aecdebeba4edf6990bbc0ce45c0b4dce8c157581064e4a1c6f
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
2138f2548748ce410d3da3e2b396646f9e2f9d5967aff3eeff5597716e9717a4df3b2fca362261f73652a9ad50787d5349d5986a99c96eae5bb37df351c36dd9
|