This commit is contained in:
Baud 2024-06-01 15:51:38 +01:00
parent ad0df84598
commit 50fcbeb9f0
1 changed files with 18 additions and 14 deletions

View File

@ -91,10 +91,11 @@ function handle_message(message: Partial<WebSocketMessage>) {
status: transportInfo.status, status: transportInfo.status,
}) })
}).catch((err) => { }).catch((err) => {
console.log() console.log(err)
}) })
}, 1000) }, 1000)
setTimeout(() => {
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(() => {
@ -105,10 +106,13 @@ function handle_message(message: Partial<WebSocketMessage>) {
slot_id: slot.slotId, slot_id: slot.slotId,
remaining: slot.recordingTime remaining: slot.recordingTime
}) })
}).catch(() => {}) }).catch((err) => {
console.log(err)
})
}, 1000) }, 1000)
} }
}) })
}, 1000)
}) })
newHyperdeck.on('notify.slot', function (slot) { newHyperdeck.on('notify.slot', function (slot) {