Constructor
new Waveform(optionsopt)
Parameters:
Properties| Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | object | <optional> | waveform data optionsProperties
|
| Name | Type | Description |
|---|---|---|
url | string | Streaming URL, blob URL, or object URL for the audio. |
sampleRate | number | Sample rate of the audio in Hz; -1 if unknown. |
duration | number | Duration of the audio in seconds; -1 if unknown. |
peaks | Array.<number> | | Pre-computed amplitude peaks for fast waveform rendering. |
filename | string | Original filename of the audio source. |
file | File | | Original File reference for large audio (chunked path); null for small files or server audio. |
- Source
Classes
Methods
clone(deepopt) → {Waveform}
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
deep | boolean | <optional> | false | If true, peaks arrays are cloned; otherwise copied by reference. |
- Source
Returns:
- Type:
- Waveform