_shakes claws at past self_
This commit is contained in:
parent
5e020c8862
commit
ad0df84598
20
index.ts
20
index.ts
|
@ -87,10 +87,12 @@ function handle_message(message: Partial<WebSocketMessage>) {
|
||||||
newHyperdeck.sendCommand(new Commands.TransportInfoCommand()).then((transportInfo) => {
|
newHyperdeck.sendCommand(new Commands.TransportInfoCommand()).then((transportInfo) => {
|
||||||
notifyClients({
|
notifyClients({
|
||||||
event: "record_state",
|
event: "record_state",
|
||||||
hyperdeckId: message.id,
|
hyperdeck_id: message.id,
|
||||||
state: transportInfo.status,
|
status: transportInfo.status,
|
||||||
|
})
|
||||||
|
}).catch((err) => {
|
||||||
|
console.log()
|
||||||
})
|
})
|
||||||
}).catch(() => {})
|
|
||||||
}, 1000)
|
}, 1000)
|
||||||
|
|
||||||
newHyperdeck.sendCommand(new Commands.DeviceInfoCommand()).then((info) => {
|
newHyperdeck.sendCommand(new Commands.DeviceInfoCommand()).then((info) => {
|
||||||
|
@ -99,8 +101,8 @@ function handle_message(message: Partial<WebSocketMessage>) {
|
||||||
newHyperdeck.sendCommand(new Commands.SlotInfoCommand(index)).then((slot) => {
|
newHyperdeck.sendCommand(new Commands.SlotInfoCommand(index)).then((slot) => {
|
||||||
notifyClients({
|
notifyClients({
|
||||||
event: "record_time_remaining",
|
event: "record_time_remaining",
|
||||||
hyperdeckId: message.id,
|
hyperdeck_id: message.id,
|
||||||
slotId: slot.slotId,
|
slot_id: slot.slotId,
|
||||||
remaining: slot.recordingTime
|
remaining: slot.recordingTime
|
||||||
})
|
})
|
||||||
}).catch(() => {})
|
}).catch(() => {})
|
||||||
|
@ -112,16 +114,16 @@ function handle_message(message: Partial<WebSocketMessage>) {
|
||||||
newHyperdeck.on('notify.slot', function (slot) {
|
newHyperdeck.on('notify.slot', function (slot) {
|
||||||
notifyClients({
|
notifyClients({
|
||||||
event: "record_time_remaining",
|
event: "record_time_remaining",
|
||||||
hyperdeckId: message.id,
|
hyperdeck_id: message.id,
|
||||||
slotId: slot.slotId,
|
slot_id: slot.slotId,
|
||||||
remaining: slot.recordingTime
|
remaining: slot.recordingTime
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
newHyperdeck.on('notify.transport', function (state) {
|
newHyperdeck.on('notify.transport', function (state) {
|
||||||
notifyClients({
|
notifyClients({
|
||||||
event: "record_state",
|
event: "record_state",
|
||||||
hyperdeckId: message.id,
|
hyperdeck_id: message.id,
|
||||||
state: state.status
|
status: state.status
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
newHyperdeck.on('error', (err) => {
|
newHyperdeck.on('error', (err) => {
|
||||||
|
|
Loading…
Reference in New Issue