L
L
lexstile2020-04-08 11:22:10
React Native
lexstile, 2020-04-08 11:22:10

Is it possible to implement audio caching on the user's device?

Is it possible to create a similar app in React Native?
I need the ability to listen to audio, but when downloading the application, it (audio) is not downloaded.
We press the "listen" button, the audio is downloaded from the server via the Internet.
Plus, it is cached on the device, after the first listening, the user can listen without the Internet.
Plus, you need the ability to cache by clicking on the "download" button, so as not to listen to the audio completely.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Alexandrovich, 2020-04-08
@lexstile

there is this library https://github.com/joltup/rn-fetch-blob and in the section Download to storage directly you can see the key fileCache : true which will just save the audio to the cache. And with the help of https://github.com/zmxv/react-native-sound you can play the sound. In any case, what you wrote really remains only to implement everything.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question