Methods
SaveConfigToServer()
Sends our config to the server to be saved for next time we run
SendSettingsWidgetLarge()
SendSettingsWidgetSmall()
update and send out our small settings widget
SetupWebpageServer()
Start the webserver. Mostly used to download encoders list to save on
websocket bandwidth
UpdateEncodersAvailable()
Query the Computer for ffmpeg encoders
- Source:
Returns:
Promise with encoders object when resolved or null
buildFFMPEGArgs(hideStreamKey)
Builds the argument string for ffmpeg
Parameters:
Name | Type | Default | Description |
---|---|---|---|
hideStreamKey |
boolean | true | //if true replaces keys with placeholders |
Returns:
ffmpeg args for the given stream
checkFFMPEGAvailabilities()
Checks and updates availabilities of FFMPEG with current settings
and builds the encoders lists
checkFFMPEGInstall()
checks what ffmpeg is installed and sets local variables
(userFfmpegInstalled, streamRollerFfmpegInstalled)
to true or false based on availability
- Source:
createCheckBox(description, name, checked)
Parameters:
Name | Type | Description |
---|---|---|
description |
string | |
name |
string | |
checked |
boolean |
Returns:
html code of the checkbox
(async) downloadFFMPEG()
download and install ffmpeg
- Source:
ffmpegBusyFlags()
checks if ffmpegBusyFlags processing is still happening, ie encoder queries etc
- Source:
Returns:
boolean
findTriggerByMessageType(messagetype)
Finds the trigger using the passed messagetype
Parameters:
Name | Type | Description |
---|---|---|
messagetype |
string |
Returns:
trigger
getDebug()
- Source:
Returns:
object
(async) getEncoderOptions(ffmpegExe, encoder)
Parameters:
Name | Type | Description |
---|---|---|
ffmpegExe |
string | |
encoder |
string |
- Source:
Returns:
array of options for the given encoder
getEncoders()
- Source:
Returns:
object
getFFMPEGCommand()
returns the cmd to run for the current ffmpeg setup
- Source:
Returns:
ffmpeg exe command
getInstalledFFMPEGs()
Returns the types of FFMPEG we have installed (ie user or StreamRoller)
{streamRollerFfmpegInstalled,userFfmpegInstalled}
- Source:
handleExit(err, endCB)
Parameters:
Name | Type | Description |
---|---|---|
err |
error | |
endCB |
callback |
- Source:
heartBeatCallback()
Provides a heartbeat message to inform other extensions of our status
init()
- Source:
initialise(app, host, port, heartbeat)
Parameters:
Name | Type | Description |
---|---|---|
app |
string | |
host |
string | |
port |
string | |
heartbeat |
number |
killProcess()
kills the current ffmpeg process
onDataCenterConnect(socket)
Connection message handler
Parameters:
Name | Type | Description |
---|---|---|
socket |
* |
onDataCenterDisconnect(reason)
Disconnection message sent from the server
Parameters:
Name | Type | Description |
---|---|---|
reason |
String |
onDataCenterMessage(server_packet)
receives message from the socket
Parameters:
Name | Type | Description |
---|---|---|
server_packet |
data |
(async) parseEncodersString(ffmpegExe)
creates video and audio encoder lists from the ffmpeg output string
Parameters:
Name | Type | Description |
---|---|---|
ffmpegExe |
string |
- Source:
Returns:
Promise (true) or error
parseSettingsWidgetLarge(extension_data)
Our large settings widget was submitted
Parameters:
Name | Type | Description |
---|---|---|
extension_data |
object |
parseSettingsWidgetSmall(extension_data)
Our small settings widget was submitted
Parameters:
Name | Type | Description |
---|---|---|
extension_data |
object |
printProgress(progress)
overwrites a string on the cmd line, mostly useful for progress etc
Parameters:
Name | Type | Description |
---|---|---|
progress |
string |
- Source:
runFFMPEG(command, args, options, processCB, streamStarted, streamFinished)
Parameters:
Name | Type | Default | Description |
---|---|---|---|
command |
string | ||
args |
array | ||
options |
object | ||
processCB |
callback | null | |
streamStarted |
callback | null | |
streamFinished |
callback | null |
- Source:
Returns:
handle to process or null
saveCredentialsToServer()
Sends our credentials to the server to be saved for next time we run
sendAction(action)
sends an action out.
Parameters:
Name | Type | Description |
---|---|---|
action |
object | {messagetype:..', to:..., data: {<< action params >>}} |
sendOBSStartRecordingAction(triggerActionRef)
tells OBS to start Recording
Parameters:
Name | Type | Default | Description |
---|---|---|---|
triggerActionRef |
string | multistream | pass through reference from action or "multistream" |
sendOBSStartStreamingAction(triggerActionRef)
tells OBS to start streaming
Parameters:
Name | Type | Default | Description |
---|---|---|---|
triggerActionRef |
string | multistream | pass through reference from action or "multistream" |
sendOBSStopRecordingAction(triggerActionRef)
Parameters:
Name | Type | Default | Description |
---|---|---|---|
triggerActionRef |
string | multistream | pass through reference from action or "multistream" |
sendOBSStopStreamingAction(triggerActionRef)
Parameters:
Name | Type | Default | Description |
---|---|---|---|
triggerActionRef |
string | multistream | pass through reference from action or "multistream" |
sendStreamStartedTrigger(triggerActionRef)
Parameters:
Name | Type | Default | Description |
---|---|---|---|
triggerActionRef |
string | multistream | pass through reference from action or "multistream" |
sendStreamStoppedTrigger(triggerActionRef)
Parameters:
Name | Type | Description |
---|---|---|
triggerActionRef |
string | pass through reference from action or "multistream" |
sendTrigger(data)
Sends the given trigger or action out on our channel if to is ""
or sends to the extension as an extension message if to specifies extension name
Parameters:
Name | Type | Description |
---|---|---|
data |
object |
setDebug(debugOptions)
Parameters:
Name | Type | Description |
---|---|---|
debugOptions |
object |
- Source:
startStream(ref)
Parameters:
Name | Type | Default | Description |
---|---|---|---|
ref |
string | multistream | identifier that is carried over from an action or defaulted |
stopStream()
Stop streaming
unzipfile(file, to)
Parameters:
Name | Type | Description |
---|---|---|
file |
string | filename |
to |
to | destination directory |
- Source:
updateEncoderWebJSONFile()
Updates the encoders file for the settings page
- Source:
useStreamRollerFfmpeg(useStreamRoller)
Should we use StreamRoller FFMPEG or the PC Installed one (if available)
Parameters:
Name | Type | Description |
---|---|---|
useStreamRoller |
boolean |
- Source:
Methods
SaveConfigToServer()
Sends our config to the server to be saved for next time we run
SendSettingsWidgetLarge()
SendSettingsWidgetSmall()
update and send out our small settings widget
SetupWebpageServer()
Start the webserver. Mostly used to download encoders list to save on
websocket bandwidth
UpdateEncodersAvailable()
Query the Computer for ffmpeg encoders
- Source:
Returns:
Promise with encoders object when resolved or null
buildFFMPEGArgs(hideStreamKey)
Builds the argument string for ffmpeg
Parameters:
Name | Type | Default | Description |
---|---|---|---|
hideStreamKey |
boolean | true | //if true replaces keys with placeholders |
Returns:
ffmpeg args for the given stream
checkFFMPEGAvailabilities()
Checks and updates availabilities of FFMPEG with current settings
and builds the encoders lists
checkFFMPEGInstall()
checks what ffmpeg is installed and sets local variables
(userFfmpegInstalled, streamRollerFfmpegInstalled)
to true or false based on availability
- Source:
createCheckBox(description, name, checked)
Parameters:
Name | Type | Description |
---|---|---|
description |
string | |
name |
string | |
checked |
boolean |
Returns:
html code of the checkbox
(async) downloadFFMPEG()
download and install ffmpeg
- Source:
ffmpegBusyFlags()
checks if ffmpegBusyFlags processing is still happening, ie encoder queries etc
- Source:
Returns:
boolean
findTriggerByMessageType(messagetype)
Finds the trigger using the passed messagetype
Parameters:
Name | Type | Description |
---|---|---|
messagetype |
string |
Returns:
trigger
getDebug()
- Source:
Returns:
object
(async) getEncoderOptions(ffmpegExe, encoder)
Parameters:
Name | Type | Description |
---|---|---|
ffmpegExe |
string | |
encoder |
string |
- Source:
Returns:
array of options for the given encoder
getEncoders()
- Source:
Returns:
object
getFFMPEGCommand()
returns the cmd to run for the current ffmpeg setup
- Source:
Returns:
ffmpeg exe command
getInstalledFFMPEGs()
Returns the types of FFMPEG we have installed (ie user or StreamRoller)
{streamRollerFfmpegInstalled,userFfmpegInstalled}
- Source:
handleExit(err, endCB)
Parameters:
Name | Type | Description |
---|---|---|
err |
error | |
endCB |
callback |
- Source:
heartBeatCallback()
Provides a heartbeat message to inform other extensions of our status
init()
- Source:
initialise(app, host, port, heartbeat)
Parameters:
Name | Type | Description |
---|---|---|
app |
string | |
host |
string | |
port |
string | |
heartbeat |
number |
killProcess()
kills the current ffmpeg process
onDataCenterConnect(socket)
Connection message handler
Parameters:
Name | Type | Description |
---|---|---|
socket |
* |
onDataCenterDisconnect(reason)
Disconnection message sent from the server
Parameters:
Name | Type | Description |
---|---|---|
reason |
String |
onDataCenterMessage(server_packet)
receives message from the socket
Parameters:
Name | Type | Description |
---|---|---|
server_packet |
data |
(async) parseEncodersString(ffmpegExe)
creates video and audio encoder lists from the ffmpeg output string
Parameters:
Name | Type | Description |
---|---|---|
ffmpegExe |
string |
- Source:
Returns:
Promise (true) or error
parseSettingsWidgetLarge(extension_data)
Our large settings widget was submitted
Parameters:
Name | Type | Description |
---|---|---|
extension_data |
object |
parseSettingsWidgetSmall(extension_data)
Our small settings widget was submitted
Parameters:
Name | Type | Description |
---|---|---|
extension_data |
object |
printProgress(progress)
overwrites a string on the cmd line, mostly useful for progress etc
Parameters:
Name | Type | Description |
---|---|---|
progress |
string |
- Source:
runFFMPEG(command, args, options, processCB, streamStarted, streamFinished)
Parameters:
Name | Type | Default | Description |
---|---|---|---|
command |
string | ||
args |
array | ||
options |
object | ||
processCB |
callback | null | |
streamStarted |
callback | null | |
streamFinished |
callback | null |
- Source:
Returns:
handle to process or null
saveCredentialsToServer()
Sends our credentials to the server to be saved for next time we run
sendAction(action)
sends an action out.
Parameters:
Name | Type | Description |
---|---|---|
action |
object | {messagetype:..', to:..., data: {<< action params >>}} |
sendOBSStartRecordingAction(triggerActionRef)
tells OBS to start Recording
Parameters:
Name | Type | Default | Description |
---|---|---|---|
triggerActionRef |
string | multistream | pass through reference from action or "multistream" |
sendOBSStartStreamingAction(triggerActionRef)
tells OBS to start streaming
Parameters:
Name | Type | Default | Description |
---|---|---|---|
triggerActionRef |
string | multistream | pass through reference from action or "multistream" |
sendOBSStopRecordingAction(triggerActionRef)
Parameters:
Name | Type | Default | Description |
---|---|---|---|
triggerActionRef |
string | multistream | pass through reference from action or "multistream" |
sendOBSStopStreamingAction(triggerActionRef)
Parameters:
Name | Type | Default | Description |
---|---|---|---|
triggerActionRef |
string | multistream | pass through reference from action or "multistream" |
sendStreamStartedTrigger(triggerActionRef)
Parameters:
Name | Type | Default | Description |
---|---|---|---|
triggerActionRef |
string | multistream | pass through reference from action or "multistream" |
sendStreamStoppedTrigger(triggerActionRef)
Parameters:
Name | Type | Description |
---|---|---|
triggerActionRef |
string | pass through reference from action or "multistream" |
sendTrigger(data)
Sends the given trigger or action out on our channel if to is ""
or sends to the extension as an extension message if to specifies extension name
Parameters:
Name | Type | Description |
---|---|---|
data |
object |
setDebug(debugOptions)
Parameters:
Name | Type | Description |
---|---|---|
debugOptions |
object |
- Source:
startStream(ref)
Parameters:
Name | Type | Default | Description |
---|---|---|---|
ref |
string | multistream | identifier that is carried over from an action or defaulted |
stopStream()
Stop streaming
unzipfile(file, to)
Parameters:
Name | Type | Description |
---|---|---|
file |
string | filename |
to |
to | destination directory |
- Source:
updateEncoderWebJSONFile()
Updates the encoders file for the settings page
- Source:
useStreamRollerFfmpeg(useStreamRoller)
Should we use StreamRoller FFMPEG or the PC Installed one (if available)
Parameters:
Name | Type | Description |
---|---|---|
useStreamRoller |
boolean |
- Source: