Show:
Extends EventEmitter

Represents a connection to Cantabile.

Constructor

Cantabile
(
  • host
)

Defined in CantabileAPI.js:20

Parameters:

  • [host] String optional

    The host to connect to. This can be either or http:// or ws:// When running in a browser, the defaults to ${window.location.host}. In other environments it defaults to localhost:35007.

Methods

connect ()

Defined in CantabileAPI.js:163

Initiate connection and retry if fails

disconnect ()

Defined in CantabileAPI.js:173

Disconnect and stop retries

request
(
  • obj
)
Promise | Object

Defined in CantabileAPI.js:195

Stringify an object as a JSON message, send it to the server and returns a promise which will resolve to the result.

Parameters:

  • obj Object

    The object to send

Returns:

Promise | Object
send
(
  • obj
)

Defined in CantabileAPI.js:183

Stringify an object as a JSON message and send it to the server

Parameters:

  • obj Object

    The object to send

untilConnected () Promise

Defined in CantabileAPI.js:222

Returns a promise that will be resolved when connected

Returns:

Promise

Example:

let C = new CantabileApi();
await C.untilConnected();

Properties

application

Application

Defined in CantabileAPI.js:135

Provides access to the Application object

bindings

Bindings

Defined in CantabileAPI.js:95

Provides access to global Bindings points

bindings4

Bindings4

Defined in CantabileAPI.js:103

Provides access to global Bindings4 points

commands

Commands

Defined in CantabileAPI.js:111

Provides access to global Commands

engine

Engine

Defined in CantabileAPI.js:143

Provides access to the Engine object

host

String

Defined in CantabileAPI.js:276

The current host

hostUrl

String

Defined in CantabileAPI.js:349

The base host url

keyRanges

KeyRanges

Defined in CantabileAPI.js:63

Gets the currently active KeyRanges

onscreenKeyboard

OnscreenKeyboard

Defined in CantabileAPI.js:87

Provides access to controllers managed by Cantabile's OnscreenKeyboard device

setList

SetList

Defined in CantabileAPI.js:47

Gets the SetList object

showNotes

ShowNotes

Defined in CantabileAPI.js:71

Gets the current ShowNotes

socketUrl

String

Defined in CantabileAPI.js:338

The base socket url

song

Song

Defined in CantabileAPI.js:119

Provides access to Song information about the current song

songStates

SongStates

Defined in CantabileAPI.js:55

Gets the SongStates for the current song

state

String

Defined in CantabileAPI.js:152

The current connection state, either "connecting", "connected" or "disconnected"

transport

Transport

Defined in CantabileAPI.js:127

Provides access to master Transport controls

variables

Variables

Defined in CantabileAPI.js:79

Provides access to Variables expansion facilities

Events

connected

Defined in CantabileAPI.js:528

Fired when entering the connected state

connecting

Defined in CantabileAPI.js:535

Fired when entering the connecting state

disconnected

Defined in CantabileAPI.js:542

Fired when entering the disconnected state

stateChanged

Defined in CantabileAPI.js:520

Fired when the state property value changes

Event Payload:

  • state String

    The new connection state ("connecting", "connected" or "disconnected")