react-native-sound
react-native-sound copied to clipboard
Integrate react-native-document-picker to load files from device internal storage
:beetle: Description I like to let user play sound for his stored files in his device.
:beetle: What have you tried? I tried to use react-native-document-picker to get file path and use it with react-native-sound
:beetle: Please post your code:
const RESULT_FROM_DOCUMENT_PICKER = content://com.android.externalstorage.documents/document/primary%3ADownload%2FMusic%2FAbstract%20-%20Doctor%20Strange%20(Prod.%20MLTM).mp3
const sound = new Sound(RESULT_FROM_DOCUMENT_PICKER , error => callback(error, sound));
// returns error {"code": -1, "message": "resource not found"}
:bulb: Possible solution
Is your issue with...
- [ ] iOS
- [x] Android
- [ ] Windows
Are you using...
- [x] React Native CLI (e.g.
react-native run-android) - [ ] Expo
- [ ] Other: (please specify)
Which versions are you using?
- React Native Sound: ^0.11.1
- React Native: 0.65.1
- iOS:
- Android:
- Windows:
Does the problem occur on...
- [ ] Simulator
- [x] Device
If your problem is happening on a device, which device?
- Device: SM-A505F (Samsung A50)
Did anyone solve this problem?
has anyone found any solution for this?