From 17839caf0eda6934b6a659c6c9b0138ac4e730d0 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Mon, 29 Sep 2025 18:16:24 +0800 Subject: [PATCH] bugfix --- bricks/recorder.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/bricks/recorder.js b/bricks/recorder.js index d4a856f..27619b1 100644 --- a/bricks/recorder.js +++ b/bricks/recorder.js @@ -36,6 +36,15 @@ bricks.MediaRecorder = class extends bricks.Popup { } async switch_record(){ console.log('toggle_record called'); + if (this.record_status == 'standby'){ + this.start_recorder(); + this.toggle_record.url = bricks_resource('imgs/stop_recording.svg'); + this.record_status = 'recording'; + } else { + this.stop_recorder(); + this.toggle_record.url = bricks_resource('imgs/start_recording.svg'); + this.record_status = 'standby'; + } } cancel_record(){ this.close_recorder();