@cometchat/calls-sdk-javascript 5.0.0-beta.1 → 5.0.0-beta.2

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/dist/index.d.ts CHANGED
@@ -877,6 +877,14 @@ declare class CallSettingsBuilder {
877
877
  * @returns
878
878
  */
879
879
  setVirtualBackground(virtualBackground: VirtualBackground): this;
880
+ /**
881
+ *
882
+ * @param {MainVideoContainerSetting} mainVideoContainerSetting
883
+ * This method can be used to customize the main video container.
884
+ * @deprecated This method is deprecated and not supported.
885
+ * @returns
886
+ */
887
+ setMainVideoContainerSetting(_mainVideoContainerSetting: MainVideoContainerSetting): this;
880
888
  /**
881
889
  *
882
890
  * @param {boolean} showVirtualBackgroundSetting
@@ -952,6 +960,10 @@ export declare class CometChatCalls extends SessionMethods {
952
960
  };
953
961
  static CallLogRequestBuilder: typeof CallLogRequestBuilder;
954
962
  static CallLog: typeof CallLog;
963
+ /** @deprecated */
964
+ static MainVideoContainerSetting: typeof MainVideoContainerSetting;
965
+ /** @deprecated */
966
+ static CallSettings: typeof CallSettings;
955
967
  /**
956
968
  * @deprecated Use CometChatCalls.init passing object directly.
957
969
  */
@@ -1010,7 +1022,7 @@ export declare class CometChatCalls extends SessionMethods {
1010
1022
  static startSession(callToken: string, callSettings: CallSettings, container: HTMLElement): Promise<Result<void, VerifyTokenException>>;
1011
1023
  private static _connectToRoom;
1012
1024
  private static connectToRoom;
1013
- static joinSession(callToken: string, callSettings: SessionSettings, container: HTMLElement): Promise<Result<void, VerifyTokenException>>;
1025
+ static joinSession(callToken: string, sessionSettings: SessionSettings, container: HTMLElement): Promise<Result<void, VerifyTokenException>>;
1014
1026
  static getAudioInputDevices(): AudioInputDevice_2[];
1015
1027
  static getVideoInputDevices(): VideoInputDevice_2[];
1016
1028
  static getAudioOutputDevices(): AudioOutputDevice_2[];
@@ -1057,7 +1069,6 @@ declare type ConfigStateBoth = {
1057
1069
  hideToggleVideoButton: boolean;
1058
1070
  hideParticipantListButton: boolean;
1059
1071
  hideChatButton: boolean;
1060
- hideScreenSharingButton: boolean;
1061
1072
  hideSessionTimer: boolean;
1062
1073
  hideNetworkIndicator: boolean;
1063
1074
  hideRecordingStatusIndicator: boolean;
@@ -1072,6 +1083,7 @@ declare type ConfigStateBoth = {
1072
1083
  enableSpotlightDrag: boolean;
1073
1084
  enableSpotlightSwap: boolean;
1074
1085
  isPeerCall: boolean;
1086
+ enableNotifications: boolean;
1075
1087
  };
1076
1088
 
1077
1089
  declare type ConfigStateWeb = {
@@ -1079,7 +1091,16 @@ declare type ConfigStateWeb = {
1079
1091
  audioInputDeviceId?: string;
1080
1092
  audioOutputDeviceId?: string;
1081
1093
  videoInputDeviceId?: string;
1094
+ hideScreenSharingButton: boolean;
1082
1095
  hideVirtualBackgroundButton: boolean;
1096
+ /**
1097
+ * @unstable This API may change or be removed in a future release.
1098
+ * When enabled, the SDK renders only remote audio elements without any
1099
+ * visual UI (no video tiles, controls, or overlays). This allows the
1100
+ * host app to provide its own custom UI while the SDK handles the
1101
+ * underlying call connection and audio playback.
1102
+ */
1103
+ unstable_renderAudioOnly: boolean;
1083
1104
  };
1084
1105
 
1085
1106
  /**
@@ -1338,6 +1359,45 @@ declare interface LoginListener {
1338
1359
  onLogoutFailure?: (error: CometChatException) => void;
1339
1360
  }
1340
1361
 
1362
+ declare class MainVideoContainerSetting {
1363
+ /**
1364
+ *
1365
+ * @param {string} mainVideoAspectRatio
1366
+ * This method is used to set the aspect ratio of main video.
1367
+ * The default value is `contain`
1368
+ * @returns
1369
+ */
1370
+ setMainVideoAspectRatio(_mainVideoAspectRatio: (typeof CallSettings.ASPECT_RATIO)[keyof typeof CallSettings.ASPECT_RATIO]): void;
1371
+ /**
1372
+ *
1373
+ * @param {string} position
1374
+ * @param {boolean} visibility
1375
+ * This method is used to set the position & visibility parameter of the full screen button.
1376
+ * By default the full screen button is visible in the `bottom-right` position.
1377
+ * @returns
1378
+ */
1379
+ setFullScreenButtonParams(_position: (typeof CallSettings.POSITION)[keyof typeof CallSettings.POSITION], _visibility: boolean): void;
1380
+ /**
1381
+ *
1382
+ * @param {string} position
1383
+ * @param {boolean} visibility
1384
+ * @param {string} backgroundColor
1385
+ * This method is used to set the position, visibility & background color of the name label.
1386
+ * By default the name label is visible in the `bottom-left` position with a background-color `rgba(27, 27, 27, 0.4)`
1387
+ * @returns
1388
+ */
1389
+ setNameLabelParams(_position: (typeof CallSettings.POSITION)[keyof typeof CallSettings.POSITION], _visibility: boolean, _backgroundColor: string): void;
1390
+ /**
1391
+ *
1392
+ * @param {string} position
1393
+ * @param {boolean} visibility
1394
+ * This method is used to set the position, visibility of the network label.
1395
+ * By default the network label is visible in the `bottom-right` position.
1396
+ * @returns
1397
+ */
1398
+ setNetworkLabelParams(_position: (typeof CallSettings.POSITION)[keyof typeof CallSettings.POSITION], _visibility: boolean): void;
1399
+ }
1400
+
1341
1401
  declare type MobileSDKEvents = SDKEvents & {
1342
1402
  onAudioModeChanged: (payload: AudioMode['type']) => void;
1343
1403
  onCameraFacingChanged: (payload: CameraFacing) => void;
@@ -1734,8 +1794,6 @@ declare class SessionMethods extends SessionMethodsCore {
1734
1794
  static hideSettingsDialog(): void;
1735
1795
  static showVirtualBackgroundDialog(): void;
1736
1796
  static hideVirtualBackgroundDialog(): void;
1737
- static enablePictureInPictureLayout(): void;
1738
- static disablePictureInPictureLayout(): void;
1739
1797
  static getAudioInputDevices(): AudioInputDevice[];
1740
1798
  static getAudioOutputDevices(): AudioOutputDevice[];
1741
1799
  static getVideoInputDevices(): VideoInputDevice[];
@@ -1784,6 +1842,11 @@ declare class SessionMethodsCore {
1784
1842
  * Unmutes the local user's audio during the call.
1785
1843
  */
1786
1844
  static unmuteAudio(): void;
1845
+ /**
1846
+ * Toggles the local user's audio mute state.
1847
+ * If audio is muted, it will be unmuted, and vice versa.
1848
+ */
1849
+ static toggleAudio(): void;
1787
1850
  /**
1788
1851
  * Pauses the local user's video stream.
1789
1852
  */
@@ -1792,10 +1855,20 @@ declare class SessionMethodsCore {
1792
1855
  * Resumes the local user's video stream.
1793
1856
  */
1794
1857
  static resumeVideo(): void;
1858
+ /**
1859
+ * Toggles the local user's video stream.
1860
+ * If video is paused, it will be resumed, and vice versa.
1861
+ */
1862
+ static toggleVideo(): void;
1795
1863
  /**
1796
1864
  * Local user leaves the current session.
1797
1865
  */
1798
1866
  static leaveSession(): void;
1867
+ /**
1868
+ * Ends the current session for all participants.
1869
+ * This will terminate the conference and disconnect everyone.
1870
+ */
1871
+ static endSessionForAll(): void;
1799
1872
  /**
1800
1873
  * Raises the user's virtual hand in the call.
1801
1874
  */
@@ -1804,6 +1877,11 @@ declare class SessionMethodsCore {
1804
1877
  * Lowers the user's virtual hand in the call.
1805
1878
  */
1806
1879
  static lowerHand(): void;
1880
+ /**
1881
+ * Toggles the user's virtual hand state.
1882
+ * If the hand is raised, it will be lowered, and vice versa.
1883
+ */
1884
+ static toggleHand(): void;
1807
1885
  /**
1808
1886
  * Switches between the front and rear camera.
1809
1887
  */
@@ -1821,6 +1899,11 @@ declare class SessionMethodsCore {
1821
1899
  * Stops the ongoing call recording.
1822
1900
  */
1823
1901
  static stopRecording(): void;
1902
+ /**
1903
+ * Toggles the call recording state.
1904
+ * If recording is active, it will be stopped, and vice versa.
1905
+ */
1906
+ static toggleRecording(): void;
1824
1907
  /**
1825
1908
  * Pins a participant's video to focus on them.
1826
1909
  * @param participantId - The ID of the participant to pin.
@@ -1846,6 +1929,18 @@ declare class SessionMethodsCore {
1846
1929
  * @param count - The number of unread messages.
1847
1930
  */
1848
1931
  static setChatButtonUnreadCount(count: number): void;
1932
+ /**
1933
+ * Toggles the visibility of the participant list panel.
1934
+ */
1935
+ static toggleParticipantList(): void;
1936
+ /**
1937
+ * Shows the participant list panel.
1938
+ */
1939
+ static showParticipantList(): void;
1940
+ /**
1941
+ * Hides the participant list panel.
1942
+ */
1943
+ static hideParticipantList(): void;
1849
1944
  /**
1850
1945
  * @deprecated switchToVideoCall is deprecated and not supported.
1851
1946
  */