react-orchestra
Version:
A toolbox to build interactive and smart instruments on the web and mobile.
45 lines (44 loc) • 1.25 kB
TypeScript
import React from "react";
declare type NoteProps = {
play?: boolean;
instrumentName?: string;
name?: string;
onNoteLoaded?: any;
interactive?: boolean;
fadeOutDuration?: number;
loader?: any;
className?: string;
chidren?: any;
gain?: number;
onStopPlayingNote?: any;
onStartPlayingNote?: any;
};
declare class Note extends React.Component<NoteProps> {
static defaultProps: {
play: boolean;
instrumentName: string;
name: string;
onNoteLoaded: () => void;
interactive: boolean;
fadeOutDuration: number;
loader: JSX.Element;
className: string;
children: JSX.Element;
gain: number;
onStopPlayingNote: () => void;
onStartPlayingNote: () => void;
};
playingBuffers: any[];
state: {
isPlaying: boolean;
isLoading: boolean;
};
componentDidMount(): Promise<void>;
componentWillReceiveProps(nextProps: NoteProps): Promise<void>;
onClickStart: () => void;
loadSound: () => Promise<void>;
startPlayingNote: () => Promise<void>;
stopPlayingNote: () => Promise<void>;
render(): any;
}
export default Note;