From ad0df845985aaeeb2ae4aa34671f40f1a10f6e7c Mon Sep 17 00:00:00 2001 From: Baud Date: Sat, 1 Jun 2024 15:48:35 +0100 Subject: [PATCH] _shakes claws at past self_ --- index.ts | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/index.ts b/index.ts index fccf1fc..ecb8f82 100644 --- a/index.ts +++ b/index.ts @@ -87,10 +87,12 @@ function handle_message(message: Partial) { newHyperdeck.sendCommand(new Commands.TransportInfoCommand()).then((transportInfo) => { notifyClients({ event: "record_state", - hyperdeckId: message.id, - state: transportInfo.status, + hyperdeck_id: message.id, + status: transportInfo.status, }) - }).catch(() => {}) + }).catch((err) => { + console.log() + }) }, 1000) newHyperdeck.sendCommand(new Commands.DeviceInfoCommand()).then((info) => { @@ -99,8 +101,8 @@ function handle_message(message: Partial) { newHyperdeck.sendCommand(new Commands.SlotInfoCommand(index)).then((slot) => { notifyClients({ event: "record_time_remaining", - hyperdeckId: message.id, - slotId: slot.slotId, + hyperdeck_id: message.id, + slot_id: slot.slotId, remaining: slot.recordingTime }) }).catch(() => {}) @@ -112,16 +114,16 @@ function handle_message(message: Partial) { newHyperdeck.on('notify.slot', function (slot) { notifyClients({ event: "record_time_remaining", - hyperdeckId: message.id, - slotId: slot.slotId, + hyperdeck_id: message.id, + slot_id: slot.slotId, remaining: slot.recordingTime }) }) newHyperdeck.on('notify.transport', function (state) { notifyClients({ event: "record_state", - hyperdeckId: message.id, - state: state.status + hyperdeck_id: message.id, + status: state.status }) }) newHyperdeck.on('error', (err) => {