doublesymmetry / react-native-track-player

A fully fledged audio module created for music apps. Provides audio playback, external media controls, background mode and more!
https://rntp.dev/
Apache License 2.0
3.18k stars 980 forks source link

[Feature Request] Support playing files from bundle without require or import #2312

Open AlexLerman opened 1 month ago

AlexLerman commented 1 month ago

What is the need and use case of this feature? I have tracks I need to play dynamically based on user input that I want to package with my app. Downloading them would require internet connection and a server with associated costs. Transferring them to the file system from the bundle is a pain and would take a long time for a lot of audio.

Describe the ideal solution Be able to read files from res/raw or the iOS bundle and play them the same as any other media without require/import.

Describe alternatives you've considered react-native-sound already supports this but isn't being maintained and doesn't use exoplayer so it has it's own issues. Expo-av is sandboxed so it doesn't have access to res/raw. Both lack many of the other features this library provides.

How I can Help In the future I can look into creating a pull request but unfortunately don't have time at the moment.

Is there a technical reason this can't be done for this library?

lovegaoshi commented 1 month ago

i mean, it surely can be done if some other repos did this, but its probably a niche FR and ud have to spend effort on it