bitmovin-player-ui
    Preparing search index...

    Class AdMessageLabel

    A label that displays a message about a running ad, optionally with a countdown.

    The message text supports placeholders that are dynamically replaced with ad timing information:

    • {remainingTime[formatString]} - Remaining time until the ad ends
    • {playedTime[formatString]} - Current playback time of the ad
    • {adDuration[formatString]} - Total duration of the current ad
    • {adBreakRemainingTime[formatString]} - Remaining time for the entire ad break (including all remaining ads)

    Format string options (optional):

    • %d - Integer (e.g., {remainingTime%d}100)
    • %0Nd - Integer with N leading zeros (e.g., {remainingTime%03d}100)
    • %f - Float (e.g., {remainingTime%f}100.0)
    • %0Nf - Float with leading zeros (e.g., {remainingTime%05f}100.0)
    • %.Mf - Float with M decimal places (e.g., {remainingTime%.2f}100.00)
    • %hh:mm:ss - Time format with hours (e.g., {remainingTime%hh:mm:ss}00:01:40)
    • %mm:ss - Time format without hours (e.g., {remainingTime%mm:ss}01:40)

    Example: { text: 'Ad: {remainingTime%mm:ss}' } displays "Ad: 01:40" for 100 seconds remaining.

    Note: If a LinearAd has a uiConfig.message property, it takes precedence over the configured text.

    Hierarchy (View Summary)

    Index

    Constructors

    Accessors

    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

      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

    • Hides the component if shown. This method basically transfers the component into the hidden state. Actual hiding is done via CSS.

      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

    • 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