@cometchat/calls-sdk-react-native 4.0.9 → 4.1.1
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/android/src/main/java/com/CometChatCalls/CallNotificationService.java +93 -0
- package/android/src/main/java/com/CometChatCalls/CallNotificationServiceModule.java +48 -0
- package/android/src/main/java/com/CometChatCalls/CometChatCallsPackage.java +13 -3
- package/android/src/main/java/com/CometChatCalls/PictureInPictureModule.java +133 -0
- package/android/src/main/res/drawable-mdpi/callingcomponent_icons_headphones_pluged.png +0 -0
- package/dist/CometChatErrorConstants.d.ts +124 -124
- package/dist/Constants.d.ts +724 -724
- package/dist/Helper copy.d.ts +1 -1
- package/dist/Helper.d.ts +7 -7
- package/dist/api/APIHandler.d.ts +42 -42
- package/dist/api/endpoints.d.ts +7 -7
- package/dist/api/helper.d.ts +69 -69
- package/dist/api/index.d.ts +2 -2
- package/dist/constants/CallConstants.d.ts +136 -136
- package/dist/constants/index.d.ts +1 -1
- package/dist/defaultCallsettings.d.ts +2 -2
- package/dist/index.d.ts +9 -9
- package/dist/index.js +80 -80
- package/dist/models/CallAppSettings.d.ts +42 -42
- package/dist/models/CallGroup.d.ts +14 -14
- package/dist/models/CallLog.d.ts +276 -276
- package/dist/models/CallLogFilterParams.d.ts +97 -97
- package/dist/models/CallSettings.d.ts +316 -316
- package/dist/models/CallUser.d.ts +14 -14
- package/dist/models/CometChatCallLogs.d.ts +193 -193
- package/dist/models/CometChatCalls.d.ts +110 -110
- package/dist/models/CometChatCallsComponent.d.ts +13 -13
- package/dist/models/CometChatCallsComponentCore.d.ts +18 -18
- package/dist/models/CometChatCallsException.d.ts +7 -7
- package/dist/models/CometChatPresenterComponent.d.ts +13 -13
- package/dist/models/ErrorModel.d.ts +11 -11
- package/dist/models/Listner.d.ts +64 -64
- package/dist/models/ListnerHandler.d.ts +10 -10
- package/dist/models/MessageComponent.d.ts +7 -7
- package/dist/models/Participant.d.ts +184 -184
- package/dist/models/PresenterSettings.d.ts +194 -194
- package/dist/models/RTCUser.d.ts +18 -18
- package/dist/models/Recording.d.ts +86 -86
- package/dist/models/index.d.ts +9 -9
- package/dist/types/ICallAppSettings.d.ts +6 -6
- package/dist/types/ICallSettings.d.ts +60 -60
- package/dist/types/RTCUser.d.ts +6 -6
- package/dist/types/callEvents.d.ts +53 -53
- package/dist/types/common.d.ts +18 -18
- package/dist/types/index.d.ts +2 -2
- package/ios/AudioMode.m +15 -0
- package/package.json +2 -2
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
import { ColorValue, Position } from "./common";
|
|
2
|
-
export interface ICallSettings {
|
|
3
|
-
screenShareMode?: "default" | "presenter";
|
|
4
|
-
ShowEndCallButton?: boolean;
|
|
5
|
-
ShowRecordingButton?: boolean;
|
|
6
|
-
StartRecordingOnCallStart?: boolean;
|
|
7
|
-
ShowMuteAudioButton?: boolean;
|
|
8
|
-
ShowPauseVideoButton?: boolean;
|
|
9
|
-
ShowScreenShareButton?: boolean;
|
|
10
|
-
ShowSwitchToVideoCallButton?: boolean;
|
|
11
|
-
defaultLayout?: boolean;
|
|
12
|
-
isAudioCall?: boolean;
|
|
13
|
-
isAudioOnly?: boolean;
|
|
14
|
-
user: {
|
|
15
|
-
name: string;
|
|
16
|
-
avatar?: string;
|
|
17
|
-
uid: string;
|
|
18
|
-
jwt?: string;
|
|
19
|
-
};
|
|
20
|
-
mode?: "DEFAULT" | "SPOTLIGHT" | "TILE" | "SIDEBAR";
|
|
21
|
-
StartAudioMuted?: boolean;
|
|
22
|
-
StartVideoMuted?: boolean;
|
|
23
|
-
ShowSwitchModeButton?: boolean;
|
|
24
|
-
ShowVirtualBackgroundSetting?: boolean;
|
|
25
|
-
VirtualBackground?: {
|
|
26
|
-
AllowBackgroundBlur?: boolean;
|
|
27
|
-
AllowUserImages?: boolean;
|
|
28
|
-
ShowDefaultImages?: boolean;
|
|
29
|
-
SetImages?: string[];
|
|
30
|
-
EnforceBackgroundBlur?: 0 | 1 | 2;
|
|
31
|
-
EnforceBackgroundImage?: string;
|
|
32
|
-
};
|
|
33
|
-
AvatarMode?: "circle";
|
|
34
|
-
MainVideoContainerSetting?: {
|
|
35
|
-
videoFit?: "contain" | "cover";
|
|
36
|
-
zoomButton?: {
|
|
37
|
-
visible?: boolean;
|
|
38
|
-
visibility?: boolean;
|
|
39
|
-
position?: Position;
|
|
40
|
-
};
|
|
41
|
-
nameLabel?: {
|
|
42
|
-
visible?: boolean;
|
|
43
|
-
visibility?: boolean;
|
|
44
|
-
position?: Position;
|
|
45
|
-
color?: ColorValue;
|
|
46
|
-
};
|
|
47
|
-
network?: {
|
|
48
|
-
visible?: boolean;
|
|
49
|
-
visibility?: boolean;
|
|
50
|
-
position?: Position;
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
|
-
customCSS?: string;
|
|
54
|
-
analyticsSettings?: {
|
|
55
|
-
ANALYTICS_HOST: string;
|
|
56
|
-
ANALYTICS_VERSION: string;
|
|
57
|
-
ANALYTICS_PING_DISABLED: boolean;
|
|
58
|
-
ANALYTICS_USE_SSL: boolean;
|
|
59
|
-
};
|
|
60
|
-
}
|
|
1
|
+
import { ColorValue, Position } from "./common";
|
|
2
|
+
export interface ICallSettings {
|
|
3
|
+
screenShareMode?: "default" | "presenter";
|
|
4
|
+
ShowEndCallButton?: boolean;
|
|
5
|
+
ShowRecordingButton?: boolean;
|
|
6
|
+
StartRecordingOnCallStart?: boolean;
|
|
7
|
+
ShowMuteAudioButton?: boolean;
|
|
8
|
+
ShowPauseVideoButton?: boolean;
|
|
9
|
+
ShowScreenShareButton?: boolean;
|
|
10
|
+
ShowSwitchToVideoCallButton?: boolean;
|
|
11
|
+
defaultLayout?: boolean;
|
|
12
|
+
isAudioCall?: boolean;
|
|
13
|
+
isAudioOnly?: boolean;
|
|
14
|
+
user: {
|
|
15
|
+
name: string;
|
|
16
|
+
avatar?: string;
|
|
17
|
+
uid: string;
|
|
18
|
+
jwt?: string;
|
|
19
|
+
};
|
|
20
|
+
mode?: "DEFAULT" | "SPOTLIGHT" | "TILE" | "SIDEBAR";
|
|
21
|
+
StartAudioMuted?: boolean;
|
|
22
|
+
StartVideoMuted?: boolean;
|
|
23
|
+
ShowSwitchModeButton?: boolean;
|
|
24
|
+
ShowVirtualBackgroundSetting?: boolean;
|
|
25
|
+
VirtualBackground?: {
|
|
26
|
+
AllowBackgroundBlur?: boolean;
|
|
27
|
+
AllowUserImages?: boolean;
|
|
28
|
+
ShowDefaultImages?: boolean;
|
|
29
|
+
SetImages?: string[];
|
|
30
|
+
EnforceBackgroundBlur?: 0 | 1 | 2;
|
|
31
|
+
EnforceBackgroundImage?: string;
|
|
32
|
+
};
|
|
33
|
+
AvatarMode?: "circle";
|
|
34
|
+
MainVideoContainerSetting?: {
|
|
35
|
+
videoFit?: "contain" | "cover";
|
|
36
|
+
zoomButton?: {
|
|
37
|
+
visible?: boolean;
|
|
38
|
+
visibility?: boolean;
|
|
39
|
+
position?: Position;
|
|
40
|
+
};
|
|
41
|
+
nameLabel?: {
|
|
42
|
+
visible?: boolean;
|
|
43
|
+
visibility?: boolean;
|
|
44
|
+
position?: Position;
|
|
45
|
+
color?: ColorValue;
|
|
46
|
+
};
|
|
47
|
+
network?: {
|
|
48
|
+
visible?: boolean;
|
|
49
|
+
visibility?: boolean;
|
|
50
|
+
position?: Position;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
customCSS?: string;
|
|
54
|
+
analyticsSettings?: {
|
|
55
|
+
ANALYTICS_HOST: string;
|
|
56
|
+
ANALYTICS_VERSION: string;
|
|
57
|
+
ANALYTICS_PING_DISABLED: boolean;
|
|
58
|
+
ANALYTICS_USE_SSL: boolean;
|
|
59
|
+
};
|
|
60
|
+
}
|
package/dist/types/RTCUser.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export interface IRTCUser {
|
|
2
|
-
name: string;
|
|
3
|
-
avatar: string;
|
|
4
|
-
joinnedAt: string;
|
|
5
|
-
uid: string;
|
|
6
|
-
}
|
|
1
|
+
export interface IRTCUser {
|
|
2
|
+
name: string;
|
|
3
|
+
avatar: string;
|
|
4
|
+
joinnedAt: string;
|
|
5
|
+
uid: string;
|
|
6
|
+
}
|
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
interface User {
|
|
2
|
-
name: string;
|
|
3
|
-
avatar: string;
|
|
4
|
-
isVideoMuted: string;
|
|
5
|
-
isAudioMuted: string;
|
|
6
|
-
isLocalUser: string;
|
|
7
|
-
id: string;
|
|
8
|
-
uid: string;
|
|
9
|
-
}
|
|
10
|
-
export interface ICallEventsData {
|
|
11
|
-
readonly onUserJoined: {
|
|
12
|
-
name: string;
|
|
13
|
-
avatar: string;
|
|
14
|
-
joinnedAt: string;
|
|
15
|
-
uid: string;
|
|
16
|
-
isAudioMuted: boolean;
|
|
17
|
-
isLocalUser: boolean;
|
|
18
|
-
isVideoMuted: boolean;
|
|
19
|
-
};
|
|
20
|
-
readonly onUserLeft: {
|
|
21
|
-
name: string;
|
|
22
|
-
avatar: string;
|
|
23
|
-
joinnedAt: string;
|
|
24
|
-
uid: string;
|
|
25
|
-
};
|
|
26
|
-
readonly onUserListUpdated: Array<{
|
|
27
|
-
name: string;
|
|
28
|
-
avatar: string;
|
|
29
|
-
uid: string;
|
|
30
|
-
}>;
|
|
31
|
-
readonly onMediaDeviceListUpdated: {
|
|
32
|
-
videoInputDevices: MediaDeviceInfo[];
|
|
33
|
-
audioInputDevices: MediaDeviceInfo[];
|
|
34
|
-
audioOutputDevices: MediaDeviceInfo[];
|
|
35
|
-
};
|
|
36
|
-
readonly onRecordingStarted: Partial<User & {
|
|
37
|
-
recordId: string;
|
|
38
|
-
}>;
|
|
39
|
-
readonly onRecordingStopped: Partial<User & {
|
|
40
|
-
recordId: string;
|
|
41
|
-
}>;
|
|
42
|
-
readonly onCallSwitchedToVideo: {
|
|
43
|
-
sessionId: string;
|
|
44
|
-
initiator: Partial<User>;
|
|
45
|
-
};
|
|
46
|
-
readonly onCallEnded: {};
|
|
47
|
-
readonly onUserMuted: {
|
|
48
|
-
name: string;
|
|
49
|
-
avatar: string;
|
|
50
|
-
uid: string;
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
export {};
|
|
1
|
+
interface User {
|
|
2
|
+
name: string;
|
|
3
|
+
avatar: string;
|
|
4
|
+
isVideoMuted: string;
|
|
5
|
+
isAudioMuted: string;
|
|
6
|
+
isLocalUser: string;
|
|
7
|
+
id: string;
|
|
8
|
+
uid: string;
|
|
9
|
+
}
|
|
10
|
+
export interface ICallEventsData {
|
|
11
|
+
readonly onUserJoined: {
|
|
12
|
+
name: string;
|
|
13
|
+
avatar: string;
|
|
14
|
+
joinnedAt: string;
|
|
15
|
+
uid: string;
|
|
16
|
+
isAudioMuted: boolean;
|
|
17
|
+
isLocalUser: boolean;
|
|
18
|
+
isVideoMuted: boolean;
|
|
19
|
+
};
|
|
20
|
+
readonly onUserLeft: {
|
|
21
|
+
name: string;
|
|
22
|
+
avatar: string;
|
|
23
|
+
joinnedAt: string;
|
|
24
|
+
uid: string;
|
|
25
|
+
};
|
|
26
|
+
readonly onUserListUpdated: Array<{
|
|
27
|
+
name: string;
|
|
28
|
+
avatar: string;
|
|
29
|
+
uid: string;
|
|
30
|
+
}>;
|
|
31
|
+
readonly onMediaDeviceListUpdated: {
|
|
32
|
+
videoInputDevices: MediaDeviceInfo[];
|
|
33
|
+
audioInputDevices: MediaDeviceInfo[];
|
|
34
|
+
audioOutputDevices: MediaDeviceInfo[];
|
|
35
|
+
};
|
|
36
|
+
readonly onRecordingStarted: Partial<User & {
|
|
37
|
+
recordId: string;
|
|
38
|
+
}>;
|
|
39
|
+
readonly onRecordingStopped: Partial<User & {
|
|
40
|
+
recordId: string;
|
|
41
|
+
}>;
|
|
42
|
+
readonly onCallSwitchedToVideo: {
|
|
43
|
+
sessionId: string;
|
|
44
|
+
initiator: Partial<User>;
|
|
45
|
+
};
|
|
46
|
+
readonly onCallEnded: {};
|
|
47
|
+
readonly onUserMuted: {
|
|
48
|
+
name: string;
|
|
49
|
+
avatar: string;
|
|
50
|
+
uid: string;
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
export {};
|
package/dist/types/common.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { REGION } from "../Constants";
|
|
2
|
-
import { CallSettings } from "../models/CallSettings";
|
|
3
|
-
export type Position = typeof CallSettings.POSITION[keyof typeof CallSettings.POSITION];
|
|
4
|
-
export type AspectRatio = typeof CallSettings.ASPECT_RATIO[keyof typeof CallSettings.ASPECT_RATIO];
|
|
5
|
-
export type ColorRGB = `rgb(${number}, ${number}, ${number})`;
|
|
6
|
-
export type ColorRGBA = `rgba(${number}, ${number}, ${number}, ${number})`;
|
|
7
|
-
export type ColorHEX = `#${string}`;
|
|
8
|
-
type _ColorValue = ColorRGB | ColorRGBA | ColorHEX;
|
|
9
|
-
export type ColorValue = _ColorValue | Omit<string, _ColorValue>;
|
|
10
|
-
type _Region = keyof typeof REGION;
|
|
11
|
-
export type Region = _Region | Omit<string, _Region>;
|
|
12
|
-
type _THost = `rtc-${_Region}.cometchat.io`;
|
|
13
|
-
export type Host = _THost | Omit<string, _THost>;
|
|
14
|
-
export interface AudioMode {
|
|
15
|
-
isSelected: boolean;
|
|
16
|
-
mode: string;
|
|
17
|
-
}
|
|
18
|
-
export {};
|
|
1
|
+
import { REGION } from "../Constants";
|
|
2
|
+
import { CallSettings } from "../models/CallSettings";
|
|
3
|
+
export type Position = typeof CallSettings.POSITION[keyof typeof CallSettings.POSITION];
|
|
4
|
+
export type AspectRatio = typeof CallSettings.ASPECT_RATIO[keyof typeof CallSettings.ASPECT_RATIO];
|
|
5
|
+
export type ColorRGB = `rgb(${number}, ${number}, ${number})`;
|
|
6
|
+
export type ColorRGBA = `rgba(${number}, ${number}, ${number}, ${number})`;
|
|
7
|
+
export type ColorHEX = `#${string}`;
|
|
8
|
+
type _ColorValue = ColorRGB | ColorRGBA | ColorHEX;
|
|
9
|
+
export type ColorValue = _ColorValue | Omit<string, _ColorValue>;
|
|
10
|
+
type _Region = keyof typeof REGION;
|
|
11
|
+
export type Region = _Region | Omit<string, _Region>;
|
|
12
|
+
type _THost = `rtc-${_Region}.cometchat.io`;
|
|
13
|
+
export type Host = _THost | Omit<string, _THost>;
|
|
14
|
+
export interface AudioMode {
|
|
15
|
+
isSelected: boolean;
|
|
16
|
+
mode: string;
|
|
17
|
+
}
|
|
18
|
+
export {};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./ICallAppSettings";
|
|
2
|
-
export * from "./ICallSettings";
|
|
1
|
+
export * from "./ICallAppSettings";
|
|
2
|
+
export * from "./ICallSettings";
|
package/ios/AudioMode.m
CHANGED
|
@@ -245,6 +245,21 @@ RCT_EXPORT_METHOD(updateDeviceList) {
|
|
|
245
245
|
[self notifyDevicesChanged];
|
|
246
246
|
}
|
|
247
247
|
|
|
248
|
+
RCT_EXPORT_METHOD(releaseAudioSession)
|
|
249
|
+
{
|
|
250
|
+
RTCAudioSession *session = [RTCAudioSession sharedInstance];
|
|
251
|
+
[session lockForConfiguration];
|
|
252
|
+
NSError *error = nil;
|
|
253
|
+
[session setActive:NO error:&error];
|
|
254
|
+
[session unlockForConfiguration];
|
|
255
|
+
|
|
256
|
+
if (error) {
|
|
257
|
+
NSLog(@"Failed to release audio session: %@", error.localizedDescription);
|
|
258
|
+
} else {
|
|
259
|
+
NSLog(@"Audio session released successfully");
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
|
|
248
263
|
RCT_EXPORT_METHOD(removeListener) {
|
|
249
264
|
RTCAudioSession *session = [RTCAudioSession sharedInstance];
|
|
250
265
|
[session removeDelegate:self];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cometchat/calls-sdk-react-native",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.1.1",
|
|
4
4
|
"description": "Cometchat React Native Calling component for iOS and Android",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
],
|
|
32
32
|
"repository": "https://github.com/github_account/react-native-react-native-cometchat-rtc",
|
|
33
33
|
"author": "cometchat <engineering.pro@cometchat.com> (https://github.com/cometchat-pro)",
|
|
34
|
-
"license": "
|
|
34
|
+
"license": "https://www.cometchat.com/legal-terms-of-service",
|
|
35
35
|
"bugs": {
|
|
36
36
|
"url": "https://github.com/github_account/react-native-react-native-cometchat-rtc/issues"
|
|
37
37
|
},
|