The device controller supports customizing a specific jabra device. It provides access to buttons and LEDs that can be controlled on the device. Please note that LEDs that are part of a button must be controlled as a button through the IButton interface. This is the case even if it is only the LED that is controlled.

interface IDeviceController {
    close(): Promise<void>;
    getButton(buttonId: ButtonId): Promise<IButton>;
    getControllableButtons(): Observable<ButtonId>;
    getControllableLeds(): Observable<LedId>;
    getLed(ledId: LedId): Promise<ILed>;
    tryGetButton(buttonId: ButtonId): Promise<undefined | IButton>;
    tryGetLed(ledId: LedId): Promise<undefined | ILed>;
}

Methods

  • Close any open buttons and LEDs that have been created by this controller.

    Returns Promise<void>

  • Get the button with the specified ID. If the button is not supported by the device, an error is thrown.

    Parameters

    • buttonId: ButtonId

      The ID of the button to get.

    Returns Promise<IButton>

  • Returns an observable that emits all buttons that can be controlled on the device.

    Returns Observable<ButtonId>

  • Returns an observable that emits all LEDs that can be controlled on the device.

    Returns Observable<LedId>

  • Get the LED with the specified ID. If the LED is not supported by the device, an error is thrown.

    Parameters

    • ledId: LedId

      The ID of the LED to get.

    Returns Promise<ILed>

  • Try to get the button with the specified ID. If the button is not supported by the device, undefined is returned.

    Parameters

    • buttonId: ButtonId

      The ID of the button to get.

    Returns Promise<undefined | IButton>

  • Try to get the LED with the specified ID. If the LED is not supported by the device, undefined is returned.

    Parameters

    • ledId: LedId

      The ID of the LED to get.

    Returns Promise<undefined | ILed>