Comments (5)
It should be playSoundFile
from react-native-sound-player.
If it is so, please update your docs.
It still doesnt help with playSoundFile method.
from react-native-sound-player.
The doc has been updated already.
How are you storing the file in your system? Can you post some of your code here?
from react-native-sound-player.
I am reading the music files from the phone dynamically . I am using react-native-get-music-files. It returns an array of objects with all the music files and their paths. A sample return value is here.
[ { id : 1, title : "La danza del fuego", author : "Mago de Oz", album : "Finisterra", genre : "Folk", duration : 132132312321, // miliseconds cover : "file:///sdcard/0/123.png", blur : "file:///sdcard/0/123-blur.png", //Will come null if createBLur is set to false path : "/sdcard/0/la-danza-del-fuego.mp3" } ]
So what do I use as the parameters for the function playSoundFile()?
Please help.
from react-native-sound-player.
Can you please try playSoundFile("file:///sdcard/0/la-danza-del-fuego.mp3")
?
Basically try add file://
in front of the path
returned to you from react-native-get-music-files
.
from react-native-sound-player.
Related Issues (20)
- NullPointerException: Attempt to invoke virtual method 'android.content.ContentResolver android.content.Context.getContentResolver()' on a null object reference HOT 2
- Improvements
- On Creation of apk HOT 5
- [BUG] setNumberOfLoops not a function
- Cannot hear sounds in ios version 13 and can hear sounds in ios version 12 HOT 3
- [BUG] Sound keeps playing if the app is killed manually HOT 1
- Add new event listener which returns the current duration as the audio progresses. HOT 3
- Audio not playing[BUG]
- [BUG]: TypeError: Cannot read property 'playSoundFile' of null HOT 1
- [ERROR] Build failed with ios HOT 1
- Invariant Violation with IoS
- Is this repo actively maintained? HOT 1
- [BUG] - Android - SoundPlayer.loadUrl crash HOT 2
- [Question] I have a question!! HOT 2
- No sound received when App is in background/kill mode
- [BUG] play multiple sounds HOT 1
- [BUG] iOS silence mode doesn't play on .playUrl HOT 1
- [BUG] when playing sounds, it crashes with saying attempt to invoke virtual method 'void.android.media.MediaPlayer.setOnCompletionListener HOT 1
- [iOS] Problem listening FinishedLoading & FinishedPlaying HOT 5
- [BUG] accumulation of addEventListener callbacks when using fast-reload HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-sound-player.