@cometchat/calls-sdk-react-native 4.1.1 → 4.2.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/AudioDeviceHandlerGeneric.java +1 -1
- package/android/src/main/java/com/CometChatCalls/BluetoothHeadsetMonitor.java +14 -1
- package/android/src/main/java/com/CometChatCalls/CometChatCallsPackage.java +1 -0
- package/android/src/main/java/com/CometChatCalls/CometChatCommonModule.java +48 -0
- package/dist/index.js +106 -106
- package/dist/models/CallSettings.d.ts +14 -0
- package/dist/models/Listner.d.ts +5 -0
- package/dist/models/PresenterSettings.d.ts +14 -0
- package/dist/types/ICallSettings.d.ts +1 -0
- package/dist/types/callEvents.d.ts +1 -0
- package/ios/CometChatCommonModule.h +6 -0
- package/ios/CometChatCommonModule.m +29 -0
- package/package.json +1 -1
|
@@ -35,6 +35,7 @@ export declare class CallSettings {
|
|
|
35
35
|
private ShowSwitchToVideoCallButton;
|
|
36
36
|
private AvatarMode;
|
|
37
37
|
private ShowRecordingButton;
|
|
38
|
+
private idleTimeoutPeriod;
|
|
38
39
|
private StartRecordingOnCallStart;
|
|
39
40
|
private MainVideoContainerSetting;
|
|
40
41
|
private EnableVideoTileClick;
|
|
@@ -55,6 +56,7 @@ export declare class CallSettings {
|
|
|
55
56
|
isAudioToVideoButtonEnabled(): boolean;
|
|
56
57
|
getAvatarMode(): string;
|
|
57
58
|
isRecordingButtonEnabled(): boolean;
|
|
59
|
+
getIdleTimeoutPeriod(): number;
|
|
58
60
|
shouldStartRecordingOnCallStart(): boolean;
|
|
59
61
|
getMainVideoContainerSetting(): MainVideoContainerSetting;
|
|
60
62
|
isVideoTileClickEnabled(): boolean;
|
|
@@ -77,6 +79,7 @@ export declare class CallSettingsBuilder {
|
|
|
77
79
|
/** @private */ ShowSwitchToVideoCallButton: boolean;
|
|
78
80
|
/** @private */ AvatarMode: string;
|
|
79
81
|
/** @private */ ShowRecordingButton: boolean;
|
|
82
|
+
/** @private */ idleTimeoutPeriod: number;
|
|
80
83
|
/** @private */ StartRecordingOnCallStart: boolean;
|
|
81
84
|
/** @private */ MainVideoContainerSetting: MainVideoContainerSetting;
|
|
82
85
|
/** @private */ EnableVideoTileClick: boolean;
|
|
@@ -223,6 +226,17 @@ export declare class CallSettingsBuilder {
|
|
|
223
226
|
* @returns
|
|
224
227
|
*/
|
|
225
228
|
showRecordingButton(showRecordingButton?: boolean): this;
|
|
229
|
+
/**
|
|
230
|
+
*
|
|
231
|
+
* @param {number} idleTimeoutPeriod
|
|
232
|
+
* This method sets the idle timeout period for the call.
|
|
233
|
+
* If set and you are the only one in call, the call will end
|
|
234
|
+
* after the idle timeout period, giving you the option to
|
|
235
|
+
* extend the call 60 seconds before the call ends.
|
|
236
|
+
* Default value is 180 seconds.
|
|
237
|
+
* @returns
|
|
238
|
+
*/
|
|
239
|
+
setIdleTimeoutPeriod(idleTimeoutPeriod?: number): this;
|
|
226
240
|
/**
|
|
227
241
|
*
|
|
228
242
|
* @param {boolean} startRecordingOnCallStart
|
package/dist/models/Listner.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ interface IOngoingCallListener {
|
|
|
10
10
|
onUserMuted: (test: Partial<ICallEventsData["onUserMuted"]>) => void;
|
|
11
11
|
onCallSwitchedToVideo: (data: Partial<ICallEventsData['onCallSwitchedToVideo']>) => void;
|
|
12
12
|
onCallEnded: () => void;
|
|
13
|
+
onSessionTimeout: () => void;
|
|
13
14
|
onCallEndButtonPressed: () => void;
|
|
14
15
|
onAudioModesUpdated: (any: any) => void;
|
|
15
16
|
onError: (error: CometChatCallsException) => void;
|
|
@@ -35,6 +36,10 @@ export declare class OngoingCallListener {
|
|
|
35
36
|
* This event is triggered when the call is ended.
|
|
36
37
|
*/
|
|
37
38
|
onCallEnded?: IOngoingCallListener["onCallEnded"];
|
|
39
|
+
/**
|
|
40
|
+
* This event is triggered when the call is ended due to session timeout.
|
|
41
|
+
*/
|
|
42
|
+
onSessionTimeout?: IOngoingCallListener["onSessionTimeout"];
|
|
38
43
|
/**
|
|
39
44
|
* This event is triggered when end call button is pressed.
|
|
40
45
|
*/
|
|
@@ -32,6 +32,7 @@ export declare class PresenterSettings {
|
|
|
32
32
|
private StartVideoMuted;
|
|
33
33
|
private defaultAudioMode;
|
|
34
34
|
private ShowRecordingButton;
|
|
35
|
+
private idleTimeoutPeriod;
|
|
35
36
|
constructor(builder: PresenterSettingsBuilder);
|
|
36
37
|
isAudioOnlyCall(): boolean;
|
|
37
38
|
getIsPresenter(): boolean;
|
|
@@ -46,6 +47,7 @@ export declare class PresenterSettings {
|
|
|
46
47
|
getStartWithVideoMuted(): boolean;
|
|
47
48
|
getDefaultAudioMode(): string;
|
|
48
49
|
isRecordingButtonEnabled(): boolean;
|
|
50
|
+
getIdleTimeoutPeriod(): number;
|
|
49
51
|
}
|
|
50
52
|
export declare class PresenterSettingsBuilder {
|
|
51
53
|
/** @private */ defaultLayout: boolean;
|
|
@@ -61,6 +63,7 @@ export declare class PresenterSettingsBuilder {
|
|
|
61
63
|
/** @private */ StartVideoMuted: boolean;
|
|
62
64
|
/** @private */ defaultAudioMode: typeof CallConstants.AUDIO_MODE[keyof typeof CallConstants.AUDIO_MODE];
|
|
63
65
|
/** @private */ ShowRecordingButton: boolean;
|
|
66
|
+
/** @private */ idleTimeoutPeriod: number;
|
|
64
67
|
/**
|
|
65
68
|
*
|
|
66
69
|
* @param {boolean} defaultLayout
|
|
@@ -186,6 +189,17 @@ export declare class PresenterSettingsBuilder {
|
|
|
186
189
|
* @returns
|
|
187
190
|
*/
|
|
188
191
|
showRecordingButton(showRecordingButton?: boolean): this;
|
|
192
|
+
/**
|
|
193
|
+
*
|
|
194
|
+
* @param {number} idleTimeoutPeriod
|
|
195
|
+
* This method sets the idle timeout period for the call.
|
|
196
|
+
* If set and you are the only one in call, the call will end
|
|
197
|
+
* after the idle timeout period, giving you the option to
|
|
198
|
+
* extend the call 60 seconds before the call ends.
|
|
199
|
+
* Default value is 180 seconds.
|
|
200
|
+
* @returns
|
|
201
|
+
*/
|
|
202
|
+
setIdleTimeoutPeriod(idleTimeoutPeriod: number): this;
|
|
189
203
|
/**
|
|
190
204
|
* This method will return an object of the CallSettings class.
|
|
191
205
|
* @returns {PresenterSettings}
|
|
@@ -3,6 +3,7 @@ export interface ICallSettings {
|
|
|
3
3
|
screenShareMode?: "default" | "presenter";
|
|
4
4
|
ShowEndCallButton?: boolean;
|
|
5
5
|
ShowRecordingButton?: boolean;
|
|
6
|
+
idleTimeoutPeriod?: number;
|
|
6
7
|
StartRecordingOnCallStart?: boolean;
|
|
7
8
|
ShowMuteAudioButton?: boolean;
|
|
8
9
|
ShowPauseVideoButton?: boolean;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
#import "CometChatCommonModule.h"
|
|
2
|
+
#import <UIKit/UIKit.h>
|
|
3
|
+
|
|
4
|
+
@implementation CometChatCommonModule {
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
RCT_EXPORT_MODULE();
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
static UIInterfaceOrientationMask _orientationMask = UIInterfaceOrientationMaskAll;
|
|
11
|
+
|
|
12
|
+
+ (void)setOrientation: (UIInterfaceOrientationMask)orientationMask {
|
|
13
|
+
_orientationMask = orientationMask;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
+ (UIInterfaceOrientationMask)getOrientation {
|
|
17
|
+
return _orientationMask;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
RCT_EXPORT_METHOD(lockToPortrait) {
|
|
21
|
+
[CometChatCommonModule setOrientation:UIInterfaceOrientationMaskPortrait];
|
|
22
|
+
[UIViewController attemptRotationToDeviceOrientation];
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
RCT_EXPORT_METHOD(unlockAllOrientations) {
|
|
26
|
+
[CometChatCommonModule setOrientation:UIInterfaceOrientationMaskAll];
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@end
|