Hierarchy

Constructors

Properties

options: Options
points: EnvelopePoint[]
polyline: null | Polyline = null
subscriptions: (() => void)[] = []

Type declaration

    • (): void
    • Returns void

throttleTimeout: null | number = null
volume: number = 1
wavesurfer?: default

Methods

  • Do not call directly, only called by WavesSurfer internally

    Parameters

    Returns void

  • Destroy the plugin instance.

    Returns void

  • Emit an event

    Type Parameters

    • EventName extends "destroy" | "volume-change" | "points-change"

    Parameters

    Returns void

  • Subscribe to an event. Returns an unsubscribe function.

    Type Parameters

    • EventName extends "destroy" | "volume-change" | "points-change"

    Parameters

    • event: EventName
    • listener: EventListener<EnvelopePluginEvents, 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

  • Subscribe to an event only once

    Type Parameters

    • EventName extends "destroy" | "volume-change" | "points-change"

    Parameters

    Returns (() => void)

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

        Returns void

  • Set the envelope volume. 0..1 (more than 1 will boost the volume).

    Parameters

    • floatValue: number

    Returns void

  • Unsubscribe from an event

    Type Parameters

    • EventName extends "destroy" | "volume-change" | "points-change"

    Parameters

    Returns void

  • Clear all events

    Returns void

Generated using TypeDoc