Provides the Autopilot webpage. This page allows the user to pair up triggers and actions from extensions to perform tasks.
It also provides a macro button system (similar to streamdeck's)
- Source:
-
Methods
CheckTriggers(data)
Handles received triggers checking if we have any matching trigger/action pairs
Parameters:
Name |
Type |
Description |
data |
object
|
|
- Source:
-
ConnectToDataCenter(host, port)
Connect to the StreamRoller websocket
Parameters:
Name |
Type |
Description |
host |
string
|
|
port |
number
|
|
- Source:
-
ProcessReceivedTrigger(pairing, receivedTrigger)
Processes a triger action pairing that has been triggered.
Parameters:
Name |
Type |
Description |
pairing |
object
|
|
receivedTrigger |
object
|
|
- Source:
-
ProcessUserPairings(userPairings)
Updates our userPairings array with the date received from the frontend webpage
when a user changes/adds a new item
Parameters:
Name |
Type |
Description |
userPairings |
object
|
|
- Source:
-
RequestChList()
Requests a channel list from the server
- Source:
-
RequestExtList()
Requests a list of extensions connected from the server
- Source:
-
SaveConfigToServer()
Saves our config on the server
- Source:
-
SaveDataToServer()
Save our data JSON to the server
- Source:
-
SendMacroImages(to)
Sends out the current list of macro images the user can chose from
Parameters:
Name |
Type |
Description |
to |
string
|
|
- Source:
-
SendMacros()
Sends out the current list of marcos
- Source:
-
Sends our small settins widget to the given channel
Parameters:
Name |
Type |
Description |
tochannel |
string
|
|
- Source:
-
SendUserPairings(to)
Sends our user pairing lists to the given extension or broadcasts if we have
just made a change and want to let everyone know
Parameters:
Name |
Type |
Description |
to |
string
|
|
- Source:
-
TriggerAction(action, triggerParams)
Causes an action to be triggered.
Parameters:
Name |
Type |
Description |
action |
object
|
action to be triggered
|
triggerParams |
object
|
received trigger parameters
|
- Source:
-
UpDateOlderTriggers(data) → {object}
This function parses older triggers and updates them with new fields to avoid the user having to redo them all manually. Wrote in longwinded format so it can be easier to understand for non/new coders
Parameters:
Name |
Type |
Description |
data |
object
|
|
- Source:
-
Returns:
modified data packet
-
Type
-
object
actionAction_SetGroupPauseState(group, state)
Handles the paused state actions to pause/unpause a trigger action pair
Parameters:
Name |
Type |
Description |
group |
string
|
group to toggle
|
state |
string
|
state to move to
|
- Source:
-
addTriggerEntries()
starts the process to build the webpage from the triggers and actions we have
- Source:
-
Handles data sent when a user submits our small setting dialog box
Parameters:
Name |
Type |
Description |
modalcode |
object
|
|
- Source:
-
heartBeatCallback()
Sends out our heartbeat message so others can monitor the extensions status
- Source:
-
initTriggersAndActions(extension_list)
Requests the triggers and actions 'SendTriggerAndActions' from each extension list in 'extension_list' and also the User triggers from the autopilot backend 'RequestUserTriggers'
Parameters:
Name |
Type |
Description |
extension_list |
Array.<strings>
|
extensions to query
|
- Source:
-
initialise(app, host, port, heartbeat)
Starts the extension using the given data.
Parameters:
Name |
Type |
Description |
app |
object:Express
|
|
host |
string
|
|
port |
number
|
|
heartbeat |
number
|
|
- Source:
-
onDataCenterConnect(socket)
Called when the StreaRoller websocket connection starts
Parameters:
Name |
Type |
Description |
socket |
object
|
|
- Source:
-
onDataCenterDisconnect(reason)
Called when the StreamRoller websocket disconnects
Parameters:
Name |
Type |
Description |
reason |
string
|
|
- Source:
-
onDataCenterMessage(server_packet)
Handles all streamroller inbound messages
Parameters:
Name |
Type |
Description |
server_packet |
object
|
|
- Source:
-
parseUserRequestSaveDataFile(data)
Handles a 'userRequestSaveDataFile' message triggered when a user uploads a new
JSON data file containing the trigger/action pairings
Parameters:
Name |
Type |
Description |
data |
object
|
|
- Source:
-
parseUserRequestSaveGroupFile(data)
Handles a 'parseUserRequestSaveGroupFile' message triggered when a user uploads a new group
JSON data file containing the trigger/action pairings
Parameters:
Name |
Type |
Description |
data |
object
|
|
- Source:
-
receivedTrigger(extensiontriggers)
Received trigger from an extension
Parameters:
Name |
Type |
Description |
extensiontriggers |
Array.<Object>
|
triggers received from extension
|
- Source:
-
(async) startServer(host, port, heartbeat)
Starts the extension using the given data.
Parameters:
Name |
Type |
Description |
host |
String
|
|
port |
Number
|
|
heartbeat |
Number
|
|
- Source:
-
Triggers the given actions mapped to a macro button trigger
Parameters:
Name |
Type |
Description |
name |
string
|
|
- Source:
-
updatesFor_v0_3_04(data) → {object}
added after release v0.3.04 04-05-25
Parameters:
Name |
Type |
Description |
data |
object
|
|
- Source:
-
Returns:
-
Type
-
object