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-startstream-endrecording-renamed
Use the on(event: string, handler: Function) function to listen to events.
Extends
Section titled “Extends”EventEmitter
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new ChannelManager():
ChannelManager
Returns
Section titled “Returns”ChannelManager
Inherited from
Section titled “Inherited from”EventEmitter.constructor
Properties
Section titled “Properties”_emitter
Section titled “_emitter”
static_emitter:ChannelManager
Defined in: core/channelmanager.ts:29
_proxyCallbacks
Section titled “_proxyCallbacks”
static_proxyCallbacks:object={}
Defined in: core/channelmanager.ts:41
_proxyHandlers
Section titled “_proxyHandlers”
static_proxyHandlers:object={}
Defined in: util/eventemitter.ts:7
Inherited from
Section titled “Inherited from”EventEmitter._proxyHandlers
_remoteCallbacks
Section titled “_remoteCallbacks”
static_remoteCallbacks:object={}
Defined in: core/channelmanager.ts:42
_remoteHandlers
Section titled “_remoteHandlers”
static_remoteHandlers:object={}
Defined in: util/eventemitter.ts:6
Inherited from
Section titled “Inherited from”EventEmitter._remoteHandlers
Methods
Section titled “Methods”emit()
Section titled “emit()”emit(
event, …params):void
Defined in: util/eventemitter.ts:66
This function lets an event trigger with any number of supplied parameters.
Parameters
Section titled “Parameters”string
params
Section titled “params”…any[]
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”EventEmitter.emit
off(
event,handler):void
Defined in: util/eventemitter.ts:37
This function removes a handler to an event.
Parameters
Section titled “Parameters”string
handler
Section titled “handler”Function
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”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.
Parameters
Section titled “Parameters”string
handler
Section titled “handler”Function
string
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”EventEmitter.on
_finalCallback()
Section titled “_finalCallback()”
static_finalCallback(message):Promise<void>
Defined in: util/eventemitter.ts:99
Parameters
Section titled “Parameters”message
Section titled “message”string
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”EventEmitter._finalCallback
_setCallback()
Section titled “_setCallback()”
static_setCallback(message):Promise<unknown>
Defined in: util/eventemitter.ts:90
Parameters
Section titled “Parameters”message
Section titled “message”string
Returns
Section titled “Returns”Promise<unknown>
Inherited from
Section titled “Inherited from”EventEmitter._setCallback
emit()
Section titled “emit()”
staticemit(event, …params):void
Defined in: core/channelmanager.ts:36
param: (event: string, …params: any[])
Allows this class to emit an event.
Parameters
Section titled “Parameters”string
params
Section titled “params”…any[]
Returns
Section titled “Returns”void
staticoff(event,handler):void
Defined in: core/channelmanager.ts:145
Parameters
Section titled “Parameters”string
handler
Section titled “handler”Function
Returns
Section titled “Returns”void
staticon(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.
Usage:
Section titled “Usage:”ChannelManager.on('stream-start', function(res) { if (!res.error) { // No error var channel = res.channel; // Channel Object var streamTime = res.streamTime; }});Parameters
Section titled “Parameters”string
handler
Section titled “handler”Function
Returns
Section titled “Returns”void