omikit-plugin 3.2.63 → 3.2.65

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 CHANGED
@@ -835,6 +835,18 @@ We need you request permission about call before make call:
835
835
  openSystemAlertSetting();
836
836
  }
837
837
  ```
838
+ - Audio:
839
+ - func *getCurrentAudio*: lấy thông tin hiện tại của audio devices
840
+ ```javascript
841
+ import {getCurrentAudio} from 'omikit-plugin';
842
+
843
+ getCurrentAudio().then((data: any) => {
844
+ console.log(data); // [{"name": "Speaker", "type": "Speaker"}]
845
+ // Ghi chú: Data là một mảng chứa thông tin của các thiết bị âm thanh, với các tham số:
846
+ // - name: Tên của thiết bị âm thanh
847
+ // - type: Loại thiết bị âm thanh (ví dụ: "Speaker", "Microphone", v.v.)
848
+ });
849
+ ```
838
850
 
839
851
  - Video Call functions: Support only video call, You need enable video in `init functions` and `start call` to implements under functions.
840
852
 
@@ -898,7 +910,11 @@ useEffect(() => {
898
910
  omiEmitter.addListener(OmiCallEvent.onClickMissedCall, clickMissedCall);
899
911
  omiEmitter.addListener(OmiCallEvent.onSwitchboardAnswer, onSwitchboardAnswer);
900
912
  omiEmitter.addListener(OmiCallEvent.onCallQuality, onCallQuality);
901
- omiEmitter.addListener(OmiCallEvent.onRequestPermissionAndroid, onRequestPermission);
913
+
914
+ if(Platform.OS == "android") {
915
+ omiEmitter.addListener(OmiCallEvent.onRequestPermissionAndroid, onRequestPermission);
916
+ }
917
+
902
918
  if (Platform.OS === 'ios') {
903
919
  registerVideoEvent();
904
920
  omiEmitter.addListener(
@@ -906,13 +922,18 @@ useEffect(() => {
906
922
  refreshRemoteCameraEvent
907
923
  );
908
924
  }
925
+
909
926
  return () => {
910
927
  omiEmitter.removeAllListeners(OmiCallEvent.onCallStateChanged);
911
928
  omiEmitter.removeAllListeners(OmiCallEvent.onMuted);
912
929
  omiEmitter.removeAllListeners(OmiCallEvent.onHold);
913
930
  omiEmitter.removeAllListeners(OmiCallEvent.onSpeaker);
914
931
  omiEmitter.removeAllListeners(OmiCallEvent.onSwitchboardAnswer);
915
- omiEmitter.removeAllListeners(OmiCallEvent.onRequestPermissionAndroid);
932
+
933
+ if(Platform.OS == "android") {
934
+ omiEmitter.removeAllListeners(OmiCallEvent.onRequestPermissionAndroid);
935
+ }
936
+
916
937
  if (Platform.OS === 'ios') {
917
938
  removeVideoEvent();
918
939
  omiEmitter.removeAllListeners(OmiCallEvent.onRemoteVideoReady);
@@ -120,7 +120,7 @@ dependencies {
120
120
  // use for OMISDK
121
121
  implementation("androidx.work:work-runtime:2.8.1")
122
122
  implementation "androidx.security:security-crypto:1.1.0-alpha06"
123
- api 'vn.vihat.omicall:omi-sdk:2.3.14'
123
+ api 'vn.vihat.omicall:omi-sdk:2.3.16'
124
124
 
125
125
  implementation "com.facebook.react:react-native:+" // From node_modules
126
126
  implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
@@ -314,7 +314,7 @@ class CallManager {
314
314
  "transactionId": "",
315
315
  "_id": ""
316
316
  ]
317
-
317
+
318
318
  if(call != nil){
319
319
  if(call.isIncoming && callState == OMICallState.early.rawValue){
320
320
  dataToSend["status"] = OMICallState.incoming.rawValue
@@ -6,12 +6,10 @@
6
6
  //
7
7
 
8
8
  #import <Foundation/Foundation.h>
9
- #if __has_include("OmikitNotification.h")
10
- #import "OmikitNotification.h"
11
- #elif __has_include(<OmikitPlugin/OmikitPlugin-Swift.h>)
12
- #import <OmikitPlugin/OmikitPlugin-Swift.h>
9
+ #if __has_include("OmikitPlugin-Swift.h")
10
+ #import <OmikitPlugin-Swift.h>
13
11
  #else
14
- #import <omikit_plugin/OmikitNotification.h>
12
+ #import <OmikitPlugin/OmikitPlugin-Swift.h>
15
13
  #endif
16
14
 
17
15
  @implementation OmikitNotification : NSObject
@@ -31,7 +31,7 @@ Pod::Spec.new do |s|
31
31
 
32
32
  # Thêm dependency bắt buộc
33
33
  s.dependency "React-Core"
34
- s.dependency "OmiKit", "1.8.2"
34
+ s.dependency "OmiKit", "1.8.4"
35
35
 
36
36
  # Đảm bảo Swift bridging header được tự động tạo
37
37
  # s.requires_arc = true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omikit-plugin",
3
- "version": "3.2.63",
3
+ "version": "3.2.65",
4
4
  "description": "Omikit Plugin by ViHAT",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -44,7 +44,7 @@
44
44
  "type": "git",
45
45
  "url": "git+https://github.com/VIHATTeam/OMICALL-React-Native-SDK"
46
46
  },
47
- "author": "ViHAT Group <chaunguyen4297@gmail.com> (https://github.com/chauminhienglish)",
47
+ "author": "ViHAT Group <tranhoaihung05@gmail.com>",
48
48
  "license": "MIT",
49
49
  "bugs": {
50
50
  "url": "https://github.com/VIHATTeam/OMICALL-React-Native-SDK/issues"