currentDuration()numberReturns the length of the current media track (in seconds)
currentEvents()scriptedEvent[]Returns a collection of events for the current scene
currentScene()stringReturns the current scene name
currentTime()numberReturns 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:
namestringThe 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
elHTMLElementThe root element where Loomse is registered