new Device(atemIpAddressopt)
Provides an easy way to connect to an ATEM. If a valid IP address is provided, Device#connect will be called automatically.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
atemIpAddress |
String |
<optional> |
The ip address of the ATEM to connect to. |
Members
-
ip :String
-
The ip address of the ATEM
Type:
- String
-
state :ConnectionState
-
The current state of the connection. For more information about the possible values see ConnectionState
Type:
- ConnectionState
-
(inner) commandQueue :Array.<Command>
-
Commands we need to send to the atem
Type:
- Array.<Command>
-
(inner) commandTimer :Timeout
-
A timer to ensure commands are sent within 16 milliseconds
Type:
- Timeout
-
(inner) communicationTimeout
-
The timeout of the last received ATEM packet. Used to detect connection loss.
-
(inner) incomingPackets :Array.<AtemPacket>
-
Packets the ATEM sent and have yet to be acknowledged
Type:
- Array.<AtemPacket>
-
(inner) ls :Number
-
The current local sequence number. Local sequence numbers are used to identify sync packets we send to the ATEM.
Type:
- Number
-
(inner) pendingPackets :Array.<UserPacket>
-
Packets we sent to the ATEM but for which we received no acknowledgement yet.
Type:
- Array.<UserPacket>
-
(inner) socket
-
Create a UDP v4 socket
-
(inner) syncInterval :Timer
-
A timer to assure there is a sync message sent every 600 milliseconds.
Type:
- Timer
-
(inner) uid :number
-
Unique identifier A temporary uid is generated to make a connection. When connected, the ATEM will provide another uid for us
Type:
- number
Methods
-
changeSourceConfiguration(sourceID, options)
-
Changes the specified options of the Source Configuration. Note that you don't need to specify all the properties of SourceConfiguration.
Parameters:
Name Type Description sourceID
SourceID options
SourceConfiguration -
connect()
-
Initiate a new connection. If already connected it will first disconnect.
-
cut()
-
Performs a cut transition between preview and program
-
setPreview(sourceID)
-
Sets the desired source in preview
Parameters:
Name Type Description sourceID
SourceID the ID of the source -
setProgram(sourceID)
-
Sets the desired source in program. (cut transition)
Parameters:
Name Type Description sourceID
SourceID the ID of the source -
(inner) getPendingPacket(ls) → {UserPacket}
-
Find a pending packet by local sequence number
Parameters:
Name Type Description ls
Number Local sequence number Returns:
The packet- Type
- UserPacket
-
(inner) handleQueue()
-
Sends a packet with all the remaining command of the commandQueue
-
(inner) sync()
-
Create and transmit a sync packet to the ATEM.
Events
-
auxiliaryOutput
-
When an auxiliary output changes, this event will be fired.
-
connectionLost
-
When the connection with the atem is lost, this event will be fired.
-
connectionStateChange
-
error
-
When an error is encountered during communication, this event will be fired.
Type:
- Error
-
inputTally
-
When the input tally changes, this event will be fired.
By input tally we mean the state (which is: live, preview or neither of them) of one of the camera inputs- Source:
Properties:
Name Type Description inputNumber
Number the index of the input state
SourceState -
messageTimeout
-
When a sync message is sent to the atem and the ATEM does not respond in x milliseconds, this event will be fired.
Type:
- Error
-
previewBus
-
When the selected preview bus changes this event will be fired.
-
programBus
-
When the selected program bus changes this event will be fired.
-
rawCommand
-
Type:
-
sourceConfiguration
-
When the Source Configuration changes, for example: if the display name of input 2 changes, this event will be fired
- Source:
Properties:
Name Type Description sourceID
SourceID the identifier of the source sourceConfiguration
SourceConfiguration the new configuration of the source -
sourceTally
-
When the source tally changes, this event will be fired.
- Source:
Properties:
Name Type Description sourceID
Number the id of the source state
SourceState