UNPKG

react-hifi

Version:

A set of react components wich provides simple abstraption to manipulate HTML5 AudioContext API (Equalizer, visualisation, stereo, basic controls)

24 lines (23 loc) 979 B
import { Plugin } from '../Plugin'; interface OsciloscopeProps { audioContext?: AudioContext; onVisualisationData: (data: number[][]) => void; height: number; width: number; } export declare class OsciloscopePlugin implements Plugin<OsciloscopeProps, AnalyserNode> { private animationFrame; private node; private dataArray; private previousContextState; private height; private width; private onData; constructor(); private handleVisualizationChange; shouldNotUpdate(prevProps: OsciloscopeProps, nextProps: OsciloscopeProps): boolean; createNode(audioContext: AudioContext, { height, width, onVisualisationData }: OsciloscopeProps): AnalyserNode; updateNode(node: AnalyserNode, { height, width }: OsciloscopeProps, audioContext: AudioContext): void; } declare const _default: import("react").FunctionComponent<OsciloscopeProps & import("../_lib/plugin-factory").PluginProps<AnalyserNode>>; export default _default;