Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

expo-av

expo1.4mMIT15.0.2TypeScript support: included

Expo universal module for Audio and Video playback

expo, react-native, audio, video

readme

expo sdk

Expo

Expo SDK version Chat or ask a question License: MIT Downloads

Try Expo in the Browser  •  Read the Documentation  •  Learn more on our blog  •  Request a feature

Follow us on

Expo on X   Expo on GitHub   Expo on Reddit   Expo on LinkedIn   Expo on LinkedIn

Introduction

Expo is an open-source platform for making universal native apps that run on Android, iOS, and the web. It includes a universal runtime and libraries that let you build native apps by writing React and JavaScript.

This repository includes the Expo SDK, Modules API, Go app, CLI, Router, documentation, and various other supporting tools. Expo Application Services (EAS) is a platform of hosted services that are deeply integrated with Expo open source tools. EAS helps you build, ship, and iterate on your app as an individual or a team.

Read the Expo Community Guidelines before interacting in the repository. Thank you for helping keep the Expo community open and welcoming!

Table of contents

📚 Documentation

Learn about building and deploying universal apps in our official docs!

🗺 Project Layout

  • packages All the source code for Expo modules, if you want to edit a library or just see how it works this is where you'll find it.
  • apps This is where you can find Expo projects which are linked to the development modules. You'll do most of your testing in here.
  • apps/expo-go This is where you can find the source code for Expo Go.
  • apps/expo-go/ios/Exponent.xcworkspace is the Xcode workspace. When developing iOS, always open this instead of Exponent.xcodeproj because the workspace also loads the CocoaPods dependencies.
  • docs The source code for https://docs.expo.dev
  • templates The template projects you get when you run npx create-expo-app
  • react-native-lab This is our fork of react-native used to build Expo Go.
  • guides In-depth tutorials for advanced topics like contributing to the client.
  • tools contain build and configuration tools.
  • template-files contains templates for files that require private keys. They are populated using the keys in template-files/keys.json.
  • template-files/ios/dependencies.json specifies the CocoaPods dependencies of the app.

🏅 Badges

Let everyone know your app can be run instantly in the Expo Go app!

runs with Expo Go

runs with Expo Go

[![runs with Expo Go](https://img.shields.io/badge/Runs%20with%20Expo%20Go-000.svg?style=flat-square&logo=EXPO&labelColor=f3f3f3&logoColor=000)](https://expo.dev/client)

[![runs with Expo Go](https://img.shields.io/badge/Runs%20with%20Expo%20Go-4630EB.svg?style=flat-square&logo=EXPO&labelColor=f3f3f3&logoColor=000)](https://expo.dev/client)

👏 Contributing

If you like Expo and want to help make it better then check out our contributing guide! Check out the CLI package to work on the Expo CLI.

❓ FAQ

If you have questions about Expo and want answers, then check out our Frequently Asked Questions!

If you still have questions you can ask them on our Discord and Forums or X @expo.

💙 The Team

Curious about who makes Expo? Here are our team members!

License

The Expo source code is made available under the MIT license. Some of the dependencies are licensed differently, with the BSD license, for example.

Star the Expo repo on GitHub to support the project

changelog

Changelog

Unpublished

🛠 Breaking changes

🎉 New features

🐛 Bug fixes

💡 Others

15.0.2 — 2025-01-10

This version does not introduce any user-facing changes.

15.0.1 — 2024-10-24

💡 Others

  • Added deprecation warning to the Video component. (#32267 by @tsapeta)

15.0.0 — 2024-10-22

🛠 Breaking changes

🎉 New features

🐛 Bug fixes

  • [iOS] loadAsync() promise never settled when given an invalid file uri (#30020 by @vonovak)
  • Fixed putting app to background stops non-mixable audio playback in other apps on iOS (#20380 by @de1acr0ix)
  • Fix unhandled promise rejection when start recording fails #29826 by @anirudhsama
  • Add missing react and react-native peer dependencies for isolated modules. (#30456 by @byCedric)
  • Add missing react-native-web optional peer dependency for isolated modules. (#30689 by @byCedric)
  • [Android] Fixed NullPointerException in the installJSIBindings function. (#31464 by @lukmccall)
  • [Android] Fixed crash when reloading an expo update with a video component mounted (#31540 by @AbijahKaj)

💡 Others

  • Keep using the legacy event emitter as the module is not fully migrated to Expo Modules API. (#28946 by @tsapeta)

⚠️ Notices

14.0.6 - 2024-06-27

🐛 Bug fixes

  • [iOS] Fixed broken Video view on New Architecture mode. (#30030 by @kudo)

14.0.5 — 2024-05-15

🐛 Bug fixes

14.0.4 — 2024-05-09

🐛 Bug fixes

  • [Android] Fix events being sent using a wrong event emitter. (#28716 by @behenate)

14.0.3 — 2024-05-01

This version does not introduce any user-facing changes.

14.0.2 — 2024-04-23

This version does not introduce any user-facing changes.

14.0.1 — 2024-04-19

This version does not introduce any user-facing changes.

14.0.0 — 2024-04-18

🐛 Bug fixes

  • [Android] Fix recording audio on Android after converting to Expo Modules (#26657 by @jpudysz)
  • [Android] Fix memory leak connect with AVManager. (#28159 by @lukmccall)
  • [Android] Fix HashMap cannot be cast to ReadableNativeMap error on Android. (#28317 by @lukmccall)

💡 Others

  • Prevent config plugin from writing permissions until prebuild. (#28107 by @EvanBacon)
  • drop unused web name property. (#27437 by @EvanBacon)
  • Removed deprecated backward compatible Gradle settings. (#28083 by @kudo)

13.10.6 - 2024-04-18

🐛 Bug fixes

  • Tried to fix unused recording permission and getting rejected by store review. (#28236 by @kudo)

13.10.5 - 2024-02-06

🐛 Bug fixes

  • [iOS] Improve precision for syncing two videos and updating new video position when user sets tolerances to 0 (#26018 by @jpudysz)

13.10.4 - 2024-01-25

🐛 Bug fixes

  • [Android] Add Events to AVModule to prevent event emitter warning. (#26434 by @alanjhughes)

13.10.3 - 2024-01-18

This version does not introduce any user-facing changes.

13.10.2 - 2024-01-10

💡 Others

  • Replace deprecated com.facebook.react:react-native:+ Android dependency with com.facebook.react:react-android. (#26237 by @kudo)

13.10.1 - 2023-12-19

This version does not introduce any user-facing changes.

13.10.0 — 2023-12-12

🐛 Bug fixes

💡 Others

  • Bump C++ compiler setting to C++20. (#25548 by @kudo)

13.9.0 — 2023-11-14

🛠 Breaking changes

🐛 Bug fixes

  • Fix audio recording resetting when receiving a phone call. (#25054 by @behenate)
  • Fix iOS naturalSize.orientation in prop onReadyForDisplay for hls stream (#25169 by @souzaluiz)

💡 Others

  • Use pointerEvent style instead of prop for video component on web. (#24931 by @EvanBacon)
  • Remove deprecated REACT_NATIVE_OVERRIDE_VERSION for React Native nightly testing. (#25151 by @kudo)
  • Removed backward compatible code for deprecated SDKs. (#25154 by @kudo)

13.8.0 — 2023-10-17

🛠 Breaking changes

🐛 Bug fixes

💡 Others

  • Ship untranspiled JSX to support custom handling of jsx and createElement. (#24889 by @EvanBacon)

13.7.0 — 2023-09-15

🐛 Bug fixes

  • [ios] Fixed the LOW_QUALITY preset producing large audio files. (#24323 by @behenate)

13.6.0 — 2023-09-04

🎉 New features

  • Added support for React Native 0.73. (#24018 by @kudo)

🐛 Bug fixes

  • Fixed recording status not being reset when recording is paused before being stopping. (#21747) (#23816 by @mojavad)
  • Prevent audio from other apps being stopped when users app is backgrounded. (#24198 by @alanhughes)

💡 Others

13.5.1 — 2023-08-02

This version does not introduce any user-facing changes.

13.5.0 — 2023-07-28

This version does not introduce any user-facing changes.

13.4.0 — 2023-06-21

🐛 Bug fixes

13.3.0 — 2023-05-08

This version does not introduce any user-facing changes.

13.2.1 — 2023-02-09

This version does not introduce any user-facing changes.

13.2.0 — 2023-02-03

🐛 Bug fixes

  • Fixed HTMLMediaElement.play and HTMLMediaElement.pause calls on the Web aren't properly awaited. (#20439) by @zhigang1992
  • Added support for React Native 0.71.x. (#20799 #20832 by @kudo)
  • Fixed JSI audio sampling buffer issues when using SimpleExoPlayer implementation on Android. (#21055 by @kudo)
  • Fixed compatibility with build-time React Native Web styling libraries. Removed StyleSheet.flatten. (#21236) by @intergalacticspacehighway

💡 Others

  • On Android bump compileSdkVersion and targetSdkVersion to 33. (#20721 by @lukmccall)

13.1.0 — 2022-12-30

🐛 Bug fixes

  • Fixed build errors when testing on React Native nightly builds. (#19805 by @kudo)
  • Fixed crashes when ProGuard or R8 is enabled on Android. (#20197 by @lukmccall)
  • Added React Native 0.71 support. (#20470 by @kudo)

13.0.2 - 2022-11-29

🐛 Bug fixes

  • Fixed error for duplicated META-INF files when building on Android. (#20251 by @kudo)

13.0.1 — 2022-10-30

🎉 New features

  • Added PosterComponent prop to Video component. (#19625 by @youedd

13.0.0 — 2022-10-25

This version does not introduce any user-facing changes.

13.0.0-beta.1 — 2022-10-06

🛠 Breaking changes

  • Bumped iOS deployment target to 13.0 and deprecated support for iOS 12. (#18873 by @tsapeta)

🎉 New features

  • Added support for audio panning on Android (MediaPlayer implementation only) via audioPan prop. (#15530 by @DominickVale)
  • Added videoStyle prop for Video component. (#18549 by @alantoa)
  • Native module for video view is now written in Swift using the new API. (#18633 by @tsapeta)

🐛 Bug fixes

  • Fixed promise rejection catching when Video is unmounted. (#18471 by @barthap)

💡 Others

  • [plugin] Migrate import from @expo/config-plugins to expo/config-plugins and @expo/config-types to expo/config. (#18855 by @brentvatne)
  • Drop @expo/config-plugins dependency in favor of peer dependency on expo. (#18595 by @EvanBacon)
  • Remove unnecessary CocoaPods dependency on ReactCommon and React-runtimeexecutor. (#19067 by @tsapeta)

📚 3rd party library updates

  • Upgraded ExoPlayer dependencies to 2.18.1 on Android. (#19332 by @kudo)

12.0.2 — 2022-07-18

🐛 Bug fixes

  • Fixed unhandled promise rejection when Video is unmounted. (#18281 by @barthap)

12.0.1 — 2022-07-16

🐛 Bug fixes

  • Automatically unload Video component before React Native initiates an unmount to prevent memory leak crashes. (#18173 by @hirbod and @Pickleboyonline)

12.0.0 — 2022-07-07

🛠 Breaking changes

  • Replace RecordingOptions related constants with enums. Check out the PR for the migration hints. (#17954 by @Simek)
  • Rename the RecordingOptions preset constant to RecordingOptionsPresets and edit export. Check out the PR for the migration hints. (#17954 by @Simek)

🐛 Bug fixes

  • On Android fix Video component crashes when activity loses focus due to accessing player from the wrong thread. (#17280 by @mnightingale)
  • Added support for React Native 0.69.x. (#18006 by @kudo)
  • On Android fix Audio.setAudioModeAsync and Audio.setIsEnabledAsync crashes due to accessing player from the wrong thread. (#17840 by @mnightingale)

💡 Others

  • Extract types defined in createAsync methods return to separate types: RecordingObject and SoundObject. (#17954 by @Simek)
  • Extract platform related nested object types from RecordingOptions to the separate types: RecordingOptionsAndroid, RecordingOptionsIOS and RecordingOptionsWeb. (#17954 by @Simek)

11.2.2 — 2022-04-27

🐛 Bug fixes

  • Fixed displaying warning about Sound.setOnAudioSampleReceived unavailable when debugging remotely. (#17210 by @barthap)
  • Fixed crash when remote debugging is enabled on Android. (#17212 by @barthap)

11.2.1 — 2022-04-20

🐛 Bug fixes

  • On iOS fix crash caused by updating AVPlaybackStatus from both <Video /> props and the Playback API at the same time. Also prevented a crash on iOS caused by removing the Video without unlisting its underlying native EXAVPlayerData as an observer. (#17036 by @Pickleboyonline)

11.2.0 — 2022-04-18

🎉 New features

  • Add new Sound.setOnAudioSampleReceived API to support streaming audio sample buffers in realtime. (#14904, #16075 by @barthap)

🐛 Bug fixes

  • On Android fix crashes caused by accessing player from the wrong thread (#16611 by @mnightingale)

💡 Others

  • Extract tolerances param type definition, used across the package methods, to the separate type AVPlaybackTolerance. (#16905 by @Simek)

⚠️ Notices

  • On Android bump compileSdkVersion to 31, targetSdkVersion to 31 and Java version to 11. (#16941 by @bbarthec)

11.1.0 — 2022-03-10

🐛 Bug fixes

  • On iOS fix pauseAsync causing framedrops and being delayed by not disabling AVAudioSession when there is no need for it (#15873 by @hirbod and @mnightingale)

11.0.1 — 2022-03-07

🐛 Bug fixes

11.0.0 — 2022-03-03

🛠 Breaking changes

  • Remove Video component's static constants FULLSCREEN_UPDATE_PLAYER_WILL_RESENT, FULLSCREEN_UPDATE_PLAYER_DID_RESENT, FULLSCREEN_UPDATE_PLAYER_WILL_DISMISS, FULLSCREEN_UPDATE_PLAYER_DID_DISMISS and replace them with new VideoFullscreenUpdate enum. (#16059 by @Simek)
  • Remove Video component's static constants RESIZE_MODE_CONTAIN, RESIZE_MODE_COVER, RESIZE_MODE_STRETCH. Use ResizeMode enum values instead. (#16059 by @Simek)
  • Remove deprecated presentIOSFullscreenPlayer and dismissIOSFullscreenPlayer method from Video component. (#16059 by @Simek)
  • Remove deprecated onIOSFullscreenUpdate prop from Video component. (#16059 by @Simek)
  • Remove unused presentFullscreenPlayerAsync method from Video component. (#16059 by @Simek)
  • Remove INTERRUPTION_MODE_* constants in favor of InterruptionModeAndroid and InterruptionModeIOS enums. (#16145 by @Simek)
  • On Android upgrade com.google.android.exoplayer:*:2.9.2 (available from jcenter()) to com.google.android.exoplayer:*:2.13.3 (available from google()). (#16123 by @bbarthec)

🎉 New features

💡 Others

10.2.1 - 2022-02-01

🐛 Bug fixes

  • Fix iOS build with Expo SDK 44 and React Native 0.65+. (#15661 by @schiller-manuel)
  • Fix Plugin with id 'maven' not found build error from Android Gradle 7. (#16080 by @kudo)

10.2.0 — 2021-12-03

This version does not introduce any user-facing changes.

10.1.3 — 2021-11-01

🐛 Bug fixes

  • On Web, do not try to attach fullscreen listener, when component ref is null. (#14713 by @Simek)

💡 Others

  • Update component types and event types. (#14713 by @Simek)
  • Mark status as an optional field in VideoFullscreenUpdateEvent and VideoReadyForDisplayEvent types, becouse Web implementation do not return status in those events. (#14713 by @Simek)

10.1.2 — 2021-10-21

🐛 Bug fixes

10.1.1 — 2021-10-15

This version does not introduce any user-facing changes.

10.1.0 — 2021-10-01

🐛 Bug fixes

  • Fixed JNI DETECTED ERROR IN APPLICATION: java_object == null in call to GetObjectClass from void versioned.host.exp.exponent.modules.api.reanimated.NativeProxy$EventHandler.receiveEvent on Android. (#14569 by @lukmccall)

10.0.0 — 2021-09-28

🛠 Breaking changes

  • Default audio recording settings on ios are now extension: '.m4a' and outputFormat: RECORDING_OPTION_IOS_OUTPUT_FORMAT_MPEG4AAC so as to ensure cross-platform compatibility. (#13492 by @actuallymentor)
  • Dropped support for iOS 11.0 (#14383 by @cruzach)

🎉 New features

🐛 Bug fixes

💡 Others

9.2.3 — 2021-06-30

🎉 New features

  • [plugin] Added Android android.permission.MODIFY_AUDIO_SETTINGS permission. (#13163 by @EvanBacon)
  • Remove lodash and nullthrows. (#12522 by @EvanBacon)
  • Add new Recording.createAsync API for faster recording on iOS. (#12294 by @IjzerenHein)
  • Add keepAudioActiveHint recording option to prevent deactivation of the Audio session when recording on iOS. (#12294 by @IjzerenHein)
  • Allow video audio to continue to play in the background on iOS. (#12950 by @matt-oakes)

🐛 Bug fixes

💡 Others

  • Migrated from unimodules-file-system-interface and unimodules-permissions-interface to expo-modules-core. (#12961 by @tsapeta)

9.1.2 — 2021-04-13

This version does not introduce any user-facing changes.

9.1.1 — 2021-03-31

This version does not introduce any user-facing changes.

9.1.0 — 2021-03-10

🎉 New features

  • Converted plugin to TypeScript. (#11715 by @EvanBacon)
  • Updated Android build configuration to target Android 11 (added support for Android SDK 30). (#11647 by @bbarthec)

🐛 Bug fixes

  • Remove peerDependencies and unimodulePeerDependencies from Expo modules. (#11980 by @brentvatne)

9.0.0 — 2021-01-14

⚠️ Notices

🛠 Breaking changes

🎉 New features

  • Created config plugins (#11538 by @EvanBacon)
  • Add optional sound level information in RecordingStatus object described with metering key. Add isMeteringEnabled flag in RecordingOptions to enable computing this information. The flag is set to true by default in RecordingOptions presets (RECORDING_OPTIONS_PRESET_HIGH_QUALITY, RECORDING_OPTIONS_PRESET_LOW_QUALITY). (#10759 by @danieloi)

🐛 Bug fixes

8.7.0 — 2020-11-17

🐛 Bug fixes

  • Fix orientation being returned incorrectly for videos in portrait mode in onReadyForDisplay on iOS. (#10449 by @lachenmayer)
  • Fix looping stops after 3 times on iOS. (#10602 by @IjzerenHein)
  • Fix Audio.stopAndUnloadAsync not handling no-data on Android. (#9877 by @IjzerenHein)

8.6.0 — 2020-08-18

This version does not introduce any user-facing changes.

8.5.0 — 2020-08-11

🐛 Bug fixes

8.4.1 — 2020-07-29

🐛 Bug fixes

  • Removed unused and potentionally unsafe call on iOS. (#9436 by @IjzerenHein)
  • Fix onReadyForDisplay not emitted for HLS streams/m3u8 files on iOS. (#9443 by @IjzerenHein)

8.4.0 — 2020-07-24

🐛 Bug fixes

8.3.0 — 2020-07-08

🎉 New features

  • [av] Delete prop-types in favor of TypeScript. (#8679 by @EvanBacon)
  • [av] Directly import createElement from react-native-web for RNW v12 support. (#8773 by @EvanBacon)

🐛 Bug fixes

  • Allow playing media files embedded as resources in an Android APK. (#8936 by @esamelson)

8.2.1 — 2020-05-29

This version does not introduce any user-facing changes.

8.2.0 — 2020-05-27

🐛 Bug fixes