You can use react-native-track-player library for audio player.
Answer from Heena Tandlekar on Stack Overflownpm
npmjs.com › package › react-native-sound
react-native-sound - npm
October 15, 2025 - 🎯 Remote URL audio playback · 📱 Local bundled audio files · 🎨 Modern UI with TypeScript · 🎵 react-native-sound-playerview - Advanced audio player UI component ·
» npm install react-native-sound
Published Oct 15, 2025
Version 0.13.0
Author Zhen Wang
Repository https://github.com/zmxv/react-native-sound
Play audio
I have a long personal history of using audio libraries in react native, I almost tried every libraries available and here is my feedback : If you need track playing, with streaming and everything, go directly with react-native-track-player. I think it's one of the most popular and I saw it grown years to years. Solid one. Playing from URL requires the URL to be the file itself (if I remember well), you can not pass some endpoint that returns a stream. If you need to play one shot sounds like SFX or anything else, just use react-native-audio-toolkit. Then, there is also two other very interesting options : You can use react-native-video and play audio only, this is a solution I used for a while but I switched to react-native-track-player because my client needed streaming and background controls. The last solution consists of using the HTML5 audio player through a Webview. This sounds hacky but believe me if you have some good JS skills you can build something very reliable. More on reddit.com
React-native playing audio from s3 URL using react-native-sound
I'm new to react-native and trying to create an audio playing app. I used react-native-sound to achieve the same. In the documentation, it specifies that I can play the file from a network. But I... More on stackoverflow.com
How to play sound from network?
Hi everyone, I would like to know how to play a sound from a given url I'm trying to run the following method which runs a local file and it also doesn't work var whoosh = new Sound('ad... More on github.com
How to play sound in React Native?
I want to play a sound in React Native. I have try to read here in zmxv/react-native-sound, but as a beginner like me, that's documentation make me confused how to apply that in React Native code. More on stackoverflow.com
Videos
GitHub
github.com › zmxv › react-native-sound
GitHub - zmxv/react-native-sound: React Native module for playing sound clips
React Native module for playing sound clips. Contribute to zmxv/react-native-sound development by creating an account on GitHub.
Starred by 2.9K users
Forked by 784 users
Languages TypeScript 44.0% | Kotlin 24.3% | Objective-C++ 13.5% | C# 11.2% | Ruby 3.9% | Swift 1.4% | TypeScript 44.0% | Kotlin 24.3% | Objective-C++ 13.5% | C# 11.2% | Ruby 3.9% | Swift 1.4%
npm
npmjs.com › package › react-native-sound-player
react-native-sound-player - npm
February 11, 2025 - import SoundPlayer from "react-native-sound-player"; try { // play the file tone.mp3 SoundPlayer.playSoundFile("tone", "mp3"); // or play from url SoundPlayer.playUrl("https://example.com/music.mp3"); // or play file from folder SoundPlayer...
» npm install react-native-sound-player
Published Feb 11, 2025
Version 0.14.5
Author Johnson Su
Reddit
reddit.com › r/reactnative › play audio
r/reactnative on Reddit: Play audio
September 23, 2022 -
Hi people, I have lost half day try to find a good library ( that works ) for playing audio in react native from a url..with no result.
Anyone have suggestions? Thanks
Top answer 1 of 4
8
I have a long personal history of using audio libraries in react native, I almost tried every libraries available and here is my feedback : If you need track playing, with streaming and everything, go directly with react-native-track-player. I think it's one of the most popular and I saw it grown years to years. Solid one. Playing from URL requires the URL to be the file itself (if I remember well), you can not pass some endpoint that returns a stream. If you need to play one shot sounds like SFX or anything else, just use react-native-audio-toolkit. Then, there is also two other very interesting options : You can use react-native-video and play audio only, this is a solution I used for a while but I switched to react-native-track-player because my client needed streaming and background controls. The last solution consists of using the HTML5 audio player through a Webview. This sounds hacky but believe me if you have some good JS skills you can build something very reliable.
2 of 4
6
Expo-AV is the de-facto standard: https://docs.expo.dev/versions/latest/sdk/av/
Top answer 1 of 2
13
You can play remote sounds with react-native-sound by specifying a url and not setting the bundle:
import React, { Component } from 'react'
import { Button } from 'react-native'
import Sound from 'react-native-sound'
class RemoteSound extends Component {
playTrack = () => {
const track = new Sound('https://www.soundjay.com/button/button-1.mp3', null, (e) => {
if (e) {
console.log('error loading track:', e)
} else {
track.play()
}
})
}
render() {
return <Button title="play me" onPress={this.playTrack} />
}
}
export default RemoteSound
2 of 2
0
To play the sound from remote URL
import Sound from 'react-native-sound';
var sound1 = new Sound('https://raw.githubusercontent.com/zmxv/react-native-sound-demo/master/pew2.aac', '',
(error, sound) => {
if (error) {
alert('error' + error.message);
return;
}
sound1.play(() => {
sound1.release();
});
});
GitHub
github.com › zmxv › react-native-sound › issues › 225
How to play sound from network? · Issue #225 · zmxv/react-native-sound
July 4, 2017 - var whoosh = new Sound('advertising.mp3', Sound.MAIN_BUNDLE, (error) => { if (error) { console.log('failed to load the sound', error); return; } // loaded successfully console.log('duration in seconds: ' + whoosh.getDuration() + 'number of channels: ' + whoosh.getNumberOfChannels()); }); function onPlaySound() { console.log('Sound started playing!'); whoosh.play((success) => { if (success) { console.log('successfully finished playing'); } else { console.log('playback failed due to audio decoding errors'); } }); } Would be grateful if someone could provide me with an example of how to run an mp3 from a url
Author Jeremaiha
GitHub
github.com › johnsonsu › react-native-sound-player
GitHub - johnsonsu/react-native-sound-player: Play sound file in ReactNative · GitHub
import SoundPlayer from "react-native-sound-player"; try { // play the file tone.mp3 SoundPlayer.playSoundFile("tone", "mp3"); // or play from url SoundPlayer.playUrl("https://example.com/music.mp3"); // or play file from folder SoundPlayer...
Starred by 284 users
Forked by 102 users
Languages Java 43.3% | Objective-C 39.0% | JavaScript 14.6% | Ruby 3.1%
Scaler
scaler.com › home › topics › playing sound in react native apps using react-native-sound
Playing Sound in React Native Apps using react-native-sound - Scaler Topics
August 7, 2023 - Make sure to replace http://example.com/sound.mp3 with the actual URL of your remote sound file. Q. Are there any events or callbacks available for handling sound playback in react-native-sound?
Expo Documentation
docs.expo.dev › expo sdk › audio (expo-audio)
Audio (expo-audio) - Expo Documentation
import { View, StyleSheet, Button } from 'react-native'; import { useAudioPlayer } from 'expo-audio'; const audioSource = require('./assets/Hello.mp3'); export default function App() { const player = useAudioPlayer(audioSource); return ( <View style={styles.container}> <Button title="Play Sound" onPress={() => player.play()} /> <Button title="Replay Sound" onPress={() => { player.seekTo(0); player.play(); }} /> </View> ); } const styles = StyleSheet.create({ container: { flex: 1, justifyContent: 'center', backgroundColor: '#ecf0f1', padding: 10, }, });
GitHub
github.com › tlenclos › react-native-audio-streaming
GitHub - tlenclos/react-native-audio-streaming: iOS & Android react native module to play an audio stream, with background support and media controls
Make sure $(SRCROOT)/../node_modules/react-native-audio-streaming/ios is added to your project's Header Search Paths within the Build Settings section.
Starred by 787 users
Forked by 252 users
Languages Java 42.7% | Objective-C 38.2% | JavaScript 14.1% | Python 3.0% | Ruby 2.0% | Java 42.7% | Objective-C 38.2% | JavaScript 14.1% | Python 3.0% | Ruby 2.0%
npm
npmjs.com › package › react-native-stream-audio-from-url
react-native-stream-audio-from-url - npm
August 28, 2016 - //play sound · AudioPlayer.play('beep.mp3'); react-component · react-native · ios · android · audioplayer · npm i react-native-stream-audio-from-url · github.com/tbinetruy/react-native-audioplayer · github.com/tbinetruy/react-native...
» npm install react-native-stream-audio-from-url
Published Aug 28, 2016
Version 0.2.0
Author Thomas Binetruy and Andreas Keller
Javatpoint
javatpoint.com › react-native-sound
React Native Sound - javatpoint
React Native Sound with tutorial, introduction, environment setup, first app hello world, state, props, flexbox, height and width, listview, scrollview, images, buttons, router, etc.
Top answer 1 of 5
13
This will preload the sound and when you press the play button it will play it.
export default class MovieList extends Component {
componentDidMount(){
this.hello = new Sound('whoosh.mp3', Sound.MAIN_BUNDLE, (error) => {
if (error) {
console.log('failed to load the sound', error);
return;
}
});
}
handlePress() {
this.hello.play((success) => {
if (!success) {
console.log('Sound did not play')
}
})
}
render() {
const { movie } = this.props
return (
<TouchableOpacity onPress={this.handlePress.bind(this)}>
<View>
<Text>Start</Text>
</View>
</TouchableOpacity>
)
}
}
If you are looking to play sound tracks from a list of sounds please check this gist for detailed code.
2 of 5
12
Thanks very much who has answer to this question, but i have resolve this with this simple one:
import React, { Component } from 'react'
import { Text, View, TouchableOpacity } from 'react-native'
import Sound from 'react-native-sound';
export default class MovieList extends Component {
sound = new Sound('motorcycle.mp3');
playSound = () => {
this.sound.play()
}
render() {
return (
<View>
<TouchableOpacity onPress={this.playSound}>
<View>
<Text>Start</Text>
</View>
</TouchableOpacity>
</View>
)
}
}
Rntp
rntp.dev
React Native Track Player — The Premium Audio Player for React Native
React Native Track Player (RNTP) is the most widely used audio playback library for React Native. Background playback, queue management, caching, preloading, Android Auto, and more.
Author Double Symmetry GmbH
npm
npmjs.com › package › react-native-play-audio
react-native-play-audio - npm
February 22, 2018 - AudioPlayer.prepare(url, () => { AudioPlayer.play(); AudioPlayer.getDuration((duration) => { console.log(duration); }); setInterval(() => { AudioPlayer.getCurrentTime((currentTime) => { console.log(currentTime); }); }, 1000); AudioPlayer.stop(); AudioPlayer.pause(); AudioPlayer.setCurrentTime(50.5); }) react-native · react-component · sound ·
» npm install react-native-play-audio
Published Feb 22, 2018
Version 0.1.2
Author Ananev Alexander