Skip to content

Commit 642dd41

Browse files
authored
Merge pull request #228 from Stringsaeed/master
Adding types
2 parents ff17c7c + 23ed8aa commit 642dd41

File tree

1 file changed

+64
-0
lines changed

1 file changed

+64
-0
lines changed

index.d.ts

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
declare class InCallManager {
2+
vibrate: boolean;
3+
audioUriMap: {
4+
ringtone: { _BUNDLE_: null; _DEFAULT_: null };
5+
ringback: { _BUNDLE_: null; _DEFAULT_: null };
6+
busytone: { _BUNDLE_: null; _DEFAULT_: null };
7+
};
8+
9+
constructor();
10+
11+
start(setup?: {
12+
auto?: boolean;
13+
media?: "video" | "audio";
14+
ringback?: string;
15+
}): void;
16+
17+
stop(setup?: { busytone?: string }): void;
18+
19+
turnScreenOff(): void;
20+
21+
turnScreenOn(): void;
22+
23+
getIsWiredHeadsetPluggedIn(): Promise<{ isWiredHeadsetPluggedIn: boolean }>;
24+
25+
setFlashOn(enable: boolean, brightness: number): void;
26+
27+
setKeepScreenOn(enable: boolean): void;
28+
29+
setSpeakerphoneOn(enable: boolean): void;
30+
31+
setForceSpeakerphoneOn(flag: boolean): void;
32+
33+
setMicrophoneMute(enable: boolean): void;
34+
35+
startRingtone(
36+
ringtone: string,
37+
vibrate_pattern: number | number[],
38+
ios_category: string,
39+
seconds: number
40+
): void;
41+
42+
stopRingtone(): void;
43+
44+
startProximitySensor(): void;
45+
46+
stopProximitySensor(): void;
47+
48+
startRingback(ringback: string): void;
49+
50+
stopRingback(): void;
51+
52+
pokeScreen(timeout: number): void;
53+
54+
getAudioUri(audioType: string, fileType: string): Promise<string | null>;
55+
56+
chooseAudioRoute(route: string): Promise<any>;
57+
58+
requestAudioFocus(): Promise<any>;
59+
60+
abandonAudioFocus(): Promise<any>;
61+
}
62+
63+
declare const inCallManager: InCallManager;
64+
export default inCallManager;

0 commit comments

Comments
 (0)