summaryrefslogtreecommitdiff
path: root/web/share/js/kvm/session.js
diff options
context:
space:
mode:
authorShantur Rathore <[email protected]>2021-09-20 01:22:48 +0100
committerGitHub <[email protected]>2021-09-20 03:22:48 +0300
commitf160fb561fa5bdcc7e35d35d16f66cc9150a0859 (patch)
treeb143c46ba4748d07da0b877d43152a7444a91c13 /web/share/js/kvm/session.js
parente38c65f18187163292c9e35957ac0b62efb04b19 (diff)
Implement macro recording for gpio (#65)
Diffstat (limited to 'web/share/js/kvm/session.js')
-rw-r--r--web/share/js/kvm/session.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/web/share/js/kvm/session.js b/web/share/js/kvm/session.js
index 061b235f..b183730a 100644
--- a/web/share/js/kvm/session.js
+++ b/web/share/js/kvm/session.js
@@ -26,6 +26,7 @@
import {tools, $} from "../tools.js";
import {wm} from "../wm.js";
+import {Recorder} from "./recorder.js";
import {Hid} from "./hid.js";
import {Atx} from "./atx.js";
import {Msd} from "./msd.js";
@@ -44,10 +45,11 @@ export function Session() {
var __missed_heartbeats = 0;
var __streamer = new Streamer();
- var __hid = new Hid(__streamer.getResolution);
+ var __recorder = new Recorder();
+ var __hid = new Hid(__streamer.getResolution, __recorder);
var __atx = new Atx();
var __msd = new Msd();
- var __gpio = new Gpio();
+ var __gpio = new Gpio(__recorder.recordWsEvent);
var __init__ = function() {
__startSession();
@@ -227,6 +229,7 @@ export function Session() {
tools.debug("Session: socket opened:", event);
$("link-led").className = "led-green";
$("link-led").title = "Connected";
+ __recorder.setSocket(__ws);
__hid.setSocket(__ws);
__missed_heartbeats = 0;
__ping_timer = setInterval(__pingServer, 1000);
@@ -272,6 +275,7 @@ export function Session() {
__gpio.setState(null);
__hid.setSocket(null);
+ __recorder.setSocket(null);
__atx.setState(null);
__msd.setState(null);
__streamer.setState(null);