react-waves icon indicating copy to clipboard operation
react-waves copied to clipboard

When set microphone in Typescript

Open kriss428 opened this issue 4 years ago • 0 comments

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?

kriss428 avatar Feb 07 '22 13:02 kriss428