Represents a button on the device that can be controlled. A button can be opened to listen for interactions, such as presses. Some buttons may also have an LED that can be controlled.

interface IButton {
    close(): Promise<void>;
    isOpen(): boolean;
    listenFor(interaction: ButtonInteraction): Promise<Observable<ButtonEvent>>;
    open(...interactions: ButtonInteraction[]): Promise<void>;
    setColor(color: Color, mode?: LedMode): Promise<void>;
    stopListeningFor(interaction: ButtonInteraction): Promise<void>;
}

Hierarchy (View Summary)

Methods

  • Release control of the Button. Configurations of color and events will be reset and any standard functionality assigned to the button will be restored.

    Returns Promise<void>

  • Determines whether it is currently open.

    Returns boolean

  • This will cause the device to emit events for the specified interaction with this button. An observable is returned that emits events when the interaction occurs.

    Parameters

    Returns Promise<Observable<ButtonEvent>>

  • Open the button for control. When the button is opened for control, any other functionality assigned to the button will be disabled until control is released again through IButton.close.

    Parameters

    Returns Promise<void>

  • Set the color and mode of the LED. If mode is not specified, the default mode is LedMode.on.

    Parameters

    Returns Promise<void>

    JabraError if the button does not have an LED.

  • This will cause the device to stop emitting events for the specified interaction with this button.

    Parameters

    Returns Promise<void>