auto record outgoing (#9711)

* Add option auto record outgoing session
* In the same connection, all displays and all windows share the same
  recording state.

todo:

Android check external storage permission

Known issue:

* Sciter old issue, stop the process directly without stop record, the record file can't play.

Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
21pages
2024-10-21 14:34:06 +08:00
committed by GitHub
parent 289076aa70
commit e8187588c1
65 changed files with 442 additions and 322 deletions

View File

@@ -301,26 +301,12 @@ class Header: Reactor.Component {
}
event click $(span#recording) (_, me) {
recording = !recording;
header.update();
handler.record_status(recording);
// 0 is just a dummy value. It will be ignored by the handler.
if (recording) {
handler.refresh_video(0);
if (handler.version_cmp(pi.version, '1.2.4') >= 0) handler.record_screen(recording, pi.current_display, display_width, display_height);
}
else {
handler.record_screen(recording, pi.current_display, display_width, display_height);
}
handler.record_screen(!recording)
}
event click $(#screen) (_, me) {
if (pi.current_display == me.index) return;
if (recording) {
recording = false;
handler.record_screen(false, pi.current_display, display_width, display_height);
handler.record_status(false);
}
handler.switch_display(me.index);
}
@@ -518,6 +504,7 @@ if (!(is_file_transfer || is_port_forward)) {
handler.updatePi = function(v) {
pi = v;
recording = handler.is_recording();
header.update();
if (is_port_forward) {
view.windowState = View.WINDOW_MINIMIZED;
@@ -682,3 +669,8 @@ handler.setConnectionType = function(secured, direct) {
direct_connection: direct,
});
}
handler.updateRecordStatus = function(status) {
recording = status;
header.update();
}