diff --git a/apps/native-component-list/src/screens/Audio/AudioPreloadScreen.tsx b/apps/native-component-list/src/screens/Audio/AudioPreloadScreen.tsx new file mode 100644 index 00000000000000..623311d01c0023 --- /dev/null +++ b/apps/native-component-list/src/screens/Audio/AudioPreloadScreen.tsx @@ -0,0 +1,234 @@ +import { + preload, + getPreloadedSources, + clearAllPreloadedSources, + useAudioPlayer, + useAudioPlayerStatus, + AudioPlayer, + AudioSource, + AudioStatus, +} from 'expo-audio'; +import React from 'react'; +import { Pressable, ScrollView, StyleSheet, Text, View } from 'react-native'; + +import HeadingText from '../../components/HeadingText'; +import ListButton from '../../components/ListButton'; +import Colors from '../../constants/Colors'; + +export const sfx1: AudioSource = { + uri: 'https://cdn.freesound.org/previews/370/370182_6430986-hq.mp3', +}; + +export const sfx2: AudioSource = { + uri: 'https://cdn.freesound.org/previews/401/401542_2331641-hq.mp3', +}; + +export default function AudioPreloadScreen(props: any) { + React.useLayoutEffect(() => { + props.navigation.setOptions({ + title: 'Audio Preloading', + }); + }); + + return ( + + Sound Effects + + Both sounds were preloaded in module scope. Tap the buttons to play — they should start + near-instantly. + + + + Preload Cache + + + Preloaded Player + + This player uses a preloaded source. Try replacing to swap between the two preloaded tracks. + + + + ); +} + +function SoundEffectButtons() { + const player1 = useAudioPlayer(sfx1, { keepAudioSessionActive: true }); + const player2 = useAudioPlayer(sfx2, { keepAudioSessionActive: true }); + const status1 = useAudioPlayerStatus(player1); + const status2 = useAudioPlayerStatus(player2); + + const playSfx = (player: AudioPlayer, status: AudioStatus) => { + if (status.playing) { + player.seekTo(0); + } else { + if (status.didJustFinish || status.currentTime > 0) { + player.seekTo(0); + } + player.play(); + } + }; + + return ( + + playSfx(player1, status1)} + /> + playSfx(player2, status2)} + /> + + ); +} + +function SfxButton({ + label, + isLoaded, + onPress, +}: { + label: string; + isLoaded: boolean; + onPress: () => void; +}) { + return ( + [styles.sfxButton, pressed && styles.sfxButtonPressed]} + onPress={onPress}> + {label} + {isLoaded ? 'Ready' : 'Loading...'} + + ); +} + +function PreloadCacheInfo() { + const [sources, setSources] = React.useState([]); + + const refresh = async () => setSources(await getPreloadedSources()); + + return ( + + + Preloaded sources are consumed when a player is created with a matching URL. Use the buttons + below to preload, inspect, and clear the cache. + + { + await preload(sfx1); + await preload(sfx2); + refresh(); + }} + /> + + + {sources.length === 0 ? 'Cache is empty.' : `${sources.length} source(s) in cache:`} + + {sources.map((uri) => ( + + {uri} + + ))} + { + await clearAllPreloadedSources(); + refresh(); + }} + /> + + ); +} + +function PreloadedPlayer() { + const player = useAudioPlayer(sfx1); + const status = useAudioPlayerStatus(player); + const [currentSource, setCurrentSource] = React.useState<1 | 2>(1); + + const handleReplace = () => { + if (currentSource === 1) { + player.replace(sfx2); + setCurrentSource(2); + } else { + player.replace(sfx1); + setCurrentSource(1); + } + }; + + return ( + + Current: Sound {currentSource} + + {status.isLoaded ? `Loaded — ${Math.round(status.duration)}s` : 'Loading...'} + {status.playing ? ' — Playing' : ''} + + + { + if (status.playing) { + player.pause(); + } else { + if (status.didJustFinish) player.seekTo(0); + player.play(); + } + }} + /> + + + + ); +} + +const styles = StyleSheet.create({ + contentContainer: { + padding: 10, + }, + hint: { + marginVertical: 4, + fontSize: 13, + color: '#666', + }, + sfxRow: { + flexDirection: 'row', + gap: 12, + marginVertical: 12, + }, + sfxButton: { + flex: 1, + backgroundColor: Colors.tintColor, + borderRadius: 12, + paddingVertical: 20, + alignItems: 'center', + justifyContent: 'center', + }, + sfxButtonPressed: { + opacity: 0.7, + }, + sfxButtonText: { + color: '#fff', + fontSize: 16, + fontWeight: '700', + }, + sfxButtonStatus: { + color: 'rgba(255,255,255,0.7)', + fontSize: 12, + marginTop: 4, + }, + cacheUri: { + fontSize: 11, + color: '#999', + fontFamily: 'monospace', + marginLeft: 8, + marginVertical: 2, + }, + buttonRow: { + flexDirection: 'row', + gap: 8, + }, +}); diff --git a/apps/native-component-list/src/screens/Audio/AudioScreen.tsx b/apps/native-component-list/src/screens/Audio/AudioScreen.tsx index fcba58c5858a75..3f000133858615 100644 --- a/apps/native-component-list/src/screens/Audio/AudioScreen.tsx +++ b/apps/native-component-list/src/screens/Audio/AudioScreen.tsx @@ -1,6 +1,12 @@ +import { preload } from 'expo-audio'; + +import { sfx1, sfx2 } from './AudioPreloadScreen'; import { optionalRequire } from '../../navigation/routeBuilder'; import ComponentListScreen, { apiScreensToListElements } from '../ComponentListScreen'; +preload(sfx1); +preload(sfx2); + export const AudioScreens = [ { name: 'Expo Audio Player', @@ -34,7 +40,6 @@ export const AudioScreens = [ return optionalRequire(() => require('./CreateAudioPlayerScreen')); }, }, - { name: 'Expo Audio Lock Screen Controls', route: 'audio/expo-audio-controls', @@ -51,6 +56,14 @@ export const AudioScreens = [ return optionalRequire(() => require('./AudioEventsScreen')); }, }, + { + name: 'Expo Audio Preloading', + route: 'audio/expo-audio-preload', + options: {}, + getComponent() { + return optionalRequire(() => require('./AudioPreloadScreen')); + }, + }, ]; export default function AudioScreen() { diff --git a/apps/native-component-list/src/screens/Video/VideoAudioTracksScreen.tsx b/apps/native-component-list/src/screens/Video/VideoAudioTracksScreen.tsx index 64aa1767566d77..a13e4844f87633 100644 --- a/apps/native-component-list/src/screens/Video/VideoAudioTracksScreen.tsx +++ b/apps/native-component-list/src/screens/Video/VideoAudioTracksScreen.tsx @@ -75,13 +75,16 @@ export default function VideoAudioTracksScreen() { handleAudioTrackChange(value); }}> {availableAudioTracks && - availableAudioTracks.map((source, index) => ( - - ))} + availableAudioTracks.map((source, index) => { + let label = availableAudioTracks[index]?.label ?? 'Off'; + const name = availableAudioTracks[index]?.name; + // Apple uses a weird algorithm to determine whether to add the name tag to the track label + // This way we will get the same results on Android and iOS in the picker + if (name && !label.includes(name)) { + label = `${name} - ${label}`; + } + return ; + })} Current audio track: {audioTrack?.label ?? availableAudioTracks[0]?.label} diff --git a/expo-audio/android/src/main/java/expo/modules/audio/Playable.kt b/expo-audio/android/src/main/java/expo/modules/audio/Playable.kt deleted file mode 100644 index 06c28423eafbe3..00000000000000 --- a/expo-audio/android/src/main/java/expo/modules/audio/Playable.kt +++ /dev/null @@ -1,56 +0,0 @@ -package expo.modules.audio - -import androidx.media3.common.C -import androidx.media3.common.Player -import expo.modules.kotlin.AppContext -import kotlinx.coroutines.launch - -/** - * Common interface for audio playback objects (AudioPlayer, AudioPlaylist). - * Provides default implementations for operations shared between player types. - */ -interface Playable { - val id: String - var isPaused: Boolean - var isMuted: Boolean - var previousVolume: Float - var onPlaybackStateChange: ((Boolean) -> Unit)? - - val player: Player - val appContext: AppContext? - - val currentTime: Double get() = player.currentPosition / 1000.0 - val duration: Double get() = if (player.duration != C.TIME_UNSET) player.duration / 1000.0 else 0.0 - val isPlaying: Boolean get() = player.isPlaying - val volume: Float get() = player.volume - - fun play() { - player.play() - } - - fun pause() { - player.pause() - } - - fun seekTo(seconds: Double) { - player.seekTo((seconds * 1000L).toLong()) - } - - fun setVolume(volume: Float?) { - appContext?.mainQueue?.launch { - val boundedVolume = volume?.coerceIn(0f, 1f) ?: 1f - if (isMuted) { - if (boundedVolume > 0f) { - previousVolume = boundedVolume - } - player.volume = 0f - } else { - previousVolume = boundedVolume - player.volume = boundedVolume - } - } - } - - fun setPlaybackRate(rate: Float) - fun currentStatus(): Map -} diff --git a/packages/@expo/cli/CHANGELOG.md b/packages/@expo/cli/CHANGELOG.md index dd0d42e95dc878..0cb37405546fd9 100644 --- a/packages/@expo/cli/CHANGELOG.md +++ b/packages/@expo/cli/CHANGELOG.md @@ -10,6 +10,8 @@ ### 💡 Others +- Force `forceNodeFilesystemAPI` when watchman is enabled (the default) but not present ([#43251](https://github.com/expo/expo/pull/43251) by [@kitten](https://github.com/kitten)) + ## 55.0.9 — 2026-02-16 _This version does not introduce any user-facing changes._ diff --git a/packages/@expo/cli/src/start/server/metro/instantiateMetro.ts b/packages/@expo/cli/src/start/server/metro/instantiateMetro.ts index 361dab98b2732a..304cc37edc6f07 100644 --- a/packages/@expo/cli/src/start/server/metro/instantiateMetro.ts +++ b/packages/@expo/cli/src/start/server/metro/instantiateMetro.ts @@ -8,7 +8,7 @@ import MetroHmrServer, { Client as MetroHmrClient } from '@expo/metro/metro/HmrS import RevisionNotFoundError from '@expo/metro/metro/IncrementalBundler/RevisionNotFoundError'; import type MetroServer from '@expo/metro/metro/Server'; import formatBundlingError from '@expo/metro/metro/lib/formatBundlingError'; -import { mergeConfig, resolveConfig, type ConfigT } from '@expo/metro/metro-config'; +import { InputConfigT, mergeConfig, resolveConfig, type ConfigT } from '@expo/metro/metro-config'; import { Terminal } from '@expo/metro/metro-core'; import { createStableModuleIdFactory, getDefaultConfig } from '@expo/metro-config'; import chalk from 'chalk'; @@ -160,6 +160,15 @@ export async function loadMetroConfigAsync( }, }; + // NOTE(@kitten): `useWatchman` is currently enabled by default, but it also disables `forceNodeFilesystemAPI`. + // If we instead set it to the special value `null`, it gets enables but also bypasses the "native find" codepath, + // which is slower than just using the Node filesystem API + // See: https://github.com/facebook/metro/blob/b9c243f/packages/metro-file-map/src/index.js#L326 + // See: https://github.com/facebook/metro/blob/b9c243f/packages/metro/src/node-haste/DependencyGraph/createFileMap.js#L109 + if (config.resolver.useWatchman === true) { + asWritable(config.resolver).useWatchman = null as any; + } + globalThis.__requireCycleIgnorePatterns = config.resolver?.requireCycleIgnorePatterns; if (isExporting) { diff --git a/packages/@expo/fingerprint/CHANGELOG.md b/packages/@expo/fingerprint/CHANGELOG.md index 51feebc04a1d9b..f3c7b66725b418 100644 --- a/packages/@expo/fingerprint/CHANGELOG.md +++ b/packages/@expo/fingerprint/CHANGELOG.md @@ -8,6 +8,8 @@ ### 🐛 Bug fixes +- Fix resolution to `expo -> @expo/cli -> @expo/env` being unstable ([#42764](https://github.com/expo/expo/pull/42764) by [@kitten](https://github.com/kitten)) + ### 💡 Others ## 0.16.3 — 2026-02-03 diff --git a/packages/@expo/fingerprint/build/ExpoConfigLoader.js b/packages/@expo/fingerprint/build/ExpoConfigLoader.js index 247200aad38501..35a71dcdfba9bc 100644 --- a/packages/@expo/fingerprint/build/ExpoConfigLoader.js +++ b/packages/@expo/fingerprint/build/ExpoConfigLoader.js @@ -9,11 +9,9 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.getExpoConfigLoaderPath = getExpoConfigLoaderPath; const promises_1 = __importDefault(require("fs/promises")); const module_1 = __importDefault(require("module")); -const node_assert_1 = __importDefault(require("node:assert")); const node_process_1 = __importDefault(require("node:process")); const path_1 = __importDefault(require("path")); const resolve_from_1 = __importDefault(require("resolve-from")); -const ExpoResolver_1 = require("./ExpoResolver"); const Options_1 = require("./Options"); const Path_1 = require("./utils/Path"); async function runAsync(programName, args = []) { @@ -23,15 +21,11 @@ async function runAsync(programName, args = []) { } const projectRoot = path_1.default.resolve(args[0]); const ignoredFile = args[1] ? path_1.default.resolve(args[1]) : null; - // @ts-expect-error: module internal _cache - const loadedModulesBefore = new Set(Object.keys(module_1.default._cache)); - const expoEnvPath = (0, ExpoResolver_1.resolveExpoEnvPath)(projectRoot); - (0, node_assert_1.default)(expoEnvPath, `Could not find '@expo/env' package for the project from ${projectRoot}.`); - require(expoEnvPath).load(projectRoot); setNodeEnv('development'); + require('@expo/env').load(projectRoot); + const loadedModulesBefore = new Set(Object.keys(module_1.default._cache)); const { getConfig } = require((0, resolve_from_1.default)(path_1.default.resolve(projectRoot), 'expo/config')); const config = await getConfig(projectRoot, { skipSDKVersionRequirement: true }); - // @ts-expect-error: module internal _cache const loadedModules = Object.keys(module_1.default._cache) .filter((modulePath) => !loadedModulesBefore.has(modulePath)) .map((modulePath) => path_1.default.relative(projectRoot, modulePath)); diff --git a/packages/@expo/fingerprint/build/ExpoConfigLoader.js.map b/packages/@expo/fingerprint/build/ExpoConfigLoader.js.map index d2133276b4774a..5e8d77f7e894fb 100644 --- a/packages/@expo/fingerprint/build/ExpoConfigLoader.js.map +++ b/packages/@expo/fingerprint/build/ExpoConfigLoader.js.map @@ -1 +1 @@ -{"version":3,"file":"ExpoConfigLoader.js","sourceRoot":"","sources":["../src/ExpoConfigLoader.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sBAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,CAAC;AAC7D,CAAC;AAED,6DAA6D;AAC7D,MAAM,mCAAmC,GAAG;IAC1C,2FAA2F;IAC3F,cAAc;IAEd,6BAA6B;IAC7B,4BAA4B;IAC5B,kCAAkC;IAClC,gCAAgC;IAChC,wCAAwC;IACxC,oBAAoB;QAClB,KAAK;QACL,aAAa;QACb,cAAc;QACd,aAAa;QACb,OAAO;QACP,OAAO;QACP,QAAQ;QACR,eAAe;QACf,sBAAsB;QACtB,QAAQ;QACR,aAAa;QACb,iBAAiB;QACjB,UAAU;QACV,UAAU;QACV,aAAa;QACb,WAAW;QACX,OAAO;QACP,sBAAsB;QACtB,IAAI;QACJ,YAAY;QACZ,mBAAmB;QACnB,qBAAqB;QACrB,cAAc;QACd,cAAc;QACd,aAAa;QACb,SAAS;QACT,gBAAgB;QAChB,sBAAsB;QACtB,mBAAmB;KACpB,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ;CACpB,CAAC"} \ No newline at end of file +{"version":3,"file":"ExpoConfigLoader.js","sourceRoot":"","sources":["../src/ExpoConfigLoader.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;AAsFH,0DAEC;AAtFD,2DAA6B;AAC7B,oDAA4B;AAC5B,gEAAmC;AACnC,gDAAwB;AACxB,gEAAuC;AAEvC,uCAAiD;AACjD,uCAA6C;AAE7C,KAAK,UAAU,QAAQ,CAAC,WAAmB,EAAE,OAAiB,EAAE;IAC9D,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACpB,OAAO,CAAC,GAAG,CAAC,UAAU,WAAW,8BAA8B,CAAC,CAAC;QACjE,OAAO;IACT,CAAC;IAED,MAAM,WAAW,GAAG,cAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1C,MAAM,WAAW,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,cAAI,CAAC,OAAO,CAAC,IA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AC;QACH,CAAC;IACH,CAAC;IAAC,MAAM,CAAC,CAAA,CAAC;IAEV,OAAO,WAAW,CAAC;AACrB,CAAC;AAED;;GAEG;AACH,SAAgB,uBAAuB;IACrC,OAAO,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,qBAAqB,CAAC,CAAC;AACrD,CAAC;AAED;;;GAGG;AACH,SAAS,UAAU,CAAC,IAAkC;IACpD,sBAAO,CAAC,GAAG,CAAC,QAAQ,GAAG,sBAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,IAAI,CAAC;IACpD,sBAAO,CAAC,GAAG,CAAC,SAAS,GAAG,sBAAO,CAAC,GAAG,CAAC,SAAS,IAAI,sBAAO,CAAC,GAAG,CAAC,QAAQ,CAAC;IAEtE,+FAA+F;IAC/F,UAAU,CAAC,OAAO,GAAG,sBAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,CAAC;AAC7D,CAAC;AAED,6DAA6D;AAC7D,MAAM,mCAAmC,GAAG;IAC1C,2FAA2F;IAC3F,cAAc;IAEd,6BAA6B;IAC7B,4BAA4B;IAC5B,kCAAkC;IAClC,gCAAgC;IAChC,wCAAwC;IACxC,oBAAoB;QAClB,KAAK;QACL,aAAa;QACb,cAAc;QACd,aAAa;QACb,OAAO;QACP,OAAO;QACP,QAAQ;QACR,eAAe;QACf,sBAAsB;QACtB,QAAQ;QACR,aAAa;QACb,iBAAiB;QACjB,UAAU;QACV,UAAU;QACV,aAAa;QACb,WAAW;QACX,OAAO;QACP,sBAAsB;QACtB,IAAI;QACJ,YAAY;QACZ,mBAAmB;QACnB,qBAAqB;QACrB,cAAc;QACd,cAAc;QACd,aAAa;QACb,SAAS;QACT,gBAAgB;QAChB,sBAAsB;QACtB,mBAAmB;KACpB,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ;CACpB,CAAC"} \ No newline at end of file diff --git a/packages/@expo/fingerprint/build/ExpoResolver.d.ts b/packages/@expo/fingerprint/build/ExpoResolver.d.ts index 6a353bfb560191..812d67e8113d24 100644 --- a/packages/@expo/fingerprint/build/ExpoResolver.d.ts +++ b/packages/@expo/fingerprint/build/ExpoResolver.d.ts @@ -2,10 +2,6 @@ * Resolve the version of `expo` package in the project. */ export declare function resolveExpoVersion(projectRoot: string): string | null; -/** - * Resolve the path to the `@expo/env` package in the project. - */ -export declare function resolveExpoEnvPath(projectRoot: string): string | null; /** * Resolve the package root of `expo-modules-autolinking` package in the project. */ diff --git a/packages/@expo/fingerprint/build/ExpoResolver.js b/packages/@expo/fingerprint/build/ExpoResolver.js index 99f809af700ec9..12eebac5ef50cb 100644 --- a/packages/@expo/fingerprint/build/ExpoResolver.js +++ b/packages/@expo/fingerprint/build/ExpoResolver.js @@ -4,7 +4,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) { }; Object.defineProperty(exports, "__esModule", { value: true }); exports.resolveExpoVersion = resolveExpoVersion; -exports.resolveExpoEnvPath = resolveExpoEnvPath; exports.resolveExpoAutolinkingPackageRoot = resolveExpoAutolinkingPackageRoot; exports.resolveExpoAutolinkingCliPath = resolveExpoAutolinkingCliPath; exports.resolveExpoAutolinkingVersion = resolveExpoAutolinkingVersion; @@ -25,17 +24,6 @@ function resolveExpoVersion(projectRoot) { } return null; } -/** - * Resolve the path to the `@expo/env` package in the project. - */ -function resolveExpoEnvPath(projectRoot) { - const expoPackageRoot = resolve_from_1.default.silent(projectRoot, 'expo/package.json'); - const expoEnvPackageJsonPath = resolve_from_1.default.silent(expoPackageRoot ?? projectRoot, '@expo/env/package.json'); - if (expoEnvPackageJsonPath) { - return path_1.default.dirname(expoEnvPackageJsonPath); - } - return null; -} /** * Resolve the package root of `expo-modules-autolinking` package in the project. */ diff --git a/packages/@expo/fingerprint/build/ExpoResolver.js.map b/packages/@expo/fingerprint/build/ExpoResolver.js.map index fb2cc2eb66b525..3c6db050ecdabd 100644 --- a/packages/@expo/fingerprint/build/ExpoResolver.js.map +++ b/packages/@expo/fingerprint/build/ExpoResolver.js.map @@ -1 +1 @@ -{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IACpD,IAAI,WAAW,EAAE,CAAC;QAChB,OAAO,gBAAM,CAAC,SAAS,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;IAC9C,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"} \ No newline at end of file +{"version":3,"file":"ExpoResolver.js","sourceRoot":"","sources":["../src/ExpoResolver.ts"],"names":[],"mappings":";;;;;AASA,gDAOC;AAKD,8EAkBC;AAMD,sEAMC;AAKD,sEAOC;AAKD,kFAEC;AAMD,gDAMC;AAlFD,gDAAwB;AACxB,gEAAuC;AACvC,oDAA4B;AAE5B,IAAI,gCAAgC,GAA4B,IAAI,CAAC;AAErE;;GAEG;AACH,SAAgB,kBAAkB,CAAC,WAAmB;IACpD,MAAM,mBAAmB,GAAG,sBAAW,CAAC,MAAM,CAAC,WAAW,EAAE,mBAAmB,CAAC,CAAC;IACjF,IAAI,mBAAmB,EAAE,CAAC;QACxB,MAAM,eAAe,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;QACrD,OAAO,eAAe,CAAC,OAAO,CAAC;IACjC,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;GAEG;AACH,SAAgB,iCAAiC,CAAC,WAAmB;IACnE,IAAI,gCAAgC,EAAE,CAAC;QACrC,MAAM,CAAC,iBAAiB,EAAE,iBAAiB,CAAC,GAAG,gCAAgC,CAAC;QAChF,IAAI,iBAAiB,KAAK,WAAW,EAAE,CAAC;YACtC,OAAO,iBAAiB,CAAC;QAC3B,CAAC;IACH,CAAC;IACD,MAAM,eAAe,GAAG,sBAAW,CAAC,MAAM,CAAC,WAAW,EAAE,mBAAmB,CAAC,CAAC;IAC7E,MAAM,0BAA0B,GAAG,sBAAW,CAAC,MAAM,CACnD,eAAe,IAAI,WAAW,EAC9B,uCAAuC,CACxC,CAAC;IACF,IAAI,0BAA0B,EAAE,CAAC;QAC/B,MAAM,sBAAsB,GAAG,cAAI,CAAC,OAAO,CAAC,0BAA0B,CAAC,CAAC;QACxE,gCAAgC,GAAG,CAAC,WAAW,EAAE,sBAAsB,CAAC,CAAC;QACzE,OAAO,sBAAsB,CAAC;IAChC,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;GAGG;AACH,SAAgB,6BAA6B,CAAC,WAAmB;IAC/D,MAAM,sBAAsB,GAAG,iCAAiC,CAAC,WAAW,CAAC,CAAC;IAC9E,IAAI,sBAAsB,IAAI,IAAI,EAAE,CAAC;QACnC,MAAM,IAAI,KAAK,CAAC,iEAAiE,CAAC,CAAC;IACrF,CAAC;IACD,OAAO,cAAI,CAAC,IAAI,CAAC,sBAAsB,EAAE,KAAK,EAAE,6BAA6B,CAAC,CAAC;AACjF,CAAC;AAED;;GAEG;AACH,SAAgB,6BAA6B,CAAC,WAAmB;IAC/D,MAAM,sBAAsB,GAAG,iCAAiC,CAAC,WAAW,CAAC,CAAC;IAC9E,IAAI,sBAAsB,EAAE,CAAC;QAC3B,MAAM,sBAAsB,GAAG,OAAO,CAAC,cAAI,CAAC,IAAI,CAAC,sBAAsB,EAAE,cAAc,CAAC,CAAC,CAAC;QAC1F,OAAO,sBAAsB,CAAC,OAAO,CAAC;IACxC,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;GAEG;AACH,SAAgB,mCAAmC,CAAC,WAAmB;IACrE,OAAO,sBAAW,CAAC,MAAM,CAAC,WAAW,EAAE,qBAAqB,CAAC,IAAI,IAAI,CAAC;AACxE,CAAC;AAED;;;GAGG;AACH,SAAgB,kBAAkB,CAAC,WAAmB,EAAE,KAAa;IACnE,MAAM,WAAW,GAAG,kBAAkB,CAAC,WAAW,CAAC,CAAC;IACpD,IAAI,WAAW,EAAE,CAAC;QAChB,OAAO,gBAAM,CAAC,SAAS,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;IAC9C,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"} \ No newline at end of file diff --git a/packages/@expo/fingerprint/package.json b/packages/@expo/fingerprint/package.json index 239b931cfe9912..2c36dab3d87cae 100644 --- a/packages/@expo/fingerprint/package.json +++ b/packages/@expo/fingerprint/package.json @@ -43,6 +43,7 @@ "license": "MIT", "homepage": "https://github.com/expo/expo/tree/main/packages/@expo/fingerprint#readme", "dependencies": { + "@expo/env": "^2.0.11", "@expo/spawn-async": "^1.7.2", "arg": "^5.0.2", "chalk": "^4.1.2", diff --git a/packages/@expo/fingerprint/src/ExpoConfigLoader.ts b/packages/@expo/fingerprint/src/ExpoConfigLoader.ts index ca00f244201cc0..cf92105d0ac387 100644 --- a/packages/@expo/fingerprint/src/ExpoConfigLoader.ts +++ b/packages/@expo/fingerprint/src/ExpoConfigLoader.ts @@ -4,12 +4,10 @@ import fs from 'fs/promises'; import module from 'module'; -import assert from 'node:assert'; import process from 'node:process'; import path from 'path'; import resolveFrom from 'resolve-from'; -import { resolveExpoEnvPath } from './ExpoResolver'; import { DEFAULT_IGNORE_PATHS } from './Options'; import { isIgnoredPath } from './utils/Path'; @@ -22,16 +20,14 @@ async function runAsync(programName: string, args: string[] = []) { const projectRoot = path.resolve(args[0]); const ignoredFile = args[1] ? path.resolve(args[1]) : null; - // @ts-expect-error: module internal _cache + setNodeEnv('development'); + require('@expo/env').load(projectRoot); + const loadedModulesBefore = new Set(Object.keys(module._cache)); - const expoEnvPath = resolveExpoEnvPath(projectRoot); - assert(expoEnvPath, `Could not find '@expo/env' package for the project from ${projectRoot}.`); - require(expoEnvPath).load(projectRoot); - setNodeEnv('development'); const { getConfig } = require(resolveFrom(path.resolve(projectRoot), 'expo/config')); const config = await getConfig(projectRoot, { skipSDKVersionRequirement: true }); - // @ts-expect-error: module internal _cache + const loadedModules = Object.keys(module._cache) .filter((modulePath) => !loadedModulesBefore.has(modulePath)) .map((modulePath) => path.relative(projectRoot, modulePath)); diff --git a/packages/@expo/fingerprint/src/ExpoResolver.ts b/packages/@expo/fingerprint/src/ExpoResolver.ts index 2954c0c74484b9..7426a67dccdfb9 100644 --- a/packages/@expo/fingerprint/src/ExpoResolver.ts +++ b/packages/@expo/fingerprint/src/ExpoResolver.ts @@ -16,21 +16,6 @@ export function resolveExpoVersion(projectRoot: string): string | null { return null; } -/** - * Resolve the path to the `@expo/env` package in the project. - */ -export function resolveExpoEnvPath(projectRoot: string): string | null { - const expoPackageRoot = resolveFrom.silent(projectRoot, 'expo/package.json'); - const expoEnvPackageJsonPath = resolveFrom.silent( - expoPackageRoot ?? projectRoot, - '@expo/env/package.json' - ); - if (expoEnvPackageJsonPath) { - return path.dirname(expoEnvPackageJsonPath); - } - return null; -} - /** * Resolve the package root of `expo-modules-autolinking` package in the project. */ diff --git a/packages/@expo/fingerprint/src/types/module.d.ts b/packages/@expo/fingerprint/src/types/module.d.ts new file mode 100644 index 00000000000000..b78b434c33d1e3 --- /dev/null +++ b/packages/@expo/fingerprint/src/types/module.d.ts @@ -0,0 +1,7 @@ +import * as __module from 'module'; + +declare module 'module' { + namespace Module { + export const _cache: Record; + } +} diff --git a/packages/@expo/metro-config/CHANGELOG.md b/packages/@expo/metro-config/CHANGELOG.md index 01ef65b1ee3213..14e94f5ce9c18e 100644 --- a/packages/@expo/metro-config/CHANGELOG.md +++ b/packages/@expo/metro-config/CHANGELOG.md @@ -10,6 +10,8 @@ ### 💡 Others +- Set default `resolver.useWatchman: undefined` value (enables it by default, as before) ([#43251](https://github.com/expo/expo/pull/43251) by [@kitten](https://github.com/kitten)) + ## 55.0.6 — 2026-02-16 _This version does not introduce any user-facing changes._ diff --git a/packages/@expo/metro-config/build/ExpoMetroConfig.d.ts b/packages/@expo/metro-config/build/ExpoMetroConfig.d.ts index 312a382e1d3f17..35c2bc1e1a8e86 100644 --- a/packages/@expo/metro-config/build/ExpoMetroConfig.d.ts +++ b/packages/@expo/metro-config/build/ExpoMetroConfig.d.ts @@ -45,6 +45,7 @@ export declare function getDefaultConfig(projectRoot: string, { mode, isCSSEnabl sourceExts: string[]; nodeModulesPaths: string[]; blockList: RegExp[]; + useWatchman: undefined; }; cacheStores: FileStore[]; watcher: { diff --git a/packages/@expo/metro-config/build/ExpoMetroConfig.js b/packages/@expo/metro-config/build/ExpoMetroConfig.js index 780c091c670a6c..46a1d47e1f93b5 100644 --- a/packages/@expo/metro-config/build/ExpoMetroConfig.js +++ b/packages/@expo/metro-config/build/ExpoMetroConfig.js @@ -224,6 +224,7 @@ function getDefaultConfig(projectRoot, { mode, isCSSEnabled = true, unstable_bef // This prevents unwanted fast refresh on the declaration files changes. /\.expo[\\/]types/, ].concat(metroDefaultValues.resolver.blockList ?? []), + useWatchman: undefined, }, cacheStores: [cacheStore], watcher: { diff --git a/packages/@expo/metro-config/build/ExpoMetroConfig.js.map b/packages/@expo/metro-config/build/ExpoMetroConfig.js.map index 9d738bb5c51d4a..93233c80465aab 100644 --- a/packages/@expo/metro-config/build/ExpoMetroConfig.js.map +++ b/packages/@expo/metro-config/build/ExpoMetroConfig.js.map @@ -1 +1 @@ -{"version":3,"file":"ExpoMetroConfig.js","sourceRoot":"","sources":["../src/ExpoMetroConfig.ts"],"names":[],"mappings":";;;;;;AA2IA,kEA4CC;AAED,4CAwPC;AAjbD,qEAAqE;AACrE,yCAA8C;AAC9C,8CAA2E;AAC3E,gEAAuC;AASvC,yDAAqD;AAErD,kDAA0B;AAC1B,4CAAoB;AACpB,gDAAwB;AACxB,gEAAuC;AAEvC,qDAAsF;AAuahE,yGAvaa,yCAAwB,OAuab;AAta9C,+BAA4B;AAC5B,6CAAyC;AACzC,uDAAoD;AACpD,uDAAoD;AACpD,2DAA2D;AAE3D,0DAA2D;AAC3D,0EAAuE;AACvE,wDAAkE;AAClE,+CAA+C;AAC/C,yDAAsD;AAEtD,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,mBAAmB,CAAuB,CAAC;AA0B1E,IAAI,oBAAoB,GAAG,KAAK,CAAC;AACjC,IAAI,yBAAyB,GAAG,KAAK,CAAC;AAEtC,8EAA8E;AAC9E,uEAAuE;AACvE,SAAS,uCAAuC;IAC9C,MAAM,EACJ,KAAK,GACN,GAA0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,MAAM,CAAC,WAAW,EAAE,QAAQ,SAAS,EAAE,CAAC,CAAC;AAC9D,CAAC;AAED,SAAS,2BAA2B,CAAC,WAAmB;IACtD,MAAM,kBAAkB,GAAG,qBAAqB,CAAC;IACjD,MAAM,YAAY,GAAG,sBAAW,CAAC,MAAM,CAAC,WAAW,EAAE,kBAAkB,CAAC,CAAC;IACzE,IAAI,YAAY,EAAE,CAAC;QACjB,OAAO,YAAY,CAAC;IACtB,CAAC;IACD,wGAAwG;IACxG,wGAAwG;IACxG,uEAAuE;IACvE,MAAM,cAAc,GAAG,sBAAW,CAAC,MAAM,CAAC,WAAW,EAAE,0BAA0B,CAAC,CAAC;IACnF,IAAI,cAAc,EAAE,CAAC;QACnB,OAAO,sBAAW,CAAC,MAAM,CAAC,cAAc,EAAE,kBAAkB,CAAC,CAAC;IAChE,CAAC;IACD,qGAAqG;IACrG,2BAA2B;IAC3B,MAAM,QAAQ,GAAG,eAAe,CAAC,WAAW,CAAC,CAAC;IAC9C,OAAO,QAAQ,CAAC,CAAC,CAAC,sBAAW,CAAC,MAAM,CAAC,QAAQ,EAAE,kBAAkB,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AACjF,CAAC"} \ No newline at end of file diff --git a/packages/@expo/metro-config/src/ExpoMetroConfig.ts b/packages/@expo/metro-config/src/ExpoMetroConfig.ts index 72a85fd8cd0576..48f7b266e14a25 100644 --- a/packages/@expo/metro-config/src/ExpoMetroConfig.ts +++ b/packages/@expo/metro-config/src/ExpoMetroConfig.ts @@ -312,6 +312,8 @@ export function getDefaultConfig( // This prevents unwanted fast refresh on the declaration files changes. /\.expo[\\/]types/, ].concat(metroDefaultValues.resolver.blockList ?? []), + + useWatchman: undefined, }, cacheStores: [cacheStore], watcher: { diff --git a/packages/create-expo-module/src/create-expo-module.ts b/packages/create-expo-module/src/create-expo-module.ts index 73ab570ae76e9a..b2bf7162a78c04 100644 --- a/packages/create-expo-module/src/create-expo-module.ts +++ b/packages/create-expo-module/src/create-expo-module.ts @@ -3,6 +3,7 @@ import chalk from 'chalk'; import { Command } from 'commander'; import ejs from 'ejs'; import fs from 'node:fs'; +import os from 'node:os'; import path from 'node:path'; import prompts from 'prompts'; @@ -23,7 +24,7 @@ import { eventCreateExpoModule, getTelemetryClient, logEventAsync } from './tele import type { CommandOptions, LocalSubstitutionData, SubstitutionData } from './types'; import { env } from './utils/env'; import { newStep } from './utils/ora'; -import { downloadAndExtractTarball } from './utils/tar'; +import { extractLocalTarball } from './utils/tar'; const debug = require('debug')('create-expo-module:main') as typeof console.log; const packageJson = require('../package.json'); @@ -204,12 +205,41 @@ async function getFilesAsync(root: string, dir: string | null = null): Promise { - debug(`Using module template ${chalk.bold(packageName)}@${chalk.bold(version)}`); - const { stdout } = await spawnAsync('npm', ['view', `${packageName}@${version}`, 'dist.tarball']); - return stdout.trim(); +async function npmPackAsync(packageName: string, cwd: string): Promise { + const npm = process.platform === 'win32' ? 'npm.cmd' : 'npm'; + const cmd = ['pack', packageName, '--json']; + const cmdString = `${npm} ${cmd.join(' ')}`; + debug('Run:', cmdString, `(cwd: ${cwd})`); + + let results: string; + try { + results = (await spawnAsync(npm, cmd, { cwd })).stdout?.trim(); + } catch (error: any) { + if (error?.stderr?.match(/npm ERR! code E404/)) { + const pkg = + error.stderr.match(/npm ERR! 404\s+'(.*)' is not in this registry\./)?.[1] ?? error.stderr; + throw new Error(`NPM package not found: ` + pkg); + } + throw error; + } + + if (!results) { + throw new Error(`No output from "${cmdString}"`); + } + + try { + const json = JSON.parse(results); + if (!Array.isArray(json) || !json[0]?.filename) { + throw new Error(`Invalid response from npm: ${results}`); + } + return json[0].filename; + } catch (error: any) { + throw new Error( + `Could not parse JSON returned from "${cmdString}".\n\n${results}\n\nError: ${error.message}` + ); + } } /** @@ -255,12 +285,13 @@ async function downloadPackageAsync(targetDir: string, isLocal = false): Promise return await newStep('Downloading module template from npm', async (step) => { const templateVersion = await getTemplateVersion(isLocal); const packageName = isLocal ? 'expo-module-template-local' : 'expo-module-template'; + const tmpDir = path.join(os.tmpdir(), '.create-expo-module'); + await fs.promises.mkdir(tmpDir, { recursive: true }); + + let filename: string; try { - await downloadAndExtractTarball({ - url: await getNpmTarballUrl(packageName, templateVersion), - dir: targetDir, - }); + filename = await npmPackAsync(`${packageName}@${templateVersion}`, tmpDir); } catch { console.log(); console.warn( @@ -268,12 +299,16 @@ async function downloadPackageAsync(targetDir: string, isLocal = false): Promise "Couldn't download the versioned template from npm, falling back to the latest version." ) ); - await downloadAndExtractTarball({ - url: await getNpmTarballUrl(packageName, 'latest'), - dir: targetDir, - }); + filename = await npmPackAsync(`${packageName}@latest`, tmpDir); } + await extractLocalTarball({ + filePath: path.join(tmpDir, filename), + dir: targetDir, + }); + + await fs.promises.rm(tmpDir, { recursive: true, force: true }); + step.succeed('Downloaded module template from npm registry.'); return path.join(targetDir, 'package'); diff --git a/packages/create-expo-module/src/utils/tar.ts b/packages/create-expo-module/src/utils/tar.ts index dba89eb5580008..795c9caca33577 100644 --- a/packages/create-expo-module/src/utils/tar.ts +++ b/packages/create-expo-module/src/utils/tar.ts @@ -1,35 +1,11 @@ -import { Readable, Stream } from 'node:stream'; +import fs from 'node:fs'; +import { Stream } from 'node:stream'; import { promisify } from 'node:util'; import { extract as tarExtract } from 'tar'; -import { fetch } from './fetch'; - -const debug = require('debug')('create-expo-module:tar') as typeof console.log; const pipeline = promisify(Stream.pipeline); -type DownloadAndExtractTarballOptions = { - /** The publicly accessible URL to download the tarball from */ - url: string; - /** The local folder to extract to */ - dir: string; -}; - -/** Download and extract tarballs directly from a publicly accessible URL */ -export async function downloadAndExtractTarball({ url, dir }: DownloadAndExtractTarballOptions) { - const response = await fetch(url); - - if (!response.ok) { - debug(`Failed to fetch "%s", received response: %O`, url, response); - throw new Error(`Failed to download "${url}", received response status ${response.status}.`); - } - - if (!response.body) { - debug(`Failed to fetch "%s", received no response body: %O`, url, response); - throw new Error(`Failed to download "${url}", received no response body.`); - } - - await pipeline( - Readable.fromWeb(response.body as ReadableStream), - tarExtract({ cwd: dir }) - ); +/** Extract a local tarball file to a directory */ +export async function extractLocalTarball({ filePath, dir }: { filePath: string; dir: string }) { + await pipeline(fs.createReadStream(filePath), tarExtract({ cwd: dir })); } diff --git a/packages/expo-audio/CHANGELOG.md b/packages/expo-audio/CHANGELOG.md index 02ca59e5bb26e8..1e683b345a4396 100644 --- a/packages/expo-audio/CHANGELOG.md +++ b/packages/expo-audio/CHANGELOG.md @@ -8,6 +8,8 @@ ### 🐛 Bug fixes +- [Web] Fix potential `nan` duration. ([#43268](https://github.com/expo/expo/pull/43268) by [@alanjhughes](https://github.com/alanjhughes)) + ### 💡 Others ## 55.0.6 — 2026-02-16 @@ -21,6 +23,7 @@ - [Web] Add support for selecting recording inputs. ([#43151](https://github.com/expo/expo/pull/43151) by [@alanjhughes](https://github.com/alanjhughes)) - [Web] Add support for recording metering. ([#43152](https://github.com/expo/expo/pull/43152) by [@alanjhughes](https://github.com/alanjhughes)) - [Web] Enable `setIsAudioActiveAsync`. ([#43142](https://github.com/expo/expo/pull/43142) by [@alanjhughes](https://github.com/alanjhughes)) +- Add support for preloading audio sources. ([#43063](https://github.com/expo/expo/pull/43063) by [@alanjhughes](https://github.com/alanjhughes)) ### 🐛 Bug fixes diff --git a/packages/expo-audio/android/build.gradle b/packages/expo-audio/android/build.gradle index d7861f0170fb62..e992f9156ab867 100644 --- a/packages/expo-audio/android/build.gradle +++ b/packages/expo-audio/android/build.gradle @@ -24,12 +24,14 @@ repositories { dependencies { implementation 'androidx.appcompat:appcompat:1.7.1' + implementation 'androidx.core:core-ktx:1.15.0' def androidxMedia3Version = "1.8.0" implementation "androidx.media3:media3-session:$androidxMedia3Version" implementation "androidx.media3:media3-ui:$androidxMedia3Version" implementation "androidx.media3:media3-exoplayer:$androidxMedia3Version" implementation "androidx.media3:media3-exoplayer-dash:$androidxMedia3Version" + implementation "androidx.media3:media3-datasource:$androidxMedia3Version" implementation "androidx.media3:media3-datasource-okhttp:$androidxMedia3Version" implementation "androidx.media3:media3-exoplayer-hls:$androidxMedia3Version" implementation "androidx.media3:media3-exoplayer-smoothstreaming:$androidxMedia3Version" diff --git a/packages/expo-audio/android/src/main/java/expo/modules/audio/AudioModule.kt b/packages/expo-audio/android/src/main/java/expo/modules/audio/AudioModule.kt index 93fc8b6fcbf275..f2cae68d90254f 100644 --- a/packages/expo-audio/android/src/main/java/expo/modules/audio/AudioModule.kt +++ b/packages/expo-audio/android/src/main/java/expo/modules/audio/AudioModule.kt @@ -34,12 +34,16 @@ import expo.modules.kotlin.functions.Coroutine import expo.modules.kotlin.functions.Queues import expo.modules.kotlin.modules.Module import expo.modules.kotlin.modules.ModuleDefinition +import kotlinx.coroutines.DelicateCoroutinesApi +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.GlobalScope import kotlinx.coroutines.launch import kotlinx.coroutines.runBlocking import okhttp3.OkHttpClient import java.io.File import java.util.concurrent.ConcurrentHashMap +@DelicateCoroutinesApi @androidx.annotation.OptIn(androidx.media3.common.util.UnstableApi::class) class AudioModule : Module() { private lateinit var audioManager: AudioManager @@ -218,6 +222,25 @@ class AudioModule : Module() { Permissions.getPermissionsWithPermissionsManager(appContext.permissions, promise, Manifest.permission.RECORD_AUDIO) } + AsyncFunction("preload") Coroutine { source: AudioSource, _: Double -> + val uri = source.uri ?: return@Coroutine + val upstreamFactory = httpDataSourceFactory(source.headers) + AudioPreloadCache.preload(context, uri, upstreamFactory) + } + + AsyncFunction("clearPreloadedSource") Coroutine { source: AudioSource -> + val uri = source.uri ?: return@Coroutine + AudioPreloadCache.clearSource(context, uri) + } + + AsyncFunction("clearAllPreloadedSources") Coroutine { -> + AudioPreloadCache.clearAll(context) + } + + AsyncFunction("getPreloadedSources") { + AudioPreloadCache.getPreloadedSources() + } + OnActivityEntersBackground { if (!shouldPlayInBackground) { releaseAudioFocus() @@ -263,7 +286,7 @@ class AudioModule : Module() { } OnDestroy { - appContext.mainQueue.launch { + GlobalScope.launch(Dispatchers.Main) { releaseAudioFocus() players.values.forEach { it.ref.stop() @@ -276,18 +299,21 @@ class AudioModule : Module() { recorders.values.forEach { it.stopRecording() } + AudioPreloadCache.release() } } Class(AudioPlayer::class) { - Constructor { source: AudioSource?, updateInterval: Double, keepAudioSessionActive: Boolean -> + Constructor { source: AudioSource?, updateInterval: Double, keepAudioSessionActive: Boolean, preferredForwardBufferDuration: Double -> val mediaSource = createMediaItem(source) + val bufferDurationMs = (preferredForwardBufferDuration * 1000).toLong() runOnMain { val player = AudioPlayer( context, appContext, mediaSource, - updateInterval + updateInterval, + bufferDurationMs ) player.onPlaybackStateChange = { isPlaying -> if (!isPlaying && shouldReleaseFocus()) { @@ -760,7 +786,9 @@ class AudioModule : Module() { } val factory = when (uri.scheme) { - "http", "https" -> httpDataSourceFactory(source.headers) + "http", "https" -> { + AudioPreloadCache.createCacheDataSourceFactory(context, httpDataSourceFactory(source.headers)) + } else -> DefaultDataSource.Factory(context) } return buildMediaSourceFactory(factory, mediaItem) diff --git a/packages/expo-audio/android/src/main/java/expo/modules/audio/AudioPlayer.kt b/packages/expo-audio/android/src/main/java/expo/modules/audio/AudioPlayer.kt index 878750c8b25672..f7c43641fc12b6 100644 --- a/packages/expo-audio/android/src/main/java/expo/modules/audio/AudioPlayer.kt +++ b/packages/expo-audio/android/src/main/java/expo/modules/audio/AudioPlayer.kt @@ -11,6 +11,7 @@ import androidx.media3.common.MediaItem import androidx.media3.common.PlaybackParameters import androidx.media3.common.Player import androidx.media3.common.util.UnstableApi +import androidx.media3.exoplayer.DefaultLoadControl import androidx.media3.exoplayer.ExoPlayer import androidx.media3.exoplayer.source.MediaSource import androidx.media3.session.MediaSession @@ -43,13 +44,28 @@ class AudioPlayer( context: Context, appContext: AppContext, source: MediaSource?, - private val updateInterval: Double + private val updateInterval: Double, + bufferDurationMs: Long = 0 ) : SharedRef( ExoPlayer.Builder(context) .setLooper(context.mainLooper) .setAudioAttributes(AudioAttributes.DEFAULT, false) .setSeekForwardIncrementMs(SEEK_JUMP_INTERVAL_MS) .setSeekBackIncrementMs(SEEK_JUMP_INTERVAL_MS) + .apply { + if (bufferDurationMs > 0) { + setLoadControl( + DefaultLoadControl.Builder() + .setBufferDurationsMs( + DefaultLoadControl.DEFAULT_MIN_BUFFER_MS, + bufferDurationMs.toInt().coerceAtLeast(DefaultLoadControl.DEFAULT_MIN_BUFFER_MS), + DefaultLoadControl.DEFAULT_BUFFER_FOR_PLAYBACK_MS, + DefaultLoadControl.DEFAULT_BUFFER_FOR_PLAYBACK_AFTER_REBUFFER_MS + ) + .build() + ) + } + } .build(), appContext ), diff --git a/packages/expo-audio/android/src/main/java/expo/modules/audio/AudioPreloadCache.kt b/packages/expo-audio/android/src/main/java/expo/modules/audio/AudioPreloadCache.kt new file mode 100644 index 00000000000000..d1c644552d1135 --- /dev/null +++ b/packages/expo-audio/android/src/main/java/expo/modules/audio/AudioPreloadCache.kt @@ -0,0 +1,89 @@ +package expo.modules.audio + +import android.content.Context +import androidx.core.net.toUri +import androidx.media3.datasource.DataSource +import androidx.media3.datasource.DataSpec +import androidx.media3.datasource.DefaultDataSource +import androidx.media3.datasource.cache.CacheDataSource +import androidx.media3.datasource.cache.CacheWriter +import androidx.media3.datasource.cache.LeastRecentlyUsedCacheEvictor +import androidx.media3.datasource.cache.SimpleCache +import androidx.media3.database.StandaloneDatabaseProvider +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.withContext +import java.io.File + +private const val CACHE_DIR_NAME = "expo_audio_preload" +private const val MAX_CACHE_SIZE_BYTES = 100L * 1024 * 1024 + +@androidx.annotation.OptIn(androidx.media3.common.util.UnstableApi::class) +object AudioPreloadCache { + private val lock = Any() + private var cache: SimpleCache? = null + private val preloadedUris = mutableSetOf() + + fun getCache(context: Context): SimpleCache = synchronized(lock) { + cache ?: run { + val cacheDir = File(context.cacheDir, CACHE_DIR_NAME) + val evictor = LeastRecentlyUsedCacheEvictor(MAX_CACHE_SIZE_BYTES) + val databaseProvider = StandaloneDatabaseProvider(context) + SimpleCache(cacheDir, evictor, databaseProvider).also { cache = it } + } + } + + fun createCacheDataSourceFactory( + context: Context, + upstreamFactory: DataSource.Factory + ): CacheDataSource.Factory = + CacheDataSource.Factory() + .setCache(getCache(context)) + .setUpstreamDataSourceFactory(upstreamFactory) + .setFlags(CacheDataSource.FLAG_IGNORE_CACHE_ON_ERROR) + + suspend fun preload(context: Context, uri: String, upstreamFactory: DataSource.Factory? = null) = withContext(Dispatchers.IO) { + val factory = upstreamFactory ?: DefaultDataSource.Factory(context) + val cacheDataSourceFactory = CacheDataSource.Factory() + .setCache(getCache(context)) + .setUpstreamDataSourceFactory(factory) + .setFlags(CacheDataSource.FLAG_IGNORE_CACHE_ON_ERROR) + + val dataSpec = DataSpec.Builder().setUri(uri.toUri()).build() + val dataSource = cacheDataSourceFactory.createDataSource() + CacheWriter(dataSource, dataSpec, null, null).cache() + synchronized(lock) { preloadedUris.add(uri) } + } + + suspend fun clearSource(context: Context, uri: String) = withContext(Dispatchers.IO) { + val simpleCache = getCache(context) + simpleCache.getCachedSpans(uri).forEach { span -> + simpleCache.removeSpan(span) + } + synchronized(lock) { preloadedUris.remove(uri) } + } + + suspend fun clearAll(context: Context) = withContext(Dispatchers.IO) { + synchronized(lock) { + cache?.let { simpleCache -> + simpleCache.keys.toList().forEach { key -> + simpleCache.getCachedSpans(key).forEach { span -> + simpleCache.removeSpan(span) + } + } + } + preloadedUris.clear() + } + } + + suspend fun release() = withContext(Dispatchers.IO) { + synchronized(lock) { + cache?.release() + cache = null + preloadedUris.clear() + } + } + + fun getPreloadedSources(): List = synchronized(lock) { + preloadedUris.toList() + } +} diff --git a/packages/expo-audio/build/Audio.types.d.ts b/packages/expo-audio/build/Audio.types.d.ts index 2f88e3f2ba1ce3..4aba6ad4505f98 100644 --- a/packages/expo-audio/build/Audio.types.d.ts +++ b/packages/expo-audio/build/Audio.types.d.ts @@ -116,6 +116,39 @@ export type AudioPlayerOptions = { * @default false */ keepAudioSessionActive?: boolean; + /** + * The duration in seconds the player should buffer ahead of the current playback position. + * A higher value improves playback stability at the cost of more memory/network usage. + * + * - **iOS**: Maps to `AVPlayerItem.preferredForwardBufferDuration`. A value of `0` lets the system decide. + * - **Android**: Configures ExoPlayer's `DefaultLoadControl` max buffer duration. + * - **Web**: Not applicable (browser manages buffering). + * + * @default 0 (system default) + * + * @platform ios + * @platform android + */ + preferredForwardBufferDuration?: number; +}; +/** + * Options for configuring audio preloading behavior. + */ +export type PreloadOptions = { + /** + * The duration in seconds the player should buffer ahead of the current playback position. + * A higher value improves playback stability at the cost of more memory/network usage. + * + * - **iOS**: Maps to `AVPlayerItem.preferredForwardBufferDuration`. A value of `0` lets the system decide. + * - **Android**: Configures ExoPlayer's buffer duration. + * - **Web**: Not applicable (browser manages buffering). + * + * @default 10 + * + * @platform ios + * @platform android + */ + preferredForwardBufferDuration?: number; }; /** * @deprecated Use `AudioPlayerOptions` instead. diff --git a/packages/expo-audio/build/Audio.types.d.ts.map b/packages/expo-audio/build/Audio.types.d.ts.map index 41b111a5169100..d34f43d8e9755e 100644 --- a/packages/expo-audio/build/Audio.types.d.ts.map +++ b/packages/expo-audio/build/Audio.types.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Audio.types.d.ts","sourceRoot":"","sources":["../src/Audio.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAErE;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAGF,MAAM,MAAM,WAAW,GACnB,MAAM,GACN,MAAM,GACN,IAAI,GACJ;IACE;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM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AC"} \ No newline at end of file +{"version":3,"file":"Audio.types.d.ts","sourceRoot":"","sources":["../src/Audio.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAErE;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAGF,MAAM,MAAM,WAAW,GACnB,MAAM,GACN,MAAM,GACN,IAAI,GACJ;IACE;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEN;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;;;;;;;OASG;IACH,WAAW,CAAC,EAAE,WAAW,GAAG,iBAAiB,CAAC;IAC9C;;;;;;;;;;;OAWG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC;;;;;;;;;;;;OAYG;IACH,8BAA8B,CAAC,EAAE,MAAM,CAAC;CACzC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B;;;;;;;;;;;;OAYG;IACH,8BAA8B,CAAC,EAAE,MAAM,CAAC;CACzC,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,kBAAkB,CAAC;AAElD;;;;;;GAMG;AACH,MAAM,MAAM,cAAc,GAAG;IA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AKG;IACH,WAAW,CAAC,EAAE,WAAW,GAAG,iBAAiB,CAAC;CAC/C,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,mDAAmD;IACnD,EAAE,EAAE,MAAM,CAAC;IACX,4DAA4D;IAC5D,YAAY,EAAE,MAAM,CAAC;IACrB,8CAA8C;IAC9C,UAAU,EAAE,MAAM,CAAC;IACnB,4CAA4C;IAC5C,WAAW,EAAE,MAAM,CAAC;IACpB,sDAAsD;IACtD,QAAQ,EAAE,MAAM,CAAC;IACjB,+CAA+C;IAC/C,OAAO,EAAE,OAAO,CAAC;IACjB,uCAAuC;IACvC,WAAW,EAAE,OAAO,CAAC;IACrB,sDAAsD;IACtD,QAAQ,EAAE,OAAO,CAAC;IAClB,kDAAkD;IAClD,YAAY,EAAE,MAAM,CAAC;IACrB,mCAAmC;IACnC,KAAK,EAAE,OAAO,CAAC;IACf,yCAAyC;IACzC,MAAM,EAAE,MAAM,CAAC;IACf,yBAAyB;IACzB,IAAI,EAAE,qBAAqB,CAAC;IAC5B,uDAAuD;IACvD,aAAa,EAAE,OAAO,CAAC;CACxB,CAAC"} \ No newline at end of file diff --git a/packages/expo-audio/build/Audio.types.js.map b/packages/expo-audio/build/Audio.types.js.map index 12f73c729cfacc..3bb272393a0502 100644 --- a/packages/expo-audio/build/Audio.types.js.map +++ b/packages/expo-audio/build/Audio.types.js.map @@ -1 +1 @@ -{"version":3,"file":"Audio.types.js","sourceRoot":"","sources":["../src/Audio.types.ts"],"names":[],"mappings":"","sourcesContent":["import { AudioQuality, IOSOutputFormat } from './RecordingConstants';\n\n/**\n * Represents audio source information returned from native.\n * This is the object returned when reading sources from a queue.\n */\nexport type AudioSourceInfo = {\n /**\n * A string representing the resource identifier for the audio.\n */\n uri?: string;\n /**\n * An optional display name for the audio source.\n */\n name?: string;\n};\n\n// @docsMissing\nexport type AudioSource =\n | string\n | number\n | null\n | {\n /**\n * A string representing the resource identifier for the audio,\n * which could be an HTTPS address, a local file path, or the name of a static audio file resource.\n */\n uri?: string;\n /**\n * The asset ID of a local audio asset, acquired with the `require` function.\n * This property is exclusive with the `uri` property. When both are present, the `assetId` will be ignored.\n */\n assetId?: number;\n /**\n * An object representing the HTTP headers to send along with the request for a remote audio source.\n * On web requires the `Access-Control-Allow-Origin` header returned by the server to include the current domain.\n */\n headers?: Record;\n /**\n * An optional display name for the audio source.\n * Useful for showing track names in a queue or playlist UI.\n */\n name?: string;\n };\n\n/**\n * Options for configuring audio player behavior.\n */\nexport type AudioPlayerOptions = {\n /**\n * How often (in milliseconds) to emit playback status updates. Defaults to 500ms.\n *\n * @example\n * ```tsx\n * import { useAudioPlayer } from 'expo-audio';\n *\n * export default function App() {\n * const player = useAudioPlayer(source);\n *\n * // High-frequency updates for smooth progress bars\n * const player = useAudioPlayer(source, { updateInterval: 100 });\n *\n * // Standard updates (default behavior)\n * const player = useAudioPlayer(source, { updateInterval: 500 });\n *\n * // Low-frequency updates for better performance\n * const player = useAudioPlayer(source, { updateInterval: 1000 });\n * }\n * ```\n *\n * @default 500ms\n *\n * @platform ios\n * @platform android\n * @platform web\n */\n updateInterval?: number;\n /**\n * If set to `true`, the system will attempt to download the resource to the device before loading.\n * This value defaults to `false`.\n *\n * Works with:\n * - Local assets from `require('path/to/file')`\n * - Remote HTTP/HTTPS URLs\n * - Asset objects\n *\n * When enabled, this ensures the audio file is fully downloaded before playback begins.\n * This can improve playback performance and reduce buffering, especially for users\n * managing multiple audio players simultaneously.\n *\n * On Android and iOS, this will download the audio file to the device's tmp directory before playback begins.\n * The system will purge the file at its discretion.\n *\n * On web, this will download the audio file to the user's device memory and make it available for the user to play.\n * The system will usually purge the file from memory after a reload or on memory pressure.\n * On web, CORS restrictions apply to the blob url, so you need to make sure the server returns the `Access-Control-Allow-Origin` header.\n *\n * @platform ios\n * @platform web\n * @platform android\n */\n downloadFirst?: boolean;\n /**\n * Determines the [cross origin policy](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/crossorigin) used by the underlying native view on web.\n * If `undefined` (default), does not use CORS at all. If set to `'anonymous'`, the audio will be loaded with CORS enabled.\n * Note that some audio may not play if CORS is enabled, depending on the CDN settings.\n * If you encounter issues, consider adjusting the `crossOrigin` property.\n *\n *\n * @platform web\n * @default undefined\n */\n crossOrigin?: 'anonymous' | 'use-credentials';\n /**\n * If set to `true`, the audio session will not be deactivated when this player pauses or finishes playback.\n * This prevents interrupting other audio sources (like videos) when the audio ends.\n *\n * Useful for sound effects that should not interfere with ongoing video playback or other audio.\n * The audio session for this player will not be deactivated automatically when the player finishes playback.\n *\n * > **Note:** If needed, you can manually deactivate the audio session using `setIsAudioActiveAsync(false)`.\n *\n * @platform ios\n * @default false\n */\n keepAudioSessionActive?: boolean;\n};\n\n/**\n * @deprecated Use `AudioPlayerOptions` instead.\n * Options for audio loading behavior.\n */\nexport type AudioLoadOptions = AudioPlayerOptions;\n\n/**\n * Represents an available audio input device for recording.\n *\n * This type describes audio input sources like built-in microphones, external microphones,\n * or other audio input devices that can be used for recording. Each input has an identifying\n * information that can be used to select the preferred recording source.\n */\nexport type RecordingInput = {\n /** Human-readable name of the audio input device. */\n name: string;\n /** Type or category of the input device (for example, 'Built-in Microphone', 'External Microphone'). */\n type: string;\n /** Unique identifier for the input device, used to select the input ('Built-in Microphone', 'External Microphone') for recording. */\n uid: string;\n};\n\n/**\n * Pitch correction quality settings for audio playback rate changes.\n *\n * When changing playback rate, pitch correction can be applied to maintain the original pitch.\n * Different quality levels offer trade-offs between processing power and audio quality.\n *\n * @platform ios\n */\nexport type PitchCorrectionQuality = 'low' | 'medium' | 'high';\n\n/**\n * Comprehensive status information for an `AudioPlayer`.\n *\n * This object contains all the current state information about audio playback,\n * including playback position, duration, loading state, and playback settings.\n * Used by `useAudioPlayerStatus()` to provide real-time status updates.\n */\nexport type AudioStatus = {\n /** Unique identifier for the player instance. */\n id: string;\n /** Current playback position in seconds. */\n currentTime: number;\n /** String representation of the player's internal playback state. */\n playbackState: string;\n /** String representation of the player's time control status (playing/paused/waiting). */\n timeControlStatus: string;\n /** Reason why the player is waiting to play (if applicable). */\n reasonForWaitingToPlay: string;\n /** Whether the player is currently muted. */\n mute: boolean;\n /** Total duration of the audio in seconds, or 0 if not yet determined. */\n duration: number;\n /** Whether the audio is currently playing. */\n playing: boolean;\n /** Whether the audio is set to loop when it reaches the end. */\n loop: boolean;\n /** Whether the audio just finished playing. */\n didJustFinish: boolean;\n /** Whether the player is currently buffering data. */\n isBuffering: boolean;\n /** Whether the audio has finished loading and is ready to play. */\n isLoaded: boolean;\n /** Current playback rate (1.0 = normal speed). */\n playbackRate: number;\n /**\n * Whether pitch correction is enabled for rate changes.\n * @default true\n */\n shouldCorrectPitch: boolean;\n /**\n * Whether the media services were reset by the system.\n * When `true`, the player was interrupted because the system's media daemon crashed.\n * The player will automatically attempt to recover by reloading the source and resuming playback.\n * @platform ios\n */\n mediaServicesDidReset?: boolean;\n};\n\n/**\n * Status information for recording operations from the event system.\n *\n * This type represents the status data emitted by `recordingStatusUpdate` events.\n * It contains high-level information about the recording session and any errors.\n * Used internally by the event system. Most users should use `useAudioRecorderState()` instead.\n */\nexport type RecordingStatus = {\n /** Unique identifier for the recording session. */\n id: string;\n /** Whether the recording has finished (stopped). */\n isFinished: boolean;\n /** Whether an error occurred during recording. */\n hasError: boolean;\n /** Error message if an error occurred, `null` otherwise. */\n error: string | null;\n /** File URL of the completed recording, if available. */\n url: string | null;\n /**\n * Whether the media services were reset by the system.\n * When `true`, the recording was interrupted because the system's media daemon crashed.\n * The recorder is now invalid and must be re-prepared by calling `prepareToRecordAsync()`.\n * @platform ios\n */\n mediaServicesDidReset?: boolean;\n};\n\n/**\n * Current state information for an `AudioRecorder`.\n *\n * This object contains detailed information about the recorder's current state,\n * including recording status, duration, and technical details. This is what you get\n * when calling `recorder.getStatus()` or using `useAudioRecorderState()`.\n */\nexport type RecorderState = {\n /** Whether the recorder is ready and able to record. */\n canRecord: boolean;\n /** Whether recording is currently in progress. */\n isRecording: boolean;\n /** Duration of the current recording in milliseconds. */\n durationMillis: number;\n /** Whether the media services have been reset (typically indicates a system interruption). */\n mediaServicesDidReset: boolean;\n /** Current audio level/volume being recorded (if metering is enabled). */\n metering?: number;\n /** File URL where the recording will be saved, if available. */\n url: string | null;\n};\n\n/**\n * Audio output format options for Android recording.\n *\n * Specifies the container format for recorded audio files on Android.\n * Different formats have different compatibility and compression characteristics.\n *\n * @platform android\n */\nexport type AndroidOutputFormat =\n | 'default'\n | '3gp'\n | 'mpeg4'\n | 'amrnb'\n | 'amrwb'\n | 'aac_adts'\n | 'mpeg2ts'\n | 'webm';\n\n/**\n * Audio encoder options for Android recording.\n *\n * Specifies the audio codec used to encode recorded audio on Android.\n * Different encoders offer different quality, compression, and compatibility trade-offs.\n *\n * @platform android\n */\nexport type AndroidAudioEncoder = 'default' | 'amr_nb' | 'amr_wb' | 'aac' | 'he_aac' | 'aac_eld';\n\n/**\n * Bit rate strategies for audio encoding.\n *\n * Determines how the encoder manages bit rate during recording, affecting\n * file size consistency and quality characteristics.\n */\nexport type BitRateStrategy = 'constant' | 'longTermAverage' | 'variableConstrained' | 'variable';\n\n/**\n * Options for controlling how audio recording is started.\n */\nexport type RecordingStartOptions = {\n /**\n * The duration in seconds after which recording should automatically stop.\n * If not provided, recording continues until manually stopped.\n *\n * @platform ios\n * @platform android\n * @platform web\n */\n forDuration?: number;\n /**\n * The time in seconds to wait before starting the recording.\n * If not provided, recording starts immediately.\n *\n * **Platform behavior:**\n * - Android: Ignored, recording starts immediately\n * - iOS: Uses native AVAudioRecorder.record(atTime:) for precise timing.\n * - Web: Ignored, recording starts immediately\n *\n * > **warning** On iOS, the recording process starts immediately (you'll see status updates),\n * but actual audio capture begins after the specified delay. This is not a countdown, since\n * the recorder is active but silent during the delay period.\n *\n * @platform ios\n */\n atTime?: number;\n};\n\nexport type RecordingOptions = {\n /**\n * A boolean that determines whether audio level information will be part of the status object under the \"metering\" key.\n */\n isMeteringEnabled?: boolean;\n /**\n * The desired file extension.\n *\n * @example .caf\n */\n extension: string;\n /**\n * The desired sample rate.\n *\n * @example 44100\n */\n sampleRate: number;\n /**\n * The desired number of channels.\n *\n * @example 2\n */\n numberOfChannels: number;\n /**\n * The desired bit rate.\n *\n * @example 128000\n */\n bitRate: number;\n /**\n * Recording options for the Android platform.\n * @platform android\n */\n android: RecordingOptionsAndroid;\n /**\n * Recording options for the iOS platform.\n * @platform ios\n */\n ios: RecordingOptionsIos;\n /**\n * Recording options for the Web platform.\n * @platform web\n */\n web: RecordingOptionsWeb;\n};\n\n/**\n * Recording options for the web.\n *\n * Web recording uses the `MediaRecorder` API, which has different capabilities\n * compared to native platforms. These options map directly to `MediaRecorder` settings.\n *\n * @platform web\n */\nexport type RecordingOptionsWeb = {\n /** MIME type for the recording (for example, 'audio/webm', 'audio/mp4'). */\n mimeType?: string;\n /** Target bits per second for the recording. */\n bitsPerSecond?: number;\n};\n\n/**\n * Recording configuration options specific to iOS.\n *\n * iOS recording uses `AVAudioRecorder` with extensive format and quality options.\n * These settings provide fine-grained control over the recording characteristics.\n *\n * @platform ios\n */\nexport type RecordingOptionsIos = {\n /**\n * The desired file extension.\n *\n * @example .caf\n */\n extension?: string;\n /**\n * The desired sample rate.\n *\n * @example 44100\n */\n sampleRate?: number;\n /**\n * The desired file format. See the [`IOSOutputFormat`](#iosoutputformat) enum for all valid values.\n */\n outputFormat?: string | IOSOutputFormat | number;\n /**\n * The desired audio quality. See the [`AudioQuality`](#audioquality) enum for all valid values.\n */\n audioQuality: AudioQuality | number;\n /**\n * The desired bit rate strategy. See the next section for an enumeration of all valid values of `bitRateStrategy`.\n */\n bitRateStrategy?: number;\n /**\n * The desired bit depth hint.\n *\n * @example 16\n */\n bitDepthHint?: number;\n /**\n * The desired PCM bit depth.\n *\n * @example 16\n */\n linearPCMBitDepth?: number;\n /**\n * A boolean describing if the PCM data should be formatted in big endian.\n */\n linearPCMIsBigEndian?: boolean;\n /**\n * A boolean describing if the PCM data should be encoded in floating point or integral values.\n */\n linearPCMIsFloat?: boolean;\n};\n\n/**\n * Recording configuration options specific to Android.\n *\n * Android recording uses `MediaRecorder` with options for format, encoder, and file constraints.\n * These settings control the output format and quality characteristics.\n *\n * @platform android\n */\nexport type RecordingOptionsAndroid = {\n /**\n * The desired file extension.\n *\n * @example .caf\n */\n extension?: string;\n /**\n * The desired sample rate.\n *\n * @example 44100\n */\n sampleRate?: number;\n /**\n * The desired file format. See the [`AndroidOutputFormat`](#androidoutputformat) type for all valid values.\n */\n outputFormat: AndroidOutputFormat;\n /**\n * The desired audio encoder. See the [`AndroidAudioEncoder`](#androidaudioencoder) type for all valid values.\n */\n audioEncoder: AndroidAudioEncoder;\n /**\n * The desired maximum file size in bytes, after which the recording will stop (but `stopAndUnloadAsync()` must still\n * be called after this point).\n *\n * @example\n * `65536`\n */\n maxFileSize?: number;\n /**\n * The desired audio Source. See the [`RecordingSource`](#recordingsource) type for all valid values.\n */\n audioSource?: RecordingSource;\n};\n\nexport type AudioMode = {\n /**\n * Determines if audio playback is allowed when the device is in silent mode.\n *\n * @platform ios\n */\n playsInSilentMode: boolean;\n /**\n * Determines how the audio session interacts with other audio sessions.\n *\n * - `'doNotMix'`: Requests exclusive audio focus. Other apps will pause their audio.\n * - `'duckOthers'`: Requests audio focus with ducking. Other apps lower their volume but continue playing.\n * - `'mixWithOthers'`: Audio plays alongside other apps without interrupting them.\n * On Android, this means no audio focus is requested. Best suited for sound effects,\n * UI feedback, or short audio clips.\n *\n * @default 'mixWithOthers'\n */\n interruptionMode: InterruptionMode;\n /**\n * Determines how the audio session interacts with other sessions on Android.\n *\n * @platform android\n * @deprecated Use `interruptionMode` instead, which now works on both platforms.\n */\n interruptionModeAndroid?: InterruptionModeAndroid;\n /**\n * Whether the audio session allows recording.\n *\n * @default false\n * @platform ios\n */\n allowsRecording: boolean;\n /**\n * Whether the audio session stays active when the app moves to the background.\n *\n * > **Note**: On Android, you have to enable the lockscreen controls with [`setActiveForLockScreen`](#setactiveforlockscreenactive-metadata-options) for sustained background playback. Otherwise, the audio will stop after approximately 3 minutes of background playback (OS limitation). Make sure to also appropriately [configure the config-plugin](#configuration-in-app-config).\n * @default false\n */\n shouldPlayInBackground: boolean;\n /**\n * Whether the audio should route through the earpiece.\n * On iOS, this only has an effect when `allowsRecording` is `true` (i.e., the audio session\n * category is `.playAndRecord`). When `false` (the default), audio is routed through the speaker.\n * @default false\n */\n shouldRouteThroughEarpiece: boolean;\n /**\n * Whether audio recording should continue when the app moves to the background.\n *\n * @default false\n * @platform ios\n * @platform android\n */\n allowsBackgroundRecording?: boolean;\n};\n\n/**\n * Audio interruption behavior modes.\n *\n * Controls how your app's audio interacts with other apps' audio.\n *\n * - `'doNotMix'`: Requests exclusive audio focus. Other apps will pause their audio.\n * - `'duckOthers'`: Requests audio focus with ducking. Other apps lower their volume but continue playing.\n * - `'mixWithOthers'`: Audio plays alongside other apps without interrupting them.\n *\n * On Android, this means no audio focus is requested. Best suited for sound effects,\n * UI feedback, or short audio clips. Note that on Android your app won't receive\n * audio focus loss callbacks (for example, during phone calls) when using this mode.\n *\n * > **Note:** When using `setActiveForLockScreen`, this must be set to `doNotMix`.\n *\n * @default 'mixWithOthers'\n */\nexport type InterruptionMode = 'mixWithOthers' | 'doNotMix' | 'duckOthers';\n\n/**\n * @deprecated Use `InterruptionMode` instead, which now works on both platforms.\n */\nexport type InterruptionModeAndroid = InterruptionMode;\n\n/**\n * Recording source for android.\n *\n * An audio source defines both a default physical source of audio signal, and a recording configuration.\n *\n * - `camcorder`: Microphone audio source tuned for video recording, with the same orientation as the camera if available.\n * - `default`: The default audio source.\n * - `mic`: Microphone audio source.\n * - `unprocessed`: Microphone audio source tuned for unprocessed (raw) sound if available, behaves like `default` otherwise.\n * - `voice_communication`: Microphone audio source tuned for voice communications such as VoIP. It will for instance take advantage of echo cancellation or automatic gain control if available.\n * - `voice_performance`: Source for capturing audio meant to be processed in real time and played back for live performance (e.g karaoke). The capture path will minimize latency and coupling with playback path.\n * - `voice_recognition`: Microphone audio source tuned for voice recognition.\n *\n * @see https://developer.android.com/reference/android/media/MediaRecorder.AudioSource\n * @platform android\n */\nexport type RecordingSource =\n | 'camcorder'\n | 'default'\n | 'mic'\n | 'remote_submix'\n | 'unprocessed'\n | 'voice_communication'\n | 'voice_performance'\n | 'voice_recognition';\n\n// @docsMissing\nexport type AudioMetadata = {\n title?: string;\n artist?: string;\n albumTitle?: string;\n artworkUrl?: string;\n};\n\n/**\n * Loop mode for audio playlist playback.\n *\n * - `'none'`: No looping. Playback stops after the last track.\n * - `'single'`: Loops the current track indefinitely.\n * - `'all'`: Loops the entire playlist, returning to the first track after the last.\n */\nexport type AudioPlaylistLoopMode = 'none' | 'single' | 'all';\n\n/**\n * Options for configuring an audio playlist.\n */\nexport type AudioPlaylistOptions = {\n /**\n * Initial sources to add to the playlist. Each source can be a local asset, remote URL, or null.\n * @default []\n */\n sources?: AudioSource[];\n\n /**\n * How often (in milliseconds) to emit playback status updates. Defaults to 500ms.\n * @default 500\n */\n updateInterval?: number;\n\n /**\n * Loop mode for the playlist.\n * - `'none'`: No looping (default)\n * - `'single'`: Loop the current track\n * - `'all'`: Loop the entire playlist\n * @default 'none'\n */\n loop?: AudioPlaylistLoopMode;\n\n /**\n * Sets the `crossOrigin` attribute on the `