Blob (Binary Large Object)
const blob = new Blob(recordedChunks, { type: recordedChunks[0].type });
const blobURL = URL.createObjectURL(blob);
//....
<video src={blobURL} />Transfering Into Node Buffer
export async function storeVideo(blob, filepath) {
const write = util.promisify(fs.writeFile);
const data = await blob.arrayBuffer();
const buf = Buffer.from(data);
console.log("Storing", buf);
await write(filePath, buf);
console.log(`Blob stored at ${filePath}`);
}Last updated