SDK functions
SingularGraphics(domElement)
Use the following code to create an instance of a Singular overlay:
domId
String
Yes
The target div
that the SingularOverlay will replace.
SDK properties
host
String
"https://app.singular.live"
Domain of the SDK player client.
id
String
"SingularOverlay"
iframe ID.
Return
object
: Graphic SDK object
SDK functions
The reference documentation provided in the following sections describes the Graphic SDK structure and methods.
-
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.
addListener
Adds a listener for events coming from the overlay.
type
A string containing one of the values described below
String
Yes
callback
The callback function for the type
of event
Function
Yes
Values for listener type
type
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.
See also:
removeAllListener removeListener
payload_changed
Listens to payload_changed
from control node updates.
Callback attributes
event
String
The event name.
msg
Object
JSON data containing event details.
datanode_payload_changed
Listens to datanode_payload_changed
from data node updates
Callback attributes
event
String
The event name.
msg
Object
JSON containing event details.
state_changed
Listens to state_changed
for animation state changes.
Callback attributes
event
String
The event name.
msg
Object
JSON containing event details.
message
Listens to message
from interactive events and widgets
Callback attributes
event
String
The event name.
msg
Object
JSON containing event details.
error
Listens to error
reported by an overlay instance.
Callback attributes
params
Object
JSON containing error details.
getAdaptationGlobals
Makes a request to get adaptation global settings.
Return
object
: adaptation globals as a JSON object
See also
getCompositionById
Returns the composition object requested by its ID.
Parameters
compositionId
String
The ID of a composition.
Return
object
: Composition object
See also
getCompositionInfo
Returns the JSON definition of the loaded composition.
Return
object
: Composition object
getConfig
Returns the configuration of the overlay.
Return
object
: JSON object
getMainComposition
Returns the composition object of the main or root composition.
Return
object
: Composition object
See also
getSequencer
Returns the sequencer object of the overlay.
Return
object
: Sequencer object
See also
loadComposition
Loads a composition into an overlay instance.
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.
Sample
noTrack
Deactivates analytic tracking.
onmessage
This call has been depreciated.
removeAllListener
Removes all registered listeners.
See also
removeListener
Removes a listener specified by its type.
type
String
Yes
A string containing one of the values described below.
callback
Function
Yes
The callback function for the type
of event.
Values for listener type
type
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.
See also:
removeAllListener removeListener
renderAppOutput
Load san app output into the 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.
Sample
renderComposition
Loads a composition into an overlay instance.
composition
Object
Yes
A composition's JSON object.
callback
Function
Yes
The callback function called when the content has been loaded.
Sample
setAdaptationGlobals
Sets adaptation global settings.
See also
setConfig
Sets the configuration of an overlay.
setFrameNumber
This call has been depreciated.
videoCommand
This call has been depreciated.
Last updated