学习概览日历可查看当日语法检测+跟读录音;修复跟读录音签名
- 学习概览选中某天展示:打卡任务+英语语法检测(分数)+单词跟读录音(回放) - 修复跟读录音无法听:Safari 录音为 audio/mp4,原写死 audio/webm 致签名 不匹配上传失败;改为按实际录音类型签名,扩展名 m4a/webm Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
cbe99e94f0
commit
b8db3ae707
@@ -36,8 +36,9 @@ function RecordBtn({ day, word }: { day: number; word: string }) {
|
||||
setBusy(true);
|
||||
stream.getTracks().forEach((t) => t.stop());
|
||||
const blob = new Blob(chunks, { type: mr.mimeType || "audio/webm" });
|
||||
const { url, key } = await getRecUploadUrl(word);
|
||||
await fetch(url, { method: "PUT", headers: { "Content-Type": blob.type || "audio/webm" }, body: blob });
|
||||
const ct = blob.type || "audio/webm";
|
||||
const { url, key } = await getRecUploadUrl(word, ct);
|
||||
await fetch(url, { method: "PUT", headers: { "Content-Type": ct }, body: blob });
|
||||
await saveRecording(day, word, key);
|
||||
setBusy(false);
|
||||
setSaved(true);
|
||||
|
||||
Reference in New Issue
Block a user