Skip to content

ChannelManager

Defined in: core/channelmanager.ts:28

The ChannelManager class allows limited access to channels (also termed as outputs) that are being used or set in XSplit Broadcaster. This function is not available on Source Properties.

The class also emits events for developers to know when a stream has started or ended.

The following events are emitted.

  • stream-start
  • stream-end
  • recording-renamed

Use the on(event: string, handler: Function) function to listen to events.

  • EventEmitter

new ChannelManager(): ChannelManager

ChannelManager

EventEmitter.constructor

static _emitter: ChannelManager

Defined in: core/channelmanager.ts:29


static _proxyCallbacks: object = {}

Defined in: core/channelmanager.ts:41


static _proxyHandlers: object = {}

Defined in: util/eventemitter.ts:7

EventEmitter._proxyHandlers


static _remoteCallbacks: object = {}

Defined in: core/channelmanager.ts:42


static _remoteHandlers: object = {}

Defined in: util/eventemitter.ts:6

EventEmitter._remoteHandlers

emit(event, …params): void

Defined in: util/eventemitter.ts:66

This function lets an event trigger with any number of supplied parameters.

string

any[]

void

EventEmitter.emit


off(event, handler): void

Defined in: util/eventemitter.ts:37

This function removes a handler to an event.

string

Function

void

EventEmitter.off


on(event, handler, _id?): void

Defined in: util/eventemitter.ts:10

This function attaches a handler to an event. Duplicate handlers are allowed.

string

Function

string

void

EventEmitter.on


static _finalCallback(message): Promise<void>

Defined in: util/eventemitter.ts:99

string

Promise<void>

EventEmitter._finalCallback


static _setCallback(message): Promise<unknown>

Defined in: util/eventemitter.ts:90

string

Promise<unknown>

EventEmitter._setCallback


static emit(event, …params): void

Defined in: core/channelmanager.ts:36

param: (event: string, …params: any[])

Allows this class to emit an event.

string

any[]

void


static off(event, handler): void

Defined in: core/channelmanager.ts:145

string

Function

void


static on(event, handler): void

Defined in: core/channelmanager.ts:66

param: (event: string, handler: Function)

Allows listening to events that this class emits. Currently there are three: stream-start, stream-end and recording-renamed.

For stream-start and stream-end, res.channel._name may include &output:N for the true target of that event (one event per index). Host payloads that omit the suffix are resolved from OutputIdx, Settings XML, or the most recent start/stop target for that channel.

ChannelManager.on('stream-start', function(res) {
if (!res.error) { // No error
var channel = res.channel; // Channel Object
var streamTime = res.streamTime;
}
});

string

Function

void