From 6e4133ae8f5acd7ae9dac4ebdb2996b4d432f74c Mon Sep 17 00:00:00 2001 From: Joel Wetzell Date: Wed, 8 Feb 2023 17:03:15 -0600 Subject: [PATCH] call atem update on interval --- plugins/atem/main.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/plugins/atem/main.js b/plugins/atem/main.js index 8322628..b972939 100644 --- a/plugins/atem/main.js +++ b/plugins/atem/main.js @@ -26,8 +26,8 @@ exports.ready = function ready(_device) { device.data = device.connection.state; device.draw(); - // TODO: this is a little hacky but it works? gotta be better way to get initial update going - const interval = setInterval(() => { + // TODO: this is a little hacky but it works? gotta be a way to hook into device.draw() to trigger update + setInterval(() => { device.update('inputs', device.data); device.update('fadeToBlack', device.data); device.update(`transitionPosition`, device.data); @@ -35,9 +35,6 @@ exports.ready = function ready(_device) { device.update('upstreamKeyers', device.data); device.update('transitionProperties', device.data); }, 1000); - setTimeout(() => { - clearInterval(interval); - }, 4000); }; exports.update = function update(device, _document, updateType, data) {