4.3.8 • Published 6 months ago
@types/react-native-audio v4.3.8
Installation
npm install --save @types/react-native-audio
Summary
This package contains type definitions for react-native-audio (https://github.com/jsierles/react-native-audio#readme).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-native-audio.
index.d.ts
// Type definitions for react-native-audio 4.3
// Project: https://github.com/jsierles/react-native-audio#readme
// Definitions by: taoqf <https://github.com/taoqf>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export type AudioEncodingAndroidType = 'aac_eld' | 'amr_nb' | 'amr_wb' | 'he_aac' | 'vorbis';
export type AudioEncodingIOSType = 'lpcm' | 'ima4' | 'MAC3' | 'MAC6' | 'ulaw' | 'alaw' | 'mp1' | 'mp2' | 'alac' | 'amr';
export type AudioEncodingType = 'aac' | AudioEncodingAndroidType | AudioEncodingIOSType;
export interface RecordingOptions {
SampleRate?: number | undefined;
Channels?: number | undefined;
AudioQuality?: 'Low' | 'Medium' | 'High' | undefined;
AudioEncoding?: AudioEncodingType | undefined;
OutputFormat?: string | undefined;
MeteringEnabled?: boolean | undefined;
MeasurementMode?: boolean | undefined;
AudioEncodingBitRate?: number | undefined;
IncludeBase64?: boolean | undefined;
AudioSource?: number | undefined;
}
export const AudioRecorder: {
requestAuthorization(): Promise<boolean>;
prepareRecordingAtPath(path: string, options: RecordingOptions): void | Promise<string>;
startRecording(): Promise<string>;
stopRecording(): Promise<string>;
resumeRecording(): Promise<string>;
pauseRecording(): Promise<string>;
checkAuthorizationStatus(): Promise<boolean>;
onProgress(res: { currentTime: number; }): void;
onFinished(res: { audioFileURL: string; base64: string; status: string; }): void;
};
export const AudioUtils: {
CachesDirectoryPath: string;
DocumentDirectoryPath: string;
DownloadsDirectoryPath: string;
LibraryDirectoryPath: string;
MainBundlePath: string;
MusicDirectoryPath: string;
PicturesDirectoryPath: string;
};
export const AudioSource: {
CAMCORDER: number;
DEFAULT: number;
MIC: number;
REMOTE_SUBMIX: number;
UNPROCESSED: number;
VOICE_CALL: number;
VOICE_COMMUNICATION: number;
VOICE_DOWNLINK: number;
VOICE_RECOGNITION: number;
VOICE_UPLINK: number;
};
Additional Details
- Last updated: Thu, 08 Jul 2021 20:20:58 GMT
- Dependencies: none
- Global values: none
Credits
These definitions were written by taoqf.