clear interval when recording end (#638)

This commit is contained in:
an-lee
2024-05-27 23:25:14 +08:00
committed by GitHub
parent 4fd5cd1c5c
commit 1c2494c79c

View File

@@ -354,6 +354,7 @@ const RecorderButton = (props: { onRecorded: () => void }) => {
setRecorder(record);
record.on("record-end", async (blob: Blob) => {
if (interval) clearInterval(interval);
createRecording(blob);
setIsRecording(false);
});