Skip to content
R

React Native Sound Player

Play sound file in ReactNative

by johnsonsuFree

#632in Music
0In stores

Description

react-native-sound-player is an open-source React Native library for playing audio files and streams on iOS and Android. You add a sound fil…

Highlights

  • Play bundled sound files on iOS and Android
  • Stream audio from a URL
  • Play files from the project's assets folder
  • Simple playSoundFile(fileName, fileType) call
  • Background audio on iOS with a Background Mode setting

Ratings & Reviews

No ratings yet

Be the first to rate React Native Sound Player.

People also visit

R

React Native Track Player

The best audio player for React Native

Music
Launch
R

react-howler

A React.js wrapper for howler.js (audio player)

UI Libraries
Launch
R

React Native VLC Media Player

React native media player for video streaming and playing

Music
Launch
R

react-player

A React component for playing a variety of URLs, including file paths, Mux

UI Libraries
Launch
R

react-native-youtube-iframe

A simple wrapper around the youtube iframe js API for react native

UI Libraries
Launch
R

React Modern Audio Player

Simple, accessible and flexible audio player

Music
Launch

React Native Sound Player FAQ

Is react-native-sound-player still maintained?

No. The README says the package is no longer actively maintained and recommends react-native-track-player for new projects.

How do I play a sound file?

Add the file to your iOS project in Xcode or to the Android res/raw folder, then call playSoundFile with the file name and file type.

Can it play audio from the internet?

Yes. The library can stream audio from a URL as well as play files stored in the app.

Does audio stop when the screen locks?

It can. The README says the device may sleep and stop playback, and on iOS you can enable the Audio, AirPlay and Picture in Picture background mode so audio keeps playing.

Do I need to link the library?

Not for React Native 0.60 and newer. Older versions need the extra linking step described in the README.

What are the best React Native Sound Player alternatives?

Popular alternatives to React Native Sound Player include React Native Track Player, React Native VLC Media Player and React Modern Audio Player. See all React Native Sound Player alternatives

Developer Stuff

Badges