feat(recording): add visibility and service storage options (#15662)

* feat(recording): add visibility and service storage options

  - support hide-recording-button in Flutter and Sciter
  - allow a custom save directory for Windows service recordings
  - sanitize peer IDs used in recording filenames

  Tested:
  - with hide-recording-button=Y and allow-auto-record-outgoing=Y,
    outgoing sessions are recorded automatically while the recording button
    remains hidden and cannot be stopped from the UI; verified on Flutter
    desktop, Sciter, and Android
  - windows-service-video-save-directory takes effect when the Windows client
    runs as an installed service
  - the Windows controlling side can save recordings for direct IP:port
    connections

Signed-off-by: 21pages <sunboeasy@gmail.com>

* update hbb_common

Signed-off-by: 21pages <sunboeasy@gmail.com>

* fix(recording): validate configured save directories

  - trim configured recording directory paths
  - reject non-absolute paths and fall back to defaults
  - warn when a non-empty path is invalid

Signed-off-by: 21pages <sunboeasy@gmail.com>

* fix(recording): validate configured save directories

Signed-off-by: 21pages <sunboeasy@gmail.com>

---------

Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
21pages
2026-07-25 15:21:13 +08:00
committed by GitHub
parent ad9dac1001
commit cefff781d4
9 changed files with 123 additions and 6 deletions

View File

@@ -151,7 +151,7 @@ class Header: Reactor.Component {
<span #action>{svg_action}</span>
<span #display>{svg_display}</span>
<span #keyboard>{svg_keyboard}</span>
{recording_enabled ? <span #recording>{recording ? svg_recording_on : svg_recording_off}</span> : ""}
{recording_enabled && show_recording_button ? <span #recording>{recording ? svg_recording_on : svg_recording_off}</span> : ""}
{this.renderKeyboardPop()}
{this.renderDisplayPop()}
{this.renderActionPop()}

View File

@@ -504,6 +504,7 @@ impl sciter::EventHandler for SciterSession {
fn get_id();
fn get_default_pi();
fn get_option(String);
fn get_local_option(String);
fn t(String);
fn set_option(String, String);
fn input_os_password(String, bool);
@@ -638,6 +639,10 @@ impl SciterSession {
crate::client::translate(name)
}
pub fn get_local_option(&self, key: String) -> String {
crate::ui_interface::get_local_option(key)
}
pub fn get_icon(&self) -> String {
super::get_icon()
}

View File

@@ -17,6 +17,7 @@ var audio_enabled = true; // server side
var file_enabled = true; // server side
var restart_enabled = true; // server side
var recording_enabled = true; // server side
var show_recording_button = handler.get_local_option("hide-recording-button") != "Y";
var privacy_mode_enabled = true; // server side
var scroll_body = $(body);
var peer_platform = "";