Base class for all plugins containing shared logic to avoid code duplication. Should handle plugin registration with the Player etc.

Hierarchy (view full)

Implements

  • Plugin

Constructors

  • Parameters

    • player: Player
    • name: string
    • verbose: boolean

    Returns PluginBase

Properties

name: string

Accessors

  • get loaded(): boolean
  • Property that states whether this plugin considers itself ready for continued playback based on internal logic. Triggers internal event of type PlayerInternalEventType.LoadedChanged if property value was changed.

    Returns boolean

  • set loaded(loaded): void
  • Parameters

    • loaded: boolean

    Returns void

  • get muted(): boolean
  • Property that states whether this plugin considers itself muted based on internal logic. Triggers internal event of type PlayerInternalEventType.MutedChanged if property value was changed.

    Returns boolean

  • set muted(muted): void
  • Parameters

    • muted: boolean

    Returns void

  • get version(): string
  • Property describing the plugin name and version.

    Returns string

Methods

  • Adds an event listener for a specific event.

    Parameters

    • type: string

      Event type.

    • callback: Listener

      Listener callback function.

    Returns void

  • Unregisters itself with the player and removes all internal and external event listeners.

    Returns void

  • Plugin actions are optional and by default a plugin does not contain any actions.

    Returns PluginAction[]

  • Alias method for removeEventListener.

    Parameters

    • type: string

      Event type.

    • callback: Listener

      Listener callback function.

    Returns void

  • Alias method for addEventListener.

    Parameters

    • type: string

      Event type.

    • callback: Listener

      Listener callback function.

    Returns void

  • Removes an event listener for a specific event.

    Parameters

    • type: string

      Event type.

    • callback: Listener

      Listener callback function.

    Returns void