Skip to content

Commit 0fd329a

Browse files
authored
prompt user (#4379)
1 parent e7a4beb commit 0fd329a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

js/utils/synthutils.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -972,7 +972,13 @@ function Synth() {
972972
}
973973
chunks = [];
974974
const url = URL.createObjectURL(blob);
975-
download(url, "");
975+
// Prompt the user for the file name
976+
const fileName = window.prompt("Enter file name", "recording");
977+
if (fileName) {
978+
download(url, fileName + (platform.FF ? ".wav" : ".ogg"));
979+
} else {
980+
alert("Download cancelled.");
981+
}
976982
};
977983
// this.recorder.start();
978984
// setTimeout(()=>{this.recorder.stop();},5000);

0 commit comments

Comments
 (0)