declare namespace UniApp {
|
interface InnerAudioContext {
|
src: string;
|
play(): void;
|
pause(): void;
|
stop(): void;
|
destroy(): void;
|
onPlay(callback: Function): void;
|
onEnded(callback: Function): void;
|
onError(callback: Function): void;
|
offPlay(callback: Function): void;
|
}
|
|
interface FileSystemManager {
|
writeFile(option: {
|
filePath: string;
|
data: string | ArrayBuffer;
|
encoding: string;
|
success?: Function;
|
fail?: Function;
|
}): void;
|
unlinkSync(filePath: string): void;
|
}
|
}
|
|
declare const uni: {
|
createInnerAudioContext(): UniApp.InnerAudioContext;
|
getFileSystemManager(): UniApp.FileSystemManager;
|
request(options: any): void;
|
env: {
|
USER_DATA_PATH: string;
|
};
|
};
|