eligius
    Preparing search index...

    Class LabelController

    This controller attaches to the given selected element and renders the text associated with the given label id in it.

    The controller also listen for the LANGUAGE_CHANGE event and re-renders the text with the new language after such an event.

    Hierarchy

    Index

    Constructors

    Properties

    currentLanguage: string | null = null
    eventListeners: TEventbusRemover[] = []
    labelData: Record<string, string> = {}
    name: string = 'LabelController'
    operationData: ILabelControllerMetadata | null = null
    requestLabelDataBound?: (labelId: string) => void

    Methods

    • Register event listener with automatic binding and cleanup tracking

      Parameters

      • eventbus: IEventbus

        The eventbus to register with

      • eventName:
            | "before-request-timeline-uri"
            | "before-request-video-url"
            | "dom-mutation"
            | "highlight-navigation"
            | "language-change"
            | "navigate-to-video-url"
            | "push-history-state"
            | "request-action"
            | "request-current-language"
            | "request-current-navigation"
            | "request-current-timeline-position"
            | "request-current-video-position"
            | "request-engine-root"
            | "request-function"
            | "request-instance"
            | "request-label-collection"
            | "request-label-collections"
            | "request-timeline-cleanup"
            | "request-timeline-uri"
            | "request-video-cleanup"
            | "request-video-url"
            | "timeline-complete"
            | "timeline-container-request"
            | "timeline-current-timeline-change"
            | "timeline-duration"
            | "timeline-duration-request"
            | "timeline-firstframe"
            | "timeline-pause"
            | "timeline-pause-request"
            | "timeline-play"
            | "timeline-play-request"
            | "timeline-play-toggle-request"
            | "timeline-request-current-timeline"
            | "timeline-resize"
            | "timeline-resize-request"
            | "timeline-restart"
            | "timeline-seek"
            | "timeline-seek-request"
            | "timeline-seeked"
            | "timeline-stop"
            | "timeline-stop-request"
            | "timeline-time"
            | "video-complete"

        Name of the event to listen for

      • handler: (...args: any[]) => void

        Event handler function (will be bound to this controller)

      Returns void

    • Register multiple event listeners at once

      Parameters

      • eventbus: IEventbus

        The eventbus to register with

      • listeners: { eventName: string; handler: (...args: any[]) => void }[]

        Array of {eventName, handler} pairs

      Returns void