Engine
Provides access to Cantabile's engine object for start/stop control
Access this object via the engine property.
Table of Contents
Methods
close
()
Closes the end point and stops listening for events.
This method no longer needs to be explicitly called as end points are now automatically closed when the last event listener is removed.
isStarted
()
Returns a promise to provide the started state of Cantabile's audio engine.
This API is only available via AJAX, and not WebSocket
open
()
Opens this end point and starts listening for events.
This method no longer needs to be explicitly called as end points are now automatically opened when the first event listener is attached.
Use this method to keep the end point open even when no event listeners are attached.
restart
()
Restarts Cantabile's audio engine
This API is only available via AJAX, and not WebSocket
restart
()
Toggles the audio engine between started and stopped
This API is only available via AJAX, and not WebSocket
start
()
Starts Cantabile's audio engine
This API is only available via AJAX, and not WebSocket
start
()
Stops Cantabile's audio engine
This API is only available via AJAX, and not WebSocket
untilOpen
()
Promise
Returns a promise that will be resolved when this end point is opened
Returns:
Example:
let C = new CantabileApi();
C.application.open();
await C.application.untilOpen();