From 5c166517ae83103935bfbd3538aff05c8552f9c2 Mon Sep 17 00:00:00 2001 From: kkb912002 Date: Wed, 5 Mar 2025 08:57:07 +0900 Subject: [PATCH 1/2] clearing previous recorded video if start new one. --- lib/commands/record-screen.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/commands/record-screen.js b/lib/commands/record-screen.js index 7adc3fa7..63e0775c 100644 --- a/lib/commands/record-screen.js +++ b/lib/commands/record-screen.js @@ -252,6 +252,9 @@ export async function startRecordingScreen ( } this.log.debug('Forcing the active screen recording to stop'); await this._screenRecorder.stop(true); + } else if (this._screenRecorder) { + this.log.debug('Clearing previous record'); + await this._screenRecorder.stop(true); } this._screenRecorder = null; From f1ea7819c9ba8853964332dd8501c22a8289166e Mon Sep 17 00:00:00 2001 From: kkb912002 Date: Wed, 5 Mar 2025 15:48:40 +0900 Subject: [PATCH 2/2] improve log message --- lib/commands/record-screen.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/commands/record-screen.js b/lib/commands/record-screen.js index 63e0775c..210cfd5c 100644 --- a/lib/commands/record-screen.js +++ b/lib/commands/record-screen.js @@ -253,7 +253,7 @@ export async function startRecordingScreen ( this.log.debug('Forcing the active screen recording to stop'); await this._screenRecorder.stop(true); } else if (this._screenRecorder) { - this.log.debug('Clearing previous record'); + this.log.debug('Clearing the recent screen recording'); await this._screenRecorder.stop(true); } this._screenRecorder = null;