I'm currently downloading files for later playback using RNFetchBlob.
It is currently possible to play those files?
If not, maybe I could look into developing that?
What format do these files have? Do you require() them? or do you directly access their file path?
I have their file path (via RNFetchBlob)
I don't think I can require them because they are downloaded runtime based on what the user puts on his/her playlist
Can you show me what an example file path looks like? The player supports local files but we may need to add a scheme for it to recognise that it's a local file.
Yes. :)
Here is an example path:
/Users/anders/Library/Developer/CoreSimulator/Devices/A5FEF161-0150-49C2-BD27-407D5CDB29C4/data/Containers/Data/Application/350969AD-B6D8-49BF-97CA-5FDA0B798248/Library/Caches/zetlandAudioCache/httpszetlanddevelopments3eucentral1amazonawscom4fb386f0397211e7a810098ab3eb3ac0s_town_mixdownmp3.mp3
Try passing it in normally but making sure that the url you pass is of the format file://path. I believe that should work :)
Yes! That was it.
Here is an example of the URL I'm using:
file:///Users/anders/Library/Developer/CoreSimulator/Devices/A5FEF161-0150-49C2-BD27-407D5CDB29C4/data/Containers/Data/Application/350969AD-B6D8-49BF-97CA-5FDA0B798248/Library/Caches/zetlandAudioCache/httpszetlanddevelopments3eucentral1amazonawscom4fb386f0397211e7a810098ab3eb3ac0s_town_mixdownmp3.mp3
@Guichaguri let's make sure Android can also handle this
It seems to be working just fine on Android as well @dcvz @Guichaguri 馃憤
@Guichaguri @dcvz hi, I am having same with local files on the 1.0.0 version
file:///storage/emulated/0/Music/track_id_1435170.mp3
data:
code: "exoplayer"
message: "Unexpected ClassCastException: sun.net.www.protocol.file.FileURLConnection cannot be cast to java.net.HttpURLConnection"
type: "playback-error"
@punksta This has been fixed in the latest dev branch.
@Guichaguri it works well in dev branch, thanks.
Most helpful comment
Yes! That was it.
Here is an example of the URL I'm using: