Questions tagged [react-native-sound]

79 questions
16
votes
5 answers

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. Before I have try this one to make react native play…
Tri
  • 369
  • 1
  • 4
  • 13
5
votes
0 answers

How can I stop the current playing song and play the next song?

I am using React Native and React Native Sound to create an audio player, but right now I am facing for some problems. My problem is that I want to stop the current playing song and play the next song and I don't know how to do this. Here is my…
Doo Doo
  • 1,337
  • 2
  • 11
  • 28
4
votes
4 answers

React Native Sound Error: Argument 1 (RCTResponseSenderBlock) of RNSound.play must not be null

As far as I can tell I am loading the correct resource. However when I try to play the sound using React Native Sound I am still getting the following error: Argument 1 (RCTResponseSenderBlock) of RNSound.play must not be null How to fix this…
preston
  • 3,721
  • 6
  • 46
  • 78
4
votes
2 answers

react-native-sound does not work on ios emulator

the below code works fine on android and the sound is played....however on ios simulator it does not. Ive added my sound file to Xcode project, and no error is caught.....when I step through code, it runs this.sound.play() successfully and callback…
james murphy
  • 1,505
  • 5
  • 31
  • 57
4
votes
1 answer

Getting Duration of Video/Audio in react Native for Progress Bar Impmentation

I am currently implementing a react Native streaming app using expo version and I am having some difficulties. please feel free to answer any of the questions or just one and in any other of your choice. 1) Implementing a Progress bar as the sound…
3
votes
0 answers

React-native sound delay issue

This is just general question. I want to make drums-like app but i have sound delay. Maybe someone tried some other package(s) and did some magic, I used react-native-sound and react-native-video since they are most popular and not outdated like…
3
votes
0 answers

stop audio when navigating in react native

I have an app that uses React navigation to navigate, and in my app I made an audioplayer component that uses React Native Sound. My question is, how can I stop the audio when the user navigates to another view? I've found the function…
Niels
  • 1,340
  • 2
  • 15
  • 32
2
votes
1 answer

null is not an object (evaluating 'RNSound.IsAndroid')

i tried to play a sound using react native but i got this problem when i run the app : TypeError: null is not an object (evaluating 'RNSound.IsAndroid') , i think that that this problem caused by the package itself ,help please import React,…
2
votes
4 answers

Global scope prop in functional react component

I am using react-native-sound for audio in this component and want to play from a url file that is passed to the component. The problem is that if the var audio is declared inside the functional component then each time the component renders the…
2
votes
1 answer

React Native syncing sound with Animated

I'm making an app which has a metronome in it. I'm using react-native-sound and Animated. I need for the metronome sound to trigger with very high accuracy, and also be in sync with an animation. I'm not massively experienced, so I've used a hacky…
2
votes
1 answer

React native sound is too slow when loading a sound from url (delay)

So i am making a mobile app with react native and i used react-native-sound for playing sounds in the app but i noticed that everytime i load the page that plays the sound it dosent play right away i have to wait for at least 10 seconds to hear it…
Deadro
  • 41
  • 3
2
votes
1 answer

Should I use Expo for expo audio library or React-native-track-player?

I have my project which I initialised with 'react-native init' . I am thinking of using expo audio library because of it's robust functionalities . But , I have read Expo isn't the solution. It increases the app size. You've to eject it in the end.…
2
votes
2 answers

Play sound in iOS device in react-native

In my app I have a feature that plays a sound when a message is received it will notify the user by playing a sound file, the app works using react-native-sound fine in Android but in iOS I keep getting this error: Code I am using for initializing…
0x01Brain
  • 798
  • 2
  • 12
  • 28
2
votes
0 answers

Pitching (Higher/Lower) sound with react native sound

I'm trying to change/manipulate a recorded sound. My goal is to make the sound sound higher or lower (pitch it), given to a specific value. I'm currently using react-native-sound: const soundfile = new SoundPlayer(filePath, '', (error) => { …
Saerdn
  • 218
  • 2
  • 17
2
votes
3 answers

React Native how to play a sound after an "onPress"?

Here is some of my code: Play Sound I want to write a function "onPress" which will play an .mp3 sound. I have already…
Rob Rouse Jr.
  • 69
  • 1
  • 6
1
2 3 4 5 6