Class WebsocketKodiClient

WebSocket client for communicating with Kodi Currently does not handle reconnecting or disconnects

Hierarchy

  • BaseKodiClient
    • WebsocketKodiClient

Constructors

  • Sets all the event listeners and properties

    Parameters

    • url: string

      full url for the WebSocket connection e.g. "ws://192.168.0.124:9090"

    Returns WebsocketKodiClient

Properties

isOpen: boolean
sendMessage: ISendMessage = ...

The sendMessage method, the actual JSON sent to Kodi

name of the method e.g. "Addons.ExecuteAddon"

string, number, object, array, whatever the method accepts

Promise containing the result, or rejects with an error

url: string
webSocket: ReconnectingWebSocket

Methods

  • Initializing all namespaces MAKE SURE THIS IS CALLED IF YOU'RE EXTENDING THE BaseKodiClient class

    Parameters

    • sendMessage: ISendMessage

      the function used to communicate with Kodi

    Returns void