@byomakase/omakase-player
    Preparing search index...

    Interface ControlBarApi

    Public API of a standalone control bar

    interface ControlBarApi {
        markerBar: ControlBarMarkerBarApi;
        getControlBarElement<T>(querySelector: string): T;
        setAttribute(
            componentId: string,
            attribute: string,
            value: string | undefined,
        ): void;
        setEnabled(componentId: string, enabled: boolean): void;
        setShortcut(componentId: string, shortcut: string | undefined): void;
        setShortcutEnabled(componentId: string, enabled: boolean): void;
        setVisible(componentId: string, visible: boolean): void;
    }

    Implemented by

    Index

    Properties

    Marker bars API

    Methods

    • Gets an HTML element from the control bar DOM

      Type Parameters

      • T

      Parameters

      • querySelector: string

        HTML query selector

      Returns T

    • Sets an attribute of a component of the control bar, or removes it when value is undefined

      Parameters

      • componentId: string

        id attribute of the component

      • attribute: string

        Attribute name

      • value: string | undefined

        Attribute value

      Returns void

    • Enables or disables a component of the control bar

      Parameters

      • componentId: string

        id attribute of the component

      • enabled: boolean

      Returns void

    • Sets the key of a component's keyboard shortcut, overriding the key of its action, or restores the action's key when undefined

      Parameters

      • componentId: string

        id attribute of the component

      • shortcut: string | undefined

        Key string, e.g. Shift+J

      Returns void

    • Enables or disables a component's keyboard shortcut

      Parameters

      • componentId: string

        id attribute of the component

      • enabled: boolean

      Returns void

    • Shows or hides a component of the control bar

      Parameters

      • componentId: string

        id attribute of the component

      • visible: boolean

      Returns void