DefinitelyTyped/types/react-native-audio/react-native-audio-tests.ts
taoqf a85998b8f2 add types: react-native-audio (#35466)
* wxapp: add FileSystemManager

* fix: add interface

* uppercase interface name

* add types react-native-audio
2019-05-15 09:01:50 -07:00

14 lines
315 B
TypeScript

import { AudioRecorder, AudioUtils } from 'react-native-audio';
const audioPath = AudioUtils.DocumentDirectoryPath + '/test.aac';
AudioRecorder.prepareRecordingAtPath(audioPath, {
SampleRate: 22050,
Channels: 1,
AudioQuality: "Low",
AudioEncoding: "aac"
});
AudioRecorder.onProgress = (data) => {
// todo
};