@cometchat/calls-sdk-javascript 4.0.12 → 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.
@@ -102,6 +102,7 @@ export declare const CallConstants: {
102
102
  readonly KEYS: {
103
103
  readonly POSITION: "position";
104
104
  readonly VISIBILITY: "visible";
105
+ readonly LEGACY_VISIBILITY: "visibility";
105
106
  readonly COLOR: "color";
106
107
  };
107
108
  };
@@ -33,6 +33,7 @@ export declare class CallSettings {
33
33
  private analyticsSettings;
34
34
  private customCSS;
35
35
  private ShowRecordingButton;
36
+ private idleTimeoutPeriod;
36
37
  private StartRecordingOnCallStart;
37
38
  private callListener;
38
39
  private ShowSwitchToVideoCallButton;
@@ -42,6 +43,7 @@ export declare class CallSettings {
42
43
  constructor(builder?: CallSettingsBuilder);
43
44
  getCallListener(): OngoingCallListener;
44
45
  isRecordingButtonEnabled(): boolean;
46
+ getIdleTimeoutPeriod(): number;
45
47
  shouldStartRecordingOnCallStart(): boolean;
46
48
  getCustomCSS(): string;
47
49
  isAudioOnlyCall(): boolean;
@@ -76,6 +78,7 @@ export declare class CallSettingsBuilder {
76
78
  /** @private */ analyticsSettings: Object;
77
79
  /** @private */ customCSS: string;
78
80
  /** @private */ ShowRecordingButton: boolean;
81
+ /** @private */ idleTimeoutPeriod: number;
79
82
  /** @private */ StartRecordingOnCallStart: boolean;
80
83
  /** @private */ ShowSwitchToVideoCallButton: boolean;
81
84
  /** @private */ virtualBackground: VirtualBackground;
@@ -201,6 +204,17 @@ export declare class CallSettingsBuilder {
201
204
  * @returns {CallSettingsBuilder} Returns the CallSettingsBuilder instance
202
205
  */
203
206
  showRecordingButton(showRecordingButton: boolean): this;
207
+ /**
208
+ *
209
+ * @param {number} idleTimeoutPeriod
210
+ * This method sets the idle timeout period for the call.
211
+ * If set and you are the only one in call, the call will end
212
+ * after the idle timeout period, giving you the option to
213
+ * extend the call 60 seconds before the call ends.
214
+ * Default value is 180 seconds.
215
+ * @returns {CallSettingsBuilder} Returns the CallSettingsBuilder instance
216
+ */
217
+ setIdleTimeoutPeriod(idleTimeoutPeriod: number): this;
204
218
  /**
205
219
  *
206
220
  * @param {boolean} startRecordingOnCallStart
@@ -6,13 +6,14 @@ interface IOngoingCallListener {
6
6
  onUserListUpdated: (userList: Partial<ICallEventsData["onUserListUpdated"]>) => void;
7
7
  onMediaDeviceListUpdated: (devices: Partial<ICallEventsData["onMediaDeviceListUpdated"]>) => void;
8
8
  onRecordingStarted: (event: Partial<ICallEventsData["onRecordingStarted"]>) => void;
9
- onRecordingStopped: (event: Partial<ICallEventsData["onRecordingStopped"]>) => void;
9
+ onRecordingStopped: () => void;
10
10
  onScreenShareStarted: () => void;
11
11
  onScreenShareStopped: () => void;
12
12
  onUserMuted: (event: Partial<ICallEventsData["onUserMuted"]>) => void;
13
13
  onUserUnMuted: (event: Partial<ICallEventsData["onUserUnMuted"]>) => void;
14
14
  onCallSwitchedToVideo: (event: Partial<ICallEventsData["onCallSwitchedToVideo"]>) => void;
15
15
  onCallEnded: () => void;
16
+ onSessionTimeout: () => void;
16
17
  onCallEndButtonPressed: () => void;
17
18
  onError: (error: CometChatCallsException) => void;
18
19
  }
@@ -73,6 +74,10 @@ export declare class OngoingCallListener {
73
74
  * This event is triggered when the call is ended.
74
75
  */
75
76
  onCallEnded?: IOngoingCallListener["onCallEnded"];
77
+ /**
78
+ * This event is triggered when the call is ended due to session timeout.
79
+ */
80
+ onSessionTimeout?: IOngoingCallListener["onSessionTimeout"];
76
81
  /**
77
82
  * This event is triggered when an error occurs.
78
83
  */
@@ -34,6 +34,7 @@ export declare class PresenterSettings {
34
34
  private analyticsSettings;
35
35
  private customCSS;
36
36
  private ShowRecordingButton;
37
+ private idleTimeoutPeriod;
37
38
  private StartRecordingOnCallStart;
38
39
  private callListener;
39
40
  private ShowSwitchToVideoCallButton;
@@ -43,6 +44,7 @@ export declare class PresenterSettings {
43
44
  constructor(builder?: PresenterSettingsBuilder);
44
45
  getCallListener(): OngoingCallListener;
45
46
  isRecordingButtonEnabled(): boolean;
47
+ getIdleTimeoutPeriod(): number;
46
48
  shouldStartRecordingOnCallStart(): boolean;
47
49
  getCustomCSS(): string;
48
50
  isAudioOnlyCall(): boolean;
@@ -78,6 +80,7 @@ export declare class PresenterSettingsBuilder {
78
80
  /** @private */ analyticsSettings: Object;
79
81
  /** @private */ customCSS: string;
80
82
  /** @private */ ShowRecordingButton: boolean;
83
+ /** @private */ idleTimeoutPeriod: number;
81
84
  /** @private */ StartRecordingOnCallStart: boolean;
82
85
  /** @private */ ShowSwitchToVideoCallButton: boolean;
83
86
  /** @private */ virtualBackground: VirtualBackground;
@@ -206,6 +209,17 @@ export declare class PresenterSettingsBuilder {
206
209
  * @returns {PresenterSettingsBuilder} Returns the PresenterSettingsBuilder instance
207
210
  */
208
211
  showRecordingButton(showRecordingButton: boolean): this;
212
+ /**
213
+ *
214
+ * @param {number} idleTimeoutPeriod
215
+ * This method sets the idle timeout period for the call.
216
+ * If set and you are the only one in call, the call will end
217
+ * after the idle timeout period, giving you the option to
218
+ * extend the call 60 seconds before the call ends.
219
+ * Default value is 180 seconds.
220
+ * @returns {PresenterSettingsBuilder} Returns the PresenterSettingsBuilder instance
221
+ */
222
+ setIdleTimeoutPeriod(idleTimeoutPeriod: number): this;
209
223
  /**
210
224
  *
211
225
  * @param {boolean} startRecordingOnCallStart
@@ -4,6 +4,7 @@ export interface ICallsettings {
4
4
  screenShareMode?: "default" | "presenter";
5
5
  ShowEndCallButton?: boolean;
6
6
  ShowRecordingButton?: boolean;
7
+ idleTimeoutPeriod?: number;
7
8
  StartRecordingOnCallStart?: boolean;
8
9
  ShowMuteAudioButton?: boolean;
9
10
  ShowPauseVideoButton?: boolean;
@@ -1,5 +1,5 @@
1
1
  import { AnyProperties } from "./common";
2
- export type CallingEventsInternal = "initialDeviceList" | "onDeviceChange" | "onUserJoined" | "onUserLeft" | "onUserListChanged" | "SCREEN_SHARE_STARTED" | "SCREEN_SHARE_ENDED" | "SCREEN_SHARE_ENDED" | "hangup" | "onCallSwitchedToVideo" | "onRecordingToggled" | "onCallEndButtonPressed" | "onUserMuted" | "onUserUnMuted";
2
+ export type CallingEventsInternal = "initialDeviceList" | "onDeviceChange" | "onUserJoined" | "onUserLeft" | "onUserListChanged" | "SCREEN_SHARE_STARTED" | "SCREEN_SHARE_ENDED" | "SCREEN_SHARE_ENDED" | "hangup" | "onSessionTimeout" | "onCallSwitchedToVideo" | "onRecordingToggled" | "onCallEndButtonPressed" | "onUserMuted" | "onUserUnMuted";
3
3
  interface IAVDevice {
4
4
  deviceId: string;
5
5
  kind: string;
@@ -52,12 +52,7 @@ export interface ICallEventsData {
52
52
  onScreenShareStarted: {};
53
53
  onScreenShareStopped: {};
54
54
  onRecordingStarted: {
55
- recordingStarted: true;
56
- user: Partial<IUserWithExtraData>;
57
- };
58
- onRecordingStopped: {
59
- recordingStarted: false;
60
- user: Partial<IUserWithExtraData>;
55
+ user: Pick<IUserWithExtraData, "name" | "uid">;
61
56
  };
62
57
  onMediaDeviceListUpdated: {
63
58
  videoInputDevices: IAVDevice[];
@@ -65,6 +60,7 @@ export interface ICallEventsData {
65
60
  audioOutputDevices: IAVDevice[];
66
61
  };
67
62
  onCallEnded: {};
63
+ onSessionTimeout: {};
68
64
  onCallSwitchedToVideo: {
69
65
  sessionId: string;
70
66
  initiator: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cometchat/calls-sdk-javascript",
3
- "version": "4.0.12",
3
+ "version": "4.1.1",
4
4
  "description": "Cometchat's Javascript SDK for In-app Calling.",
5
5
  "main": "pack/index.js",
6
6
  "module": "pack/index.js",
@@ -1 +0,0 @@
1
- /*! For license information please see index.js.LICENSE.txt */