Hierarchy

Constructors

Properties

label: HTMLElement
options: HoverPluginOptions & {
    labelSize: number;
    lineWidth: number;
    formatTimeCallback(seconds) => string;
}

Type declaration

  • labelSize: number
  • lineWidth: number
  • formatTimeCallback:function
    • Parameters

      • seconds: number

      Returns string

subscriptions: (() => void)[] = []

Type declaration

    • (): void
    • Returns void

unsubscribe: (() => void) = ...

Type declaration

    • (): void
    • Returns void

wavesurfer?: default
wrapper: HTMLElement

Methods

  • Do not call directly, only called by WavesSurfer internally

    Parameters

    Returns void

  • Parameters

    • value: string | number

    Returns string

  • Emit an event

    Type Parameters

    • EventName extends "destroy" | "hover"

    Parameters

    Returns void

  • Subscribe to an event. Returns an unsubscribe function.

    Type Parameters

    • EventName extends "destroy" | "hover"

    Parameters

    • event: EventName
    • listener: EventListener<HoverPluginEvents, EventName>
    • Optional options: {
          once?: boolean;
      }
      • Optional once?: boolean

    Returns (() => void)

      • (): void
      • Subscribe to an event. Returns an unsubscribe function.

        Returns void

  • Called by wavesurfer, don't call manually

    Returns void

  • Parameters

    • e: PointerEvent | WheelEvent

    Returns void

  • Subscribe to an event only once

    Type Parameters

    • EventName extends "destroy" | "hover"

    Parameters

    Returns (() => void)

      • (): void
      • Subscribe to an event only once

        Returns void

  • Unsubscribe from an event

    Type Parameters

    • EventName extends "destroy" | "hover"

    Parameters

    Returns void

  • Clear all events

    Returns void

Generated using TypeDoc