omikit-plugin 4.0.2 → 4.1.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.
Files changed (62) hide show
  1. package/README.md +272 -24
  2. package/android/src/main/java/com/omikitplugin/OmiLocalCameraView.kt +112 -0
  3. package/android/src/main/java/com/omikitplugin/OmiRemoteCameraView.kt +99 -0
  4. package/android/src/main/java/com/omikitplugin/OmikitPluginModule.kt +5 -4
  5. package/android/src/main/java/com/omikitplugin/OmikitPluginPackage.kt +11 -8
  6. package/ios/CallProcess/CallManager.swift +99 -29
  7. package/ios/Library/OmikitPlugin.m +18 -0
  8. package/ios/Library/OmikitPlugin.swift +233 -1
  9. package/ios/OmikitPlugin-Bridging-Header.h +1 -0
  10. package/ios/OmikitPlugin.xcodeproj/project.pbxproj +4 -4
  11. package/ios/VideoCall/OmiLocalCameraViewBridge.m +14 -0
  12. package/ios/VideoCall/OmiLocalCameraViewManager.swift +41 -0
  13. package/ios/VideoCall/OmiRemoteCameraViewBridge.m +14 -0
  14. package/ios/VideoCall/OmiRemoteCameraViewManager.swift +40 -0
  15. package/lib/commonjs/NativeOmikitPlugin.js +2 -1
  16. package/lib/commonjs/NativeOmikitPlugin.js.map +1 -1
  17. package/lib/commonjs/index.js.map +1 -1
  18. package/lib/commonjs/omi_audio_type.js +5 -7
  19. package/lib/commonjs/omi_audio_type.js.map +1 -1
  20. package/lib/commonjs/omi_call_state.js +5 -3
  21. package/lib/commonjs/omi_call_state.js.map +1 -1
  22. package/lib/commonjs/omi_local_camera.js +19 -17
  23. package/lib/commonjs/omi_local_camera.js.map +1 -1
  24. package/lib/commonjs/omi_remote_camera.js +20 -17
  25. package/lib/commonjs/omi_remote_camera.js.map +1 -1
  26. package/lib/commonjs/omi_start_call_status.js +5 -24
  27. package/lib/commonjs/omi_start_call_status.js.map +1 -1
  28. package/lib/commonjs/omikit.js +56 -3
  29. package/lib/commonjs/omikit.js.map +1 -1
  30. package/lib/commonjs/types/index.d.js.map +1 -1
  31. package/lib/module/NativeOmikitPlugin.js.map +1 -1
  32. package/lib/module/index.js.map +1 -1
  33. package/lib/module/omi_audio_type.js +4 -7
  34. package/lib/module/omi_audio_type.js.map +1 -1
  35. package/lib/module/omi_call_state.js +4 -3
  36. package/lib/module/omi_call_state.js.map +1 -1
  37. package/lib/module/omi_local_camera.js +19 -18
  38. package/lib/module/omi_local_camera.js.map +1 -1
  39. package/lib/module/omi_remote_camera.js +20 -18
  40. package/lib/module/omi_remote_camera.js.map +1 -1
  41. package/lib/module/omi_start_call_status.js +4 -24
  42. package/lib/module/omi_start_call_status.js.map +1 -1
  43. package/lib/module/omikit.js +49 -1
  44. package/lib/module/omikit.js.map +1 -1
  45. package/lib/module/types/index.d.js.map +1 -1
  46. package/omikit-plugin.podspec +1 -1
  47. package/package.json +2 -11
  48. package/react-native.config.js +14 -0
  49. package/src/NativeOmikitPlugin.ts +1 -0
  50. package/src/omi_call_state.tsx +1 -0
  51. package/src/omi_local_camera.tsx +15 -19
  52. package/src/omi_remote_camera.tsx +16 -19
  53. package/src/omikit.tsx +63 -0
  54. package/src/types/index.d.ts +344 -62
  55. package/android/src/main/java/com/omikitplugin/FLLocalCameraModule.kt +0 -34
  56. package/android/src/main/java/com/omikitplugin/FLLocalCameraView.kt +0 -44
  57. package/android/src/main/java/com/omikitplugin/FLRemoteCameraModule.kt +0 -37
  58. package/android/src/main/java/com/omikitplugin/FLRemoteCameraView.kt +0 -23
  59. package/ios/VideoCall/FLLocalCameraView.m +0 -17
  60. package/ios/VideoCall/FLLocalCameraView.swift +0 -44
  61. package/ios/VideoCall/FLRemoteCameraView.m +0 -18
  62. package/ios/VideoCall/FLRemoteCameraView.swift +0 -124
@@ -1,44 +0,0 @@
1
- //
2
- // LocalCameraView.swift
3
- // omicall_flutter_plugin
4
- //
5
- // Created by PRO 2019 16' on 15/02/2023.
6
- //
7
-
8
- import Foundation
9
- import React
10
- import UIKit
11
- import OmiKit
12
-
13
- @objc(FLLocalCameraView)
14
- class FLLocalCameraView: RCTViewManager {
15
-
16
- private var _view: OMIVideoPreviewView
17
-
18
- override init() {
19
- _view = OMIVideoPreviewView.init()
20
- super.init()
21
- }
22
-
23
- override class func requiresMainQueueSetup() -> Bool {
24
- return true
25
- }
26
-
27
- override func view() -> UIView! {
28
- return _view
29
- }
30
-
31
- @objc(refresh:withRejecter:)
32
- func refresh(resolve: RCTPromiseResolveBlock, reject: RCTPromiseRejectBlock) -> Void {
33
- setupViews()
34
- }
35
-
36
- func setupViews() {
37
- DispatchQueue.main.async {[weak self] in
38
- guard let self = self else { return }
39
- if let videoView = CallManager.shareInstance().getLocalPreviewView(frame: self._view.frame) {
40
- self._view.setView(videoView)
41
- }
42
- }
43
- }
44
- }
@@ -1,18 +0,0 @@
1
- //
2
- // FLRemoteCameraView.m
3
- // omikit-plugin
4
- //
5
- // Created by PRO 2019 16' on 10/04/2023.
6
- //
7
-
8
- #import <Foundation/Foundation.h>
9
- #import <React/RCTBridgeModule.h>
10
- #import <React/RCTViewManager.h>
11
-
12
-
13
- @interface RCT_EXTERN_MODULE(FLRemoteCameraView, RCTViewManager)
14
- RCT_EXTERN_METHOD(refresh:
15
- (RCTPromiseResolveBlock)resolve
16
- withRejecter:(RCTPromiseRejectBlock)reject)
17
- @end
18
-
@@ -1,124 +0,0 @@
1
- ////
2
- //// LocalCameraView.swift
3
- //// omicall_flutter_plugin
4
- ////
5
- //// Created by PRO 2019 16' on 15/02/2023.
6
- ////
7
- import Foundation
8
- import React
9
- import UIKit
10
- import OmiKit
11
-
12
- @objc(FLRemoteCameraView)
13
- class FLRemoteCameraView: RCTViewManager {
14
-
15
- private var _view: OMIVideoPreviewView
16
-
17
- override init() {
18
- _view = OMIVideoPreviewView.init()
19
- super.init()
20
- }
21
-
22
- override class func requiresMainQueueSetup() -> Bool {
23
- return true
24
- }
25
-
26
- override func view() -> UIView! {
27
- return _view
28
- }
29
-
30
- @objc(refresh:withRejecter:)
31
- func refresh(resolve: RCTPromiseResolveBlock, reject: RCTPromiseRejectBlock) -> Void {
32
- self.setupViews()
33
- }
34
-
35
- func setupViews() {
36
- DispatchQueue.main.async {[weak self] in
37
- guard let self = self else { return }
38
- if let videoView = CallManager.shareInstance().getRemotePreviewView(frame: self._view.frame) {
39
- self._view.setView(videoView)
40
- }
41
- }
42
- }
43
-
44
- }
45
-
46
-
47
-
48
- //import Foundation
49
- //import Flutter
50
- //import WebKit
51
- //import UIKit
52
- //import OmiKit
53
- //
54
- //class FLRemoteCameraFactory: NSObject, FlutterPlatformViewFactory {
55
- // private var messenger: FlutterBinaryMessenger
56
- //
57
- // init(messenger: FlutterBinaryMessenger) {
58
- // self.messenger = messenger
59
- // super.init()
60
- // }
61
- //
62
- // func createArgsCodec() -> FlutterMessageCodec & NSObjectProtocol {
63
- // return FlutterStandardMessageCodec.sharedInstance()
64
- // }
65
- //
66
- // func create(
67
- // withFrame frame: CGRect,
68
- // viewIdentifier viewId: Int64,
69
- // arguments args: Any?
70
- // ) -> FlutterPlatformView {
71
- // return FLRemoteCameraView(
72
- // frame: frame,
73
- // viewIdentifier: viewId,
74
- // arguments: args,
75
- // binaryMessenger: messenger
76
- // )
77
- // }
78
- //}
79
- //
80
- //class FLRemoteCameraView: NSObject, FlutterPlatformView {
81
- // private var _view: OMIVideoPreviewView
82
- // private var _arg : [String : Any]?
83
- // private let methodChannel: FlutterMethodChannel?
84
- //
85
- // init(
86
- // frame: CGRect,
87
- // viewIdentifier viewId: Int64,
88
- // arguments args: Any?,
89
- // binaryMessenger messenger: FlutterBinaryMessenger?
90
- // ) {
91
- // _view = OMIVideoPreviewView.init()
92
- // _arg = args as? [String: Any]
93
- // methodChannel = FlutterMethodChannel(name: "remote_camera_controller/\(viewId)", binaryMessenger: messenger!)
94
- // super.init()
95
- // methodChannel?.setMethodCallHandler(onMethodCall)
96
- // }
97
- //
98
- // func onMethodCall(call: FlutterMethodCall, result: FlutterResult) {
99
- // switch(call.method){
100
- // case "refresh":
101
- // setupViews()
102
- // break
103
- // default:
104
- // result(FlutterMethodNotImplemented)
105
- // }
106
- // }
107
- //
108
- // func view() -> UIView {
109
- // return _view
110
- // }
111
- //
112
- // func setupViews() {
113
- // self._view.layer.cornerRadius = 5
114
- //// self._view.layer.borderColor = UIColor.gray.cgColor
115
- //// self._view.layer.borderWidth = 1.0
116
- // self._view.clipsToBounds = true
117
- // CallManager.shareInstance().getRemotePreviewView(callback: { previewView in
118
- // self._view.setView(previewView)
119
- // print("\(previewView.frame)")
120
- // print("\(self._view.frame)")
121
- // print("AAAA")
122
- // })
123
- // }
124
- //}