Dll
Defined in: core/dll.ts:27
The Dll class allows access to functions in DLL files that are placed within the Scriptdlls folder.
The class also emits two events for developers to know when the user changes the DLL permission setting for the plugin through the permissions window.
The following events are emitted.
access-grantedaccess-revoked
Use the on(event: string, handler: Function) function to listen to events.
For more detailed information about using DLLs in XSplit, please see the tutorials.html#/dll DLL tutorial. That link also includes a list of methods exposed by the DLLs that ship with XSplit.
Extends
Section titled “Extends”EventEmitter
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Dll():
Dll
Returns
Section titled “Returns”Dll
Inherited from
Section titled “Inherited from”EventEmitter.constructor
Properties
Section titled “Properties”_emitter
Section titled “_emitter”
static_emitter:Dll
Defined in: core/dll.ts:50
_proxyHandlers
Section titled “_proxyHandlers”
static_proxyHandlers:object={}
Defined in: util/eventemitter.ts:7
Inherited from
Section titled “Inherited from”EventEmitter._proxyHandlers
_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
call()
Section titled “call()”
staticcall(func, …params):Promise<string>
Defined in: core/dll.ts:80
param: (funcName: string, …params: string[])
return: Promise
Calls a function from a loaded “safe” DLL. The only safe DLL we are
currently exposing is Xjs.dll.
Parameters
Section titled “Parameters”string
params
Section titled “params”…string[]
Returns
Section titled “Returns”Promise<string>
callEx()
Section titled “callEx()”
staticcallEx(func, …params):Promise<string>
Defined in: core/dll.ts:110
param: (funcName: string, …params: string[])
return: Promise
Calls a function from a loaded “unsafe” DLL. The first DLL containing the function name will be called, so you need to ensure there are no function name collisions among DLLs for functions you require.
Some DLLs have callbacks. Assign a handler function to that callback in
the global namespace (window.callbackName = ...), and the DLL will call
that function accordingly.
See the documentation of your specific DLL for more details.
Parameters
Section titled “Parameters”string
params
Section titled “params”…string[]
Returns
Section titled “Returns”Promise<string>
emit()
Section titled “emit()”
staticemit(event, …params):void
Defined in: core/dll.ts:67
param: (event: string, …params: any[])
Allows this class to emit an event. Generally only useful for testing.
Parameters
Section titled “Parameters”string
params
Section titled “params”…any[]
Returns
Section titled “Returns”void
isAccessGranted()
Section titled “isAccessGranted()”
staticisAccessGranted():Promise<boolean>
Defined in: core/dll.ts:131
return: Promise
Determines if user has granted DLL access for this plugin. This also resolves to true if DLL security is disabled altogether.
Returns
Section titled “Returns”Promise<boolean>
load()
Section titled “load()”
staticload(path):Promise<any>
Defined in: core/dll.ts:42
param: (path: string)
Loads one or more DLLs for the plugin to use. Currently, only Xjs.dll is auto-loaded and does not require loading. Loading DLLs will trigger a notification for the user, requesting access to be granted to DLL files. Your plugin should only call this once, at the beginning of execution.
Paths are relative to the main XBC application folder, so sample usage is:
Dll.load(['Scriptdlls\\SplitMediaLabs\\XjsEx.dll']);Parameters
Section titled “Parameters”string[]
Returns
Section titled “Returns”Promise<any>
staticon(event,handler):void
Defined in: core/dll.ts:58
param: (event: string, handler: Function)
Allows listening to events that this class emits. Currently there are two:
access-granted and access-revoked.
Parameters
Section titled “Parameters”string
handler
Section titled “handler”Function
Returns
Section titled “Returns”void