UNPKG

@mescius/dspdfviewer

Version:
50 lines (49 loc) 1.39 kB
/** * Class for creating an oscilloscope visualizer for audio. */ export declare class AudioOscilloscopeVisualizer { container: HTMLElement; audioElement: HTMLAudioElement; /** * Background color of the oscilloscope. */ backColor: string; /** * Color of the oscilloscope line. */ lineColor: string; /** * Width of the oscilloscope line. */ lineWidth: number; private _bottomMargin; private _analyser?; private _disposed?; private _audioContext?; private _started; private _mediaElementSource?; private _canvasCtx; /** * Creates an instance of AudioOscilloscopeVisualizer. * @param {HTMLElement} container - The container element where the oscilloscope will be displayed. * @param {HTMLAudioElement} audioElement - The HTML audio element to be visualized. */ constructor(container: HTMLElement, audioElement: HTMLAudioElement, args: { bottomMargin: number; }); /** * Starts the oscilloscope visualizer. */ start(): void; /** * Stops the oscilloscope visualizer. */ stop(): void; captureStream(): MediaProvider | null; get isDomRemoved(): boolean; /** * Disposes the resources used by the oscilloscope visualizer. */ dispose(): void; private _init; }