Interface LiveMusicCallbacks

Callbacks for the realtime music API.

interface LiveMusicCallbacks {
    onclose?: null | (e: CloseEvent) => void;
    onerror?: null | (e: ErrorEvent) => void;
    onmessage: (e: LiveMusicServerMessage) => void;
}

Properties

onclose?: null | (e: CloseEvent) => void

Called when the websocket connection is closed.

onerror?: null | (e: ErrorEvent) => void

Called when an error occurs.

onmessage: (e: LiveMusicServerMessage) => void

Called when a message is received from the server.