_hisses in exasperation_
This commit is contained in:
parent
cbb2c64bf6
commit
8c38320062
14
index.ts
14
index.ts
|
@ -90,9 +90,12 @@ function handle_message(message: Partial<WebSocketMessage>) {
|
||||||
hyperdeckId: message.id,
|
hyperdeckId: message.id,
|
||||||
state: transportInfo.status,
|
state: transportInfo.status,
|
||||||
})
|
})
|
||||||
})
|
}).catch(() => {})
|
||||||
})
|
}, 1000)
|
||||||
|
|
||||||
|
let connected = false;
|
||||||
|
while (!connected) {
|
||||||
|
try {
|
||||||
newHyperdeck.sendCommand(new Commands.DeviceInfoCommand()).then((info) => {
|
newHyperdeck.sendCommand(new Commands.DeviceInfoCommand()).then((info) => {
|
||||||
for (let index = 0; index < info.slots; index++) {
|
for (let index = 0; index < info.slots; index++) {
|
||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
|
@ -103,10 +106,13 @@ function handle_message(message: Partial<WebSocketMessage>) {
|
||||||
slotId: slot.slotId,
|
slotId: slot.slotId,
|
||||||
remaining: slot.recordingTime
|
remaining: slot.recordingTime
|
||||||
})
|
})
|
||||||
})
|
}).catch(() => {})
|
||||||
})
|
}, 1000)
|
||||||
|
connected = true;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
} catch (_err) {}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
newHyperdeck.on('notify.slot', function (slot) {
|
newHyperdeck.on('notify.slot', function (slot) {
|
||||||
|
|
Loading…
Reference in New Issue