Posts

Showing posts with the label blob

Download file using Blob in react-native

Download file using Blob in react-native Since React-native v0.54 and Expo SDK v26 , Blob are now supported. v0.54 SDK v26 I'm trying to download a file available on a URL to my phone (if possible, in my Downloads directory on Android) Downloads All i can find for now is existing solution using react-native-fetch-blob which seems not necessary anymore. react-native-fetch-blob If anyone could provide a brief example on how to start implementing this feature on Expo snack Expo snack By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Javascript make audio blob

Javascript make audio blob I am testing the html audio tag and I would like to make audio blob url's , like youtube or vimeo does, and add it to the "src" to start playing the audio. I've been testing with new Blob() and URL.createObjectURL() but I don't know how to use it. new Blob() URL.createObjectURL() I would like to do something like: <audio controls src"blob:null/8142a612-29ad-4220-af08-9a31c55ed078"></audio> <audio controls src"blob:null/8142a612-29ad-4220-af08-9a31c55ed078"></audio> I would greatly appreciate your help. 1 Answer 1 Suppose you have base64 encoded version of audio like this data="data:audio/ogg;base64,T2dnUwACAAAAAAAAAADSeWyXAU9nZ1MAAAAAAAAAAAAA0nl"; 1.First remove the base64 headers (preamble) and decode it to pure binary form, the form it lies in as in your iPad. You can use convertDataURIToBinar...