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:162

Initiate connection and retry if fails

disconnect ()

Defined in CantabileApi.js:172

Disconnect and stop retries

request
(
  • obj
)
Promise | Object

Defined in CantabileApi.js:194

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:182

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:221

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:134

Provides access to the Application object

bindings

Bindings

Defined in CantabileApi.js:94

Provides access to global Bindings points

bindings4

Bindings4

Defined in CantabileApi.js:102

Provides access to global Bindings4 points

commands

Commands

Defined in CantabileApi.js:110

Provides access to global Commands

engine

Engine

Defined in CantabileApi.js:142

Provides access to the Engine object

host

String

Defined in CantabileApi.js:275

The current host

hostUrl

String

Defined in CantabileApi.js:348

The base host url

keyRanges

KeyRanges

Defined in CantabileApi.js:62

Gets the currently active KeyRanges

onscreenKeyboard

OnscreenKeyboard

Defined in CantabileApi.js:86

Provides access to controllers managed by Cantabile's OnscreenKeyboard device

setList

SetList

Defined in CantabileApi.js:46

Gets the SetList object

showNotes

ShowNotes

Defined in CantabileApi.js:70

Gets the current ShowNotes

socketUrl

String

Defined in CantabileApi.js:337

The base socket url

song

Song

Defined in CantabileApi.js:118

Provides access to Song information about the current song

songStates

SongStates

Defined in CantabileApi.js:54

Gets the SongStates for the current song

state

String

Defined in CantabileApi.js:151

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

transport

Transport

Defined in CantabileApi.js:126

Provides access to master Transport controls

variables

Variables

Defined in CantabileApi.js:78

Provides access to Variables expansion facilities

Events

connected

Defined in CantabileApi.js:527

Fired when entering the connected state

connecting

Defined in CantabileApi.js:534

Fired when entering the connecting state

disconnected

Defined in CantabileApi.js:541

Fired when entering the disconnected state

stateChanged

Defined in CantabileApi.js:519

Fired when the state property value changes

Event Payload:

  • state String

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