mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-02 21:31:27 +03:00
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:
@@ -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();
|
||||
}
|
||||
Reference in New Issue
Block a user