ShowNotes
Used to access the current set of show notes
Access this object via the showNotes property.
Table of Contents
- Methods
- Properties
- Events
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.
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.
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();
Properties
Events
changed
Fired when anything about the current set of show notes changes
itemAdded
Fired after a new show note has been added
Event Payload:
-
index
NumberThe zero based index of the newly added item
itemChanged
Fired when something about an show note has changed
Event Payload:
-
index
NumberThe zero based index of the item that changed
itemMoved
Fired when an show note has been moved
Event Payload:
-
from
NumberThe zero based index of the item before being moved
-
to
NumberThe zero based index of the item's new position
itemRemoved
Fired after a show note has been removed
Event Payload:
-
index
NumberThe zero based index of the removed item
reload
Fired when the entire set of show notes has changed (eg: after loading a new song)