Skip to content

Commit

Permalink
feat: add types
Browse files Browse the repository at this point in the history
  • Loading branch information
Stringsaeed committed Oct 12, 2023
1 parent a9a7679 commit 23ed8aa
Showing 1 changed file with 64 additions and 0 deletions.
64 changes: 64 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
declare class InCallManager {
vibrate: boolean;
audioUriMap: {
ringtone: { _BUNDLE_: null; _DEFAULT_: null };
ringback: { _BUNDLE_: null; _DEFAULT_: null };
busytone: { _BUNDLE_: null; _DEFAULT_: null };
};

constructor();

start(setup?: {
auto?: boolean;
media?: "video" | "audio";
ringback?: string;
}): void;

stop(setup?: { busytone?: string }): void;

turnScreenOff(): void;

turnScreenOn(): void;

getIsWiredHeadsetPluggedIn(): Promise<{ isWiredHeadsetPluggedIn: boolean }>;

setFlashOn(enable: boolean, brightness: number): void;

setKeepScreenOn(enable: boolean): void;

setSpeakerphoneOn(enable: boolean): void;

setForceSpeakerphoneOn(flag: boolean): void;

setMicrophoneMute(enable: boolean): void;

startRingtone(
ringtone: string,
vibrate_pattern: number | number[],
ios_category: string,
seconds: number
): void;

stopRingtone(): void;

startProximitySensor(): void;

stopProximitySensor(): void;

startRingback(ringback: string): void;

stopRingback(): void;

pokeScreen(timeout: number): void;

getAudioUri(audioType: string, fileType: string): Promise<string | null>;

chooseAudioRoute(route: string): Promise<any>;

requestAudioFocus(): Promise<any>;

abandonAudioFocus(): Promise<any>;
}

declare const inCallManager: InCallManager;
export default inCallManager;

0 comments on commit 23ed8aa

Please sign in to comment.