toast error when recording save failed
This commit is contained in:
@@ -460,5 +460,6 @@
|
||||
"preparingVideo": "Preparing video",
|
||||
"itMayTakeAWhileToPrepareForTheFirstLoad": "It may take a while to prepare for the first load. Please be patient.",
|
||||
"loadingTranscription": "Loading transcription",
|
||||
"cannotFindMicrophone": "Cannot find microphone"
|
||||
"cannotFindMicrophone": "Cannot find microphone",
|
||||
"failedToSaveRecording": "Failed to save recording"
|
||||
}
|
||||
|
||||
@@ -459,5 +459,6 @@
|
||||
"preparingVideo": "正在准备视频",
|
||||
"itMayTakeAWhileToPrepareForTheFirstLoad": "首次加载可能需要一些时间,请耐心等候",
|
||||
"loadingTranscription": "正在加载语音文本",
|
||||
"cannotFindMicrophone": "无法找到麦克风"
|
||||
"cannotFindMicrophone": "无法找到麦克风",
|
||||
"failedToSaveRecording": "保存录音失败"
|
||||
}
|
||||
|
||||
@@ -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