omikit-plugin 2.3.4 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +129 -41
- package/android/build.gradle +4 -1
- package/android/src/main/java/com/omikitplugin/OmikitPluginModule.kt +133 -93
- package/android/src/main/java/com/omikitplugin/constants/constant.kt +2 -3
- package/android/src/main/java/com/omikitplugin/state/CallState.kt +12 -0
- package/ios/CallProcess/CallManager.swift +191 -216
- package/ios/CallProcess/CallState.swift +17 -0
- package/ios/Constant/Constant.swift +2 -6
- package/ios/Library/OmikitPlugin.m +18 -0
- package/ios/Library/OmikitPlugin.swift +42 -20
- package/lib/commonjs/index.js +22 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/omi_call_state.js +18 -0
- package/lib/commonjs/omi_call_state.js.map +1 -0
- package/lib/commonjs/omi_start_call_status.js +21 -0
- package/lib/commonjs/omi_start_call_status.js.map +1 -0
- package/lib/commonjs/omikit.js +15 -10
- package/lib/commonjs/omikit.js.map +1 -1
- package/lib/module/index.js +2 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/omi_call_state.js +11 -0
- package/lib/module/omi_call_state.js.map +1 -0
- package/lib/module/omi_start_call_status.js +14 -0
- package/lib/module/omi_start_call_status.js.map +1 -0
- package/lib/module/omikit.js +12 -10
- package/lib/module/omikit.js.map +1 -1
- package/lib/typescript/index.d.ts +2 -0
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/omi_call_state.d.ts +10 -0
- package/lib/typescript/omi_call_state.d.ts.map +1 -0
- package/lib/typescript/omi_start_call_status.d.ts +13 -0
- package/lib/typescript/omi_start_call_status.d.ts.map +1 -0
- package/lib/typescript/omikit.d.ts +7 -6
- package/lib/typescript/omikit.d.ts.map +1 -1
- package/omikit-plugin.podspec +1 -1
- package/package.json +1 -1
- package/src/index.tsx +2 -0
- package/src/omi_call_state.tsx +9 -0
- package/src/omi_start_call_status.tsx +12 -0
- package/src/omikit.tsx +16 -11
package/src/omikit.tsx
CHANGED
|
@@ -30,27 +30,22 @@ export function getInitialCall(): Promise<any> {
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
export function initCallWithUserPassword(data: any): Promise<boolean> {
|
|
33
|
-
console.log(data);
|
|
34
33
|
return OmikitPlugin.initCallWithUserPassword(data);
|
|
35
34
|
}
|
|
36
35
|
|
|
37
36
|
export function initCallWithApiKey(data: any): Promise<boolean> {
|
|
38
|
-
console.log(data);
|
|
39
37
|
return OmikitPlugin.initCallWithApiKey(data);
|
|
40
38
|
}
|
|
41
39
|
|
|
42
40
|
export function updateToken(data: any): Promise<void> {
|
|
43
|
-
console.log(data);
|
|
44
41
|
return OmikitPlugin.updateToken(data);
|
|
45
42
|
}
|
|
46
43
|
|
|
47
|
-
export function startCall(data: any): Promise<
|
|
48
|
-
console.log(data);
|
|
44
|
+
export function startCall(data: any): Promise<Number> {
|
|
49
45
|
return OmikitPlugin.startCall(data);
|
|
50
46
|
}
|
|
51
47
|
|
|
52
|
-
export function startCallWithUuid(data: any): Promise<
|
|
53
|
-
console.log(data);
|
|
48
|
+
export function startCallWithUuid(data: any): Promise<Number> {
|
|
54
49
|
return OmikitPlugin.startCallWithUuid(data);
|
|
55
50
|
}
|
|
56
51
|
|
|
@@ -114,17 +109,27 @@ export function openSystemAlertSetting(): Promise<void> {
|
|
|
114
109
|
return OmikitPlugin.openSystemAlertSetting();
|
|
115
110
|
}
|
|
116
111
|
|
|
112
|
+
export function getAudio(): Promise<any> {
|
|
113
|
+
return OmikitPlugin.getAudio();
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export function setAudio(data: any): Promise<void> {
|
|
117
|
+
return OmikitPlugin.setAudio(data);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export function getCurrentAudio(): Promise<any> {
|
|
121
|
+
return OmikitPlugin.getCurrentAudio();
|
|
122
|
+
}
|
|
123
|
+
|
|
117
124
|
export const omiEmitter = new NativeEventEmitter(OmikitPlugin);
|
|
118
125
|
|
|
119
126
|
export const OmiCallEvent = {
|
|
120
|
-
|
|
121
|
-
onCallEnd: 'CALL_END',
|
|
122
|
-
incomingReceived: 'INCOMING_RECEIVED',
|
|
127
|
+
onCallStateChanged: 'CALL_STATE_CHANGED',
|
|
123
128
|
onSpeaker: 'SPEAKER',
|
|
124
129
|
onMuted: 'MUTED',
|
|
125
|
-
onLocalVideoReady: 'LOCAL_VIDEO_READY',
|
|
126
130
|
onRemoteVideoReady: 'REMOTE_VIDEO_READY',
|
|
127
131
|
onClickMissedCall: 'CLICK_MISSED_CALL',
|
|
128
132
|
onSwitchboardAnswer: 'SWITCHBOARD_ANSWER',
|
|
129
133
|
onCallQuality: 'CALL_QUALITY',
|
|
134
|
+
onAudioChange: 'AUDIO_CHANGE',
|
|
130
135
|
};
|