zmxv / react-native-sound

React Native module for playing sound clips
MIT License
2.78k stars 748 forks source link

Integrate react-native-document-picker to load files from device internal storage #747

Open taheroo opened 2 years ago

taheroo commented 2 years ago

: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...

Are you using...

Which versions are you using?

Does the problem occur on...

If your problem is happening on a device, which device?

leodev30 commented 2 years ago

Did anyone solve this problem?

Zuber-Dunge commented 11 months ago

has anyone found any solution for this?