Skip to content

Output

Defined in: core/output.ts:138

new Output(props?): Output

Defined in: core/output.ts:148

string

Output

static _callback: object = {}

Defined in: core/output.ts:139


static _id: string

Defined in: core/output.ts:140


static _localRecording: boolean = false

Defined in: core/output.ts:145


static _proxyCallback: object = {}

Defined in: core/output.ts:143


static _remoteCallback: object = {}

Defined in: core/output.ts:142

getDisplayName(): Promise<string>

Defined in: core/output.ts:359

return: Promise

Gets the name of the Output as displayed in the Outputs menu.

Promise<string>


getName(): Promise<string>

Defined in: core/output.ts:348

return: Promise

Gets the actual name of the Output.

Promise<string>


pauseLocalRecording(): Promise<boolean>

Defined in: core/output.ts:435

** For Deprecation, please use the static method instead

return: Promise

Pause a local recording.

Promise<boolean>


startBroadcast(optionBag?): Promise<boolean>

Defined in: core/output.ts:399

param: ([options]) – see below

return: Promise<boolean>

Start a broadcast of the provided channel.

Accepts an optional JSON object argument, which can be used to indicate certain flags, such as (additional options may be added):

  • suppressPrestreamDialog : used to bypass the showing of the pre-stream dialog of the outputs supporting it, will use last settings provided
  • outputTarget : optional 0-based target output index (0count-1) or 'all'. Count comes from host getProperty('viewoutputscount') and is not a fixed max of 2. 'all' fans out to each index; the host only receives numeric output=N (never output=all). Omit for legacy single-target / default behavior.
output.startBroadcast({ suppressPrestreamDialog: true });
output.startBroadcast({ suppressPrestreamDialog: true, outputTarget: 'all' });
output.startBroadcast({ outputTarget: '0' });

BroadcastOptions

Promise<boolean>


stopBroadcast(optionBag?): Promise<boolean>

Defined in: core/output.ts:424

param: ([options]) – see below

return: Promise<boolean>

Stop a broadcast of the provided channel.

Accepts an optional JSON object argument:

  • outputTarget : optional 0-based target output index (0count-1) or 'all'. Count comes from host getProperty('viewoutputscount') and is not a fixed max of 2. 'all' fans out to each index; the host only receives numeric output=N (never output=all). Omit for legacy single-target / default behavior.

OutputTargetOptions

Promise<boolean>


unpauseLocalRecording(): Promise<boolean>

Defined in: core/output.ts:466

** For Deprecation, please use the static method instead

return: Promise

Unpause a local recording.

Promise<boolean>


static _finalCallback(message): Promise<unknown>

Defined in: core/output.ts:554

string

Promise<unknown>


static _getBroadcastChannels(id, …args): Promise<unknown>

Defined in: core/output.ts:490

string

any[]

Promise<unknown>


static getOutputList(): Promise<Output[]>

Defined in: core/output.ts:182

param: (id: string)

return Promise<Output[]>

Fetch all available Outputs you can broadcast on based on your installed Broadcast plugin.

var xjs = require('xjs');
xjs.Output.getOutputList()
.then(function(outputs) {
outputs.map(output => {
output.getName()
.then(function(name) {
if(name.includes('Twitch')) {
output.startBroadcast({
suppressPrestreamDialog : true
});
}
})
})
})

Promise<Output[]>


static pauseLocalRecording(optionBag?): Promise<boolean>

Defined in: core/output.ts:320

param: ([options]) – see below

return: Promise<boolean>

Pause a local recording.

Accepts an optional JSON object argument:

  • outputTarget : optional 0-based target output index (0count-1) or 'all'. Count comes from host getProperty('viewoutputscount') and is not a fixed max of 2. 'all' fans out to each index; the host only receives numeric output=N (never output=all). Omit for legacy single-target / default behavior.

OutputTargetOptions

Promise<boolean>


static setSceneToRecord(scene): Promise<boolean>

Defined in: core/output.ts:234

param: scene<number|Scene>

return: Promise<boolean>

Sets a scene to record. Set to live scene or blank string to reset

any

Promise<boolean>


static startLocalRecording(optionBag?): Promise<boolean>

Defined in: core/output.ts:277

param: ([options]) – see below

return: Promise<boolean>

Start a local recording.

Accepts an optional JSON object argument:

  • outputTarget : optional 0-based target output index (0count-1) or 'all'. Count comes from host getProperty('viewoutputscount') and is not a fixed max of 2. 'all' fans out to each index; the host only receives numeric output=N (never output=all). Omit for legacy single-target / default behavior.

OutputTargetOptions

Promise<boolean>


static stopLocalRecording(optionBag?): Promise<boolean>

Defined in: core/output.ts:301

param: ([options]) – see below

return: Promise<boolean>

Stop a local recording.

Accepts an optional JSON object argument:

  • outputTarget : optional 0-based target output index (0count-1) or 'all'. Count comes from host getProperty('viewoutputscount') and is not a fixed max of 2. 'all' fans out to each index; the host only receives numeric output=N (never output=all). Omit for legacy single-target / default behavior.

OutputTargetOptions

Promise<boolean>


static unpauseLocalRecording(optionBag?): Promise<boolean>

Defined in: core/output.ts:339

param: ([options]) – see below

return: Promise<boolean>

Unpause a local recording.

Accepts an optional JSON object argument:

  • outputTarget : optional 0-based target output index (0count-1) or 'all'. Count comes from host getProperty('viewoutputscount') and is not a fixed max of 2. 'all' fans out to each index; the host only receives numeric output=N (never output=all). Omit for legacy single-target / default behavior.

OutputTargetOptions

Promise<boolean>