toast error when recording save failed
This commit is contained in:
@@ -140,8 +140,13 @@ const RecordButtonPopover = (props: {
|
||||
|
||||
record.on("record-end", async (blob: Blob) => {
|
||||
const duration = Date.now() - startAt;
|
||||
const output = await transcode(blob);
|
||||
props.onRecordEnd(output, duration);
|
||||
try {
|
||||
const output = await transcode(blob);
|
||||
props.onRecordEnd(output, duration);
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
toast.error(t("failedToSaveRecording"));
|
||||
}
|
||||
});
|
||||
|
||||
RecordPlugin.getAvailableAudioDevices()
|
||||
|
||||
Reference in New Issue
Block a user