@theoplayer/react-ui
    Preparing search index...

    Interface LanguageMenuProps

    interface LanguageMenuProps {
        children?: ReactNode;
        closeCurrentMenu?: () => boolean;
        closeMenu?: (menuId?: string) => boolean;
        connectedCallback?: () => void;
        getMenuById?: (menuId?: string) => Menu | MenuGroup | undefined;
        hasCurrentMenu?: () => boolean;
        heading?: ReactNode;
        isMenuOpen?: (menuId?: string) => boolean;
        openMenu?: (menuId?: string, opener?: HTMLElement) => boolean;
        player?: ChromelessPlayer;
    }

    Hierarchy (View Summary)

    Index

    Other

    children?: ReactNode

    The menu's contents.

    closeCurrentMenu?: () => boolean

    Type Declaration

      • (): boolean
      • Close the current menu.

        Returns boolean

    closeMenu?: (menuId?: string) => boolean

    Type Declaration

      • (menuId?: string): boolean
      • Closes the menu with the given ID.

        If no ID is given, then the entire menu group is closed.

        If the given menu has opened one or more submenus, then those are also closed. If the last open menu is closed, then the menu group also becomes closed.

        Parameters

        • OptionalmenuId: string

          The ID of the menu to close.

        Returns boolean

        True if the given menu was found and closed.

    getMenuById?: (menuId?: string) => Menu | MenuGroup | undefined

    Type Declaration

      • (menuId?: string): Menu | MenuGroup | undefined
      • Get the menu with the given ID.

        Parameters

        • OptionalmenuId: string

          The ID of the menu. If unset, returns this menu group.

        Returns Menu | MenuGroup | undefined

    hasCurrentMenu?: () => boolean

    Type Declaration

      • (): boolean
      • Whether this menu group has a currently open menu.

        Returns boolean

    heading?: ReactNode

    A slot for the menu's heading.

    isMenuOpen?: (menuId?: string) => boolean

    Type Declaration

      • (menuId?: string): boolean
      • Whether the menu with the given ID is currently open.

        Parameters

        • OptionalmenuId: string

          The ID of the menu.

        Returns boolean

    openMenu?: (menuId?: string, opener?: HTMLElement) => boolean

    Type Declaration

      • (menuId?: string, opener?: HTMLElement): boolean
      • Open the menu with the given ID.

        If no ID is given, the first menu in the group is opened.

        If there's already an open menu, then the new menu is opened as a "submenu". When it closed, the previous menu is opened.

        Parameters

        • OptionalmenuId: string

          The ID of the menu to open.

        • Optionalopener: HTMLElement

          The control that opened the menu. When the menu is closed, focus is moved back to this control.

        Returns boolean

        True if the given menu was found.

    lifecycle

    connectedCallback?: () => void

    Type Declaration

      • (): void
      • Invoked when the component is added to the document's DOM.

        In connectedCallback() you should setup tasks that should only occur when the element is connected to the document. The most common of these is adding event listeners to nodes external to the element, like a keydown event handler added to the window.

        connectedCallback() {
        super.connectedCallback();
        addEventListener('keydown', this._handleKeydown);
        }

        Typically, anything done in connectedCallback() should be undone when the element is disconnected, in disconnectedCallback().

        Returns void