@cometchat/calls-sdk-react-native 4.0.0-beta1

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 (50) hide show
  1. package/README.md +27 -0
  2. package/android/build.gradle +20 -0
  3. package/android/src/main/AndroidManifest.xml +8 -0
  4. package/android/src/main/java/com/CometChatCalls/AudioDeviceHandlerGeneric.java +213 -0
  5. package/android/src/main/java/com/CometChatCalls/AudioDeviceHandlerLegacy.java +213 -0
  6. package/android/src/main/java/com/CometChatCalls/AudioModeModule.java +456 -0
  7. package/android/src/main/java/com/CometChatCalls/BluetoothHeadsetMonitor.java +174 -0
  8. package/android/src/main/java/com/CometChatCalls/CometChatCallsPackage.java +45 -0
  9. package/cometchat-calls-sdk-react-native.podspec +21 -0
  10. package/dist/CometChatErrorConstants.d.ts +124 -0
  11. package/dist/Constants.d.ts +720 -0
  12. package/dist/Helper copy.d.ts +1 -0
  13. package/dist/Helper.d.ts +7 -0
  14. package/dist/api/APIHandler.d.ts +6 -0
  15. package/dist/api/endpoints.d.ts +6 -0
  16. package/dist/api/helper.d.ts +63 -0
  17. package/dist/api/index.d.ts +2 -0
  18. package/dist/constants/CallConstants.d.ts +136 -0
  19. package/dist/constants/index.d.ts +1 -0
  20. package/dist/defaultCallsettings.d.ts +2 -0
  21. package/dist/index.d.ts +3 -0
  22. package/dist/index.js +128 -0
  23. package/dist/models/CallAppSettings.d.ts +42 -0
  24. package/dist/models/CallSettings.d.ts +316 -0
  25. package/dist/models/CometChatCalls.d.ts +89 -0
  26. package/dist/models/CometChatCallsComponent.d.ts +13 -0
  27. package/dist/models/CometChatCallsComponentCore.d.ts +18 -0
  28. package/dist/models/CometChatCallsException.d.ts +7 -0
  29. package/dist/models/CometChatPresenterComponent.d.ts +13 -0
  30. package/dist/models/ErrorModel.d.ts +11 -0
  31. package/dist/models/Listner.d.ts +64 -0
  32. package/dist/models/ListnerHandler.d.ts +10 -0
  33. package/dist/models/MessageComponent.d.ts +7 -0
  34. package/dist/models/PresenterSettings.d.ts +194 -0
  35. package/dist/models/RTCUser.d.ts +18 -0
  36. package/dist/models/index.d.ts +7 -0
  37. package/dist/types/ICallAppSettings.d.ts +6 -0
  38. package/dist/types/ICallSettings.d.ts +60 -0
  39. package/dist/types/RTCUser.d.ts +6 -0
  40. package/dist/types/callEvents.d.ts +53 -0
  41. package/dist/types/common.d.ts +17 -0
  42. package/dist/types/index.d.ts +2 -0
  43. package/ios/AudioMode.h +11 -0
  44. package/ios/AudioMode.m +403 -0
  45. package/ios/JitsiAudioSession+Private.h +25 -0
  46. package/ios/JitsiAudioSession.h +17 -0
  47. package/ios/JitsiAudioSession.m +34 -0
  48. package/ios/LogUtils.h +23 -0
  49. package/ios/react-native-calls2.xcodeproj/project.pbxproj +269 -0
  50. package/package.json +122 -0
@@ -0,0 +1,269 @@
1
+ // !$*UTF8*$!
2
+ {
3
+ archiveVersion = 1;
4
+ classes = {
5
+ };
6
+ objectVersion = 46;
7
+ objects = {
8
+
9
+ /* Begin PBXCopyFilesBuildPhase section */
10
+ 58B511D91A9E6C8500147676 /* CopyFiles */ = {
11
+ isa = PBXCopyFilesBuildPhase;
12
+ buildActionMask = 2147483647;
13
+ dstPath = "include/$(PRODUCT_NAME)";
14
+ dstSubfolderSpec = 16;
15
+ files = (
16
+ );
17
+ runOnlyForDeploymentPostprocessing = 0;
18
+ };
19
+ /* End PBXCopyFilesBuildPhase section */
20
+
21
+ /* Begin PBXFileReference section */
22
+ 134814201AA4EA6300B7C361 /* libAudioMode.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libAudioMode.a; sourceTree = BUILT_PRODUCTS_DIR; };
23
+ B3E7B5881CC2AC0600A0062D /* AudioMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AudioMode.h; sourceTree = "<group>"; };
24
+ B3E7B5891CC2AC0600A0062D /* AudioMode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AudioMode.m; sourceTree = "<group>"; };
25
+ /* End PBXFileReference section */
26
+
27
+ /* Begin PBXFrameworksBuildPhase section */
28
+ 58B511D81A9E6C8500147676 /* Frameworks */ = {
29
+ isa = PBXFrameworksBuildPhase;
30
+ buildActionMask = 2147483647;
31
+ files = (
32
+ );
33
+ runOnlyForDeploymentPostprocessing = 0;
34
+ };
35
+ /* End PBXFrameworksBuildPhase section */
36
+
37
+ /* Begin PBXGroup section */
38
+ 134814211AA4EA7D00B7C361 /* Products */ = {
39
+ isa = PBXGroup;
40
+ children = (
41
+ 134814201AA4EA6300B7C361 /* libAudioMode.a */,
42
+ );
43
+ name = Products;
44
+ sourceTree = "<group>";
45
+ };
46
+ 58B511D21A9E6C8500147676 = {
47
+ isa = PBXGroup;
48
+ children = (
49
+ B3E7B5881CC2AC0600A0062D /* AudioMode.h */,
50
+ B3E7B5891CC2AC0600A0062D /* AudioMode.m */,
51
+ 134814211AA4EA7D00B7C361 /* Products */,
52
+ );
53
+ sourceTree = "<group>";
54
+ };
55
+ /* End PBXGroup section */
56
+
57
+ /* Begin PBXNativeTarget section */
58
+ 58B511DA1A9E6C8500147676 /* AudioMode */ = {
59
+ isa = PBXNativeTarget;
60
+ buildConfigurationList = 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "AudioMode" */;
61
+ buildPhases = (
62
+ 58B511D71A9E6C8500147676 /* Sources */,
63
+ 58B511D81A9E6C8500147676 /* Frameworks */,
64
+ 58B511D91A9E6C8500147676 /* CopyFiles */,
65
+ );
66
+ buildRules = (
67
+ );
68
+ dependencies = (
69
+ );
70
+ name = AudioMode;
71
+ productName = RCTDataManager;
72
+ productReference = 134814201AA4EA6300B7C361 /* libAudioMode.a */;
73
+ productType = "com.apple.product-type.library.static";
74
+ };
75
+ /* End PBXNativeTarget section */
76
+
77
+ /* Begin PBXProject section */
78
+ 58B511D31A9E6C8500147676 /* Project object */ = {
79
+ isa = PBXProject;
80
+ attributes = {
81
+ LastUpgradeCheck = 0920;
82
+ ORGANIZATIONNAME = Facebook;
83
+ TargetAttributes = {
84
+ 58B511DA1A9E6C8500147676 = {
85
+ CreatedOnToolsVersion = 6.1.1;
86
+ };
87
+ };
88
+ };
89
+ buildConfigurationList = 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "react-native-calls2" */;
90
+ compatibilityVersion = "Xcode 3.2";
91
+ developmentRegion = English;
92
+ hasScannedForEncodings = 0;
93
+ knownRegions = (
94
+ English,
95
+ en,
96
+ );
97
+ mainGroup = 58B511D21A9E6C8500147676;
98
+ productRefGroup = 58B511D21A9E6C8500147676;
99
+ projectDirPath = "";
100
+ projectRoot = "";
101
+ targets = (
102
+ 58B511DA1A9E6C8500147676 /* AudioMode */,
103
+ );
104
+ };
105
+ /* End PBXProject section */
106
+
107
+ /* Begin PBXSourcesBuildPhase section */
108
+ 58B511D71A9E6C8500147676 /* Sources */ = {
109
+ isa = PBXSourcesBuildPhase;
110
+ buildActionMask = 2147483647;
111
+ files = (
112
+ );
113
+ runOnlyForDeploymentPostprocessing = 0;
114
+ };
115
+ /* End PBXSourcesBuildPhase section */
116
+
117
+ /* Begin XCBuildConfiguration section */
118
+ 58B511ED1A9E6C8500147676 /* Debug */ = {
119
+ isa = XCBuildConfiguration;
120
+ buildSettings = {
121
+ ALWAYS_SEARCH_USER_PATHS = NO;
122
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
123
+ CLANG_CXX_LIBRARY = "libc++";
124
+ CLANG_ENABLE_MODULES = YES;
125
+ CLANG_ENABLE_OBJC_ARC = YES;
126
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
127
+ CLANG_WARN_BOOL_CONVERSION = YES;
128
+ CLANG_WARN_COMMA = YES;
129
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
130
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
131
+ CLANG_WARN_EMPTY_BODY = YES;
132
+ CLANG_WARN_ENUM_CONVERSION = YES;
133
+ CLANG_WARN_INFINITE_RECURSION = YES;
134
+ CLANG_WARN_INT_CONVERSION = YES;
135
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
136
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
137
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
138
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
139
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
140
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
141
+ CLANG_WARN_UNREACHABLE_CODE = YES;
142
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
143
+ COPY_PHASE_STRIP = NO;
144
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
145
+ ENABLE_TESTABILITY = YES;
146
+ GCC_C_LANGUAGE_STANDARD = gnu99;
147
+ GCC_DYNAMIC_NO_PIC = NO;
148
+ GCC_NO_COMMON_BLOCKS = YES;
149
+ GCC_OPTIMIZATION_LEVEL = 0;
150
+ GCC_PREPROCESSOR_DEFINITIONS = (
151
+ "DEBUG=1",
152
+ "$(inherited)",
153
+ );
154
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
155
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
156
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
157
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
158
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
159
+ GCC_WARN_UNUSED_FUNCTION = YES;
160
+ GCC_WARN_UNUSED_VARIABLE = YES;
161
+ IPHONEOS_DEPLOYMENT_TARGET = 8.0;
162
+ MTL_ENABLE_DEBUG_INFO = YES;
163
+ ONLY_ACTIVE_ARCH = YES;
164
+ SDKROOT = iphoneos;
165
+ };
166
+ name = Debug;
167
+ };
168
+ 58B511EE1A9E6C8500147676 /* Release */ = {
169
+ isa = XCBuildConfiguration;
170
+ buildSettings = {
171
+ ALWAYS_SEARCH_USER_PATHS = NO;
172
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
173
+ CLANG_CXX_LIBRARY = "libc++";
174
+ CLANG_ENABLE_MODULES = YES;
175
+ CLANG_ENABLE_OBJC_ARC = YES;
176
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
177
+ CLANG_WARN_BOOL_CONVERSION = YES;
178
+ CLANG_WARN_COMMA = YES;
179
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
180
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
181
+ CLANG_WARN_EMPTY_BODY = YES;
182
+ CLANG_WARN_ENUM_CONVERSION = YES;
183
+ CLANG_WARN_INFINITE_RECURSION = YES;
184
+ CLANG_WARN_INT_CONVERSION = YES;
185
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
186
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
187
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
188
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
189
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
190
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
191
+ CLANG_WARN_UNREACHABLE_CODE = YES;
192
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
193
+ COPY_PHASE_STRIP = YES;
194
+ ENABLE_NS_ASSERTIONS = NO;
195
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
196
+ GCC_C_LANGUAGE_STANDARD = gnu99;
197
+ GCC_NO_COMMON_BLOCKS = YES;
198
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
199
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
200
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
201
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
202
+ GCC_WARN_UNUSED_FUNCTION = YES;
203
+ GCC_WARN_UNUSED_VARIABLE = YES;
204
+ IPHONEOS_DEPLOYMENT_TARGET = 8.0;
205
+ MTL_ENABLE_DEBUG_INFO = NO;
206
+ SDKROOT = iphoneos;
207
+ VALIDATE_PRODUCT = YES;
208
+ };
209
+ name = Release;
210
+ };
211
+ 58B511F01A9E6C8500147676 /* Debug */ = {
212
+ isa = XCBuildConfiguration;
213
+ buildSettings = {
214
+ HEADER_SEARCH_PATHS = (
215
+ "$(inherited)",
216
+ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
217
+ "$(SRCROOT)/../../../React/**",
218
+ "$(SRCROOT)/../../react-native/React/**",
219
+ "$(SRCROOT)/../../react-native-webrtc/**",
220
+ );
221
+ LIBRARY_SEARCH_PATHS = "$(inherited)";
222
+ OTHER_LDFLAGS = "-ObjC";
223
+ PRODUCT_NAME = AudioMode;
224
+ SKIP_INSTALL = YES;
225
+ };
226
+ name = Debug;
227
+ };
228
+ 58B511F11A9E6C8500147676 /* Release */ = {
229
+ isa = XCBuildConfiguration;
230
+ buildSettings = {
231
+ HEADER_SEARCH_PATHS = (
232
+ "$(inherited)",
233
+ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
234
+ "$(SRCROOT)/../../../React/**",
235
+ "$(SRCROOT)/../../react-native/React/**",
236
+ "$(SRCROOT)/../../react-native-webrtc/**",
237
+ );
238
+ LIBRARY_SEARCH_PATHS = "$(inherited)";
239
+ OTHER_LDFLAGS = "-ObjC";
240
+ PRODUCT_NAME = AudioMode;
241
+ SKIP_INSTALL = YES;
242
+ };
243
+ name = Release;
244
+ };
245
+ /* End XCBuildConfiguration section */
246
+
247
+ /* Begin XCConfigurationList section */
248
+ 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "react-native-calls2" */ = {
249
+ isa = XCConfigurationList;
250
+ buildConfigurations = (
251
+ 58B511ED1A9E6C8500147676 /* Debug */,
252
+ 58B511EE1A9E6C8500147676 /* Release */,
253
+ );
254
+ defaultConfigurationIsVisible = 0;
255
+ defaultConfigurationName = Release;
256
+ };
257
+ 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "AudioMode" */ = {
258
+ isa = XCConfigurationList;
259
+ buildConfigurations = (
260
+ 58B511F01A9E6C8500147676 /* Debug */,
261
+ 58B511F11A9E6C8500147676 /* Release */,
262
+ );
263
+ defaultConfigurationIsVisible = 0;
264
+ defaultConfigurationName = Release;
265
+ };
266
+ /* End XCConfigurationList section */
267
+ };
268
+ rootObject = 58B511D31A9E6C8500147676 /* Project object */;
269
+ }
package/package.json ADDED
@@ -0,0 +1,122 @@
1
+ {
2
+ "name": "@cometchat/calls-sdk-react-native",
3
+ "version": "4.0.0-beta1",
4
+ "description": "Cometchat React Native Calling component for iOS and Android",
5
+ "main": "dist/index.js",
6
+ "module": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "scripts": {
9
+ "start": "webpack --mode development",
10
+ "build": "webpack --mode production",
11
+ "test": "jest",
12
+ "typescript": "tsc --noEmit",
13
+ "lint": "eslint \"**/*.{js,ts,tsx}\"",
14
+ "release": "release-it",
15
+ "example": "yarn --cwd example",
16
+ "pods": "cd example && pod-install --quiet",
17
+ "bootstrap": "yarn example && yarn && yarn pods",
18
+ "buildold": "rm -rf package && tsc && cp src/calling.js package/calling.js"
19
+ },
20
+ "files": [
21
+ "android/src/main/",
22
+ "android/build.gradle",
23
+ "dist/",
24
+ "ios/",
25
+ "cometchat-calls-sdk-react-native.podspec"
26
+ ],
27
+ "keywords": [
28
+ "react-native",
29
+ "ios",
30
+ "android"
31
+ ],
32
+ "repository": "https://github.com/github_account/react-native-react-native-cometchat-rtc",
33
+ "author": "cometchat <engineering.pro@cometchat.com> (https://github.com/cometchat-pro)",
34
+ "license": "MIT",
35
+ "bugs": {
36
+ "url": "https://github.com/github_account/react-native-react-native-cometchat-rtc/issues"
37
+ },
38
+ "homepage": "https://github.com/github_account/react-native-react-native-cometchat-rtc#readme",
39
+ "publishConfig": {
40
+ "registry": "https://registry.npmjs.org/"
41
+ },
42
+ "devDependencies": {
43
+ "@types/react": "^17.0.53",
44
+ "babel-loader": "^8.0.4",
45
+ "esbuild-loader": "^2.19.0",
46
+ "react": "^17.0.2",
47
+ "react-native": "^0.66.5",
48
+ "ts-loader": "^9.4.2",
49
+ "typescript": "^4.9.5",
50
+ "typescript-declaration-webpack-plugin": "^0.2.2",
51
+ "webpack": "^5.75.0",
52
+ "webpack-cli": "^5.0.1"
53
+ },
54
+ "peerDependencies": {
55
+ "react": "*",
56
+ "react-native": "*",
57
+ "@react-native-async-storage/async-storage": "*",
58
+ "@react-native-community/netinfo": "*",
59
+ "react-native-background-timer": "*",
60
+ "react-native-callstats": "*",
61
+ "react-native-webrtc": "*"
62
+ },
63
+ "jest": {
64
+ "preset": "react-native",
65
+ "modulePathIgnorePatterns": [
66
+ "<rootDir>/example/node_modules",
67
+ "<rootDir>/lib/"
68
+ ]
69
+ },
70
+ "commitlint": {
71
+ "extends": [
72
+ "@commitlint/config-conventional"
73
+ ]
74
+ },
75
+ "release-it": {
76
+ "git": {
77
+ "commitMessage": "chore: release ${version}",
78
+ "tagName": "v${version}"
79
+ },
80
+ "npm": {
81
+ "publish": true
82
+ },
83
+ "github": {
84
+ "release": true
85
+ },
86
+ "plugins": {
87
+ "@release-it/conventional-changelog": {
88
+ "preset": "angular"
89
+ }
90
+ }
91
+ },
92
+ "eslintConfig": {
93
+ "root": true,
94
+ "extends": [
95
+ "@react-native-community",
96
+ "prettier"
97
+ ],
98
+ "rules": {
99
+ "prettier/prettier": [
100
+ "error",
101
+ {
102
+ "quoteProps": "consistent",
103
+ "singleQuote": true,
104
+ "tabWidth": 2,
105
+ "trailingComma": "es5",
106
+ "useTabs": false
107
+ }
108
+ ]
109
+ }
110
+ },
111
+ "eslintIgnore": [
112
+ "node_modules/",
113
+ "lib/"
114
+ ],
115
+ "prettier": {
116
+ "quoteProps": "consistent",
117
+ "singleQuote": true,
118
+ "tabWidth": 2,
119
+ "trailingComma": "es5",
120
+ "useTabs": false
121
+ }
122
+ }