currentDuration()
number
Returns the length of the current media track (in seconds)
currentEvents()
scriptedEvent[]
Returns a collection of events for the current scene
currentScene()
string
Returns the current scene name
currentTime()
number
Returns the time index of the current media (in seconds)
pause()
Pauses the current media track
play()
Plays the current media track
reloadScene()
Reloads the current scene
registerPlugin(pluginProps)
pluginProps
PluginProps
An object with some or all of the following properties:
name
stringThe name of the plugin. Must be unique
mount?
object (optional)Specifies the mount behaviour for the plugin
parentEl
: HTMLElementThe parent container where the plugin will be mounted
el
: HTMLElement;The container for the plugin
onLoad?
boolean (optional)Should the plugin be mounted when Loomse initialises?
persist?
boolean (optional)Keeps the plugin mounted to the DOM
hooks?
object (optional)
run?
function (optional)The callback which should execute when the plugin is called via an event
cleanup?
function (optional)The callback which should execute before unmounting the plugin
changeScene(sceneName)
Skips to the named scene
sceneName
string
el
HTMLElement
The root element where Loomse is registered