Quantcast
Channel: Active questions tagged react-native+android - Stack Overflow
Viewing all articles
Browse latest Browse all 29444

Need help understanding Audio in Expo

$
0
0

Any insight is greatly appreciated. Even if it's only a link to a useful article or tutorial.

I'm trying to get a grasp on handling audio that is pulled from a website. I have done my best to create a Snack that is similar to my situation.

If you look at the snack, you can see that line 10 of PlayerScreen.js has shouldPlay: set to false. If I set this to true then the audio file will begin playing as soon as you enter PlayerScreen.

The problem is that this is the only way I have managed to get the file to play, and I have no idea how to get it to stop. Ideally, I would start the file with a play button, and pause with a pause. I just don't know how to store the audio into an object that I can look into. Such that I can manipulate its play state and see the duration and current position.


Viewing all articles
Browse latest Browse all 29444

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>