Val Neekman
07/14/2021, 4:09 PMKent C. Dodds
07/14/2021, 4:15 PMBlob
. How do I send that to the backend? I need to serialize that to a string right?Kent C. Dodds
07/14/2021, 4:16 PMKent C. Dodds
07/14/2021, 4:22 PMBytes
that property requires a Buffer, but a buffer of what?Val Neekman
07/14/2021, 9:17 PM// const recorder = document.getElementById('recorder');
Kent C. Dodds
07/14/2021, 9:18 PMKent C. Dodds
07/14/2021, 9:19 PMVal Neekman
07/14/2021, 9:19 PMrecorder.addEventListener('change', function(e) {
const file = e.target.files[0]; // capture the stream here
const url = URL.createObjectURL(file); // grab a URL that is assignable
// Do something with the audio file.
// (e.g. Upload it to a server by attaching it to an XMLHttpRequest)
});
Val Neekman
07/14/2021, 9:20 PMVal Neekman
07/14/2021, 9:20 PMKent C. Dodds
07/14/2021, 9:20 PMVal Neekman
07/14/2021, 9:20 PMVal Neekman
07/14/2021, 9:21 PM