Default track name for record of untitled track

[Fixes #58]
This commit is contained in:
Stefano Brilli 2021-08-20 09:55:41 +02:00
parent ee4bc1e9c1
commit 3732bf11cf
1 changed files with 2 additions and 1 deletions

View File

@ -365,7 +365,8 @@ export function recordTracks(indexes: number[], deviceId: string) {
// Stop recording and download the wav
await mediaRecorderService?.stopRecording();
mediaRecorderService?.downloadRecorded(`${track.title}`);
const fileName = track.title || `Track ${track.index + 1}`;
mediaRecorderService?.downloadRecorded(`${fileName}`);
await mediaRecorderService?.closeStream();
}