UNPKG

react-music-waveform

Version:
62 lines (51 loc) 1.63 kB
import { default as default_2 } from 'react'; export declare interface AudioPlayerProps { src: string; className?: string; onTimeUpdate?: (currentTime: number, duration: number) => void; onPlay?: () => void; onPause?: () => void; onEnded?: () => void; } export declare const AudioWaveform: default_2.FC<AudioWaveformProps>; export declare interface AudioWaveformProps { src: string; style?: WaveformStyle; theme?: Theme; height?: number; width?: number; barSpacing?: number; primaryColor?: string; progressColor?: string; backgroundColor?: string; showBackground?: boolean; showControls?: boolean; showTimestamp?: boolean; showSpeedControl?: boolean; className?: string; } export declare const debounce: <T extends (...args: unknown[]) => unknown>(func: T, wait: number) => ((...args: Parameters<T>) => void); export declare const formatTime: (seconds: number) => string; export declare type Theme = "light" | "dark"; export declare interface ThemeColors { background: string; primary: string; progress: string; text: string; controls: string; controlsBorder: string; } export declare interface WaveformProps { data: number[]; style?: WaveformStyle; color?: string; progressColor?: string; height?: number; width?: number; barSpacing?: number; progress?: number; onClick?: (progress: number) => void; className?: string; } export declare type WaveformStyle = "viridara" | "solmara" | "aurevia" | "minimal"; export { }