Closed bevand10 closed 2 years ago
You don't get anything back in that promise, because the atem doesn't respond in a way we can reliably match up with the request.
You can do this to do something every time the atem sends you the time, which I have a feeling it does at other times by itself too.
client.on('stateChanged', (newState, changedPaths) => {
if (changedPaths.includes('info.lastTime')) {
console.log(`New time: ${newState.info.lastTime}`)
}
})
Soon after you make a call to client.requestTime()
, that handler should get an updated state with an updated time
Do you have any worked examples of these two methods?
I'm attempting to requestTime from an Atem Mini Extreme ISO and getting nothing of value in response other than 'undefined'. Other commands such as state enquiry/update events, running macros, switching main and preview sources, starting and stopping recording, stopping streaming etc are working fine.
Env: Node 16 (non TS) on Ubuntu 20.04.