Maybe?
This commit is contained in:
parent
ad0df84598
commit
50fcbeb9f0
32
index.ts
32
index.ts
|
@ -91,24 +91,28 @@ function handle_message(message: Partial<WebSocketMessage>) {
|
||||||
status: transportInfo.status,
|
status: transportInfo.status,
|
||||||
})
|
})
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
console.log()
|
console.log(err)
|
||||||
})
|
})
|
||||||
}, 1000)
|
}, 1000)
|
||||||
|
|
||||||
newHyperdeck.sendCommand(new Commands.DeviceInfoCommand()).then((info) => {
|
setTimeout(() => {
|
||||||
for (let index = 0; index < info.slots; index++) {
|
newHyperdeck.sendCommand(new Commands.DeviceInfoCommand()).then((info) => {
|
||||||
setInterval(() => {
|
for (let index = 0; index < info.slots; index++) {
|
||||||
newHyperdeck.sendCommand(new Commands.SlotInfoCommand(index)).then((slot) => {
|
setInterval(() => {
|
||||||
notifyClients({
|
newHyperdeck.sendCommand(new Commands.SlotInfoCommand(index)).then((slot) => {
|
||||||
event: "record_time_remaining",
|
notifyClients({
|
||||||
hyperdeck_id: message.id,
|
event: "record_time_remaining",
|
||||||
slot_id: slot.slotId,
|
hyperdeck_id: message.id,
|
||||||
remaining: slot.recordingTime
|
slot_id: slot.slotId,
|
||||||
|
remaining: slot.recordingTime
|
||||||
|
})
|
||||||
|
}).catch((err) => {
|
||||||
|
console.log(err)
|
||||||
})
|
})
|
||||||
}).catch(() => {})
|
}, 1000)
|
||||||
}, 1000)
|
}
|
||||||
}
|
})
|
||||||
})
|
}, 1000)
|
||||||
})
|
})
|
||||||
|
|
||||||
newHyperdeck.on('notify.slot', function (slot) {
|
newHyperdeck.on('notify.slot', function (slot) {
|
||||||
|
|
Loading…
Reference in New Issue