function loadPeaks
loadPeaks(source: PeaksSource): Promise<number[]>

Returns the peaks of source, from 0 to 1.

Parameters

Return Type

Promise<number[]>

Throws

Error

When the server has no waveform for the file, or the local file can't be decoded.

Usage

import { loadPeaks } from "src/utils/player/waveform.ts";