SDK functions
Last updated
Last updated
Use the following code to create an instance of a Singular overlay:
Attributes | Type | Required | Description |
---|---|---|---|
Name | Type | Example | Description |
---|---|---|---|
object
: Graphic SDK object
The reference documentation provided in the following sections describes the Graphic SDK structure and methods.
Adds a listener for events coming from the overlay.
type
See also:
removeAllListener removeListener
Listens to payload_changed
from control node updates.
Callback attributes
Listens to datanode_payload_changed
from data node updates
Callback attributes
Listens to state_changed
for animation state changes.
Callback attributes
Listens to message
from interactive events and widgets
Callback attributes
Listens to error
reported by an overlay instance.
Callback attributes
Makes a request to get adaptation global settings.
object
: adaptation globals as a JSON object
Returns the composition object requested by its ID.
object
: Composition object
Returns the JSON definition of the loaded composition.
object
: Composition object
Returns the configuration of the overlay.
object
: JSON object
Returns the composition object of the main or root composition.
object
: Composition object
Returns the sequencer object of the overlay.
object
: Sequencer object
See also
Loads a composition into an overlay instance.
Sample
Deactivates analytic tracking.
This call has been depreciated.
Removes all registered listeners.
Removes a listener specified by its type.
type
removeAllListener removeListener
Load san app output into the overlay instance.
Loads a composition into an overlay instance.
Sets adaptation global settings.
Sets the configuration of an overlay.
This call has been depreciated.
This call has been depreciated.
Method | Return type | Description |
---|---|---|
Attributes | Description | Type | Required | |
---|---|---|---|---|
Setting | Description |
---|---|
Attributes | Type | Description |
---|---|---|
Attributes | Type | Description |
---|---|---|
Attributes | Type | Description |
---|---|---|
Attributes | Type | Description |
---|---|---|
Attributes | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Attributes | Type | Required | Description |
---|---|---|---|
Attributes | Type | Required | Description |
---|---|---|---|
Setting | Description |
---|---|
Attributes | Type | Required | Description |
---|---|---|---|
Attributes | Type | Required | Description |
---|---|---|---|
domId
String
Yes
The target div
that the SingularOverlay will replace.
host
String
"https://app.singular.live"
Domain of the SDK player client.
id
String
"SingularOverlay"
iframe ID.
-
Adds an event listener.
Object
Returns adaptation global parameters.
Object
Returns the composition object requested by its ID.
Object
Returns a detailed description of a composition's structure, control and data nodes, animation, and timeline states.
Object
Returns configuration details.
Object
Returns the main composition object.
Object
Returns the sequencer object.
-
Loads a composition defined by its ID or JSON URL.
-
Deactivates tracking of analytics.
-
Depreciated.
-
Removes all event listeners.
-
Removes an event listener defined by its name.
-
Loads a composition defined by its app ID.
-
Loads the composition defined in a composition object.
-
Sets adaptation global parameters.
-
Sets configuration properties.
-
Depreciated.
-
Depreciated.
type
A string containing one of the values described below
String
Yes
callback
The callback function for the type
of event
Function
Yes
payload_changed
Listens to messages from control node updates.
datanode_payload_changed
Listens to messages from data node updates.
state_changed
Listens to messages for animation state changes.
message
Listens to messages from the interactive events and widgets.
error
Listens to errors reported by overlay instances.
event
String
The event name.
msg
Object
JSON data containing event details.
event
String
The event name.
msg
Object
JSON containing event details.
event
String
The event name.
msg
Object
JSON containing event details.
event
String
The event name.
msg
Object
JSON containing event details.
params
Object
JSON containing error details.
compositionId
String
The ID of a composition.
composition
String
Yes
A composition referenced by token or URL.
outputName
String
Yes
Depreciated. Set output name to null
for compatibility reasons.
callback
Function
Yes
Callback function called when the content has been loaded.
type
String
Yes
A string containing one of the values described below.
callback
Function
Yes
The callback function for the type
of event.
payload_changed
Listens to messages from control node updates.
datanode_payload_changed
Listens to messages from data node updates.
state_changed
Listens to messages for animation state changes.
message
Listens to messages from the interactive events and widgets.
error
Listens to errors reported by an overlay instance.
appInstanceId
String
Yes
The ID of an app instance.
outputName
String
Yes
Depreciated. Sets output name to null
for compatibility reasons.
callback
Function
Yes
The callback function called when the content has been loaded.
composition
Object
Yes
A composition's JSON object.
callback
Function
Yes
The callback function called when the content has been loaded.