Constructor
new module:ct-sljsadapter /providers /Stream Link Trigger Service(provided Streamlink Trigger APIopt)
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
providedStreamlinkTriggerAPI |
caplin |
<optional> |
new caplin.streamlink.alerts.TriggerService() | provide a fake streamlink API for testing |
Methods
create(properties, erroropt, successopt)
This method is meant to be invoked by UI components wishing to create a new trigger. It uses the streamlink API to add a trigger.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
properties |
Object | A map including the required properties |
|
error |
function |
<optional> |
callback to be invoked on streamlink contrib error. |
success |
function |
<optional> |
callback to be invoked on successful trigger creation. |
- See:
-
- ct-alerts/TriggerService#create
Throws:
-
If required properties are not included, or if error and success are not functions.
- Type
-
br
/Errors .INVALID _PARAMETERS
disable Trigger(trigger, erroropt, successopt)
Disables a trigger in the system.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
trigger |
ct-alerts |
The trigger to be disabled. |
|
error |
function |
<optional> |
callback invoked on streamlink contrib error. |
success |
function |
<optional> |
callback invoked on successful trigger disabling. |
- See:
-
- ct-alerts/TriggerService#disableTrigger
Throws:
-
If trigger parameter is not a Trigger, not found in the current list, or if error and success are not functions.
- Type
-
br
/Errors .INVALID _PARAMETERS
dispose(trigger, erroropt, successopt)
This method is meant to be invoked by UI components wishing to dispose of a trigger. It uses the streamlink API to remove a trigger.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
trigger |
ct-alerts |
The trigger to be disposed of. |
|
error |
function |
<optional> |
callback to be invoked on streamlink contrib error. |
success |
function |
<optional> |
callback to be invoked on successful trigger disposal. |
- See:
-
- ct-alerts/TriggerService#dispose
Throws:
-
If trigger parameter is not a Trigger, not found in the current list, or if error and success are not functions.
- Type
-
br
/Errors .INVALID _PARAMETERS
enable Trigger(trigger, erroropt, successopt)
Enables a trigger in the system.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
trigger |
ct-alerts |
The trigger to be enabled. |
|
error |
function |
<optional> |
callback invoked on streamlink contrib error. |
success |
function |
<optional> |
callback invoked on successful trigger enabling. |
- See:
-
- ct-alerts/TriggerService#enableTrigger
Throws:
-
If trigger parameter is not a Trigger, not found in the current list, or if error and success are not functions.
- Type
-
br
/Errors .INVALID _PARAMETERS