UNPKG

wavesurfer-react

Version:
15 lines (12 loc) 714 B
import { GenericPlugin } from 'wavesurfer.js/dist/base-plugin'; import WaveSurferRef from 'wavesurfer.js'; import { PluginType } from '../types/PluginType.js'; type UseWaveSurferParams<GPlug extends GenericPlugin> = { container?: string | HTMLElement; plugins: PluginType<GPlug>[]; onMount: (wavesurferRef: null | WaveSurferRef) => any; }; type PluginDictionary<GPlug extends GenericPlugin> = Record<string, GPlug>; declare function useWavesurfer<GPlug extends GenericPlugin>({ container, plugins, onMount, ...props }: UseWaveSurferParams<GPlug>): readonly [WaveSurferRef, PluginDictionary<GPlug>, GPlug[]]; export { useWavesurfer as default }; export type { PluginDictionary, UseWaveSurferParams };