react-waves
react-waves copied to clipboard
When set microphone in Typescript
Type '{ className: string; options: { barHeight: number; barWidth: number; cursorWidth: number; height: number; hideScrollbar: true; progressColor: string; responsive: true; waveColor: string; }; playing: boolean; volume: number; zoom: number; micCallback: ({ micInstance_, stream_ }: any) => void; }' is not assignable to type 'IntrinsicAttributes & ReactWavesProps'.
Property 'micCallback' does not exist on type 'IntrinsicAttributes & ReactWavesProps'.
176 | volume={1}
177 | zoom={1}
> 178 | micCallback={micCallback}
| ^^^^^^^^^^^
179 | />
what I tried:
export type ReactWavesProps = {
style?: CSSProperties;
className?: string;
playing?: boolean;
pos?: number;
audioFile?: File | Blob | string;
mediaElt?: string | HTMLElement;
audioPeaks?: number[];
volume?: number;
zoom?: number;
onPosChange?: () => void;
micCallback?:({ micInstance, stream}: any) => void;
options?: {
audioRate?: number; ....
It doesn't work well however. Does anyone know about this?