From b115f2de6596900aa5880808ae0e355c3f6854b0 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Mon, 29 Sep 2025 11:48:29 +0800 Subject: [PATCH] bugfix --- bricks/camera.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bricks/camera.js b/bricks/camera.js index ee7c630..38d94cf 100644 --- a/bricks/camera.js +++ b/bricks/camera.js @@ -126,10 +126,11 @@ bricks.Camera = class extends bricks.Popup { }; this.mediaRecorder.onstop = () => { const blob = new Blob(this.recordedChunks, { type: 'video/webm' }); + const file = new File([blob], "recorded_video.webm", { type: "video/webm" }); const url = URL.createObjectURL(blob); console.log('recorded url=', url); this.recordedChunks = []; - this.dispatch('recorded', url); + this.dispatch('recorded', file); console.log('record end') } this.mediaRecorder.start();