bitmovin-player-ui
    Preparing search index...

    Class NavigationGroup

    Used as part of spatial navigation. Groups together different components to which you can navigate to, in a single navigation group.

    Responsible for finding elements in direction on navigation and for tracking active element inside the group. Triggers blur and focus on element when active element is changed, as well as click on element on Action.SELECT. Will call hideUi() on passed in container if Action.BACK is called.

    To have more control over grouping related elements together, you can use FocusableContainer.

    Example 1: new RootNavigationGroup(uiContainer, playbackToggleOverlay, seekBar, bottomControlBar, titleBar)

    In this example all components which are passed to the RootNavigationGroup will be navigable on a 'flat' hierarchy. Elements form within the bottomControlBar and the titleBar will be resolved lazily and it's possible to navigate from/to every element.

    Example 2: new RootNavigationGroup( uiContainer, playbackToggleOverlay, seekBar, new FocusableContainer(bottomControlBar, playbackToggleButton), new FocusableContainer(titleBar) )

    In this example the bottomControlBar and the titleBar are considered as a group of elements. Their components will still be resolved lazily, but the navigation will target the whole container instead of the individual components. In addition, a primary component can be set for each FocusableContainer, which will be component that receives focus first when the container is focused.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    onAction?: ActionCallback

    If overwritten, allows to implement custom action behavior. Per default, the internal handler will still be executed. To prevent execution of the default action handler, call preventDefault();

    {Action} The action that was called

    {HTMLElement} The target element that action was called on

    {() => void} A function that, when called, will prevent the execution of the default handler

    onNavigation?: NavigationCallback

    If overwritten, allows to implement custom navigation behavior. Per default, the internal handler will still be executed. To prevent execution of the default navigation handler, call preventDefault();

    {Direction} The direction to move along

    {HTMLElement} The target element for the event

    {() => void} A function that, when called, will prevent the execution of the default handler

    Methods

    • Enable navigation group

      Sets active element to either element that was active before disable, or first element of tracked elements. If it is settings panel, it will always focus first element in the list.

      Returns void

    • Handles a navigation event.

      Parameters

      • direction: Direction

        The direction of the navigation event

      Returns void

      true if navigation was successful, false otherwise