setInputURLInSpeedControlSettings Object Settings for automatically updating the Runner Stream Source panel:
mediaSourceNames Array of strings The names of the browser/media sources in the Stream Portable OBS that the Runner Stream Source panel will be managing. This needs to be identical to the value set in nodecg-obs-control.mediaSourceURLPanel.mediaSources.
baseURL String The common portion of the URLs for your runner streaming servers. This needs to be identical to one of the URLs set in nodecg-obs-control.mediaSourceURLPanel.urls.url.
SpeedControlKeyNames Object The Custom Data key names declared in nodecg-speedcontrol.customData:
layout String The key that houses a run's layout code as declared in nodecg-speedcontrol.customData.run.key.
streamKey String The key that houses a runner's stream key as declared in nodecg-speedcontrol.customData.player.key.
onClickTimeout Integer The amount of time in milliseconds all buttons will be disabled for when one is clicked. This prevents double clicking or clicking too many buttons too quickly. Can be disabled by entering a value of 0.
buttons Array of objects Each object in the array creates a single button on the Live Switch Automation panel. name, displayText, and actions are all required, with the rest being optional. The order these are declared will determine the order they appear in the panel. The default settings have been specifically configured for STUK's needs, so only change these if you know what you're doing:
name String The name of the button.
displayText String The text that appears on the button.
color String The colour of the button. Supports the following strings: ["red","pink","purple","blue","lightblue","green","yellow","orange","grey"].
textColor String The colour of the button's text. Supports the following strings: ["black","white"].
disabledOn Array of Strings Declares events that will cause the button to be disabled. Supports the following strings: ["OBSDisconnected","speedControlTimerActive","invalidLayout","activeScene"].
activeScenes Array of Strings If "activeScene" is declared in disabledOn, declares which scenes in OBS the button will disable on when they become active.
actions Object Declares the actions that will perform when the button is clicked. Multiple actions can be defined, however a button cannot include more than one copy of the same action. Every action must include an active boolean that determines if that action is to be performed, and can include a delay integer that specifies in milliseconds how long after the button is pressed the action should be performed. Some actions have further variables:
switchScene Object Switches the OBS Program Scene to the scene declared in the current run's Layout Code field.
switchPreview Object Switches the OBS Preview Scene to the scene declared in the current run's Layout Code field.
switchSceneCustom Object Switches the OBS Program Scene to a specific scene:
sceneName String The scene to switch to.
playNextRunInSpeedControl Object Tells nodecg-speedcontrol to move to the next run.
setInputURLFromSpeedControl Object Tells OBS to set the runner stream browser/media sources to the values declared in the current runners' Stream Key fields.
startRecording Object Tells OBS to start locally recording.
stopRecording Object Tells OBS to stop locally recording if already recording.
setInputMuteState Object Tells to OBS to change the mute state of an audio source.
data Array of Objects Each input that needs to be changed. If you only want to change one input, you can remove the data field and just have one set of the following children:
inputName String The name of the audio source to set.
inputMuted Boolean Whether the audio source should be muted (true) or unmuted (false) if not already at the intended state.
{
"setInputURLInSpeedControlSettings": {
"mediaSourceNames": ["Player 1","Player 2","Player 3","Player 4"],
"baseURL": "https://player.twitch.tv/?enableExtensions=false&muted=false&parent=twitch.tv&player=popout&quality=high&volume=1&channel=speedruntoolsukstream",
"SpeedControlKeyNames": {
"layout": "layout",
"streamKey": "stream"
}
},
"onClickTimeout": 2000,
"buttons": [
{
"name": "nextGame",
"displayText": "Start Run",
"color": "purple",
"textColor": "white",
"actions": {
"switchScene": {
"active": true,
"delay": 1000
},
"playNextRunInSpeedControl": {
"active": false
},
"stopRecording": {
"active": false
},
"startRecording": {
"active": true
},
"setInputMuteState": {
"active": true,
"data": [{
"inputName": "♪ P1 Mic Out",
"inputMuted": false
},{
"inputName": "♪ P1 Local Mic Out",
"inputMuted": false
}]
}
},
"disabledOn": ["speedControlTimerActive", "OBSDisconnected", "invalidLayout", "activeScene"],
"activeScenes": ["INTERVIEW","5X3_4X3_1P","16X9_4X3_1P","4X3+16X9_1P","4X3_X2_BIGSMALL_1P","10X9_1P","3X2_1P","1X1_1P","16X9_4P","16X9_3P","16X9_2P","16X9_1P","4X3_4P","4X3_3P","4X3_2P","4X3_1P"]
},
{
"name": "intermission",
"displayText": "Intermission",
"color": "blue",
"textColor": "white",
"actions": {
"switchSceneCustom": {
"active": true,
"sceneName": "INTERMISSION",
"delay": 100
},
"playNextRunInSpeedControl": {
"active": true,
"delay": 0
},
"switchPreview": {
"active": true,
"delay": 2000
},
"startRecording":{
"active": false
},
"stopRecording": {
"active": true
},
"setInputMuteState": {
"active": true,
"delay": 1000,
"data": [{
"inputName": "♪ P1 Mic Out",
"inputMuted": true
},{
"inputName": "♪ P1 Local Mic Out",
"inputMuted": true
}]
},
"setInputURLFromSpeedControl": {
"active": true,
"delay": 2000
}
},
"disabledOn": ["speedControlTimerActive", "OBSDisconnected", "activeScene"],
"activeScenes": ["INTERMISSION","VIDEO","OPENING","CLOSING"]
},
{
"name": "video run",
"displayText": "Video from Run",
"color": "pink",
"textColor": "black",
"actions": {
"switchSceneCustom": {
"active": true,
"sceneName": "VIDEO"
},
"playNextRunInSpeedControl": {
"active": true,
"delay": 100
},
"startRecording":{
"active": false
},
"stopRecording": {
"active": true
},
"setInputMuteState": {
"active": true,
"delay": 1000,
"data": [{
"inputName": "♪ P1 Mic Out",
"inputMuted": true
},{
"inputName": "♪ P1 Local Mic Out",
"inputMuted": true
}]
},
"setInputURLFromSpeedControl": {
"active": true,
"delay": 2000
}
},
"disabledOn": ["speedControlTimerActive", "OBSDisconnected", "activeScene"],
"activeScenes": ["INTERMISSION","VIDEO","OPENING","CLOSING"]
},
{
"name": "video intermission",
"displayText": "Video from Intermission",
"color": "lightblue",
"textColor":"black",
"actions": {
"switchSceneCustom": {
"active": true,
"sceneName": "VIDEO"
},
"stopRecording":{
"active": true
},
"startRecording":{
"active": false
}
},
"disabledOn": ["speedControlTimerActive", "OBSDisconnected", "activeScene"],
"activeScenes": ["VIDEO","INTERVIEW","5X3_4X3_1P","16X9_4X3_1P","4X3+16X9_1P","4X3_X2_BIGSMALL_1P","10X9_1P","3X2_1P","1X1_1P","16X9_4P","16X9_3P","16X9_2P","16X9_1P","4X3_4P","4X3_3P","4X3_2P","4X3_1P"]
},
{
"name": "opening",
"displayText": "Opening",
"color": "yellow",
"textColor": "black",
"actions": {
"switchSceneCustom": {
"active": true,
"sceneName": "OPENING"
},
"startRecording":{
"active": false
},
"stopRecording": {
"active": true
}
},
"disabledOn": ["speedControlTimerActive", "OBSDisconnected", "activeScene"],
"activeScenes": ["OPENING"]
},
{
"name": "closing",
"displayText": "Closing",
"color": "orange",
"textColor": "black",
"actions": {
"switchSceneCustom": {
"active": true,
"sceneName": "CLOSING"
},
"startRecording":{
"active": false
},
"stopRecording": {
"active": true
}
},
"disabledOn": ["speedControlTimerActive", "OBSDisconnected", "activeScene"],
"activeScenes": ["CLOSING"]
},
{
"name": "tech_issue_start",
"displayText": "Tech Issue Start",
"color": "red",
"textColor": "white",
"actions": {
"switchSceneCustom": {
"active": true,
"sceneName": "INTERMISSION"
},
"playNextRunInSpeedControl": {
"active": false
},
"setInputMuteState": {
"active": true,
"delay": 1000,
"data": [{
"inputName": "♪ P1 Mic Out",
"inputMuted": true
},{
"inputName": "♪ P1 Local Mic Out",
"inputMuted": true
}]
}
},
"disabledOn": ["OBSDisconnected", "activeScene],
"activeScenes": ["INTERMISSION","VIDEO","OPENING","CLOSING"]
},
{
"name": "tech_issue_over",
"displayText": "Tech Issue Over",
"color": "green",
"textColor": "white",
"actions": {
"switchScene": {
"active": true
},
"playNextRunInSpeedControl": {
"active": false
},
"stopRecording": {
"active": false
},
"startRecording": {
"active": false
},
"setInputMuteState": {
"active": true,
"data": [{
"inputName": "♪ P1 Mic Out",
"inputMuted": false
},{
"inputName": "♪ P1 Local Mic Out",
"inputMuted": false
}]
}
},
"disabledOn": ["OBSDisconnected", "activeScene],
"activeScenes": ["INTERVIEW","5X3_4X3_1P","16X9_4X3_1P","4X3+16X9_1P","4X3_X2_BIGSMALL_1P","10X9_1P","3X2_1P","1X1_1P","16X9_4P","16X9_3P","16X9_2P","16X9_1P","4X3_4P","4X3_3P","4X3_2P","4X3_1P"]
},
{
"name": "quickIntermission",
"displayText": "Intermission (Scene Switch Only)",
"color": "blue",
"textColor": "white",
"actions": {
"switchSceneCustom": {
"active": true,
"sceneName": "INTERMISSION"
}
},
"disabledOn": ["speedControlTimerActive", "OBSDisconnected", "activeScene"],
"activeScenes": ["INTERMISSION"]
}
]
}
The default schema produces a predesigned set of button that have been designed for use with the STUK package - most users will not need to change any of the buttons settings (all users should change the setInputURLInSpeedControlSettings). If sticking with the default settings, a simpler overview of these buttons is explained on the Live Switch page. The active actions for these buttons do the following:
To be pressed during Intermission when runners and comms are ready to start:
"switchScene": switches the OBS programme scene to the scene declared in the run's layout code.
"startRecording": tells OBS to start recording, this way you have separate recordings of each run ready to upload to YouTube.
"setInputState": unmutes Player 1's Mic audio and Player 1's Local Mic audio, both of which should include the host and commentator mics. OBS uses Advanced Scene Switcher to automatically unmute Player 1's Game audio when the scene changes from intermission to a game layout.
To be pressed only when a run or interview has ended. If you ever need to go to the intermission scene before a run starts or during a run, you should use the tech_issue_start button:
"switchSceneCustom": switches the OBS programme scene to the INTERMISSION scene. Includes a 100ms delay just to give the next action a slight head start.
"playNextRunInSpeedControl": tells nodecg-speedcontrol to move to the next run. The delay is specifically set to 0 to encourage users not to change this. Setting this to zero and using a transition in OBS that lasts at least a second will mean that by the time the transition has ended, the intermission screen will already be showing the next run.
"switchPreview": switches the OBS preview scene to the scene declared in the next run's layout code. Includes a one-second delay to ensure the previous action to switch to the next run has concluded so it looks up that run and not the current run.
"stopRecording": tells OBS to stop recording.
"setInputMuteState": mutes Player 1's Mic audio and Player 1's Local Mic audio, both of which should include the host and commentator mics. OBS uses Advanced Scene Switcher to automatically mute Player 1's Game audio when the scene changes from intermission to a game layout. Includes a one-second delay to ensure the host doesn't accidentally get cut off.
"setInputURLFromSpeedControl": Tells OBS to set the runner stream browser/media sources to the values declared in the next runners' stream key fields. Includes a two-second delay to ensure all other actions have concluded before swapping the sources. The combination of this action with switchPreview means that as soon as the transition to intermission has concluded, the OBS preview viewer will already show the scene for the next run, and assuming the next runner is already streaming to the correct location, their stream should be showing.
To be pressed when a run or interview has ended and you immediately want to display a video. This button does exactly the same as the intermission button, except switches the OBS programme scene to the VIDEO scene. OBS uses Advanced Scene Switcher to automatically switch to the intermission scene when the video ends.
To be pressed during intermission when you'd like to show a video. You should not use the video run button if you're already at intermission as doing so will cause nodecg-speedcontrol to move on to the next run.
"switchSceneCustom": switches the OBS programme scene to the VIDEO scene.
"stopRecording": on the off chance OBS is still recording (which it shouldn't be during intermission), stops locally recording.
To be pressed if you ever need to go to the opening scene.
"switchSceneCustom": switches the OBS programme scene to the OPENING scene.
"stopRecording": on the off chance OBS is recording, stops locally recording.
To be pressed when you're ready to go to the closing scene. This button does exactly the same as the opening button, except switches the OBS programme scene to the CLOSING scene. You shouldn't go to the closing scene straight from a run, as this button doesn't mute any audio sources. You should go to intermission first, have your host do a sign off, then go to the closing scene.
To be pressed during a run if there is a tech issue and you'd like to switch to the intermission scene whilst the issue is resolved. Whilst the timer is going, the intermission button is disabled, preventing users from switching to intermission in the middle of a run. This button does not include that limitation, but also doesn't move speedcontrol onto the next run, or stop OBS' local recording:
"switchSceneCustom": switches the OBS programme scene to the INTERMISSION scene.
"setInputMuteState": mutes Player 1's Mic audio and Player 1's Local Mic audio, both of which should include the host and commentator mics. OBS uses Advanced Scene Switcher to automatically mute Player 1's Game audio when the scene changes to intermission. Includes a one-second delay to ensure the host doesn't accidentally get cut off.
To be pressed during a tech issue intermission once the problem is resolved and you're ready to resume the run. There actually wouldn't be any harm in using the nextRun button to resume the run, but having a button for the end of the tech issue is better for the user experience.
"switchScene": switches the OBS programme scene to the scene declared in the run's layout code.
"setInputMuteState": unmutes Player 1's Mics audio and Player 1's Local Mic audio, both of which should include the host and commentator mics. OBS uses Advanced Scene Switcher to automatically unmute Player 1's Game audio when the scene changes from intermission to a game layout.
Switches to the Intermission scene without performing any other actions. This is useful for going to the Intermission from the Opening scene at the very start of the marathon, or any other time where you need to go to the Intermission scene without advancing the run player.