function usePeaks
usePeaks(source: PeaksSource | undefined): number[] | null

Returns the peaks of source once loaded, and null until then, without a source, or when it can't be loaded: the scrubber then draws a plain bar.

Parameters

source: PeaksSource | undefined

Return Type

number[] | null

Usage

import { usePeaks } from "src/hooks/player/usePeaks.ts";