Constructor.
Input HTML element with source audio (HTML audio tag).
The HTML element to render the widget.
Optionaloptions: IWaveFormGraphOptionsThe widget options.
Returns the current audio buffer.
Returns an array of a specified number of data samples, taken at regular intervals. The minimum amount of data to construct a wave form graphic of a given width (defined by number of samples).
Number of samples.
OptionalsourceChannel: numberOptional source channel (0 - Left or 1 - Right). If omitted the max of both channels for stereo audio will be taken.
OptionalsourceAudioBuffer: AudioBufferOptional instance of a source audio buffer. If omitted the current audio buffer will be taken.
Loads audio from source URL and sets current audio buffer.
Optionalsrc: stringSource URL of audio.
Promise that resolves the current audio buffer.
Draws waveform graphic.
Promise that resolves an array of data samples used to construct a wave form graphic.
Resets the graphic.
Updates the canvas size depended on element size.
Sets the current audio buffer.
Instance of the Audio buffer.
Sets manually prepared audio data to draw the wave graphic.
Optionaldata: number[]Channel data of AudioBuffer or the data obtained from getDataSampling method.
Waveform graphic draw widget.
Example 1: Just draw the waveform.
Example 2: Draw the waveform and set the data to the other graph.
See more options at interface definition: IWaveFormGraphOptions