expo-audio 56.0.3 → 56.0.5

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.
Files changed (69) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/android/build.gradle +2 -2
  3. package/android/src/main/java/expo/modules/audio/AudioModule.kt +1 -1
  4. package/build/AudioModule.types.d.ts +1 -1
  5. package/build/AudioModule.types.d.ts.map +1 -1
  6. package/build/AudioModule.types.js.map +1 -1
  7. package/build/AudioModule.web.d.ts +1 -1
  8. package/build/AudioModule.web.d.ts.map +1 -1
  9. package/build/AudioModule.web.js +1 -1
  10. package/build/AudioModule.web.js.map +1 -1
  11. package/build/ExpoAudio.d.ts +1 -1
  12. package/build/ExpoAudio.d.ts.map +1 -1
  13. package/build/ExpoAudio.js.map +1 -1
  14. package/build/ExpoAudio.web.d.ts +1 -1
  15. package/build/ExpoAudio.web.d.ts.map +1 -1
  16. package/build/ExpoAudio.web.js.map +1 -1
  17. package/build/index.d.ts +1 -1
  18. package/build/index.d.ts.map +1 -1
  19. package/build/index.js +1 -1
  20. package/build/index.js.map +1 -1
  21. package/expo-module.config.json +1 -1
  22. package/local-maven-repo/expo/modules/audio/expo.modules.audio/{56.0.3/expo.modules.audio-56.0.3-sources.jar → 56.0.5/expo.modules.audio-56.0.5-sources.jar} +0 -0
  23. package/local-maven-repo/expo/modules/audio/expo.modules.audio/56.0.5/expo.modules.audio-56.0.5-sources.jar.md5 +1 -0
  24. package/local-maven-repo/expo/modules/audio/expo.modules.audio/56.0.5/expo.modules.audio-56.0.5-sources.jar.sha1 +1 -0
  25. package/local-maven-repo/expo/modules/audio/expo.modules.audio/56.0.5/expo.modules.audio-56.0.5-sources.jar.sha256 +1 -0
  26. package/local-maven-repo/expo/modules/audio/expo.modules.audio/56.0.5/expo.modules.audio-56.0.5-sources.jar.sha512 +1 -0
  27. package/local-maven-repo/expo/modules/audio/expo.modules.audio/56.0.5/expo.modules.audio-56.0.5.aar +0 -0
  28. package/local-maven-repo/expo/modules/audio/expo.modules.audio/56.0.5/expo.modules.audio-56.0.5.aar.md5 +1 -0
  29. package/local-maven-repo/expo/modules/audio/expo.modules.audio/56.0.5/expo.modules.audio-56.0.5.aar.sha1 +1 -0
  30. package/local-maven-repo/expo/modules/audio/expo.modules.audio/56.0.5/expo.modules.audio-56.0.5.aar.sha256 +1 -0
  31. package/local-maven-repo/expo/modules/audio/expo.modules.audio/56.0.5/expo.modules.audio-56.0.5.aar.sha512 +1 -0
  32. package/local-maven-repo/expo/modules/audio/expo.modules.audio/{56.0.3/expo.modules.audio-56.0.3.module → 56.0.5/expo.modules.audio-56.0.5.module} +22 -22
  33. package/local-maven-repo/expo/modules/audio/expo.modules.audio/56.0.5/expo.modules.audio-56.0.5.module.md5 +1 -0
  34. package/local-maven-repo/expo/modules/audio/expo.modules.audio/56.0.5/expo.modules.audio-56.0.5.module.sha1 +1 -0
  35. package/local-maven-repo/expo/modules/audio/expo.modules.audio/56.0.5/expo.modules.audio-56.0.5.module.sha256 +1 -0
  36. package/local-maven-repo/expo/modules/audio/expo.modules.audio/56.0.5/expo.modules.audio-56.0.5.module.sha512 +1 -0
  37. package/local-maven-repo/expo/modules/audio/expo.modules.audio/{56.0.3/expo.modules.audio-56.0.3.pom → 56.0.5/expo.modules.audio-56.0.5.pom} +1 -1
  38. package/local-maven-repo/expo/modules/audio/expo.modules.audio/56.0.5/expo.modules.audio-56.0.5.pom.md5 +1 -0
  39. package/local-maven-repo/expo/modules/audio/expo.modules.audio/56.0.5/expo.modules.audio-56.0.5.pom.sha1 +1 -0
  40. package/local-maven-repo/expo/modules/audio/expo.modules.audio/56.0.5/expo.modules.audio-56.0.5.pom.sha256 +1 -0
  41. package/local-maven-repo/expo/modules/audio/expo.modules.audio/56.0.5/expo.modules.audio-56.0.5.pom.sha512 +1 -0
  42. package/local-maven-repo/expo/modules/audio/expo.modules.audio/maven-metadata.xml +4 -4
  43. package/local-maven-repo/expo/modules/audio/expo.modules.audio/maven-metadata.xml.md5 +1 -1
  44. package/local-maven-repo/expo/modules/audio/expo.modules.audio/maven-metadata.xml.sha1 +1 -1
  45. package/local-maven-repo/expo/modules/audio/expo.modules.audio/maven-metadata.xml.sha256 +1 -1
  46. package/local-maven-repo/expo/modules/audio/expo.modules.audio/maven-metadata.xml.sha512 +1 -1
  47. package/package.json +5 -5
  48. package/src/AudioModule.types.ts +1 -1
  49. package/src/AudioModule.web.ts +1 -2
  50. package/src/ExpoAudio.ts +1 -2
  51. package/src/ExpoAudio.web.ts +1 -2
  52. package/src/index.ts +1 -5
  53. package/local-maven-repo/expo/modules/audio/expo.modules.audio/56.0.3/expo.modules.audio-56.0.3-sources.jar.md5 +0 -1
  54. package/local-maven-repo/expo/modules/audio/expo.modules.audio/56.0.3/expo.modules.audio-56.0.3-sources.jar.sha1 +0 -1
  55. package/local-maven-repo/expo/modules/audio/expo.modules.audio/56.0.3/expo.modules.audio-56.0.3-sources.jar.sha256 +0 -1
  56. package/local-maven-repo/expo/modules/audio/expo.modules.audio/56.0.3/expo.modules.audio-56.0.3-sources.jar.sha512 +0 -1
  57. package/local-maven-repo/expo/modules/audio/expo.modules.audio/56.0.3/expo.modules.audio-56.0.3.aar +0 -0
  58. package/local-maven-repo/expo/modules/audio/expo.modules.audio/56.0.3/expo.modules.audio-56.0.3.aar.md5 +0 -1
  59. package/local-maven-repo/expo/modules/audio/expo.modules.audio/56.0.3/expo.modules.audio-56.0.3.aar.sha1 +0 -1
  60. package/local-maven-repo/expo/modules/audio/expo.modules.audio/56.0.3/expo.modules.audio-56.0.3.aar.sha256 +0 -1
  61. package/local-maven-repo/expo/modules/audio/expo.modules.audio/56.0.3/expo.modules.audio-56.0.3.aar.sha512 +0 -1
  62. package/local-maven-repo/expo/modules/audio/expo.modules.audio/56.0.3/expo.modules.audio-56.0.3.module.md5 +0 -1
  63. package/local-maven-repo/expo/modules/audio/expo.modules.audio/56.0.3/expo.modules.audio-56.0.3.module.sha1 +0 -1
  64. package/local-maven-repo/expo/modules/audio/expo.modules.audio/56.0.3/expo.modules.audio-56.0.3.module.sha256 +0 -1
  65. package/local-maven-repo/expo/modules/audio/expo.modules.audio/56.0.3/expo.modules.audio-56.0.3.module.sha512 +0 -1
  66. package/local-maven-repo/expo/modules/audio/expo.modules.audio/56.0.3/expo.modules.audio-56.0.3.pom.md5 +0 -1
  67. package/local-maven-repo/expo/modules/audio/expo.modules.audio/56.0.3/expo.modules.audio-56.0.3.pom.sha1 +0 -1
  68. package/local-maven-repo/expo/modules/audio/expo.modules.audio/56.0.3/expo.modules.audio-56.0.3.pom.sha256 +0 -1
  69. package/local-maven-repo/expo/modules/audio/expo.modules.audio/56.0.3/expo.modules.audio-56.0.3.pom.sha512 +0 -1
package/CHANGELOG.md CHANGED
@@ -10,6 +10,16 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 56.0.5 — 2026-05-13
14
+
15
+ ### 💡 Others
16
+
17
+ - Updated permission type and permission status imports to be imported from `expo` instead of `expo-modules-core` ([#45565](https://github.com/expo/expo/pull/45565) by [@Wenszel](https://github.com/Wenszel))
18
+
19
+ ## 56.0.4 — 2026-05-11
20
+
21
+ _This version does not introduce any user-facing changes._
22
+
13
23
  ## 56.0.3 — 2026-05-06
14
24
 
15
25
  _This version does not introduce any user-facing changes._
@@ -4,13 +4,13 @@ plugins {
4
4
  }
5
5
 
6
6
  group = 'expo.modules.audio'
7
- version = '56.0.3'
7
+ version = '56.0.5'
8
8
 
9
9
  android {
10
10
  namespace "expo.modules.audio"
11
11
  defaultConfig {
12
12
  versionCode 1
13
- versionName "56.0.3"
13
+ versionName "56.0.5"
14
14
  }
15
15
 
16
16
  compileOptions {
@@ -44,7 +44,6 @@ import okhttp3.OkHttpClient
44
44
  import java.io.File
45
45
  import java.util.concurrent.ConcurrentHashMap
46
46
 
47
- @DelicateCoroutinesApi
48
47
  @androidx.annotation.OptIn(androidx.media3.common.util.UnstableApi::class)
49
48
  class AudioModule : Module() {
50
49
  private lateinit var audioManager: AudioManager
@@ -200,6 +199,7 @@ class AudioModule : Module() {
200
199
  focusAcquired = false
201
200
  }
202
201
 
202
+ @OptIn(DelicateCoroutinesApi::class)
203
203
  override fun definition() = ModuleDefinition {
204
204
  Name("ExpoAudio")
205
205
 
@@ -1,4 +1,4 @@
1
- import type { PermissionResponse } from 'expo-modules-core';
1
+ import type { PermissionResponse } from 'expo';
2
2
  import { NativeModule, SharedObject } from 'expo-modules-core';
3
3
  import type { AudioMetadata, AudioMode, AudioPlaylistLoopMode, AudioPlaylistStatus, AudioSource, AudioSourceInfo, AudioStatus, PitchCorrectionQuality, RecorderState, RecordingInput, RecordingOptions, RecordingStartOptions, RecordingStatus } from './Audio.types';
4
4
  import type { AudioLockScreenOptions } from './AudioConstants';
@@ -1 +1 @@
1
- {"version":3,"file":"AudioModule.types.d.ts","sourceRoot":"","sources":["../src/AudioModule.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE/D,OAAO,KAAK,EACV,aAAa,EACb,SAAS,EACT,qBAAqB,EACrB,mBAAmB,EACnB,WAAW,EACX,eAAe,EACf,WAAW,EACX,sBAAsB,EACtB,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,qBAAqB,EACrB,eAAe,EAChB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,YAAY;IACzD,qBAAqB,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IACrD,iBAAiB,CAAC,QAAQ,EAAE,OAAO,CAAC,SAAS,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAC9D,gCA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GG;IACH,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAE3B;;;OAGG;IACH,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAEtC;;;OAGG;IACH,GAAG,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI;IAE9B;;;;OAIG;IACH,MAAM,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAEhD;;;OAGG;IACH,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAE3B;;OAEG;IACH,KAAK,IAAI,IAAI;IAEb;;OAEG;IACH,OAAO,IAAI,IAAI;CAChB"}
@@ -1 +1 @@
1
- {"version":3,"file":"AudioModule.types.js","sourceRoot":"","sources":["../src/AudioModule.types.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC","sourcesContent":["import type { PermissionResponse } from 'expo-modules-core';\nimport { NativeModule, SharedObject } from 'expo-modules-core';\n\nimport type {\n AudioMetadata,\n AudioMode,\n AudioPlaylistLoopMode,\n AudioPlaylistStatus,\n AudioSource,\n AudioSourceInfo,\n AudioStatus,\n PitchCorrectionQuality,\n RecorderState,\n RecordingInput,\n RecordingOptions,\n RecordingStartOptions,\n RecordingStatus,\n} from './Audio.types';\nimport type { AudioLockScreenOptions } from './AudioConstants';\nimport type { AudioStream } from './AudioStream.types';\n\n/**\n * @hidden\n */\nexport declare class NativeAudioModule extends NativeModule {\n setIsAudioActiveAsync(active: boolean): Promise<void>;\n setAudioModeAsync(category: Partial<AudioMode>): Promise<void>;\n requestRecordingPermissionsAsync(): Promise<PermissionResponse>;\n requestNotificationPermissionsAsync(): Promise<PermissionResponse>;\n getRecordingPermissionsAsync(): Promise<PermissionResponse>;\n preload(source: AudioSource, preferredForwardBufferDuration: number): Promise<void>;\n clearPreloadedSource(source: AudioSource): Promise<void>;\n clearAllPreloadedSources(): Promise<void>;\n getPreloadedSources(): Promise<string[]>;\n\n readonly AudioPlayer: typeof AudioPlayer;\n readonly AudioRecorder: typeof AudioRecorder;\n readonly AudioPlaylist: typeof AudioPlaylist;\n readonly AudioStream: typeof AudioStream;\n}\n\nexport declare class AudioPlayer extends SharedObject<AudioEvents> {\n /**\n * Initializes a new audio player instance with the given source.\n * @hidden\n */\n constructor(\n source: AudioSource,\n updateInterval: number,\n keepAudioSessionActive: boolean,\n preferredForwardBufferDuration: number\n );\n\n /**\n * Unique identifier for the player object.\n */\n id: string;\n\n /**\n * Boolean value indicating whether the player is currently playing.\n */\n playing: boolean;\n\n /**\n * Boolean value indicating whether the player is currently muted.\n */\n muted: boolean;\n\n /**\n * Boolean value indicating whether the player is currently looping.\n */\n loop: boolean;\n\n /**\n * Boolean value indicating whether the player is currently paused.\n */\n paused: boolean;\n\n /**\n * Boolean value indicating whether the player is finished loading.\n */\n isLoaded: boolean;\n\n /**\n * Boolean value indicating whether audio sampling is supported on the platform.\n */\n isAudioSamplingSupported: boolean;\n\n /**\n * Boolean value indicating whether the player is buffering.\n */\n isBuffering: boolean;\n\n /**\n * The current position through the audio item in seconds.\n */\n currentTime: number;\n\n /**\n * The total duration of the audio in seconds.\n */\n duration: number;\n\n /**\n * The current volume of the audio.\n *\n * **Range:** `0.0` to `1.0`. For example, `0.0` is completely silent (0%), `0.5` is half volume (50%), and `1.0` is full volume (100%).\n *\n *\n * @example\n * ```tsx\n * import { useAudioPlayer } from 'expo-audio';\n *\n * export default function App() {\n * const player = useAudioPlayer(source);\n *\n * // Mute the audio\n * player.volume = 0.0;\n *\n * // Set volume to 50%\n * player.volume = 0.5;\n *\n * // Set to full volume\n * player.volume = 1.0;\n * }\n * ```\n */\n volume: number;\n\n /**\n * The current playback rate of the audio. It accepts different values depending on the platform:\n * - **Android**: `0.1` to `2.0`\n * - **iOS**: `0.0` to `2.0`\n * - **Web**: Follows browser implementation\n *\n * @example\n * ```tsx\n * import { useAudioPlayer } from 'expo-audio';\n *\n * export default function App() {\n * const player = useAudioPlayer(source);\n *\n * // Normal playback speed\n * player.playbackRate = 1.0;\n *\n * // Slow motion (half speed)\n * player.playbackRate = 0.5;\n *\n * // Fast playback (1.5x speed)\n * player.playbackRate = 1.5;\n *\n * // Maximum speed on mobile\n * player.playbackRate = 2.0;\n * }\n * ```\n */\n playbackRate: number;\n\n /**\n * A boolean describing if we are correcting the pitch for a changed rate.\n */\n shouldCorrectPitch: boolean;\n\n /**\n * The current status of the audio player.\n * @hidden\n */\n currentStatus: AudioStatus;\n\n /**\n * Start playing audio.\n */\n play(): void;\n\n /**\n * Pauses the player.\n */\n pause(): void;\n\n /**\n * Replaces the current audio source with a new one.\n */\n replace(source: AudioSource): void;\n\n /**\n * Seeks the playback by the given number of seconds.\n * @param seconds The number of seconds to seek by.\n * @param toleranceMillisBefore The tolerance allowed before the requested seek time, in milliseconds. iOS only.\n * @param toleranceMillisAfter The tolerance allowed after the requested seek time, in milliseconds. iOS only.\n */\n seekTo(\n seconds: number,\n toleranceMillisBefore?: number,\n toleranceMillisAfter?: number\n ): Promise<void>;\n\n /**\n * Sets the current playback rate of the audio.\n *\n * @param rate The playback rate of the audio. See [`playbackRate`](#playbackrate) property for detailed range information.\n * @param pitchCorrectionQuality The quality of the pitch correction.\n */\n setPlaybackRate(rate: number, pitchCorrectionQuality?: PitchCorrectionQuality): void;\n\n /**\n *\n * @hidden\n */\n setAudioSamplingEnabled(enabled: boolean): void;\n\n /**\n * Sets or removes this audio player as the active player for lock screen controls.\n * Only one player can control the lock screen at a time.\n *\n * > **Note:** For lock screen controls to work correctly, [`interruptionMode`](#interruptionmode) must be set to `doNotMix` using [`setAudioModeAsync`](#audiosetaudiomodeasyncmode).\n * > Without this, the OS might not associate lock screen controls with your player.\n *\n * @param active Whether this player should be active for lock screen controls.\n * @param metadata Optional metadata to display on the lock screen (title, artist, album, artwork).\n * @param options Optional configuration to configure the lock screen controls.\n */\n setActiveForLockScreen(\n active: boolean,\n metadata?: AudioMetadata,\n options?: AudioLockScreenOptions\n ): void;\n\n /**\n * Updates the metadata displayed on the lock screen for this player.\n * This method only has an effect if this player is currently active for lock screen controls.\n * @param metadata The metadata to display (title, artist, album, artwork).\n */\n updateLockScreenMetadata(metadata: AudioMetadata): void;\n\n /**\n * Removes this player from lock screen controls if it's currently active.\n * This will clear the lock screen's now playing info.\n */\n clearLockScreenControls(): void;\n\n /**\n * Remove the player from memory to free up resources.\n */\n remove(): void;\n}\n\n/**\n * Represents a single audio sample containing waveform data from all audio channels.\n *\n * Audio samples are provided in real-time when audio sampling is enabled on an `AudioPlayer`.\n * Each sample contains the raw PCM audio data for all channels (mono has 1 channel, stereo has 2).\n * This data can be used for audio visualization, analysis, or processing.\n */\nexport type AudioSample = {\n /** Array of audio channels, each containing PCM frame data. Stereo audio will have 2 channels (left/right). */\n channels: AudioSampleChannel[];\n /** Timestamp of this sample relative to the audio track's timeline, in seconds. */\n timestamp: number;\n};\n\n/**\n * Represents audio data for a single channel (for example, left or right in stereo audio).\n *\n * Contains the raw PCM (Pulse Code Modulation) audio frames for this channel.\n * Frame values are normalized between -1.0 and 1.0, where 0 represents silence.\n */\nexport type AudioSampleChannel = {\n /** Array of PCM audio frame values, each between -1.0 and 1.0. */\n frames: number[];\n};\n\n/**\n * Event types that an `AudioPlayer` can emit.\n *\n * These events allow you to listen for changes in playback state and receive real-time audio data.\n * Use `player.addListener()` to subscribe to these events.\n */\nexport type AudioEvents = {\n /** Fired when the player's status changes (play/pause/seek/load and so on.). */\n playbackStatusUpdate(status: AudioStatus): void;\n /** Fired when audio sampling is enabled and new sample data is available. */\n audioSampleUpdate(data: AudioSample): void;\n};\n\nexport declare class AudioRecorder extends SharedObject<RecordingEvents> {\n /**\n * Initializes a new audio recorder instance with the given source.\n * @hidden\n */\n constructor(options: Partial<RecordingOptions>);\n\n /**\n * Unique identifier for the recorder object.\n */\n id: string;\n\n /**\n * The current length of the recording, in seconds.\n */\n currentTime: number;\n\n /**\n * Boolean value indicating whether the recording is in progress.\n */\n isRecording: boolean;\n\n /**\n * The uri of the recording.\n */\n uri: string | null;\n\n /**\n * Starts the recording.\n * @param options Optional recording configuration options.\n */\n record(options?: RecordingStartOptions): void;\n\n /**\n * Stop the recording.\n */\n stop(): Promise<void>;\n\n /**\n * Pause the recording.\n */\n pause(): void;\n\n /**\n * Returns a list of available recording inputs. This method can only be called if the `Recording` has been prepared.\n * @return A `Promise` that is fulfilled with an array of `RecordingInput` objects.\n */\n getAvailableInputs(): RecordingInput[];\n\n /**\n * Returns the currently-selected recording input. This method can only be called if the `Recording` has been prepared.\n * @return A `Promise` that is fulfilled with a `RecordingInput` object.\n */\n getCurrentInput(): Promise<RecordingInput>;\n\n /**\n * Sets the current recording input.\n * @param inputUid The uid of a `RecordingInput`.\n * @return A `Promise` that is resolved if successful or rejected if not.\n */\n setInput(inputUid: string): void;\n\n /**\n * Status of the current recording.\n */\n getStatus(): RecorderState;\n\n /**\n * Starts the recording at the given time.\n * @param seconds The time in seconds to start recording at.\n * @deprecated Use `record({ atTime: seconds })` instead.\n */\n startRecordingAtTime(seconds: number): void;\n\n /**\n * Prepares the recording for recording.\n */\n prepareToRecordAsync(options?: Partial<RecordingOptions>): Promise<void>;\n\n /**\n * Stops the recording once the specified time has elapsed.\n * @param seconds The time in seconds to stop recording at.\n * @deprecated Use `record({ forDuration: seconds })` instead.\n */\n recordForDuration(seconds: number): void;\n}\n\n/**\n * Event types that an `AudioRecorder` can emit.\n *\n * These events are used internally by `expo-audio` hooks to provide real-time status updates.\n * Use `useAudioRecorderState()` or the `statusListener` parameter in `useAudioRecorder()` instead of subscribing directly.\n */\nexport type RecordingEvents = {\n /** Fired when the recorder's status changes (start/stop/pause/error, and so on). */\n recordingStatusUpdate: (status: RecordingStatus) => void;\n};\n\n/**\n * Event types that an `AudioPlaylist` can emit.\n *\n * These events allow you to listen for changes in playlist playback state.\n * Use `playlist.addListener()` to subscribe to these events.\n */\nexport type AudioPlaylistEvents = {\n /** Fired when the playlist's status changes (play/pause/seek/load/track change). */\n playlistStatusUpdate(status: AudioPlaylistStatus): void;\n /** Fired when the current track changes (next/previous/skip). */\n trackChanged(data: { previousIndex: number; currentIndex: number }): void;\n};\n\nexport declare class AudioPlaylist extends SharedObject<AudioPlaylistEvents> {\n /**\n * Initializes a new audio playlist instance.\n * @hidden\n */\n constructor(sources: AudioSource[], updateInterval: number, loop: AudioPlaylistLoopMode);\n\n /**\n * Unique identifier for the playlist instance.\n */\n id: string;\n\n /**\n * Index of the currently playing track in the playlist.\n */\n readonly currentIndex: number;\n\n /**\n * Total number of tracks in the playlist.\n */\n readonly trackCount: number;\n\n /**\n * The audio sources currently in the playlist.\n */\n readonly sources: AudioSourceInfo[];\n\n /**\n * Boolean value indicating whether the playlist is currently playing.\n */\n playing: boolean;\n\n /**\n * Boolean value indicating whether the playlist is currently muted.\n */\n muted: boolean;\n\n /**\n * Boolean value indicating whether the current track has finished loading.\n */\n isLoaded: boolean;\n\n /**\n * Boolean value indicating whether the playlist is buffering.\n */\n isBuffering: boolean;\n\n /**\n * Current playback position in seconds.\n */\n currentTime: number;\n\n /**\n * Duration of the current track in seconds.\n */\n duration: number;\n\n /**\n * Current volume (0.0 to 1.0).\n */\n volume: number;\n\n /**\n * Current playback rate (1.0 = normal speed).\n */\n playbackRate: number;\n\n /**\n * Current loop mode.\n */\n loop: AudioPlaylistLoopMode;\n\n /**\n * The current status of the audio playlist.\n * @hidden\n */\n currentStatus: AudioPlaylistStatus;\n\n /**\n * Start playing the current track in the playlist.\n */\n play(): void;\n\n /**\n * Pause playback.\n */\n pause(): void;\n\n /**\n * Skip to the next track in the playlist.\n * If at the end of the playlist and loop mode is 'all', wraps to the first track.\n * If loop mode is 'none' and at the end, does nothing.\n */\n next(): void;\n\n /**\n * Skip to the previous track in the playlist.\n * If at the beginning of the playlist and loop mode is 'all', wraps to the last track.\n * If loop mode is 'none' and at the beginning, does nothing.\n */\n previous(): void;\n\n /**\n * Skip to a specific track in the playlist by index.\n * @param index The index of the track to skip to.\n */\n skipTo(index: number): void;\n\n /**\n * Seeks the playback to a specific position in seconds.\n * @param seconds The position to seek to.\n */\n seekTo(seconds: number): Promise<void>;\n\n /**\n * Add a track to the end of the playlist.\n * @param source The audio source to add.\n */\n add(source: AudioSource): void;\n\n /**\n * Insert a track at a specific position in the playlist.\n * @param source The audio source to insert.\n * @param index The position to insert at.\n */\n insert(source: AudioSource, index: number): void;\n\n /**\n * Remove a track from the playlist by index.\n * @param index The index of the track to remove.\n */\n remove(index: number): void;\n\n /**\n * Clear all tracks from the playlist.\n */\n clear(): void;\n\n /**\n * Destroy the playlist and free up resources.\n */\n destroy(): void;\n}\n"]}
1
+ {"version":3,"file":"AudioModule.types.js","sourceRoot":"","sources":["../src/AudioModule.types.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC","sourcesContent":["import type { PermissionResponse } from 'expo';\nimport { NativeModule, SharedObject } from 'expo-modules-core';\n\nimport type {\n AudioMetadata,\n AudioMode,\n AudioPlaylistLoopMode,\n AudioPlaylistStatus,\n AudioSource,\n AudioSourceInfo,\n AudioStatus,\n PitchCorrectionQuality,\n RecorderState,\n RecordingInput,\n RecordingOptions,\n RecordingStartOptions,\n RecordingStatus,\n} from './Audio.types';\nimport type { AudioLockScreenOptions } from './AudioConstants';\nimport type { AudioStream } from './AudioStream.types';\n\n/**\n * @hidden\n */\nexport declare class NativeAudioModule extends NativeModule {\n setIsAudioActiveAsync(active: boolean): Promise<void>;\n setAudioModeAsync(category: Partial<AudioMode>): Promise<void>;\n requestRecordingPermissionsAsync(): Promise<PermissionResponse>;\n requestNotificationPermissionsAsync(): Promise<PermissionResponse>;\n getRecordingPermissionsAsync(): Promise<PermissionResponse>;\n preload(source: AudioSource, preferredForwardBufferDuration: number): Promise<void>;\n clearPreloadedSource(source: AudioSource): Promise<void>;\n clearAllPreloadedSources(): Promise<void>;\n getPreloadedSources(): Promise<string[]>;\n\n readonly AudioPlayer: typeof AudioPlayer;\n readonly AudioRecorder: typeof AudioRecorder;\n readonly AudioPlaylist: typeof AudioPlaylist;\n readonly AudioStream: typeof AudioStream;\n}\n\nexport declare class AudioPlayer extends SharedObject<AudioEvents> {\n /**\n * Initializes a new audio player instance with the given source.\n * @hidden\n */\n constructor(\n source: AudioSource,\n updateInterval: number,\n keepAudioSessionActive: boolean,\n preferredForwardBufferDuration: number\n );\n\n /**\n * Unique identifier for the player object.\n */\n id: string;\n\n /**\n * Boolean value indicating whether the player is currently playing.\n */\n playing: boolean;\n\n /**\n * Boolean value indicating whether the player is currently muted.\n */\n muted: boolean;\n\n /**\n * Boolean value indicating whether the player is currently looping.\n */\n loop: boolean;\n\n /**\n * Boolean value indicating whether the player is currently paused.\n */\n paused: boolean;\n\n /**\n * Boolean value indicating whether the player is finished loading.\n */\n isLoaded: boolean;\n\n /**\n * Boolean value indicating whether audio sampling is supported on the platform.\n */\n isAudioSamplingSupported: boolean;\n\n /**\n * Boolean value indicating whether the player is buffering.\n */\n isBuffering: boolean;\n\n /**\n * The current position through the audio item in seconds.\n */\n currentTime: number;\n\n /**\n * The total duration of the audio in seconds.\n */\n duration: number;\n\n /**\n * The current volume of the audio.\n *\n * **Range:** `0.0` to `1.0`. For example, `0.0` is completely silent (0%), `0.5` is half volume (50%), and `1.0` is full volume (100%).\n *\n *\n * @example\n * ```tsx\n * import { useAudioPlayer } from 'expo-audio';\n *\n * export default function App() {\n * const player = useAudioPlayer(source);\n *\n * // Mute the audio\n * player.volume = 0.0;\n *\n * // Set volume to 50%\n * player.volume = 0.5;\n *\n * // Set to full volume\n * player.volume = 1.0;\n * }\n * ```\n */\n volume: number;\n\n /**\n * The current playback rate of the audio. It accepts different values depending on the platform:\n * - **Android**: `0.1` to `2.0`\n * - **iOS**: `0.0` to `2.0`\n * - **Web**: Follows browser implementation\n *\n * @example\n * ```tsx\n * import { useAudioPlayer } from 'expo-audio';\n *\n * export default function App() {\n * const player = useAudioPlayer(source);\n *\n * // Normal playback speed\n * player.playbackRate = 1.0;\n *\n * // Slow motion (half speed)\n * player.playbackRate = 0.5;\n *\n * // Fast playback (1.5x speed)\n * player.playbackRate = 1.5;\n *\n * // Maximum speed on mobile\n * player.playbackRate = 2.0;\n * }\n * ```\n */\n playbackRate: number;\n\n /**\n * A boolean describing if we are correcting the pitch for a changed rate.\n */\n shouldCorrectPitch: boolean;\n\n /**\n * The current status of the audio player.\n * @hidden\n */\n currentStatus: AudioStatus;\n\n /**\n * Start playing audio.\n */\n play(): void;\n\n /**\n * Pauses the player.\n */\n pause(): void;\n\n /**\n * Replaces the current audio source with a new one.\n */\n replace(source: AudioSource): void;\n\n /**\n * Seeks the playback by the given number of seconds.\n * @param seconds The number of seconds to seek by.\n * @param toleranceMillisBefore The tolerance allowed before the requested seek time, in milliseconds. iOS only.\n * @param toleranceMillisAfter The tolerance allowed after the requested seek time, in milliseconds. iOS only.\n */\n seekTo(\n seconds: number,\n toleranceMillisBefore?: number,\n toleranceMillisAfter?: number\n ): Promise<void>;\n\n /**\n * Sets the current playback rate of the audio.\n *\n * @param rate The playback rate of the audio. See [`playbackRate`](#playbackrate) property for detailed range information.\n * @param pitchCorrectionQuality The quality of the pitch correction.\n */\n setPlaybackRate(rate: number, pitchCorrectionQuality?: PitchCorrectionQuality): void;\n\n /**\n *\n * @hidden\n */\n setAudioSamplingEnabled(enabled: boolean): void;\n\n /**\n * Sets or removes this audio player as the active player for lock screen controls.\n * Only one player can control the lock screen at a time.\n *\n * > **Note:** For lock screen controls to work correctly, [`interruptionMode`](#interruptionmode) must be set to `doNotMix` using [`setAudioModeAsync`](#audiosetaudiomodeasyncmode).\n * > Without this, the OS might not associate lock screen controls with your player.\n *\n * @param active Whether this player should be active for lock screen controls.\n * @param metadata Optional metadata to display on the lock screen (title, artist, album, artwork).\n * @param options Optional configuration to configure the lock screen controls.\n */\n setActiveForLockScreen(\n active: boolean,\n metadata?: AudioMetadata,\n options?: AudioLockScreenOptions\n ): void;\n\n /**\n * Updates the metadata displayed on the lock screen for this player.\n * This method only has an effect if this player is currently active for lock screen controls.\n * @param metadata The metadata to display (title, artist, album, artwork).\n */\n updateLockScreenMetadata(metadata: AudioMetadata): void;\n\n /**\n * Removes this player from lock screen controls if it's currently active.\n * This will clear the lock screen's now playing info.\n */\n clearLockScreenControls(): void;\n\n /**\n * Remove the player from memory to free up resources.\n */\n remove(): void;\n}\n\n/**\n * Represents a single audio sample containing waveform data from all audio channels.\n *\n * Audio samples are provided in real-time when audio sampling is enabled on an `AudioPlayer`.\n * Each sample contains the raw PCM audio data for all channels (mono has 1 channel, stereo has 2).\n * This data can be used for audio visualization, analysis, or processing.\n */\nexport type AudioSample = {\n /** Array of audio channels, each containing PCM frame data. Stereo audio will have 2 channels (left/right). */\n channels: AudioSampleChannel[];\n /** Timestamp of this sample relative to the audio track's timeline, in seconds. */\n timestamp: number;\n};\n\n/**\n * Represents audio data for a single channel (for example, left or right in stereo audio).\n *\n * Contains the raw PCM (Pulse Code Modulation) audio frames for this channel.\n * Frame values are normalized between -1.0 and 1.0, where 0 represents silence.\n */\nexport type AudioSampleChannel = {\n /** Array of PCM audio frame values, each between -1.0 and 1.0. */\n frames: number[];\n};\n\n/**\n * Event types that an `AudioPlayer` can emit.\n *\n * These events allow you to listen for changes in playback state and receive real-time audio data.\n * Use `player.addListener()` to subscribe to these events.\n */\nexport type AudioEvents = {\n /** Fired when the player's status changes (play/pause/seek/load and so on.). */\n playbackStatusUpdate(status: AudioStatus): void;\n /** Fired when audio sampling is enabled and new sample data is available. */\n audioSampleUpdate(data: AudioSample): void;\n};\n\nexport declare class AudioRecorder extends SharedObject<RecordingEvents> {\n /**\n * Initializes a new audio recorder instance with the given source.\n * @hidden\n */\n constructor(options: Partial<RecordingOptions>);\n\n /**\n * Unique identifier for the recorder object.\n */\n id: string;\n\n /**\n * The current length of the recording, in seconds.\n */\n currentTime: number;\n\n /**\n * Boolean value indicating whether the recording is in progress.\n */\n isRecording: boolean;\n\n /**\n * The uri of the recording.\n */\n uri: string | null;\n\n /**\n * Starts the recording.\n * @param options Optional recording configuration options.\n */\n record(options?: RecordingStartOptions): void;\n\n /**\n * Stop the recording.\n */\n stop(): Promise<void>;\n\n /**\n * Pause the recording.\n */\n pause(): void;\n\n /**\n * Returns a list of available recording inputs. This method can only be called if the `Recording` has been prepared.\n * @return A `Promise` that is fulfilled with an array of `RecordingInput` objects.\n */\n getAvailableInputs(): RecordingInput[];\n\n /**\n * Returns the currently-selected recording input. This method can only be called if the `Recording` has been prepared.\n * @return A `Promise` that is fulfilled with a `RecordingInput` object.\n */\n getCurrentInput(): Promise<RecordingInput>;\n\n /**\n * Sets the current recording input.\n * @param inputUid The uid of a `RecordingInput`.\n * @return A `Promise` that is resolved if successful or rejected if not.\n */\n setInput(inputUid: string): void;\n\n /**\n * Status of the current recording.\n */\n getStatus(): RecorderState;\n\n /**\n * Starts the recording at the given time.\n * @param seconds The time in seconds to start recording at.\n * @deprecated Use `record({ atTime: seconds })` instead.\n */\n startRecordingAtTime(seconds: number): void;\n\n /**\n * Prepares the recording for recording.\n */\n prepareToRecordAsync(options?: Partial<RecordingOptions>): Promise<void>;\n\n /**\n * Stops the recording once the specified time has elapsed.\n * @param seconds The time in seconds to stop recording at.\n * @deprecated Use `record({ forDuration: seconds })` instead.\n */\n recordForDuration(seconds: number): void;\n}\n\n/**\n * Event types that an `AudioRecorder` can emit.\n *\n * These events are used internally by `expo-audio` hooks to provide real-time status updates.\n * Use `useAudioRecorderState()` or the `statusListener` parameter in `useAudioRecorder()` instead of subscribing directly.\n */\nexport type RecordingEvents = {\n /** Fired when the recorder's status changes (start/stop/pause/error, and so on). */\n recordingStatusUpdate: (status: RecordingStatus) => void;\n};\n\n/**\n * Event types that an `AudioPlaylist` can emit.\n *\n * These events allow you to listen for changes in playlist playback state.\n * Use `playlist.addListener()` to subscribe to these events.\n */\nexport type AudioPlaylistEvents = {\n /** Fired when the playlist's status changes (play/pause/seek/load/track change). */\n playlistStatusUpdate(status: AudioPlaylistStatus): void;\n /** Fired when the current track changes (next/previous/skip). */\n trackChanged(data: { previousIndex: number; currentIndex: number }): void;\n};\n\nexport declare class AudioPlaylist extends SharedObject<AudioPlaylistEvents> {\n /**\n * Initializes a new audio playlist instance.\n * @hidden\n */\n constructor(sources: AudioSource[], updateInterval: number, loop: AudioPlaylistLoopMode);\n\n /**\n * Unique identifier for the playlist instance.\n */\n id: string;\n\n /**\n * Index of the currently playing track in the playlist.\n */\n readonly currentIndex: number;\n\n /**\n * Total number of tracks in the playlist.\n */\n readonly trackCount: number;\n\n /**\n * The audio sources currently in the playlist.\n */\n readonly sources: AudioSourceInfo[];\n\n /**\n * Boolean value indicating whether the playlist is currently playing.\n */\n playing: boolean;\n\n /**\n * Boolean value indicating whether the playlist is currently muted.\n */\n muted: boolean;\n\n /**\n * Boolean value indicating whether the current track has finished loading.\n */\n isLoaded: boolean;\n\n /**\n * Boolean value indicating whether the playlist is buffering.\n */\n isBuffering: boolean;\n\n /**\n * Current playback position in seconds.\n */\n currentTime: number;\n\n /**\n * Duration of the current track in seconds.\n */\n duration: number;\n\n /**\n * Current volume (0.0 to 1.0).\n */\n volume: number;\n\n /**\n * Current playback rate (1.0 = normal speed).\n */\n playbackRate: number;\n\n /**\n * Current loop mode.\n */\n loop: AudioPlaylistLoopMode;\n\n /**\n * The current status of the audio playlist.\n * @hidden\n */\n currentStatus: AudioPlaylistStatus;\n\n /**\n * Start playing the current track in the playlist.\n */\n play(): void;\n\n /**\n * Pause playback.\n */\n pause(): void;\n\n /**\n * Skip to the next track in the playlist.\n * If at the end of the playlist and loop mode is 'all', wraps to the first track.\n * If loop mode is 'none' and at the end, does nothing.\n */\n next(): void;\n\n /**\n * Skip to the previous track in the playlist.\n * If at the beginning of the playlist and loop mode is 'all', wraps to the last track.\n * If loop mode is 'none' and at the beginning, does nothing.\n */\n previous(): void;\n\n /**\n * Skip to a specific track in the playlist by index.\n * @param index The index of the track to skip to.\n */\n skipTo(index: number): void;\n\n /**\n * Seeks the playback to a specific position in seconds.\n * @param seconds The position to seek to.\n */\n seekTo(seconds: number): Promise<void>;\n\n /**\n * Add a track to the end of the playlist.\n * @param source The audio source to add.\n */\n add(source: AudioSource): void;\n\n /**\n * Insert a track at a specific position in the playlist.\n * @param source The audio source to insert.\n * @param index The position to insert at.\n */\n insert(source: AudioSource, index: number): void;\n\n /**\n * Remove a track from the playlist by index.\n * @param index The index of the track to remove.\n */\n remove(index: number): void;\n\n /**\n * Clear all tracks from the playlist.\n */\n clear(): void;\n\n /**\n * Destroy the playlist and free up resources.\n */\n destroy(): void;\n}\n"]}
@@ -1,4 +1,4 @@
1
- import type { PermissionResponse } from 'expo-modules-core';
1
+ import { type PermissionResponse } from 'expo';
2
2
  import type { AudioMode, AudioSource } from './Audio.types';
3
3
  export { AudioPlayerWeb } from './AudioPlayer.web';
4
4
  export { AudioPlaylistWeb } from './AudioPlaylist.web';
@@ -1 +1 @@
1
- {"version":3,"file":"AudioModule.web.d.ts","sourceRoot":"","sources":["../src/AudioModule.web.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAG5D,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAI5D,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,eAAO,IAAI,aAAa,SAAO,CAAC;AAuBhC,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,SAAS,iBAAI;AAC3D,wBAAsB,qBAAqB,CAAC,MAAM,EAAE,OAAO,iBAS1D;AAED,wBAAsB,YAAY,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAarE;AAED,wBAAgB,OAAO,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,CAEjD;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,CAS9D;AAED,wBAAgB,wBAAwB,IAAI,IAAI,CAK/C;AAED,wBAAgB,mBAAmB,IAAI,MAAM,EAAE,CAE9C;AAED,wBAAsB,4BAA4B,IAAI,OAAO,CAAC,kBAAkB,CAAC,CAoBhF;AAED,wBAAsB,gCAAgC,IAAI,OAAO,CAAC,kBAAkB,CAAC,CAkBpF"}
1
+ {"version":3,"file":"AudioModule.web.d.ts","sourceRoot":"","sources":["../src/AudioModule.web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,kBAAkB,EAAoB,MAAM,MAAM,CAAC;AAEjE,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAI5D,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,eAAO,IAAI,aAAa,SAAO,CAAC;AAuBhC,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,SAAS,iBAAI;AAC3D,wBAAsB,qBAAqB,CAAC,MAAM,EAAE,OAAO,iBAS1D;AAED,wBAAsB,YAAY,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAarE;AAED,wBAAgB,OAAO,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,CAEjD;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,CAS9D;AAED,wBAAgB,wBAAwB,IAAI,IAAI,CAK/C;AAED,wBAAgB,mBAAmB,IAAI,MAAM,EAAE,CAE9C;AAED,wBAAsB,4BAA4B,IAAI,OAAO,CAAC,kBAAkB,CAAC,CAoBhF;AAED,wBAAsB,gCAAgC,IAAI,OAAO,CAAC,kBAAkB,CAAC,CAkBpF"}
@@ -1,4 +1,4 @@
1
- import { PermissionStatus } from 'expo-modules-core';
1
+ import { PermissionStatus } from 'expo';
2
2
  import { activePlayers } from './AudioPlayer.web';
3
3
  import { getUserMedia, getSourceUri, preloadCache } from './AudioUtils.web';
4
4
  export { AudioPlayerWeb } from './AudioPlayer.web';
@@ -1 +1 @@
1
- {"version":3,"file":"AudioModule.web.js","sourceRoot":"","sources":["../src/AudioModule.web.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAGrD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAE5E,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,MAAM,CAAC,IAAI,aAAa,GAAG,IAAI,CAAC;AAEhC,KAAK,UAAU,2BAA2B,CACxC,IAAwC;IAExC,IAAI,CAAC,SAAS,IAAI,CAAC,SAAS,CAAC,WAAW,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IAEtF,IAAI,CAAC;QACH,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC;QAC9D,QAAQ,KAAK,EAAE,CAAC;YACd,KAAK,SAAS;gBACZ,OAAO,gBAAgB,CAAC,OAAO,CAAC;YAClC,KAAK,QAAQ;gBACX,OAAO,gBAAgB,CAAC,MAAM,CAAC;YACjC;gBACE,OAAO,gBAAgB,CAAC,YAAY,CAAC;QACzC,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,0IAA0I;QAC1I,OAAO,gBAAgB,CAAC,YAAY,CAAC;IACvC,CAAC;AACH,CAAC;AAED,MAAM,CAAC,KA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gC,EAAE,CAAC;IACpD,CAAC;AACH,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,gCAAgC;IACpD,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;QACnD,MAAM,CAAC,SAAS,EAAE,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;QACpD,OAAO;YACL,MAAM,EAAE,gBAAgB,CAAC,OAAO;YAChC,OAAO,EAAE,OAAO;YAChB,WAAW,EAAE,IAAI;YACjB,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;IAAC,MAAM,CAAC;QACP,OAAO;YACL,MAAM,EAAE,gBAAgB,CAAC,MAAM;YAC/B,OAAO,EAAE,OAAO;YAChB,WAAW,EAAE,IAAI;YACjB,OAAO,EAAE,KAAK;SACf,CAAC;IACJ,CAAC;AACH,CAAC","sourcesContent":["import type { PermissionResponse } from 'expo-modules-core';\nimport { PermissionStatus } from 'expo-modules-core';\n\nimport type { AudioMode, AudioSource } from './Audio.types';\nimport { activePlayers } from './AudioPlayer.web';\nimport { getUserMedia, getSourceUri, preloadCache } from './AudioUtils.web';\n\nexport { AudioPlayerWeb } from './AudioPlayer.web';\nexport { AudioPlaylistWeb } from './AudioPlaylist.web';\nexport { AudioRecorderWeb } from './AudioRecorder.web';\n\nexport let isAudioActive = true;\n\nasync function getPermissionWithQueryAsync(\n name: PermissionNameWithAdditionalValues\n): Promise<PermissionStatus | null> {\n if (!navigator || !navigator.permissions || !navigator.permissions.query) return null;\n\n try {\n const { state } = await navigator.permissions.query({ name });\n switch (state) {\n case 'granted':\n return PermissionStatus.GRANTED;\n case 'denied':\n return PermissionStatus.DENIED;\n default:\n return PermissionStatus.UNDETERMINED;\n }\n } catch {\n // Firefox - TypeError: 'microphone' (value of 'name' member of PermissionDescriptor) is not a valid value for enumeration PermissionName.\n return PermissionStatus.UNDETERMINED;\n }\n}\n\nexport async function setAudioModeAsync(mode: AudioMode) {}\nexport async function setIsAudioActiveAsync(active: boolean) {\n isAudioActive = active;\n if (!active) {\n for (const player of activePlayers) {\n if (player.playing) {\n player.pause();\n }\n }\n }\n}\n\nexport async function preloadAsync(source: AudioSource): Promise<void> {\n const uri = getSourceUri(source);\n if (!uri || preloadCache.has(uri)) return;\n\n const headers =\n source && typeof source === 'object' && !Array.isArray(source) ? source.headers : undefined;\n\n const response = await fetch(uri, headers ? { headers } : undefined);\n const blob = await response.blob();\n const blobUrl = URL.createObjectURL(blob);\n const audio = new Audio(blobUrl);\n audio.preload = 'auto';\n preloadCache.set(uri, { blobUrl, audio });\n}\n\nexport function preload(source: AudioSource): void {\n preloadAsync(source).catch(() => {});\n}\n\nexport function clearPreloadedSource(source: AudioSource): void {\n const uri = getSourceUri(source);\n if (!uri) return;\n\n const cached = preloadCache.get(uri);\n if (cached) {\n URL.revokeObjectURL(cached.blobUrl);\n preloadCache.delete(uri);\n }\n}\n\nexport function clearAllPreloadedSources(): void {\n for (const cached of preloadCache.values()) {\n URL.revokeObjectURL(cached.blobUrl);\n }\n preloadCache.clear();\n}\n\nexport function getPreloadedSources(): string[] {\n return Array.from(preloadCache.keys());\n}\n\nexport async function getRecordingPermissionsAsync(): Promise<PermissionResponse> {\n const maybeStatus = await getPermissionWithQueryAsync('microphone');\n switch (maybeStatus) {\n case PermissionStatus.GRANTED:\n return {\n status: PermissionStatus.GRANTED,\n expires: 'never',\n canAskAgain: true,\n granted: true,\n };\n case PermissionStatus.DENIED:\n return {\n status: PermissionStatus.DENIED,\n expires: 'never',\n canAskAgain: true,\n granted: false,\n };\n default:\n return await requestRecordingPermissionsAsync();\n }\n}\n\nexport async function requestRecordingPermissionsAsync(): Promise<PermissionResponse> {\n try {\n const stream = await getUserMedia({ audio: true });\n stream.getTracks().forEach((track) => track.stop());\n return {\n status: PermissionStatus.GRANTED,\n expires: 'never',\n canAskAgain: true,\n granted: true,\n };\n } catch {\n return {\n status: PermissionStatus.DENIED,\n expires: 'never',\n canAskAgain: true,\n granted: false,\n };\n }\n}\n"]}
1
+ {"version":3,"file":"AudioModule.web.js","sourceRoot":"","sources":["../src/AudioModule.web.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,gBAAgB,EAAE,MAAM,MAAM,CAAC;AAGjE,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAE5E,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,MAAM,CAAC,IAAI,aAAa,GAAG,IAAI,CAAC;AAEhC,KAAK,UAAU,2BAA2B,CACxC,IAAwC;IAExC,IAAI,CAAC,SAAS,IAAI,CAAC,SAAS,CAAC,WAAW,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IAEtF,IAAI,CAAC;QACH,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC;QAC9D,QAAQ,KAAK,EAAE,CAAC;YACd,KAAK,SAAS;gBACZ,OAAO,gBAAgB,CAAC,OAAO,CAAC;YAClC,KAAK,QAAQ;gBACX,OAAO,gBAAgB,CAAC,MAAM,CAAC;YACjC;gBACE,OAAO,gBAAgB,CAAC,YAAY,CAAC;QACzC,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,0IAA0I;QAC1I,OAAO,gBAAgB,CAAC,YAAY,CAAC;IACvC,CAAC;AACH,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,IAAe,IAAG,CAAC;AAC3D,MAAM,CAAC,KAAK,UAAU,qB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IACpD,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;QACnD,MAAM,CAAC,SAAS,EAAE,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;QACpD,OAAO;YACL,MAAM,EAAE,gBAAgB,CAAC,OAAO;YAChC,OAAO,EAAE,OAAO;YAChB,WAAW,EAAE,IAAI;YACjB,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;IAAC,MAAM,CAAC;QACP,OAAO;YACL,MAAM,EAAE,gBAAgB,CAAC,MAAM;YAC/B,OAAO,EAAE,OAAO;YAChB,WAAW,EAAE,IAAI;YACjB,OAAO,EAAE,KAAK;SACf,CAAC;IACJ,CAAC;AACH,CAAC","sourcesContent":["import { type PermissionResponse, PermissionStatus } from 'expo';\n\nimport type { AudioMode, AudioSource } from './Audio.types';\nimport { activePlayers } from './AudioPlayer.web';\nimport { getUserMedia, getSourceUri, preloadCache } from './AudioUtils.web';\n\nexport { AudioPlayerWeb } from './AudioPlayer.web';\nexport { AudioPlaylistWeb } from './AudioPlaylist.web';\nexport { AudioRecorderWeb } from './AudioRecorder.web';\n\nexport let isAudioActive = true;\n\nasync function getPermissionWithQueryAsync(\n name: PermissionNameWithAdditionalValues\n): Promise<PermissionStatus | null> {\n if (!navigator || !navigator.permissions || !navigator.permissions.query) return null;\n\n try {\n const { state } = await navigator.permissions.query({ name });\n switch (state) {\n case 'granted':\n return PermissionStatus.GRANTED;\n case 'denied':\n return PermissionStatus.DENIED;\n default:\n return PermissionStatus.UNDETERMINED;\n }\n } catch {\n // Firefox - TypeError: 'microphone' (value of 'name' member of PermissionDescriptor) is not a valid value for enumeration PermissionName.\n return PermissionStatus.UNDETERMINED;\n }\n}\n\nexport async function setAudioModeAsync(mode: AudioMode) {}\nexport async function setIsAudioActiveAsync(active: boolean) {\n isAudioActive = active;\n if (!active) {\n for (const player of activePlayers) {\n if (player.playing) {\n player.pause();\n }\n }\n }\n}\n\nexport async function preloadAsync(source: AudioSource): Promise<void> {\n const uri = getSourceUri(source);\n if (!uri || preloadCache.has(uri)) return;\n\n const headers =\n source && typeof source === 'object' && !Array.isArray(source) ? source.headers : undefined;\n\n const response = await fetch(uri, headers ? { headers } : undefined);\n const blob = await response.blob();\n const blobUrl = URL.createObjectURL(blob);\n const audio = new Audio(blobUrl);\n audio.preload = 'auto';\n preloadCache.set(uri, { blobUrl, audio });\n}\n\nexport function preload(source: AudioSource): void {\n preloadAsync(source).catch(() => {});\n}\n\nexport function clearPreloadedSource(source: AudioSource): void {\n const uri = getSourceUri(source);\n if (!uri) return;\n\n const cached = preloadCache.get(uri);\n if (cached) {\n URL.revokeObjectURL(cached.blobUrl);\n preloadCache.delete(uri);\n }\n}\n\nexport function clearAllPreloadedSources(): void {\n for (const cached of preloadCache.values()) {\n URL.revokeObjectURL(cached.blobUrl);\n }\n preloadCache.clear();\n}\n\nexport function getPreloadedSources(): string[] {\n return Array.from(preloadCache.keys());\n}\n\nexport async function getRecordingPermissionsAsync(): Promise<PermissionResponse> {\n const maybeStatus = await getPermissionWithQueryAsync('microphone');\n switch (maybeStatus) {\n case PermissionStatus.GRANTED:\n return {\n status: PermissionStatus.GRANTED,\n expires: 'never',\n canAskAgain: true,\n granted: true,\n };\n case PermissionStatus.DENIED:\n return {\n status: PermissionStatus.DENIED,\n expires: 'never',\n canAskAgain: true,\n granted: false,\n };\n default:\n return await requestRecordingPermissionsAsync();\n }\n}\n\nexport async function requestRecordingPermissionsAsync(): Promise<PermissionResponse> {\n try {\n const stream = await getUserMedia({ audio: true });\n stream.getTracks().forEach((track) => track.stop());\n return {\n status: PermissionStatus.GRANTED,\n expires: 'never',\n canAskAgain: true,\n granted: true,\n };\n } catch {\n return {\n status: PermissionStatus.DENIED,\n expires: 'never',\n canAskAgain: true,\n granted: false,\n };\n }\n}\n"]}
@@ -1,4 +1,4 @@
1
- import type { PermissionResponse } from 'expo-modules-core';
1
+ import { type PermissionResponse } from 'expo';
2
2
  import type { AudioMode, AudioPlayerOptions, AudioPlaylistOptions, AudioPlaylistStatus, AudioSource, AudioStatus, PreloadOptions, RecordingOptions, RecordingStatus } from './Audio.types';
3
3
  import AudioModule from './AudioModule';
4
4
  import type { AudioPlayer, AudioPlaylist, AudioRecorder, AudioSample } from './AudioModule.types';
@@ -1 +1 @@
1
- {"version":3,"file":"ExpoAudio.d.ts","sourceRoot":"","sources":["../src/ExpoAudio.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAK5D,OAAO,KAAK,EACV,SAAS,EACT,kBAAkB,EAClB,oBAAoB,EACpB,mBAAmB,EACnB,WAAW,EACX,WAAW,EAEX,cAAc,EACd,gBAAgB,EAChB,eAAe,EAChB,MAAM,eAAe,CAAC;AAOvB,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AA+BlG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,wBAAgB,cAAc,CAC5B,MAAM,GAAE,WAAkB,EAC1B,OAAO,GAAE,kBAAuB,GAC/B,WAAW,CAkEb;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,WAAW,GAAG,WAAW,CAGrE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,IAAI,QAShG;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,gBAAgB,EACzB,cAAc,CAAC,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,CAAC,mCAAmC,EAAE,CAAC;AACjE,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,CAAC,KAAK,UAAU,4BAA4B;IAChD,OAAO,MAAM,WAAW,CAAC,4BAA4B,EAAE,CAAC;AAC1D,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,CAAC,KAAK,UAAU,OAAO,CAAC,MAAmB,EAAE,UAA0B,EAAE;IAC7E,MAAM,QAAQ,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC;IACvC,IAAI,CAAC,QAAQ;QAAE,OAAO;IACtB,MAAM,EAAE,8BAA8B,GAAG,EAAE,EAAE,GAAG,OAAO,CAAC;IACxD,OAAO,WAAW,CAAC,OAAO,CAAC,QAAQ,EAAE,8BAA8B,CAAC,CAAC;AACvE,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,MAAmB;IAC5D,MAAM,QAAQ,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC;IACvC,IAAI,CAAC,QAAQ;QAAE,OAAO;IACtB,OAAO,WAAW,CAAC,oBAAoB,CAAC,QAAQ,CAAC,CAAC;AACpD,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,wBAAwB;IAC5C,OAAO,WAAW,CAAC,wBAAwB,EAAE,CAAC;AAChD,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB;IACvC,OAAO,WAAW,CAAC,mBAAmB,EAAE,CAAC;AAC3C,CAAC;AAED,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C,OAAO,EAAE,WAAW,EAAE,CAAC","sourcesContent":["import { useEvent } from 'expo';\nimport type { PermissionResponse } from 'expo-modules-core';\nimport { useReleasingSharedObject } from 'expo-modules-core';\nimport { useEffect, useMemo } from 'react';\nimport { Platform } from 'react-native';\n\nimport type {\n AudioMode,\n AudioPlayerOptions,\n AudioPlaylistOptions,\n AudioPlaylistStatus,\n AudioSource,\n AudioStatus,\n PitchCorrectionQuality,\n PreloadOptions,\n RecordingOptions,\n RecordingStatus,\n} from './Audio.types';\nimport {\n AUDIO_SAMPLE_UPDATE,\n PLAYBACK_STATUS_UPDATE,\n PLAYLIST_STATUS_UPDATE,\n RECORDING_STATUS_UPDATE,\n} from './AudioEventKeys';\nimport AudioModule from './AudioModule';\nimport type { AudioPlayer, AudioPlaylist, AudioRecorder, AudioSample } from './AudioModule.types';\nimport { createRecordingOptions } from './utils/options';\nimport { resolveSource, resolveSources, resolveSourceWithDownload } from './utils/resolveSource';\n\n// TODO: Temporary solution until we develop a way of overriding prototypes that won't break the lazy loading of the module.\nconst replace = AudioModule.AudioPlayer.prototype.replace;\nAudioModule.AudioPlayer.prototype.replace = function (source: AudioSource) {\n return replace.call(this, resolveSource(source));\n};\n\nconst setPlaybackRate = AudioModule.AudioPlayer.prototype.setPlaybackRate;\nAudioModule.AudioPlayer.prototype.setPlaybackRate = function (\n rate: number,\n pitchCorrectionQuality?: PitchCorrectionQuality\n) {\n if (Platform.OS === 'android') {\n return setPlaybackRate.call(this, rate);\n } else {\n return setPlaybackRate.call(this, rate, pitchCorrectionQuality);\n }\n};\n\n// Audio recording prototypes should not be shimmed on tvOS, where they do not exist\nif (!Platform.isTV || Platform.OS !== 'ios') {\n const prepareToRecordAsync = AudioModule.AudioRecorder.prototype.prepareToRecordAsync;\n AudioModule.AudioRecorder.prototype.prepareToRecordAsync = function (options?: RecordingOptions) {\n const processedOptions = options ? createRecordingOptions(options) : undefined;\n return prepareToRecordAsync.call(this, processedOptions);\n };\n}\n\n/**\n * Creates an `AudioPlayer` instance that automatically releases when the component unmounts.\n *\n * This hook manages the player's lifecycle and ensures it's properly disposed when no longer needed.\n * The player will start loading the audio source immediately upon creation.\n *\n * @param source The audio source to load. Can be a local asset via `require()`, a remote URL, or null for no initial source.\n * @param options Audio player configuration options.\n * @returns An `AudioPlayer` instance that's automatically managed by the component lifecycle.\n *\n * @example\n * ```tsx\n * import { useAudioPlayer } from 'expo-audio';\n *\n * function MyComponent() {\n * const player = useAudioPlayer(require('./sound.mp3'));\n *\n * return (\n * <Button title=\"Play\" onPress={() => player.play()} />\n * );\n * }\n * ```\n *\n * @example Using downloadFirst\n * ```tsx\n * import { useAudioPlayer } from 'expo-audio';\n *\n * function MyComponent() {\n * const player = useAudioPlayer('https://example.com/audio.mp3', {\n * updateInterval: 1000,\n * downloadFirst: true,\n * });\n *\n * return (\n * <Button title=\"Play\" onPress={() => player.play()} />\n * );\n * }\n * ```\n */\nexport function useAudioPlayer(\n source: AudioSource = null,\n options: AudioPlayerOptions = {}\n): AudioPlayer {\n const {\n updateInterval = 500,\n downloadFirst = false,\n keepAudioSessionActive = false,\n preferredForwardBufferDuration = 0,\n } = options;\n\n // If downloadFirst is true, we don't need to resolve the source, because it will be resolved in the useEffect below.\n // If downloadFirst is false, we resolve the source here.\n // we call .replace() in the useEffect below to replace the source with the downloaded one.\n const initialSource = useMemo(() => {\n return downloadFirst ? null : resolveSource(source);\n }, [JSON.stringify(source), downloadFirst]);\n\n const player = useReleasingSharedObject(\n () =>\n new AudioModule.AudioPlayer(\n initialSource,\n updateInterval,\n keepAudioSessionActive,\n preferredForwardBufferDuration\n ),\n [\n JSON.stringify(initialSource),\n updateInterval,\n keepAudioSessionActive,\n preferredForwardBufferDuration,\n ]\n );\n\n // Handle async source resolution for downloadFirst\n useEffect(() => {\n if (!downloadFirst || source === null) {\n return;\n }\n\n let isCancelled = false;\n\n // We resolve the source with expo-asset and replace the player's source with the downloaded one.\n async function resolveAndReplaceSource() {\n try {\n const resolved = await resolveSourceWithDownload(source);\n\n if (\n !isCancelled &&\n resolved &&\n JSON.stringify(resolved) !== JSON.stringify(initialSource)\n ) {\n player.replace(resolved);\n }\n } catch (error) {\n if (!isCancelled) {\n console.warn('expo-audio: Failed to download source, using original:', error);\n }\n }\n }\n\n resolveAndReplaceSource();\n\n return () => {\n isCancelled = true;\n };\n }, [player, JSON.stringify(source), downloadFirst]);\n\n return player;\n}\n\n/**\n * Hook that provides real-time playback status updates for an `AudioPlayer`.\n *\n * This hook automatically subscribes to playback status changes and returns the current status.\n * The status includes information about playback state, current time, duration, loading state, and more.\n *\n * @param player The `AudioPlayer` instance to monitor.\n * @returns The current `AudioStatus` object containing playback information.\n *\n * @example\n * ```tsx\n * import { useAudioPlayer, useAudioPlayerStatus } from 'expo-audio';\n *\n * function PlayerComponent() {\n * const player = useAudioPlayer(require('./sound.mp3'));\n * const status = useAudioPlayerStatus(player);\n *\n * return (\n * <View>\n * <Text>Playing: {status.playing ? 'Yes' : 'No'}</Text>\n * <Text>Current Time: {status.currentTime}s</Text>\n * <Text>Duration: {status.duration}s</Text>\n * </View>\n * );\n * }\n * ```\n */\nexport function useAudioPlayerStatus(player: AudioPlayer): AudioStatus {\n const currentStatus = useMemo(() => player.currentStatus, [player.id]);\n return useEvent(player, PLAYBACK_STATUS_UPDATE, currentStatus);\n}\n\n/**\n * Hook that sets up audio sampling for an `AudioPlayer` and calls a listener with audio data.\n *\n * This hook enables audio sampling on the player (if supported) and subscribes to audio sample updates.\n * Audio sampling provides real-time access to audio waveform data for visualization or analysis.\n *\n * > **Note:** Audio sampling requires `RECORD_AUDIO` permission on Android and is not supported on all platforms.\n *\n * @param player The `AudioPlayer` instance to sample audio from.\n * @param listener Function called with each audio sample containing waveform data.\n *\n * @example\n * ```tsx\n * import { useEffect } from 'react';\n * import { useAudioPlayer, useAudioSampleListener, requestRecordingPermissionsAsync } from 'expo-audio';\n *\n * function AudioVisualizerComponent() {\n * const player = useAudioPlayer(require('./music.mp3'));\n *\n * // if required on Android, request recording permissions\n * useEffect(() => {\n * async function requestPermission() {\n * const { granted } = await requestRecordingPermissionsAsync();\n * if (granted) {\n * console.log(\"Permission granted\");\n * }\n * }\n *\n * requestPermission();\n * }, []);\n *\n * useAudioSampleListener(player, (sample) => {\n * // Use sample.channels array for audio visualization\n * console.log('Audio sample:', sample.channels[0].frames);\n * });\n *\n * return <AudioWaveform player={player} />;\n * }\n * ```\n */\nexport function useAudioSampleListener(player: AudioPlayer, listener: (data: AudioSample) => void) {\n useEffect(() => {\n if (!player.isAudioSamplingSupported) {\n return;\n }\n player.setAudioSamplingEnabled(true);\n const subscription = player.addListener(AUDIO_SAMPLE_UPDATE, listener);\n return () => subscription.remove();\n }, [player.id]);\n}\n\n/**\n * Hook that creates an `AudioRecorder` instance for recording audio.\n *\n * This hook manages the recorder's lifecycle and ensures it's properly disposed when no longer needed.\n * The recorder is automatically prepared with the provided options and can be used to record audio.\n *\n * @param options Recording configuration options including format, quality, sample rate, etc.\n * @param statusListener Optional callback function that receives recording status updates.\n * @returns An `AudioRecorder` instance that's automatically managed by the component lifecycle.\n *\n * @example\n * ```tsx\n * import { useAudioRecorder, RecordingPresets } from 'expo-audio';\n *\n * function RecorderComponent() {\n * const recorder = useAudioRecorder(\n * RecordingPresets.HIGH_QUALITY,\n * (status) => console.log('Recording status:', status)\n * );\n *\n * const startRecording = async () => {\n * await recorder.prepareToRecordAsync();\n * recorder.record();\n * };\n *\n * return (\n * <Button title=\"Start Recording\" onPress={startRecording} />\n * );\n * }\n * ```\n */\nexport function useAudioRecorder(\n options: RecordingOptions,\n statusListener?: (status: RecordingStatus) => void\n): AudioRecorder {\n const platformOptions = createRecordingOptions(options);\n const recorder = useReleasingSharedObject(() => {\n return new AudioModule.AudioRecorder(platformOptions);\n }, [JSON.stringify(platformOptions)]);\n\n useEffect(() => {\n const subscription = recorder.addListener(RECORDING_STATUS_UPDATE, (status) => {\n statusListener?.(status);\n });\n return () => subscription.remove();\n }, [recorder.id]);\n\n return recorder;\n}\n\nexport { useAudioRecorderState } from './utils/useAudioRecorderState';\n\n/**\n * Creates an `AudioPlaylist` instance that automatically releases when the component unmounts.\n *\n * This hook manages the playlist's lifecycle and ensures it's properly disposed when no longer needed.\n * An audio playlist allows you to manage a collection of audio sources with gapless playback support.\n *\n * @param options Audio playlist configuration options including initial sources and loop mode.\n * @returns An `AudioPlaylist` instance that's automatically managed by the component lifecycle.\n *\n * @example\n * ```tsx\n * import { useAudioPlaylist } from 'expo-audio';\n *\n * function PlaylistPlayer() {\n * const playlist = useAudioPlaylist({\n * sources: [\n * require('./track1.mp3'),\n * require('./track2.mp3'),\n * 'https://example.com/track3.mp3',\n * ],\n * loop: 'all',\n * });\n *\n * return (\n * <View>\n * <Text>Track {playlist.currentIndex + 1} of {playlist.trackCount}</Text>\n * <Button title=\"Previous\" onPress={() => playlist.previous()} />\n * <Button title={playlist.playing ? 'Pause' : 'Play'} onPress={() => playlist.playing ? playlist.pause() : playlist.play()} />\n * <Button title=\"Next\" onPress={() => playlist.next()} />\n * </View>\n * );\n * }\n * ```\n */\nexport function useAudioPlaylist(options: AudioPlaylistOptions = {}): AudioPlaylist {\n const { sources = [], updateInterval = 500, loop = 'none' } = options;\n\n const resolvedSources = useMemo(() => resolveSources(sources), [JSON.stringify(sources)]);\n\n const playlist = useReleasingSharedObject(\n () => new AudioModule.AudioPlaylist(resolvedSources, updateInterval, loop),\n [JSON.stringify(resolvedSources), updateInterval, loop]\n );\n\n return playlist;\n}\n\n/**\n * Hook that provides real-time status updates for an `AudioPlaylist`.\n *\n * This hook automatically subscribes to playlist status changes and returns the current status.\n * The status includes information about the current track, playback state, and playlist position.\n *\n * @param playlist The `AudioPlaylist` instance to monitor.\n * @returns The current `AudioPlaylistStatus` object containing playlist and playback information.\n *\n * @example\n * ```tsx\n * import { useAudioPlaylist, useAudioPlaylistStatus } from 'expo-audio';\n *\n * function PlaylistStatusDisplay() {\n * const playlist = useAudioPlaylist({ sources: [require('./track1.mp3')] });\n * const status = useAudioPlaylistStatus(playlist);\n *\n * return (\n * <View>\n * <Text>Track: {status.currentIndex + 1} / {status.trackCount}</Text>\n * <Text>Time: {status.currentTime}s / {status.duration}s</Text>\n * <Text>Playing: {status.playing ? 'Yes' : 'No'}</Text>\n * </View>\n * );\n * }\n * ```\n */\nexport function useAudioPlaylistStatus(playlist: AudioPlaylist): AudioPlaylistStatus {\n const currentStatus = useMemo(() => playlist.currentStatus, [playlist.id]);\n return useEvent(playlist, PLAYLIST_STATUS_UPDATE, currentStatus);\n}\n\n/**\n * Creates an instance of an `AudioPlaylist` that doesn't release automatically.\n *\n * > **info** For most use cases you should use the [`useAudioPlaylist`](#useaudioplaylistoptions) hook instead.\n *\n * @param options Audio playlist configuration options.\n */\nexport function createAudioPlaylist(options: AudioPlaylistOptions = {}): AudioPlaylist {\n const { sources = [], updateInterval = 500, loop = 'none' } = options;\n const resolvedSources = resolveSources(sources);\n return new AudioModule.AudioPlaylist(resolvedSources, updateInterval, loop);\n}\n\n/**\n * Creates an instance of an `AudioPlayer` that doesn't release automatically.\n *\n * > **info** For most use cases you should use the [`useAudioPlayer`](#useaudioplayersource-options) hook instead.\n * > See the [Using the `AudioPlayer` directly](#using-the-audioplayer-directly) section for more details.\n * @param source The audio source to load.\n * @param options Audio player configuration options.\n */\nexport function createAudioPlayer(\n source: AudioSource | string | number | null = null,\n options: AudioPlayerOptions = {}\n): AudioPlayer {\n const {\n updateInterval = 500,\n downloadFirst = false,\n keepAudioSessionActive = false,\n preferredForwardBufferDuration = 0,\n } = options;\n const initialSource = downloadFirst ? null : resolveSource(source);\n const player = new AudioModule.AudioPlayer(\n initialSource,\n updateInterval,\n keepAudioSessionActive,\n preferredForwardBufferDuration\n );\n\n if (downloadFirst && source) {\n resolveSourceWithDownload(source)\n .then((resolved) => {\n if (resolved) {\n player.replace(resolved);\n }\n })\n .catch((error) => {\n console.warn('expo-audio: Failed to download source, using fallback:', error);\n const fallback = resolveSource(source);\n if (fallback) {\n player.replace(fallback);\n }\n });\n }\n\n return player;\n}\n\n/**\n * Enables or disables the audio subsystem globally.\n *\n * When set to `false`, this will pause all audio playback and prevent new audio from playing.\n * This is useful for implementing app-wide audio controls or responding to system events.\n *\n * @param active Whether audio should be active (`true`) or disabled (`false`).\n * @returns A Promise that resolves when the audio state has been updated.\n *\n * @example\n * ```tsx\n * import { setIsAudioActiveAsync } from 'expo-audio';\n *\n * // Disable all audio when app goes to background\n * const handleAppStateChange = async (nextAppState) => {\n * if (nextAppState === 'background') {\n * await setIsAudioActiveAsync(false);\n * } else if (nextAppState === 'active') {\n * await setIsAudioActiveAsync(true);\n * }\n * };\n * ```\n */\nexport async function setIsAudioActiveAsync(active: boolean): Promise<void> {\n return await AudioModule.setIsAudioActiveAsync(active);\n}\n\n/**\n * Configures the global audio behavior and session settings.\n *\n * This function allows you to control how your app's audio interacts with other apps,\n * background playback behavior, audio routing, and interruption handling.\n *\n * @param mode Partial audio mode configuration object. Only specified properties will be updated.\n * @returns A Promise that resolves when the audio mode has been applied.\n *\n * @example\n * ```tsx\n * import { setAudioModeAsync } from 'expo-audio';\n *\n * // Configure audio for background playback with mixing\n * await setAudioModeAsync({\n * playsInSilentMode: true,\n * shouldPlayInBackground: true,\n * interruptionMode: 'mixWithOthers'\n * });\n *\n * // Configure audio for recording\n * await setAudioModeAsync({\n * allowsRecording: true,\n * playsInSilentMode: true\n * });\n * ```\n */\nexport async function setAudioModeAsync(mode: Partial<AudioMode>): Promise<void> {\n const audioMode: Partial<AudioMode> =\n Platform.OS === 'ios'\n ? mode\n : {\n shouldPlayInBackground: mode.shouldPlayInBackground,\n shouldRouteThroughEarpiece: mode.shouldRouteThroughEarpiece,\n interruptionMode: mode.interruptionMode ?? mode.interruptionModeAndroid,\n allowsBackgroundRecording: mode.allowsBackgroundRecording,\n playsInSilentMode: mode.playsInSilentMode,\n };\n return await AudioModule.setAudioModeAsync(audioMode);\n}\n\n/**\n * Requests permission to record audio from the microphone.\n *\n * This function prompts the user for microphone access permission, which is required\n * for audio recording functionality. On iOS, this will show the system permission dialog.\n * On Android, this requests the `RECORD_AUDIO` permission.\n *\n * @returns A Promise that resolves to a `PermissionResponse` object containing the permission status.\n *\n * @example\n * ```tsx\n * import { requestRecordingPermissionsAsync } from 'expo-audio';\n *\n * const checkPermissions = async () => {\n * const { status, granted } = await requestRecordingPermissionsAsync();\n *\n * if (granted) {\n * console.log('Recording permission granted');\n * } else {\n * console.log('Recording permission denied:', status);\n * }\n * };\n * ```\n */\nexport async function requestRecordingPermissionsAsync(): Promise<PermissionResponse> {\n return await AudioModule.requestRecordingPermissionsAsync();\n}\n\n/**\n * Requests permission to post notifications on Android.\n *\n * This is required for showing media playback controls in the notification shade.\n * This function is only available on Android and will throw on other platforms.\n *\n * @returns A Promise that resolves to a `PermissionResponse` object containing the permission status.\n *\n * @example\n * ```tsx\n * import { requestNotificationPermissionsAsync } from 'expo-audio';\n *\n * const checkPermissions = async () => {\n * const { status, granted } = await requestNotificationPermissionsAsync();\n *\n * if (granted) {\n * console.log('Notification permission granted');\n * } else {\n * console.log('Notification permission denied:', status);\n * }\n * };\n * ```\n */\nexport async function requestNotificationPermissionsAsync(): Promise<PermissionResponse> {\n if (Platform.OS !== 'android') {\n throw new Error(\n 'expo-audio: `requestNotificationPermissionsAsync` is only available on Android.'\n );\n }\n return await AudioModule.requestNotificationPermissionsAsync();\n}\n\n/**\n * Checks the current status of recording permissions without requesting them.\n *\n * This function returns the current permission status for microphone access\n * without triggering a permission request dialog. Use this to check permissions\n * before deciding whether to call `requestRecordingPermissionsAsync()`.\n *\n * @returns A Promise that resolves to a `PermissionResponse` object containing the current permission status.\n *\n * @example\n * ```tsx\n * import { getRecordingPermissionsAsync, requestRecordingPermissionsAsync } from 'expo-audio';\n *\n * const ensureRecordingPermissions = async () => {\n * const { status } = await getRecordingPermissionsAsync();\n *\n * if (status !== 'granted') {\n * // Permission not granted, request it\n * const { granted } = await requestRecordingPermissionsAsync();\n * return granted;\n * }\n *\n * return true; // Already granted\n * };\n * ```\n */\nexport async function getRecordingPermissionsAsync(): Promise<PermissionResponse> {\n return await AudioModule.getRecordingPermissionsAsync();\n}\n\n/**\n * Preloads an audio source for near-instant playback later.\n *\n * This should be called in module scope, before any React components render.\n * When the source is later used with `useAudioPlayer()`, `createAudioPlayer()`, or `player.replace()`,\n * playback begins with minimal delay.\n *\n * @param source The audio source to preload. Can be a URL string, a local asset via `require()`, or an audio source object.\n * @param options Optional configuration for preloading behavior.\n *\n * @example\n * ```tsx\n * import { preload, useAudioPlayer } from 'expo-audio';\n *\n * const track1 = 'https://example.com/track1.mp3';\n * const track2 = 'https://example.com/track2.mp3';\n *\n * // Preload at module scope — starts buffering immediately\n * preload(track1);\n * preload(track2, { preferredForwardBufferDuration: 20 });\n *\n * export default function App() {\n * const player = useAudioPlayer(track1);\n * // Playback starts near-instantly because the source was preloaded\n * return <Button title=\"Play\" onPress={() => player.play()} />;\n * }\n * ```\n */\nexport async function preload(source: AudioSource, options: PreloadOptions = {}): Promise<void> {\n const resolved = resolveSource(source);\n if (!resolved) return;\n const { preferredForwardBufferDuration = 10 } = options;\n return AudioModule.preload(resolved, preferredForwardBufferDuration);\n}\n\n/**\n * Releases a specific preloaded audio source to free memory.\n *\n * @param source The audio source to release. Must match the source previously passed to `preload()`.\n */\nexport async function clearPreloadedSource(source: AudioSource): Promise<void> {\n const resolved = resolveSource(source);\n if (!resolved) return;\n return AudioModule.clearPreloadedSource(resolved);\n}\n\n/**\n * Releases all preloaded audio sources to free memory.\n */\nexport async function clearAllPreloadedSources(): Promise<void> {\n return AudioModule.clearAllPreloadedSources();\n}\n\n/**\n * Returns the URIs of all currently preloaded audio sources.\n *\n * On iOS, sources are removed from this list when consumed by `useAudioPlayer()`, `createAudioPlayer()`, or `player.replace()`.\n * On Android and web, sources remain until explicitly cleared with `clearPreloadedSource()` / `clearAllPreloadedSources()`.\n *\n * @returns An array of URI strings for sources currently in the preload cache.\n */\nexport async function getPreloadedSources(): Promise<string[]> {\n return AudioModule.getPreloadedSources();\n}\n\nexport { useAudioStream } from './AudioStream';\n\nexport { AudioModule };\n"]}
1
+ {"version":3,"file":"ExpoAudio.js","sourceRoot":"","sources":["../src/ExpoAudio.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAA2B,MAAM,MAAM,CAAC;AACzD,OAAO,EAAE,wBAAwB,EAAE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ACtB,OAAO,WAAW,CAAC,oBAAoB,CAAC,QAAQ,CAAC,CAAC;AACpD,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,wBAAwB;IAC5C,OAAO,WAAW,CAAC,wBAAwB,EAAE,CAAC;AAChD,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB;IACvC,OAAO,WAAW,CAAC,mBAAmB,EAAE,CAAC;AAC3C,CAAC;AAED,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C,OAAO,EAAE,WAAW,EAAE,CAAC","sourcesContent":["import { useEvent, type PermissionResponse } from 'expo';\nimport { useReleasingSharedObject } from 'expo-modules-core';\nimport { useEffect, useMemo } from 'react';\nimport { Platform } from 'react-native';\n\nimport type {\n AudioMode,\n AudioPlayerOptions,\n AudioPlaylistOptions,\n AudioPlaylistStatus,\n AudioSource,\n AudioStatus,\n PitchCorrectionQuality,\n PreloadOptions,\n RecordingOptions,\n RecordingStatus,\n} from './Audio.types';\nimport {\n AUDIO_SAMPLE_UPDATE,\n PLAYBACK_STATUS_UPDATE,\n PLAYLIST_STATUS_UPDATE,\n RECORDING_STATUS_UPDATE,\n} from './AudioEventKeys';\nimport AudioModule from './AudioModule';\nimport type { AudioPlayer, AudioPlaylist, AudioRecorder, AudioSample } from './AudioModule.types';\nimport { createRecordingOptions } from './utils/options';\nimport { resolveSource, resolveSources, resolveSourceWithDownload } from './utils/resolveSource';\n\n// TODO: Temporary solution until we develop a way of overriding prototypes that won't break the lazy loading of the module.\nconst replace = AudioModule.AudioPlayer.prototype.replace;\nAudioModule.AudioPlayer.prototype.replace = function (source: AudioSource) {\n return replace.call(this, resolveSource(source));\n};\n\nconst setPlaybackRate = AudioModule.AudioPlayer.prototype.setPlaybackRate;\nAudioModule.AudioPlayer.prototype.setPlaybackRate = function (\n rate: number,\n pitchCorrectionQuality?: PitchCorrectionQuality\n) {\n if (Platform.OS === 'android') {\n return setPlaybackRate.call(this, rate);\n } else {\n return setPlaybackRate.call(this, rate, pitchCorrectionQuality);\n }\n};\n\n// Audio recording prototypes should not be shimmed on tvOS, where they do not exist\nif (!Platform.isTV || Platform.OS !== 'ios') {\n const prepareToRecordAsync = AudioModule.AudioRecorder.prototype.prepareToRecordAsync;\n AudioModule.AudioRecorder.prototype.prepareToRecordAsync = function (options?: RecordingOptions) {\n const processedOptions = options ? createRecordingOptions(options) : undefined;\n return prepareToRecordAsync.call(this, processedOptions);\n };\n}\n\n/**\n * Creates an `AudioPlayer` instance that automatically releases when the component unmounts.\n *\n * This hook manages the player's lifecycle and ensures it's properly disposed when no longer needed.\n * The player will start loading the audio source immediately upon creation.\n *\n * @param source The audio source to load. Can be a local asset via `require()`, a remote URL, or null for no initial source.\n * @param options Audio player configuration options.\n * @returns An `AudioPlayer` instance that's automatically managed by the component lifecycle.\n *\n * @example\n * ```tsx\n * import { useAudioPlayer } from 'expo-audio';\n *\n * function MyComponent() {\n * const player = useAudioPlayer(require('./sound.mp3'));\n *\n * return (\n * <Button title=\"Play\" onPress={() => player.play()} />\n * );\n * }\n * ```\n *\n * @example Using downloadFirst\n * ```tsx\n * import { useAudioPlayer } from 'expo-audio';\n *\n * function MyComponent() {\n * const player = useAudioPlayer('https://example.com/audio.mp3', {\n * updateInterval: 1000,\n * downloadFirst: true,\n * });\n *\n * return (\n * <Button title=\"Play\" onPress={() => player.play()} />\n * );\n * }\n * ```\n */\nexport function useAudioPlayer(\n source: AudioSource = null,\n options: AudioPlayerOptions = {}\n): AudioPlayer {\n const {\n updateInterval = 500,\n downloadFirst = false,\n keepAudioSessionActive = false,\n preferredForwardBufferDuration = 0,\n } = options;\n\n // If downloadFirst is true, we don't need to resolve the source, because it will be resolved in the useEffect below.\n // If downloadFirst is false, we resolve the source here.\n // we call .replace() in the useEffect below to replace the source with the downloaded one.\n const initialSource = useMemo(() => {\n return downloadFirst ? null : resolveSource(source);\n }, [JSON.stringify(source), downloadFirst]);\n\n const player = useReleasingSharedObject(\n () =>\n new AudioModule.AudioPlayer(\n initialSource,\n updateInterval,\n keepAudioSessionActive,\n preferredForwardBufferDuration\n ),\n [\n JSON.stringify(initialSource),\n updateInterval,\n keepAudioSessionActive,\n preferredForwardBufferDuration,\n ]\n );\n\n // Handle async source resolution for downloadFirst\n useEffect(() => {\n if (!downloadFirst || source === null) {\n return;\n }\n\n let isCancelled = false;\n\n // We resolve the source with expo-asset and replace the player's source with the downloaded one.\n async function resolveAndReplaceSource() {\n try {\n const resolved = await resolveSourceWithDownload(source);\n\n if (\n !isCancelled &&\n resolved &&\n JSON.stringify(resolved) !== JSON.stringify(initialSource)\n ) {\n player.replace(resolved);\n }\n } catch (error) {\n if (!isCancelled) {\n console.warn('expo-audio: Failed to download source, using original:', error);\n }\n }\n }\n\n resolveAndReplaceSource();\n\n return () => {\n isCancelled = true;\n };\n }, [player, JSON.stringify(source), downloadFirst]);\n\n return player;\n}\n\n/**\n * Hook that provides real-time playback status updates for an `AudioPlayer`.\n *\n * This hook automatically subscribes to playback status changes and returns the current status.\n * The status includes information about playback state, current time, duration, loading state, and more.\n *\n * @param player The `AudioPlayer` instance to monitor.\n * @returns The current `AudioStatus` object containing playback information.\n *\n * @example\n * ```tsx\n * import { useAudioPlayer, useAudioPlayerStatus } from 'expo-audio';\n *\n * function PlayerComponent() {\n * const player = useAudioPlayer(require('./sound.mp3'));\n * const status = useAudioPlayerStatus(player);\n *\n * return (\n * <View>\n * <Text>Playing: {status.playing ? 'Yes' : 'No'}</Text>\n * <Text>Current Time: {status.currentTime}s</Text>\n * <Text>Duration: {status.duration}s</Text>\n * </View>\n * );\n * }\n * ```\n */\nexport function useAudioPlayerStatus(player: AudioPlayer): AudioStatus {\n const currentStatus = useMemo(() => player.currentStatus, [player.id]);\n return useEvent(player, PLAYBACK_STATUS_UPDATE, currentStatus);\n}\n\n/**\n * Hook that sets up audio sampling for an `AudioPlayer` and calls a listener with audio data.\n *\n * This hook enables audio sampling on the player (if supported) and subscribes to audio sample updates.\n * Audio sampling provides real-time access to audio waveform data for visualization or analysis.\n *\n * > **Note:** Audio sampling requires `RECORD_AUDIO` permission on Android and is not supported on all platforms.\n *\n * @param player The `AudioPlayer` instance to sample audio from.\n * @param listener Function called with each audio sample containing waveform data.\n *\n * @example\n * ```tsx\n * import { useEffect } from 'react';\n * import { useAudioPlayer, useAudioSampleListener, requestRecordingPermissionsAsync } from 'expo-audio';\n *\n * function AudioVisualizerComponent() {\n * const player = useAudioPlayer(require('./music.mp3'));\n *\n * // if required on Android, request recording permissions\n * useEffect(() => {\n * async function requestPermission() {\n * const { granted } = await requestRecordingPermissionsAsync();\n * if (granted) {\n * console.log(\"Permission granted\");\n * }\n * }\n *\n * requestPermission();\n * }, []);\n *\n * useAudioSampleListener(player, (sample) => {\n * // Use sample.channels array for audio visualization\n * console.log('Audio sample:', sample.channels[0].frames);\n * });\n *\n * return <AudioWaveform player={player} />;\n * }\n * ```\n */\nexport function useAudioSampleListener(player: AudioPlayer, listener: (data: AudioSample) => void) {\n useEffect(() => {\n if (!player.isAudioSamplingSupported) {\n return;\n }\n player.setAudioSamplingEnabled(true);\n const subscription = player.addListener(AUDIO_SAMPLE_UPDATE, listener);\n return () => subscription.remove();\n }, [player.id]);\n}\n\n/**\n * Hook that creates an `AudioRecorder` instance for recording audio.\n *\n * This hook manages the recorder's lifecycle and ensures it's properly disposed when no longer needed.\n * The recorder is automatically prepared with the provided options and can be used to record audio.\n *\n * @param options Recording configuration options including format, quality, sample rate, etc.\n * @param statusListener Optional callback function that receives recording status updates.\n * @returns An `AudioRecorder` instance that's automatically managed by the component lifecycle.\n *\n * @example\n * ```tsx\n * import { useAudioRecorder, RecordingPresets } from 'expo-audio';\n *\n * function RecorderComponent() {\n * const recorder = useAudioRecorder(\n * RecordingPresets.HIGH_QUALITY,\n * (status) => console.log('Recording status:', status)\n * );\n *\n * const startRecording = async () => {\n * await recorder.prepareToRecordAsync();\n * recorder.record();\n * };\n *\n * return (\n * <Button title=\"Start Recording\" onPress={startRecording} />\n * );\n * }\n * ```\n */\nexport function useAudioRecorder(\n options: RecordingOptions,\n statusListener?: (status: RecordingStatus) => void\n): AudioRecorder {\n const platformOptions = createRecordingOptions(options);\n const recorder = useReleasingSharedObject(() => {\n return new AudioModule.AudioRecorder(platformOptions);\n }, [JSON.stringify(platformOptions)]);\n\n useEffect(() => {\n const subscription = recorder.addListener(RECORDING_STATUS_UPDATE, (status) => {\n statusListener?.(status);\n });\n return () => subscription.remove();\n }, [recorder.id]);\n\n return recorder;\n}\n\nexport { useAudioRecorderState } from './utils/useAudioRecorderState';\n\n/**\n * Creates an `AudioPlaylist` instance that automatically releases when the component unmounts.\n *\n * This hook manages the playlist's lifecycle and ensures it's properly disposed when no longer needed.\n * An audio playlist allows you to manage a collection of audio sources with gapless playback support.\n *\n * @param options Audio playlist configuration options including initial sources and loop mode.\n * @returns An `AudioPlaylist` instance that's automatically managed by the component lifecycle.\n *\n * @example\n * ```tsx\n * import { useAudioPlaylist } from 'expo-audio';\n *\n * function PlaylistPlayer() {\n * const playlist = useAudioPlaylist({\n * sources: [\n * require('./track1.mp3'),\n * require('./track2.mp3'),\n * 'https://example.com/track3.mp3',\n * ],\n * loop: 'all',\n * });\n *\n * return (\n * <View>\n * <Text>Track {playlist.currentIndex + 1} of {playlist.trackCount}</Text>\n * <Button title=\"Previous\" onPress={() => playlist.previous()} />\n * <Button title={playlist.playing ? 'Pause' : 'Play'} onPress={() => playlist.playing ? playlist.pause() : playlist.play()} />\n * <Button title=\"Next\" onPress={() => playlist.next()} />\n * </View>\n * );\n * }\n * ```\n */\nexport function useAudioPlaylist(options: AudioPlaylistOptions = {}): AudioPlaylist {\n const { sources = [], updateInterval = 500, loop = 'none' } = options;\n\n const resolvedSources = useMemo(() => resolveSources(sources), [JSON.stringify(sources)]);\n\n const playlist = useReleasingSharedObject(\n () => new AudioModule.AudioPlaylist(resolvedSources, updateInterval, loop),\n [JSON.stringify(resolvedSources), updateInterval, loop]\n );\n\n return playlist;\n}\n\n/**\n * Hook that provides real-time status updates for an `AudioPlaylist`.\n *\n * This hook automatically subscribes to playlist status changes and returns the current status.\n * The status includes information about the current track, playback state, and playlist position.\n *\n * @param playlist The `AudioPlaylist` instance to monitor.\n * @returns The current `AudioPlaylistStatus` object containing playlist and playback information.\n *\n * @example\n * ```tsx\n * import { useAudioPlaylist, useAudioPlaylistStatus } from 'expo-audio';\n *\n * function PlaylistStatusDisplay() {\n * const playlist = useAudioPlaylist({ sources: [require('./track1.mp3')] });\n * const status = useAudioPlaylistStatus(playlist);\n *\n * return (\n * <View>\n * <Text>Track: {status.currentIndex + 1} / {status.trackCount}</Text>\n * <Text>Time: {status.currentTime}s / {status.duration}s</Text>\n * <Text>Playing: {status.playing ? 'Yes' : 'No'}</Text>\n * </View>\n * );\n * }\n * ```\n */\nexport function useAudioPlaylistStatus(playlist: AudioPlaylist): AudioPlaylistStatus {\n const currentStatus = useMemo(() => playlist.currentStatus, [playlist.id]);\n return useEvent(playlist, PLAYLIST_STATUS_UPDATE, currentStatus);\n}\n\n/**\n * Creates an instance of an `AudioPlaylist` that doesn't release automatically.\n *\n * > **info** For most use cases you should use the [`useAudioPlaylist`](#useaudioplaylistoptions) hook instead.\n *\n * @param options Audio playlist configuration options.\n */\nexport function createAudioPlaylist(options: AudioPlaylistOptions = {}): AudioPlaylist {\n const { sources = [], updateInterval = 500, loop = 'none' } = options;\n const resolvedSources = resolveSources(sources);\n return new AudioModule.AudioPlaylist(resolvedSources, updateInterval, loop);\n}\n\n/**\n * Creates an instance of an `AudioPlayer` that doesn't release automatically.\n *\n * > **info** For most use cases you should use the [`useAudioPlayer`](#useaudioplayersource-options) hook instead.\n * > See the [Using the `AudioPlayer` directly](#using-the-audioplayer-directly) section for more details.\n * @param source The audio source to load.\n * @param options Audio player configuration options.\n */\nexport function createAudioPlayer(\n source: AudioSource | string | number | null = null,\n options: AudioPlayerOptions = {}\n): AudioPlayer {\n const {\n updateInterval = 500,\n downloadFirst = false,\n keepAudioSessionActive = false,\n preferredForwardBufferDuration = 0,\n } = options;\n const initialSource = downloadFirst ? null : resolveSource(source);\n const player = new AudioModule.AudioPlayer(\n initialSource,\n updateInterval,\n keepAudioSessionActive,\n preferredForwardBufferDuration\n );\n\n if (downloadFirst && source) {\n resolveSourceWithDownload(source)\n .then((resolved) => {\n if (resolved) {\n player.replace(resolved);\n }\n })\n .catch((error) => {\n console.warn('expo-audio: Failed to download source, using fallback:', error);\n const fallback = resolveSource(source);\n if (fallback) {\n player.replace(fallback);\n }\n });\n }\n\n return player;\n}\n\n/**\n * Enables or disables the audio subsystem globally.\n *\n * When set to `false`, this will pause all audio playback and prevent new audio from playing.\n * This is useful for implementing app-wide audio controls or responding to system events.\n *\n * @param active Whether audio should be active (`true`) or disabled (`false`).\n * @returns A Promise that resolves when the audio state has been updated.\n *\n * @example\n * ```tsx\n * import { setIsAudioActiveAsync } from 'expo-audio';\n *\n * // Disable all audio when app goes to background\n * const handleAppStateChange = async (nextAppState) => {\n * if (nextAppState === 'background') {\n * await setIsAudioActiveAsync(false);\n * } else if (nextAppState === 'active') {\n * await setIsAudioActiveAsync(true);\n * }\n * };\n * ```\n */\nexport async function setIsAudioActiveAsync(active: boolean): Promise<void> {\n return await AudioModule.setIsAudioActiveAsync(active);\n}\n\n/**\n * Configures the global audio behavior and session settings.\n *\n * This function allows you to control how your app's audio interacts with other apps,\n * background playback behavior, audio routing, and interruption handling.\n *\n * @param mode Partial audio mode configuration object. Only specified properties will be updated.\n * @returns A Promise that resolves when the audio mode has been applied.\n *\n * @example\n * ```tsx\n * import { setAudioModeAsync } from 'expo-audio';\n *\n * // Configure audio for background playback with mixing\n * await setAudioModeAsync({\n * playsInSilentMode: true,\n * shouldPlayInBackground: true,\n * interruptionMode: 'mixWithOthers'\n * });\n *\n * // Configure audio for recording\n * await setAudioModeAsync({\n * allowsRecording: true,\n * playsInSilentMode: true\n * });\n * ```\n */\nexport async function setAudioModeAsync(mode: Partial<AudioMode>): Promise<void> {\n const audioMode: Partial<AudioMode> =\n Platform.OS === 'ios'\n ? mode\n : {\n shouldPlayInBackground: mode.shouldPlayInBackground,\n shouldRouteThroughEarpiece: mode.shouldRouteThroughEarpiece,\n interruptionMode: mode.interruptionMode ?? mode.interruptionModeAndroid,\n allowsBackgroundRecording: mode.allowsBackgroundRecording,\n playsInSilentMode: mode.playsInSilentMode,\n };\n return await AudioModule.setAudioModeAsync(audioMode);\n}\n\n/**\n * Requests permission to record audio from the microphone.\n *\n * This function prompts the user for microphone access permission, which is required\n * for audio recording functionality. On iOS, this will show the system permission dialog.\n * On Android, this requests the `RECORD_AUDIO` permission.\n *\n * @returns A Promise that resolves to a `PermissionResponse` object containing the permission status.\n *\n * @example\n * ```tsx\n * import { requestRecordingPermissionsAsync } from 'expo-audio';\n *\n * const checkPermissions = async () => {\n * const { status, granted } = await requestRecordingPermissionsAsync();\n *\n * if (granted) {\n * console.log('Recording permission granted');\n * } else {\n * console.log('Recording permission denied:', status);\n * }\n * };\n * ```\n */\nexport async function requestRecordingPermissionsAsync(): Promise<PermissionResponse> {\n return await AudioModule.requestRecordingPermissionsAsync();\n}\n\n/**\n * Requests permission to post notifications on Android.\n *\n * This is required for showing media playback controls in the notification shade.\n * This function is only available on Android and will throw on other platforms.\n *\n * @returns A Promise that resolves to a `PermissionResponse` object containing the permission status.\n *\n * @example\n * ```tsx\n * import { requestNotificationPermissionsAsync } from 'expo-audio';\n *\n * const checkPermissions = async () => {\n * const { status, granted } = await requestNotificationPermissionsAsync();\n *\n * if (granted) {\n * console.log('Notification permission granted');\n * } else {\n * console.log('Notification permission denied:', status);\n * }\n * };\n * ```\n */\nexport async function requestNotificationPermissionsAsync(): Promise<PermissionResponse> {\n if (Platform.OS !== 'android') {\n throw new Error(\n 'expo-audio: `requestNotificationPermissionsAsync` is only available on Android.'\n );\n }\n return await AudioModule.requestNotificationPermissionsAsync();\n}\n\n/**\n * Checks the current status of recording permissions without requesting them.\n *\n * This function returns the current permission status for microphone access\n * without triggering a permission request dialog. Use this to check permissions\n * before deciding whether to call `requestRecordingPermissionsAsync()`.\n *\n * @returns A Promise that resolves to a `PermissionResponse` object containing the current permission status.\n *\n * @example\n * ```tsx\n * import { getRecordingPermissionsAsync, requestRecordingPermissionsAsync } from 'expo-audio';\n *\n * const ensureRecordingPermissions = async () => {\n * const { status } = await getRecordingPermissionsAsync();\n *\n * if (status !== 'granted') {\n * // Permission not granted, request it\n * const { granted } = await requestRecordingPermissionsAsync();\n * return granted;\n * }\n *\n * return true; // Already granted\n * };\n * ```\n */\nexport async function getRecordingPermissionsAsync(): Promise<PermissionResponse> {\n return await AudioModule.getRecordingPermissionsAsync();\n}\n\n/**\n * Preloads an audio source for near-instant playback later.\n *\n * This should be called in module scope, before any React components render.\n * When the source is later used with `useAudioPlayer()`, `createAudioPlayer()`, or `player.replace()`,\n * playback begins with minimal delay.\n *\n * @param source The audio source to preload. Can be a URL string, a local asset via `require()`, or an audio source object.\n * @param options Optional configuration for preloading behavior.\n *\n * @example\n * ```tsx\n * import { preload, useAudioPlayer } from 'expo-audio';\n *\n * const track1 = 'https://example.com/track1.mp3';\n * const track2 = 'https://example.com/track2.mp3';\n *\n * // Preload at module scope — starts buffering immediately\n * preload(track1);\n * preload(track2, { preferredForwardBufferDuration: 20 });\n *\n * export default function App() {\n * const player = useAudioPlayer(track1);\n * // Playback starts near-instantly because the source was preloaded\n * return <Button title=\"Play\" onPress={() => player.play()} />;\n * }\n * ```\n */\nexport async function preload(source: AudioSource, options: PreloadOptions = {}): Promise<void> {\n const resolved = resolveSource(source);\n if (!resolved) return;\n const { preferredForwardBufferDuration = 10 } = options;\n return AudioModule.preload(resolved, preferredForwardBufferDuration);\n}\n\n/**\n * Releases a specific preloaded audio source to free memory.\n *\n * @param source The audio source to release. Must match the source previously passed to `preload()`.\n */\nexport async function clearPreloadedSource(source: AudioSource): Promise<void> {\n const resolved = resolveSource(source);\n if (!resolved) return;\n return AudioModule.clearPreloadedSource(resolved);\n}\n\n/**\n * Releases all preloaded audio sources to free memory.\n */\nexport async function clearAllPreloadedSources(): Promise<void> {\n return AudioModule.clearAllPreloadedSources();\n}\n\n/**\n * Returns the URIs of all currently preloaded audio sources.\n *\n * On iOS, sources are removed from this list when consumed by `useAudioPlayer()`, `createAudioPlayer()`, or `player.replace()`.\n * On Android and web, sources remain until explicitly cleared with `clearPreloadedSource()` / `clearAllPreloadedSources()`.\n *\n * @returns An array of URI strings for sources currently in the preload cache.\n */\nexport async function getPreloadedSources(): Promise<string[]> {\n return AudioModule.getPreloadedSources();\n}\n\nexport { useAudioStream } from './AudioStream';\n\nexport { AudioModule };\n"]}
@@ -1,4 +1,4 @@
1
- import type { PermissionResponse } from 'expo-modules-core';
1
+ import { type PermissionResponse } from 'expo';
2
2
  import type { AudioMode, AudioPlayerOptions, AudioPlaylistOptions, AudioPlaylistStatus, AudioSource, AudioStatus, PreloadOptions, RecordingOptions, RecordingStatus } from './Audio.types';
3
3
  import type { AudioPlayer, AudioSample } from './AudioModule.types';
4
4
  import * as AudioModule from './AudioModule.web';
@@ -1 +1 @@
1
- {"version":3,"file":"ExpoAudio.web.d.ts","sourceRoot":"","sources":["../src/ExpoAudio.web.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAI5D,OAAO,KAAK,EACV,SAAS,EACT,kBAAkB,EAClB,oBAAoB,EACpB,mBAAmB,EACnB,WAAW,EACX,WAAW,EACX,cAAc,EACd,gBAAgB,EAChB,eAAe,EAChB,MAAM,eAAe,CAAC;AAOvB,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACpE,OAAO,KAAK,WAAW,MAAM,mBAAmB,CAAC;AAIjD,wBAAgB,iBAAiB,CAC/B,MAAM,GAAE,WAAW,GAAG,MAAM,GAAG,MAAM,GAAG,IAAW,EACnD,OAAO,GAAE,kBAAuB,GAC/B,WAAW,CAoBb;AAED,wBAAgB,cAAc,CAC5B,MAAM,GAAE,WAAW,GAAG,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C,CAAC;AACnE,CAAC;AAED,MAAM,UAAU,mBAAmB,CACjC,UAAgC,EAAE;IAElC,MAAM,EAAE,OAAO,GAAG,EAAE,EAAE,cAAc,GAAG,GAAG,EAAE,IAAI,GAAG,MAAM,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC;IACnF,MAAM,eAAe,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC;IAChD,OAAO,IAAI,WAAW,CAAC,gBAAgB,CAAC,eAAe,EAAE,cAAc,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC;AAC9F,CAAC;AAED,MAAM,UAAU,OAAO,CAAC,MAAmB,EAAE,WAA2B,EAAE;IACxE,MAAM,QAAQ,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC;IACvC,IAAI,CAAC,QAAQ;QAAE,OAAO;IACtB,WAAW,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;AAChC,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,MAAmB;IACtD,MAAM,QAAQ,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC;IACvC,IAAI,CAAC,QAAQ;QAAE,OAAO;IACtB,WAAW,CAAC,oBAAoB,CAAC,QAAQ,CAAC,CAAC;AAC7C,CAAC;AAED,MAAM,UAAU,wBAAwB;IACtC,WAAW,CAAC,wBAAwB,EAAE,CAAC;AACzC,CAAC;AAED,MAAM,UAAU,mBAAmB;IACjC,OAAO,WAAW,CAAC,mBAAmB,EAAE,CAAC;AAC3C,CAAC;AAED,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,OAAO,EAAE,WAAW,EAAE,CAAC","sourcesContent":["import { useEvent } from 'expo';\nimport type { PermissionResponse } from 'expo-modules-core';\nimport { useReleasingSharedObject } from 'expo-modules-core';\nimport { useEffect, useMemo } from 'react';\n\nimport type {\n AudioMode,\n AudioPlayerOptions,\n AudioPlaylistOptions,\n AudioPlaylistStatus,\n AudioSource,\n AudioStatus,\n PreloadOptions,\n RecordingOptions,\n RecordingStatus,\n} from './Audio.types';\nimport {\n AUDIO_SAMPLE_UPDATE,\n PLAYBACK_STATUS_UPDATE,\n PLAYLIST_STATUS_UPDATE,\n RECORDING_STATUS_UPDATE,\n} from './AudioEventKeys';\nimport type { AudioPlayer, AudioSample } from './AudioModule.types';\nimport * as AudioModule from './AudioModule.web';\nimport { createRecordingOptions } from './utils/options';\nimport { resolveSource, resolveSources } from './utils/resolveSource';\n\nexport function createAudioPlayer(\n source: AudioSource | string | number | null = null,\n options: AudioPlayerOptions = {}\n): AudioPlayer {\n const { downloadFirst = false } = options;\n\n // If downloadFirst is true, we don't need to resolve the source, because it will be replaced once the source is downloaded.\n // If downloadFirst is false, we resolve the source here.\n const initialSource = downloadFirst ? null : resolveSource(source);\n const player = new AudioModule.AudioPlayerWeb(initialSource, options);\n\n // Preload the source and replace the player's source with the cached blob URL.\n // Only relevant if downloadFirst is true and source is not null.\n if (downloadFirst && source) {\n const resolved = resolveSource(source);\n if (resolved) {\n AudioModule.preloadAsync(resolved).finally(() => {\n player.replace(resolved);\n });\n }\n }\n\n return player;\n}\n\nexport function useAudioPlayer(\n source: AudioSource | string | number | null = null,\n options: AudioPlayerOptions = {}\n): AudioModule.AudioPlayerWeb {\n const { downloadFirst = false } = options;\n\n // If downloadFirst is true, we don't need to resolve the source, because it will be resolved in the useEffect below.\n // If downloadFirst is false, we resolve the source here.\n // we call .replace() in the useEffect below to replace the source with the downloaded one.\n const initialSource = useMemo(() => {\n return downloadFirst ? null : resolveSource(source);\n }, [JSON.stringify(source), downloadFirst]);\n\n const player = useReleasingSharedObject(\n () => new AudioModule.AudioPlayerWeb(initialSource, options),\n [JSON.stringify(initialSource), JSON.stringify(options)]\n );\n\n // Handle async source resolution for downloadFirst\n useEffect(() => {\n if (!downloadFirst || source === null) {\n return;\n }\n\n let isCancelled = false;\n const resolved = resolveSource(source);\n\n if (resolved) {\n AudioModule.preloadAsync(resolved).finally(() => {\n if (!isCancelled) {\n player.replace(resolved);\n }\n });\n }\n\n return () => {\n isCancelled = true;\n };\n }, [player, JSON.stringify(source), downloadFirst]);\n\n return player;\n}\n\nexport function useAudioPlayerStatus(player: AudioModule.AudioPlayerWeb): AudioStatus {\n const currentStatus = useMemo(() => player.currentStatus, [player.id]);\n return useEvent(player, PLAYBACK_STATUS_UPDATE, currentStatus);\n}\n\nexport function useAudioSampleListener(\n player: AudioModule.AudioPlayerWeb,\n listener: (data: AudioSample) => void\n) {\n player.setAudioSamplingEnabled(true);\n useEffect(() => {\n const subscription = player.addListener(AUDIO_SAMPLE_UPDATE, listener);\n return () => {\n player.setAudioSamplingEnabled(false);\n subscription.remove();\n };\n }, [player.id]);\n}\n\nexport function useAudioRecorder(\n options: RecordingOptions,\n statusListener?: (status: RecordingStatus) => void\n): AudioModule.AudioRecorderWeb {\n const platformOptions = createRecordingOptions(options);\n const recorder = useMemo(() => {\n return new AudioModule.AudioRecorderWeb(platformOptions);\n }, [JSON.stringify(platformOptions)]);\n\n useEffect(() => {\n const subscription = recorder.addListener(RECORDING_STATUS_UPDATE, (status) => {\n statusListener?.(status);\n });\n return () => {\n recorder.clearTimeouts();\n subscription.remove();\n };\n }, [recorder.id]);\n\n return recorder;\n}\n\nexport { useAudioRecorderState } from './utils/useAudioRecorderState';\n\nexport async function setIsAudioActiveAsync(active: boolean): Promise<void> {\n return await AudioModule.setIsAudioActiveAsync(active);\n}\n\nexport async function setAudioModeAsync(mode: AudioMode): Promise<void> {\n return await AudioModule.setAudioModeAsync(mode);\n}\n\nexport async function requestRecordingPermissionsAsync(): Promise<PermissionResponse> {\n return await AudioModule.requestRecordingPermissionsAsync();\n}\n\nexport async function getRecordingPermissionsAsync(): Promise<PermissionResponse> {\n return await AudioModule.getRecordingPermissionsAsync();\n}\n\nexport function useAudioPlaylist(options: AudioPlaylistOptions = {}): AudioModule.AudioPlaylistWeb {\n const { sources = [], updateInterval = 500, loop = 'none', crossOrigin } = options;\n\n const resolvedSources = useMemo(() => resolveSources(sources), [JSON.stringify(sources)]);\n\n const playlist = useMemo(\n () => new AudioModule.AudioPlaylistWeb(resolvedSources, updateInterval, loop, crossOrigin),\n [JSON.stringify(resolvedSources), updateInterval, loop, crossOrigin]\n );\n\n useEffect(() => {\n return () => playlist.destroy();\n }, [playlist]);\n\n return playlist;\n}\n\nexport function useAudioPlaylistStatus(\n playlist: AudioModule.AudioPlaylistWeb\n): AudioPlaylistStatus {\n const currentStatus = useMemo(() => playlist.currentStatus, [playlist.id]);\n return useEvent(playlist, PLAYLIST_STATUS_UPDATE, currentStatus);\n}\n\nexport function createAudioPlaylist(\n options: AudioPlaylistOptions = {}\n): AudioModule.AudioPlaylistWeb {\n const { sources = [], updateInterval = 500, loop = 'none', crossOrigin } = options;\n const resolvedSources = resolveSources(sources);\n return new AudioModule.AudioPlaylistWeb(resolvedSources, updateInterval, loop, crossOrigin);\n}\n\nexport function preload(source: AudioSource, _options: PreloadOptions = {}): void {\n const resolved = resolveSource(source);\n if (!resolved) return;\n AudioModule.preload(resolved);\n}\n\nexport function clearPreloadedSource(source: AudioSource): void {\n const resolved = resolveSource(source);\n if (!resolved) return;\n AudioModule.clearPreloadedSource(resolved);\n}\n\nexport function clearAllPreloadedSources(): void {\n AudioModule.clearAllPreloadedSources();\n}\n\nexport function getPreloadedSources(): string[] {\n return AudioModule.getPreloadedSources();\n}\n\nexport { useAudioStream } from './AudioStream.web';\n\nexport { AudioModule };\n"]}
1
+ {"version":3,"file":"ExpoAudio.web.js","sourceRoot":"","sources":["../src/ExpoAudio.web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAA2B,MAAM,MAAM,CAAC;AACzD,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAa3C,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,sBAAsB,EACtB,uBAAuB,GACxB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,WAAW,MA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B,EAAE,aAAa,CAAC,CAAC;AACnE,CAAC;AAED,MAAM,UAAU,mBAAmB,CACjC,UAAgC,EAAE;IAElC,MAAM,EAAE,OAAO,GAAG,EAAE,EAAE,cAAc,GAAG,GAAG,EAAE,IAAI,GAAG,MAAM,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC;IACnF,MAAM,eAAe,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC;IAChD,OAAO,IAAI,WAAW,CAAC,gBAAgB,CAAC,eAAe,EAAE,cAAc,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC;AAC9F,CAAC;AAED,MAAM,UAAU,OAAO,CAAC,MAAmB,EAAE,WAA2B,EAAE;IACxE,MAAM,QAAQ,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC;IACvC,IAAI,CAAC,QAAQ;QAAE,OAAO;IACtB,WAAW,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;AAChC,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,MAAmB;IACtD,MAAM,QAAQ,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC;IACvC,IAAI,CAAC,QAAQ;QAAE,OAAO;IACtB,WAAW,CAAC,oBAAoB,CAAC,QAAQ,CAAC,CAAC;AAC7C,CAAC;AAED,MAAM,UAAU,wBAAwB;IACtC,WAAW,CAAC,wBAAwB,EAAE,CAAC;AACzC,CAAC;AAED,MAAM,UAAU,mBAAmB;IACjC,OAAO,WAAW,CAAC,mBAAmB,EAAE,CAAC;AAC3C,CAAC;AAED,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,OAAO,EAAE,WAAW,EAAE,CAAC","sourcesContent":["import { useEvent, type PermissionResponse } from 'expo';\nimport { useReleasingSharedObject } from 'expo-modules-core';\nimport { useEffect, useMemo } from 'react';\n\nimport type {\n AudioMode,\n AudioPlayerOptions,\n AudioPlaylistOptions,\n AudioPlaylistStatus,\n AudioSource,\n AudioStatus,\n PreloadOptions,\n RecordingOptions,\n RecordingStatus,\n} from './Audio.types';\nimport {\n AUDIO_SAMPLE_UPDATE,\n PLAYBACK_STATUS_UPDATE,\n PLAYLIST_STATUS_UPDATE,\n RECORDING_STATUS_UPDATE,\n} from './AudioEventKeys';\nimport type { AudioPlayer, AudioSample } from './AudioModule.types';\nimport * as AudioModule from './AudioModule.web';\nimport { createRecordingOptions } from './utils/options';\nimport { resolveSource, resolveSources } from './utils/resolveSource';\n\nexport function createAudioPlayer(\n source: AudioSource | string | number | null = null,\n options: AudioPlayerOptions = {}\n): AudioPlayer {\n const { downloadFirst = false } = options;\n\n // If downloadFirst is true, we don't need to resolve the source, because it will be replaced once the source is downloaded.\n // If downloadFirst is false, we resolve the source here.\n const initialSource = downloadFirst ? null : resolveSource(source);\n const player = new AudioModule.AudioPlayerWeb(initialSource, options);\n\n // Preload the source and replace the player's source with the cached blob URL.\n // Only relevant if downloadFirst is true and source is not null.\n if (downloadFirst && source) {\n const resolved = resolveSource(source);\n if (resolved) {\n AudioModule.preloadAsync(resolved).finally(() => {\n player.replace(resolved);\n });\n }\n }\n\n return player;\n}\n\nexport function useAudioPlayer(\n source: AudioSource | string | number | null = null,\n options: AudioPlayerOptions = {}\n): AudioModule.AudioPlayerWeb {\n const { downloadFirst = false } = options;\n\n // If downloadFirst is true, we don't need to resolve the source, because it will be resolved in the useEffect below.\n // If downloadFirst is false, we resolve the source here.\n // we call .replace() in the useEffect below to replace the source with the downloaded one.\n const initialSource = useMemo(() => {\n return downloadFirst ? null : resolveSource(source);\n }, [JSON.stringify(source), downloadFirst]);\n\n const player = useReleasingSharedObject(\n () => new AudioModule.AudioPlayerWeb(initialSource, options),\n [JSON.stringify(initialSource), JSON.stringify(options)]\n );\n\n // Handle async source resolution for downloadFirst\n useEffect(() => {\n if (!downloadFirst || source === null) {\n return;\n }\n\n let isCancelled = false;\n const resolved = resolveSource(source);\n\n if (resolved) {\n AudioModule.preloadAsync(resolved).finally(() => {\n if (!isCancelled) {\n player.replace(resolved);\n }\n });\n }\n\n return () => {\n isCancelled = true;\n };\n }, [player, JSON.stringify(source), downloadFirst]);\n\n return player;\n}\n\nexport function useAudioPlayerStatus(player: AudioModule.AudioPlayerWeb): AudioStatus {\n const currentStatus = useMemo(() => player.currentStatus, [player.id]);\n return useEvent(player, PLAYBACK_STATUS_UPDATE, currentStatus);\n}\n\nexport function useAudioSampleListener(\n player: AudioModule.AudioPlayerWeb,\n listener: (data: AudioSample) => void\n) {\n player.setAudioSamplingEnabled(true);\n useEffect(() => {\n const subscription = player.addListener(AUDIO_SAMPLE_UPDATE, listener);\n return () => {\n player.setAudioSamplingEnabled(false);\n subscription.remove();\n };\n }, [player.id]);\n}\n\nexport function useAudioRecorder(\n options: RecordingOptions,\n statusListener?: (status: RecordingStatus) => void\n): AudioModule.AudioRecorderWeb {\n const platformOptions = createRecordingOptions(options);\n const recorder = useMemo(() => {\n return new AudioModule.AudioRecorderWeb(platformOptions);\n }, [JSON.stringify(platformOptions)]);\n\n useEffect(() => {\n const subscription = recorder.addListener(RECORDING_STATUS_UPDATE, (status) => {\n statusListener?.(status);\n });\n return () => {\n recorder.clearTimeouts();\n subscription.remove();\n };\n }, [recorder.id]);\n\n return recorder;\n}\n\nexport { useAudioRecorderState } from './utils/useAudioRecorderState';\n\nexport async function setIsAudioActiveAsync(active: boolean): Promise<void> {\n return await AudioModule.setIsAudioActiveAsync(active);\n}\n\nexport async function setAudioModeAsync(mode: AudioMode): Promise<void> {\n return await AudioModule.setAudioModeAsync(mode);\n}\n\nexport async function requestRecordingPermissionsAsync(): Promise<PermissionResponse> {\n return await AudioModule.requestRecordingPermissionsAsync();\n}\n\nexport async function getRecordingPermissionsAsync(): Promise<PermissionResponse> {\n return await AudioModule.getRecordingPermissionsAsync();\n}\n\nexport function useAudioPlaylist(options: AudioPlaylistOptions = {}): AudioModule.AudioPlaylistWeb {\n const { sources = [], updateInterval = 500, loop = 'none', crossOrigin } = options;\n\n const resolvedSources = useMemo(() => resolveSources(sources), [JSON.stringify(sources)]);\n\n const playlist = useMemo(\n () => new AudioModule.AudioPlaylistWeb(resolvedSources, updateInterval, loop, crossOrigin),\n [JSON.stringify(resolvedSources), updateInterval, loop, crossOrigin]\n );\n\n useEffect(() => {\n return () => playlist.destroy();\n }, [playlist]);\n\n return playlist;\n}\n\nexport function useAudioPlaylistStatus(\n playlist: AudioModule.AudioPlaylistWeb\n): AudioPlaylistStatus {\n const currentStatus = useMemo(() => playlist.currentStatus, [playlist.id]);\n return useEvent(playlist, PLAYLIST_STATUS_UPDATE, currentStatus);\n}\n\nexport function createAudioPlaylist(\n options: AudioPlaylistOptions = {}\n): AudioModule.AudioPlaylistWeb {\n const { sources = [], updateInterval = 500, loop = 'none', crossOrigin } = options;\n const resolvedSources = resolveSources(sources);\n return new AudioModule.AudioPlaylistWeb(resolvedSources, updateInterval, loop, crossOrigin);\n}\n\nexport function preload(source: AudioSource, _options: PreloadOptions = {}): void {\n const resolved = resolveSource(source);\n if (!resolved) return;\n AudioModule.preload(resolved);\n}\n\nexport function clearPreloadedSource(source: AudioSource): void {\n const resolved = resolveSource(source);\n if (!resolved) return;\n AudioModule.clearPreloadedSource(resolved);\n}\n\nexport function clearAllPreloadedSources(): void {\n AudioModule.clearAllPreloadedSources();\n}\n\nexport function getPreloadedSources(): string[] {\n return AudioModule.getPreloadedSources();\n}\n\nexport { useAudioStream } from './AudioStream.web';\n\nexport { AudioModule };\n"]}
package/build/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { type PermissionResponse, type PermissionExpiration, PermissionStatus, } from 'expo-modules-core';
1
+ export { type PermissionResponse, type PermissionExpiration, PermissionStatus } from 'expo';
2
2
  export * from './ExpoAudio';
3
3
  export type * from './Audio.types';
4
4
  export type * from './AudioModule.types';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,gBAAgB,GACjB,MAAM,mBAAmB,CAAC;AAE3B,cAAc,aAAa,CAAC;AAE5B,mBAAmB,eAAe,CAAC;AACnC,mBAAmB,qBAAqB,CAAC;AACzC,mBAAmB,qBAAqB,CAAC;AACzC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,kBAAkB,EAAE,KAAK,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,MAAM,CAAC;AAE5F,cAAc,aAAa,CAAC;AAE5B,mBAAmB,eAAe,CAAC;AACnC,mBAAmB,qBAAqB,CAAC;AACzC,mBAAmB,qBAAqB,CAAC;AACzC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC"}
package/build/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // TODO(@kitten): Remove re-exports from EMC
2
- export { PermissionStatus, } from 'expo-modules-core';
2
+ export { PermissionStatus } from 'expo';
3
3
  export * from './ExpoAudio';
4
4
  export * from './AudioConstants';
5
5
  export * from './RecordingConstants';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,OAAO,EAGL,gBAAgB,GACjB,MAAM,mBAAmB,CAAC;AAE3B,cAAc,aAAa,CAAC;AAK5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC","sourcesContent":["// TODO(@kitten): Remove re-exports from EMC\nexport {\n type PermissionResponse,\n type PermissionExpiration,\n PermissionStatus,\n} from 'expo-modules-core';\n\nexport * from './ExpoAudio';\n\nexport type * from './Audio.types';\nexport type * from './AudioModule.types';\nexport type * from './AudioStream.types';\nexport * from './AudioConstants';\nexport * from './RecordingConstants';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,OAAO,EAAsD,gBAAgB,EAAE,MAAM,MAAM,CAAC;AAE5F,cAAc,aAAa,CAAC;AAK5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC","sourcesContent":["// TODO(@kitten): Remove re-exports from EMC\nexport { type PermissionResponse, type PermissionExpiration, PermissionStatus } from 'expo';\n\nexport * from './ExpoAudio';\n\nexport type * from './Audio.types';\nexport type * from './AudioModule.types';\nexport type * from './AudioStream.types';\nexport * from './AudioConstants';\nexport * from './RecordingConstants';\n"]}
@@ -8,7 +8,7 @@
8
8
  "publication": {
9
9
  "groupId": "expo.modules.audio",
10
10
  "artifactId": "expo.modules.audio",
11
- "version": "56.0.3",
11
+ "version": "56.0.5",
12
12
  "repository": "local-maven-repo"
13
13
  }
14
14
  }
@@ -0,0 +1 @@
1
+ 7adc88e437f5c6573628c06bd85ad77da782bc1c370c756310b82d6344c96d99
@@ -0,0 +1 @@
1
+ e2232fd407b882af66893dc25ea436522fff3cb025be09a1959daa99c39bd585d685b1729c7ca5e2ea970f6c0f98b083187b17a19680f3434529e93277302646
@@ -0,0 +1 @@
1
+ a25203c3df1b887123b59db81afcf4132a1c8aeb57acfd4a58706e5d2ed4c8c5
@@ -0,0 +1 @@
1
+ 50204594468f7710e47700986cf6576ab9740fdcdd8844949bcb18070e421b297c2899d3e6159a13853039a517486529a9efc06d1ff81771038d6d9fa2cf56fb
@@ -3,7 +3,7 @@
3
3
  "component": {
4
4
  "group": "expo.modules.audio",
5
5
  "module": "expo.modules.audio",
6
- "version": "56.0.3",
6
+ "version": "56.0.5",
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-56.0.3.aar",
28
- "url": "expo.modules.audio-56.0.3.aar",
29
- "size": 472613,
30
- "sha512": "e4b9d089bcd22e14e7f7b86ceeecbdcfd1eac1948045edfdd17b553967889174bfe1e4c8d748e85e324fd9a8a59da86cc34f6485cb8ab3e2602068edf1ae479f",
31
- "sha256": "0551e1ca82278e3df7a9931bcc90878beaf8e34170f0802be20e62151cceffb6",
32
- "sha1": "dcb7b1ff4cbae34a934d203e55475c95fb30a493",
33
- "md5": "a7022f40df77fd5551bbe4d4b93bc764"
27
+ "name": "expo.modules.audio-56.0.5.aar",
28
+ "url": "expo.modules.audio-56.0.5.aar",
29
+ "size": 472595,
30
+ "sha512": "50204594468f7710e47700986cf6576ab9740fdcdd8844949bcb18070e421b297c2899d3e6159a13853039a517486529a9efc06d1ff81771038d6d9fa2cf56fb",
31
+ "sha256": "a25203c3df1b887123b59db81afcf4132a1c8aeb57acfd4a58706e5d2ed4c8c5",
32
+ "sha1": "f1783da6f71616a7bd3ca497eba8cf16ed75a7b0",
33
+ "md5": "108cc95093198f117d6cc911be1a5930"
34
34
  }
35
35
  ]
36
36
  },
@@ -137,13 +137,13 @@
137
137
  ],
138
138
  "files": [
139
139
  {
140
- "name": "expo.modules.audio-56.0.3.aar",
141
- "url": "expo.modules.audio-56.0.3.aar",
142
- "size": 472613,
143
- "sha512": "e4b9d089bcd22e14e7f7b86ceeecbdcfd1eac1948045edfdd17b553967889174bfe1e4c8d748e85e324fd9a8a59da86cc34f6485cb8ab3e2602068edf1ae479f",
144
- "sha256": "0551e1ca82278e3df7a9931bcc90878beaf8e34170f0802be20e62151cceffb6",
145
- "sha1": "dcb7b1ff4cbae34a934d203e55475c95fb30a493",
146
- "md5": "a7022f40df77fd5551bbe4d4b93bc764"
140
+ "name": "expo.modules.audio-56.0.5.aar",
141
+ "url": "expo.modules.audio-56.0.5.aar",
142
+ "size": 472595,
143
+ "sha512": "50204594468f7710e47700986cf6576ab9740fdcdd8844949bcb18070e421b297c2899d3e6159a13853039a517486529a9efc06d1ff81771038d6d9fa2cf56fb",
144
+ "sha256": "a25203c3df1b887123b59db81afcf4132a1c8aeb57acfd4a58706e5d2ed4c8c5",
145
+ "sha1": "f1783da6f71616a7bd3ca497eba8cf16ed75a7b0",
146
+ "md5": "108cc95093198f117d6cc911be1a5930"
147
147
  }
148
148
  ]
149
149
  },
@@ -157,13 +157,13 @@
157
157
  },
158
158
  "files": [
159
159
  {
160
- "name": "expo.modules.audio-56.0.3-sources.jar",
161
- "url": "expo.modules.audio-56.0.3-sources.jar",
162
- "size": 35786,
163
- "sha512": "2c0c3bd2bbecb2664d1634ed410bd9c4e7ea38841909d357e596fcfc21c9724ec19da8d4094fb0bd01b5f3f8e68fc62a1e9b23af62987f1678055797d057821d",
164
- "sha256": "ce5a7b6b4a8d0bed02d6e8954e82f5fe285928c59aedb02f6e985ed49a3c4231",
165
- "sha1": "5e4b39ecbe2139bc1b3b7c7196033a3f3f958834",
166
- "md5": "fd1625833987971f0172cd89ec751693"
160
+ "name": "expo.modules.audio-56.0.5-sources.jar",
161
+ "url": "expo.modules.audio-56.0.5-sources.jar",
162
+ "size": 35792,
163
+ "sha512": "e2232fd407b882af66893dc25ea436522fff3cb025be09a1959daa99c39bd585d685b1729c7ca5e2ea970f6c0f98b083187b17a19680f3434529e93277302646",
164
+ "sha256": "7adc88e437f5c6573628c06bd85ad77da782bc1c370c756310b82d6344c96d99",
165
+ "sha1": "5d7850aa094236f7117525f5b41b248cf88e6aa3",
166
+ "md5": "b03efa19389d62afcae08ccb49299bc5"
167
167
  }
168
168
  ]
169
169
  }
@@ -0,0 +1 @@
1
+ 33c69502e08021f27d158df65cd4a733149b06b65c4854946b88dfa42cc6df5b
@@ -0,0 +1 @@
1
+ a9b3dbbdf90ee09d09613708ea59dda7fe86611d9ff34c6ffa524e37d15343586547a9506fe730d2c1b0b4bf91402e76ff3d241d988c5fba6a0bf0ea1c3975d7
@@ -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>56.0.3</version>
12
+ <version>56.0.5</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
+ 5edc401573b021778f819b44612548f51f1c2a964b8ed8fddb440082ff8a9f33
@@ -0,0 +1 @@
1
+ 24c679d78999946834806c10aa70392d0cd37a43962cfe762e9b321774e7e7f318eea1c814d19afbe2fb6bc24937963821e38fb213acccd39438b1826c9c16a3
@@ -3,11 +3,11 @@
3
3
  <groupId>expo.modules.audio</groupId>
4
4
  <artifactId>expo.modules.audio</artifactId>
5
5
  <versioning>
6
- <latest>56.0.3</latest>
7
- <release>56.0.3</release>
6
+ <latest>56.0.5</latest>
7
+ <release>56.0.5</release>
8
8
  <versions>
9
- <version>56.0.3</version>
9
+ <version>56.0.5</version>
10
10
  </versions>
11
- <lastUpdated>20260506211920</lastUpdated>
11
+ <lastUpdated>20260513103325</lastUpdated>
12
12
  </versioning>
13
13
  </metadata>
@@ -1 +1 @@
1
- 037e761b55b6be8ec88af8a37c3d3ea1
1
+ d0c1c00020b39a96d96011fd8dfd3223
@@ -1 +1 @@
1
- b886be1d215fbecdee0ca0392ba8a9cdeefd1293
1
+ ad44c35b66e0434fb314006e66fc6911d3cdaa8d
@@ -1 +1 @@
1
- c380e46e8a6c567d5f40a50f47539293881199ec3b6b8951b568fd3ba6823f1c
1
+ 62fd88a91428018c2f614e883ad94d57a28dfa6b4c0f693d575828e9771ac5c3
@@ -1 +1 @@
1
- 40b14e0bd5b929353f7f1e5defecd36f281183f5536e1e69376f087a4bfa3336cb74e7fccc3759217566c8c265544dc473fb0004ca21fecb9b64ade1151a311e
1
+ 1c3d1771ec0ed2f2e6ae7c97e2fe7327f8d07244d08a439187ad673c0f1a0e67d245262aa2f2d59c12a2328244d0e545ff3351d5bf9920dd0bcfe905508f2987
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "expo-audio",
3
3
  "title": "Expo Audio",
4
- "version": "56.0.3",
4
+ "version": "56.0.5",
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",
@@ -26,9 +26,9 @@
26
26
  "devDependencies": {
27
27
  "@types/react": "~19.2.0",
28
28
  "@types/node": "^22.14.0",
29
- "expo": "56.0.0-preview.5",
30
- "expo-module-scripts": "56.0.2",
31
- "expo-asset": "56.0.4"
29
+ "expo": "56.0.0-preview.10",
30
+ "expo-asset": "56.0.8",
31
+ "expo-module-scripts": "56.0.2"
32
32
  },
33
33
  "peerDependencies": {
34
34
  "expo": "*",
@@ -36,7 +36,7 @@
36
36
  "react-native": "*",
37
37
  "expo-asset": "*"
38
38
  },
39
- "gitHead": "a8ab3da510a34b7bdb2262aa9887d4f78b102280",
39
+ "gitHead": "40f0a6f6711d93762e0506b37e6e077e4bd9a541",
40
40
  "scripts": {
41
41
  "build": "expo-module build",
42
42
  "clean": "expo-module clean",
@@ -1,4 +1,4 @@
1
- import type { PermissionResponse } from 'expo-modules-core';
1
+ import type { PermissionResponse } from 'expo';
2
2
  import { NativeModule, SharedObject } from 'expo-modules-core';
3
3
 
4
4
  import type {
@@ -1,5 +1,4 @@
1
- import type { PermissionResponse } from 'expo-modules-core';
2
- import { PermissionStatus } from 'expo-modules-core';
1
+ import { type PermissionResponse, PermissionStatus } from 'expo';
3
2
 
4
3
  import type { AudioMode, AudioSource } from './Audio.types';
5
4
  import { activePlayers } from './AudioPlayer.web';
package/src/ExpoAudio.ts CHANGED
@@ -1,5 +1,4 @@
1
- import { useEvent } from 'expo';
2
- import type { PermissionResponse } from 'expo-modules-core';
1
+ import { useEvent, type PermissionResponse } from 'expo';
3
2
  import { useReleasingSharedObject } from 'expo-modules-core';
4
3
  import { useEffect, useMemo } from 'react';
5
4
  import { Platform } from 'react-native';
@@ -1,5 +1,4 @@
1
- import { useEvent } from 'expo';
2
- import type { PermissionResponse } from 'expo-modules-core';
1
+ import { useEvent, type PermissionResponse } from 'expo';
3
2
  import { useReleasingSharedObject } from 'expo-modules-core';
4
3
  import { useEffect, useMemo } from 'react';
5
4
 
package/src/index.ts CHANGED
@@ -1,9 +1,5 @@
1
1
  // TODO(@kitten): Remove re-exports from EMC
2
- export {
3
- type PermissionResponse,
4
- type PermissionExpiration,
5
- PermissionStatus,
6
- } from 'expo-modules-core';
2
+ export { type PermissionResponse, type PermissionExpiration, PermissionStatus } from 'expo';
7
3
 
8
4
  export * from './ExpoAudio';
9
5
 
@@ -1 +0,0 @@
1
- ce5a7b6b4a8d0bed02d6e8954e82f5fe285928c59aedb02f6e985ed49a3c4231
@@ -1 +0,0 @@
1
- 2c0c3bd2bbecb2664d1634ed410bd9c4e7ea38841909d357e596fcfc21c9724ec19da8d4094fb0bd01b5f3f8e68fc62a1e9b23af62987f1678055797d057821d
@@ -1 +0,0 @@
1
- dcb7b1ff4cbae34a934d203e55475c95fb30a493
@@ -1 +0,0 @@
1
- 0551e1ca82278e3df7a9931bcc90878beaf8e34170f0802be20e62151cceffb6
@@ -1 +0,0 @@
1
- e4b9d089bcd22e14e7f7b86ceeecbdcfd1eac1948045edfdd17b553967889174bfe1e4c8d748e85e324fd9a8a59da86cc34f6485cb8ab3e2602068edf1ae479f
@@ -1 +0,0 @@
1
- 832bbb90351dd9831388a87d082f36f3d33660c989926281b784c0a28926e822
@@ -1 +0,0 @@
1
- 07bf39bd0759174d3956ac6449f8edc14dd266260920a4f19b7fc044787fc6c28756fc681b46c42ac4a2a1bc4ac3ef5e60b729ffe764c6e4baf61f3ef194f299
@@ -1 +0,0 @@
1
- 7c98df758143757845409e5d5f637374842eb0c1
@@ -1 +0,0 @@
1
- ae3c106afeb3b920e0f84c9448110ab3c8ff5d6033b8662171a8a5cc20ea887d
@@ -1 +0,0 @@
1
- cd36e76126daeefed8f5b45e07bc28051a569cd03557ea32e1acfcf9319728ef7909663ef840e0080d397ed608d9c708a605816eb0b943b296737fe5fda939da