Open iPhaeton opened 7 years ago
Hi, could you share how you resolved this?
Hi. It was a long time ago... If I'm not mistaking, I had to read a file into a buffer and create the asset from that buffer, like this:
import RNFS from 'react-native-fs';
import b64AB from 'base64-arraybuffer';
...
const file = await RNFS.readFile(path, 'base64');
const buffer = b64AB.decode(file);
const asset = AV.Asset.fromBuffer(buffer);
Hi, is it possible to use aurora.js with react-native? I tried this method: https://medium.com/@aakashns/using-core-node-js-modules-in-react-native-apps-64acd4d07140 an managed to have aurora.js read an asset from file using
AV.Asset.fromFile();
. But when I tryasset.decodeToBuffer()
, I get the following error: