MediaStreamRecorder
MediaStreamRecorder copied to clipboard
How to Save Recorded Audio into Folder
Hello,
I am facing problem how can i save audio file in to specific folder, Actually this plugin record audio perfectly but i dont know how to save audio in to specific folder
Please help
'''Dear all, correct me when I'm wrong. It also helps me a lot.'''
Hi, @HatimSaif
At first, I guess it's not an issue on this project.
if you want to save it simply under ~/Downloads
recorder.ondataavailable = (blob) => {
var a = document.createElement('a');
var url = URL.createObjectURL(blob);
a.href = url;
a.download = 'your-file-name.webm';
a.click();
// URL.revokeObjectURL(url);
};
if you want to save it in some directory under ~/Downloads
I guess you should do something for that such like https://developer.chrome.com/extensions/downloads#method-download
if you want to save it "any" directory of the machine
It might not be permitted to browser's JavaScript runtime. If you want to do that, you should create native application and request permission to do that. If you're JavaScrip lover, electron is the easiest way to build native (desktop) application. http://electron.atom.io/