A seek bar to seek within the player's media. It displays the current playback position, amount of buffed data, seek target, and keeps status about an ongoing seek.

The seek bar displays different 'bars':

  • the playback position, i.e. the position in the media at which the player current playback pointer is positioned
  • the buffer position, which usually is the playback position plus the time span that is already buffered ahead
  • the seek position, used to preview to where in the timeline a seek will jump to

Hierarchy (view full)

Constructors

Properties

SMOOTH_PLAYBACK_POSITION_UPDATE_DISABLED: -1 = -1

Accessors

  • get onDisabled(): Event<Component<Config>, NoArgs>
  • Gets the event that is fired when the component is disabling. See the detailed explanation on event architecture on the #componentEvents events list.

    Returns Event<Component<Config>, NoArgs>

Methods

  • Configures the component for the supplied Player and UIInstanceManager. This is the place where all the magic happens, where components typically subscribe and react to events (on their DOM element, the Player, or the UIInstanceManager), and basically everything that makes them interactive. This method is called only once, when the UIManager initializes the UI.

    Subclasses usually overwrite this method to add their own functionality.

    Parameters

    • player: PlayerAPI

      the player which this component controls

    • uimanager: UIInstanceManager

      the UIInstanceManager that manages this component

    • configureSeek: boolean = true

    Returns void

  • Disables the component. This method basically transfers the component into the disabled state. Actual disabling is done via CSS or child components. (e.g. Button needs to unsubscribe click listeners)

    Returns void

  • Enables the component. This method basically transfers the component into the enabled state. Actual enabling is done via CSS or child components. (e.g. Button needs to subscribe click listeners)

    Returns void

  • Initializes the component, e.g. by applying config settings. This method must not be called from outside the UI framework.

    This method is automatically called by the UIInstanceManager. If the component is an inner component of some component, and thus encapsulated abd managed internally and never directly exposed to the UIManager, this method must be called from the managing component's #initialize method.

    Returns void

  • Checks if the seek bar is currently in the seek state.

    Returns boolean

    true if in seek state, else false

  • Checks if TouchEvent is supported.

    Parameters

    • e: UIEvent

    Returns e is TouchEvent

    true if TouchEvent not undefined, else false

  • Releases all resources and dependencies that the component holds. Player, DOM, and UIManager events are automatically removed during release and do not explicitly need to be removed here. This method is called by the UIManager when it releases the UI.

    Subclasses that need to release resources should override this method and call super.release().

    Returns void

  • Sets the position until which media is buffered.

    Parameters

    • percent: number

      a number between 0 and 100

    Returns void

  • Sets the position of the playback position indicator.

    Parameters

    • percent: number

      a number between 0 and 100 as returned by the player

    Returns void

  • Sets the position where a seek, if executed, would jump to.

    Parameters

    • percent: number

      a number between 0 and 100

    Returns void

  • Puts the seek bar into or out of seeking state by adding/removing a class to the DOM element. This can be used to adjust the styling while seeking.

    Parameters

    • seeking: boolean

      should be true when entering seek state, false when exiting the seek state

    Returns void