Skip to main content

Getting started

The goal of Fundamentals is to guide you through the setup process of the Audio API, as well as to show the basic concepts behind audio programming using a web audio framework, giving you the confidence to explore more advanced use cases on your own. This section is packed with interactive examples, code snippets, and explanations. Are you ready? Let's make some noise!

Installation

It takes only a few steps to add Audio API to your project:

Install the package

Install the react-native-audio-api package from npm:

npx expo install react-native-audio-api

Usage with expo

react-native-audio-api contains native custom code and isn't part of the Expo Go application. In order to be available in expo managed builds, you have to use Expo development build. Simplest way on starting local expo dev builds, is to use:

npx expo run:ios

To learn more about expo development builds, please check out Development Builds Documentation.

Android

No further steps are necessary.

iOS

While developing for iOS, make sure to install pods first before running the app:

cd ios && pod install && cd ..

Web

No further steps are necessary.

caution

react-native-audio-api on the web exposes the browser's built-in Web Audio API, but for compatibility between platforms, it limits the available interfaces to APIs that are implemented on iOS and Android.

npx expo start -c

What's next?

In the next section, we will learn how to prepare Audio API and to play some sound!.