Getting Started

#4 · closed · 1 comments

View on GitHub ↗

bwerst

Hi, I'm very interested in your code. I'd like to be able to control "ATEM Television Studio HD" units. Could you do an expanded example that shows how to get the current settings. After doing the connect() how can I easily determine the current Program & Preview outputs? I'm attempting to use the RunKit example and its possible I'm failing to connect in the first place. The only state output I'm seeing is "Attempting to connect". I am able to ping my test unit at 10.205.1.20 from the computer trying to use RunKit. Below is the code I'm trying to use in RunKit: var atem = require("atem") var myAtemDevice = new atem() myAtemDevice.on('connectionStateChange', function(state) { console.log('state', state); }); myAtemDevice.on('productNameChange', function(name) { console.log('name', name); }); myAtemDevice.on('sourceConfiguration', function(id, config, info) { console.log(id, info, config.videoInterface); }); myAtemDevice.on('programBus', function(source) { console.log('program bus changed to', source); }); myAtemDevice.on('connectionLost', function(state) { console.log('Connection Lost', state); }); myAtemDevice.on('error', function(Message) { console.log('Atem Error', Message); }); myAtemDevice.ip = "10.205.1.20" myAtemDevice.connect()

Comments

Dev1an

The ATEM address you supplied (10.205.1.20) is a local address and thus can only be used on devices that are in te same (local) network as your ATEM. A script in RunKit is always executed on a remote server an thus it cannot acces your ATEM. There are two possible solutions: - Run your script on a local machine (directly using the node.js engine) or - Give your ATEM a public IP address so that RunKit can access it. (I strongly discourage this, because the whole world will be able to control your atem in this case 😄)