@cometchat/calls-sdk-react-native 5.0.0-beta.3 → 5.0.0-beta.4

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.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as v from "valibot";
2
- import * as zustand3 from "zustand";
2
+ import * as zustand5 from "zustand";
3
3
  import * as zustand_middleware0 from "zustand/middleware";
4
4
  import React from "react";
5
5
  import JitsiMeetJS from "lib-jitsi-meet";
@@ -40,6 +40,16 @@ declare function sleep(ms?: number): Promise<void>;
40
40
  declare function isArrayOfObjEqual(arr1: any[], arr2: any[]): boolean;
41
41
  declare function isDeviceEqual(device1: MediaDeviceInfo | undefined, device2: MediaDeviceInfo | undefined): boolean;
42
42
  declare function getDefaultDevice<T extends MediaDeviceInfo>(devices: T[]): T;
43
+ /**
44
+ * Returns a promise that resolves when the given Zustand store
45
+ * satisfies the provided predicate. Resolves immediately if the
46
+ * condition is already met. Includes a timeout to avoid hanging
47
+ * forever (defaults to 5 000 ms).
48
+ */
49
+ declare function waitForStoreState<T>(store: {
50
+ getState: () => T;
51
+ subscribe: (listener: (state: T) => void) => () => void;
52
+ }, predicate: (state: T) => boolean, timeoutMs?: number): Promise<void>;
43
53
  //#endregion
44
54
  //#region calls-sdk-core/utils/constants.d.ts
45
55
  declare const MIN_ASPECT_RATIO: number;
@@ -87,10 +97,12 @@ declare const VIDEO_QUALITY_LEVELS: {
87
97
  LOW: number;
88
98
  NONE: number;
89
99
  };
90
- declare const PLATFORM: {
100
+ declare const SDK_PLATFORM: {
91
101
  readonly WEB: "web";
92
102
  readonly ANDROID: "android";
93
103
  readonly IOS: "ios";
104
+ readonly REACT_NATIVE_ANDROID: "react-native-android";
105
+ readonly REACT_NATIVE_IOS: "react-native-ios";
94
106
  };
95
107
  declare const EVENT_LISTENER_METHODS: {
96
108
  readonly SessionStatusListener: {
@@ -288,12 +300,15 @@ type AudioOutputDevice = MediaDeviceInfo & {
288
300
  type VideoInputDevice = MediaDeviceInfo & {
289
301
  kind: Extract<MediaDeviceKind, 'videoinput'>;
290
302
  };
303
+ type Subscription = (() => void) | {
304
+ remove: () => void;
305
+ };
291
306
  type BaseState = {
292
307
  participantListVisible: boolean;
293
308
  moreMenuVisible: boolean;
294
- subscriptions: any[];
309
+ subscriptions: Subscription[];
295
310
  isPIPLayoutEnabled: boolean;
296
- audioModes: AudioMode$1[];
311
+ audioModes: AudioMode[];
297
312
  audioInputDevices: AudioInputDevice[];
298
313
  audioOutputDevices: AudioOutputDevice[];
299
314
  videoInputDevices: VideoInputDevice[];
@@ -305,7 +320,7 @@ type BaseState = {
305
320
  skipSubscribe: boolean;
306
321
  };
307
322
  previewVideoInputDevice?: VideoInputDevice;
308
- selectedAudioModeType?: AudioMode$1['type'];
323
+ selectedAudioModeType?: AudioMode['type'];
309
324
  audioModeMenuVisible: boolean;
310
325
  layout: Layout;
311
326
  sidebarLayoutSetProgrammatically: boolean;
@@ -322,7 +337,7 @@ type BaseState = {
322
337
  desktopSharingFrameRate: 5 | 15 | 30;
323
338
  chatButtonUnreadCount: number;
324
339
  enableNoiseReduction: boolean;
325
- sdkPlatform: Platform$1;
340
+ sdkPlatform: SDKPlatform;
326
341
  webOSName?: WebOSName;
327
342
  previewVideoTrack?: any;
328
343
  isMobileBrowser: boolean;
@@ -347,14 +362,14 @@ type Actions$5 = {
347
362
  toggleParticipantListVisible: () => void;
348
363
  reset: () => void;
349
364
  toggleMoreMenuVisible: () => void;
350
- addSubscriptions: (subscriptions: any[]) => void;
365
+ addSubscriptions: (subscriptions: Subscription[]) => void;
351
366
  incrementConnectionRetryCount: () => void;
352
367
  clearIdealTimeoutTimer: () => void;
353
368
  restartIdealTimeoutTimer: () => void;
354
369
  isMobileSDK: () => boolean;
355
370
  isMobile: () => boolean;
356
371
  };
357
- declare const useBaseStore: zustand3.UseBoundStore<Omit<Omit<zustand3.StoreApi<BaseState & Actions$5>, "subscribe"> & {
372
+ declare const useBaseStore: zustand5.UseBoundStore<Omit<Omit<zustand5.StoreApi<BaseState & Actions$5>, "subscribe"> & {
358
373
  subscribe: {
359
374
  (listener: (selectedState: BaseState & Actions$5, previousSelectedState: BaseState & Actions$5) => void): () => void;
360
375
  <U>(selector: (state: BaseState & Actions$5) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
@@ -386,6 +401,7 @@ declare const useBaseStore: zustand3.UseBoundStore<Omit<Omit<zustand3.StoreApi<B
386
401
  declare const toggleParticipantListVisible: () => void;
387
402
  declare const hideParticipantList: () => void;
388
403
  declare const showParticipantList: () => void;
404
+ declare const toggleParticipantList: () => void;
389
405
  declare const toggleMoreMenuVisible: () => void;
390
406
  declare const toggleAudioModeMenuVisible: () => void;
391
407
  declare const setLayout: (layout: Layout, sidebarLayoutSetProgrammatically?: boolean) => void;
@@ -400,6 +416,7 @@ declare const hideVirtualBackgroundDialog: () => void;
400
416
  declare const toggleMirrorLocalVideo: () => void;
401
417
  declare const toggleEnableNoiseReduction: () => void;
402
418
  declare const setChatButtonUnreadCount: (count: number) => void;
419
+ declare const setAudioMode: (mode: AudioMode["type"]) => void;
403
420
  declare const getLayout: () => Layout;
404
421
  declare function initBaseStoreSubscriptions(): void;
405
422
  //#endregion
@@ -432,7 +449,7 @@ type Actions$4 = {
432
449
  endConference: () => Promise<void>;
433
450
  stopRecording: () => Promise<void>;
434
451
  };
435
- declare const useConferenceStore: zustand3.UseBoundStore<Omit<zustand3.StoreApi<ConferenceState & Actions$4>, "subscribe"> & {
452
+ declare const useConferenceStore: zustand5.UseBoundStore<Omit<zustand5.StoreApi<ConferenceState & Actions$4>, "subscribe"> & {
436
453
  subscribe: {
437
454
  (listener: (selectedState: ConferenceState & Actions$4, previousSelectedState: ConferenceState & Actions$4) => void): () => void;
438
455
  <U>(selector: (state: ConferenceState & Actions$4) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
@@ -459,9 +476,10 @@ type ConfigStateInternal = {
459
476
  iAmRecorder: boolean;
460
477
  showFrameRate: boolean;
461
478
  enableCompanionMode: boolean;
479
+ sdkPlatform?: SDKPlatform;
462
480
  };
463
481
  type ConfigStateMobile = {
464
- audioMode?: AudioMode$1['type'];
482
+ audioMode?: AudioMode['type'];
465
483
  hideAudioModeButton: boolean;
466
484
  };
467
485
  type ConfigStateWeb = {
@@ -507,7 +525,7 @@ type ConfigState = ConfigStateInternal & ConfigStateMobile & ConfigStateWeb & Co
507
525
  type Actions$3 = {
508
526
  reset: () => void;
509
527
  };
510
- declare const useConfigStore: zustand3.UseBoundStore<Omit<zustand3.StoreApi<ConfigStateInternal & ConfigStateMobile & ConfigStateWeb & ConfigStateBoth & Actions$3>, "subscribe"> & {
528
+ declare const useConfigStore: zustand5.UseBoundStore<Omit<zustand5.StoreApi<ConfigStateInternal & ConfigStateMobile & ConfigStateWeb & ConfigStateBoth & Actions$3>, "subscribe"> & {
511
529
  subscribe: {
512
530
  (listener: (selectedState: ConfigStateInternal & ConfigStateMobile & ConfigStateWeb & ConfigStateBoth & Actions$3, previousSelectedState: ConfigStateInternal & ConfigStateMobile & ConfigStateWeb & ConfigStateBoth & Actions$3) => void): () => void;
513
531
  <U>(selector: (state: ConfigStateInternal & ConfigStateMobile & ConfigStateWeb & ConfigStateBoth & Actions$3) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
@@ -659,7 +677,7 @@ type Actions$2 = {
659
677
  disconnect: () => Promise<void>;
660
678
  reset: () => void;
661
679
  };
662
- declare const useConnectionStore: zustand3.UseBoundStore<Omit<zustand3.StoreApi<ConnectionState & Actions$2>, "subscribe"> & {
680
+ declare const useConnectionStore: zustand5.UseBoundStore<Omit<zustand5.StoreApi<ConnectionState & Actions$2>, "subscribe"> & {
663
681
  subscribe: {
664
682
  (listener: (selectedState: ConnectionState & Actions$2, previousSelectedState: ConnectionState & Actions$2) => void): () => void;
665
683
  <U>(selector: (state: ConnectionState & Actions$2) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
@@ -710,7 +728,7 @@ type Actions$1 = {
710
728
  getParticipantById: (pid: string) => HumanParticipant | undefined;
711
729
  reset: () => void;
712
730
  };
713
- declare const useParticipantStore: zustand3.UseBoundStore<Omit<zustand3.StoreApi<ParticipantsState & Actions$1>, "subscribe"> & {
731
+ declare const useParticipantStore: zustand5.UseBoundStore<Omit<zustand5.StoreApi<ParticipantsState & Actions$1>, "subscribe"> & {
714
732
  subscribe: {
715
733
  (listener: (selectedState: ParticipantsState & Actions$1, previousSelectedState: ParticipantsState & Actions$1) => void): () => void;
716
734
  <U>(selector: (state: ParticipantsState & Actions$1) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
@@ -756,7 +774,7 @@ type Actions = {
756
774
  updateTrack: (originalTrack: any, updatedTrack: Partial<Track>) => void;
757
775
  updateLocalTrack: (mediaType: MediaType, updatedTrack: Partial<Track>) => void;
758
776
  };
759
- declare const useTracksStore: zustand3.UseBoundStore<Omit<zustand3.StoreApi<TracksState & Actions>, "subscribe"> & {
777
+ declare const useTracksStore: zustand5.UseBoundStore<Omit<zustand5.StoreApi<TracksState & Actions>, "subscribe"> & {
760
778
  subscribe: {
761
779
  (listener: (selectedState: TracksState & Actions, previousSelectedState: TracksState & Actions) => void): () => void;
762
780
  <U>(selector: (state: TracksState & Actions) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
@@ -801,6 +819,7 @@ declare const useNonRecoverableError: () => any;
801
819
  declare const useIsSwitchCameraEnabledBrowser: () => any;
802
820
  declare const useIsAudioInputSelectionSupported: () => boolean;
803
821
  declare const useIsVideoInputSelectionSupported: () => boolean;
822
+ declare const useShouldMirrorLocalVideo: () => boolean;
804
823
  //#endregion
805
824
  //#region calls-sdk-core/store/utils/switch-camera.d.ts
806
825
  declare const switchCamera: () => void;
@@ -815,6 +834,11 @@ declare class SessionMethodsCore {
815
834
  * Unmutes the local user's audio during the call.
816
835
  */
817
836
  static unmuteAudio(): void;
837
+ /**
838
+ * Toggles the local user's audio mute state.
839
+ * If audio is muted, it will be unmuted, and vice versa.
840
+ */
841
+ static toggleAudio(): void;
818
842
  /**
819
843
  * Pauses the local user's video stream.
820
844
  */
@@ -823,6 +847,11 @@ declare class SessionMethodsCore {
823
847
  * Resumes the local user's video stream.
824
848
  */
825
849
  static resumeVideo(): void;
850
+ /**
851
+ * Toggles the local user's video stream.
852
+ * If video is paused, it will be resumed, and vice versa.
853
+ */
854
+ static toggleVideo(): void;
826
855
  /**
827
856
  * Local user leaves the current session.
828
857
  */
@@ -835,6 +864,11 @@ declare class SessionMethodsCore {
835
864
  * Lowers the user's virtual hand in the call.
836
865
  */
837
866
  static lowerHand(): void;
867
+ /**
868
+ * Toggles the user's virtual hand state.
869
+ * If the hand is raised, it will be lowered, and vice versa.
870
+ */
871
+ static toggleHand(): void;
838
872
  /**
839
873
  * Switches between the front and rear camera.
840
874
  */
@@ -852,6 +886,11 @@ declare class SessionMethodsCore {
852
886
  * Stops the ongoing call recording.
853
887
  */
854
888
  static stopRecording(): void;
889
+ /**
890
+ * Toggles the call recording state.
891
+ * If recording is active, it will be stopped, and vice versa.
892
+ */
893
+ static toggleRecording(): void;
855
894
  /**
856
895
  * Pins a participant's video to focus on them.
857
896
  * @param participantId - The ID of the participant to pin.
@@ -877,6 +916,18 @@ declare class SessionMethodsCore {
877
916
  * @param count - The number of unread messages.
878
917
  */
879
918
  static setChatButtonUnreadCount(count: number): void;
919
+ /**
920
+ * Toggles the visibility of the participant list panel.
921
+ */
922
+ static toggleParticipantList(): void;
923
+ /**
924
+ * Shows the participant list panel.
925
+ */
926
+ static showParticipantList(): void;
927
+ /**
928
+ * Hides the participant list panel.
929
+ */
930
+ static hideParticipantList(): void;
880
931
  /**
881
932
  * @deprecated switchToVideoCall is deprecated and not supported.
882
933
  */
@@ -914,7 +965,7 @@ declare function updateConfig(config: Partial<ConfigState>): void;
914
965
  //#endregion
915
966
  //#region calls-sdk-core/types/common.d.ts
916
967
  type AudioModeType = 'BLUETOOTH' | 'EARPIECE' | 'HEADPHONES' | 'SPEAKER';
917
- type AudioMode$1 = {
968
+ type AudioMode = {
918
969
  type: AudioModeType;
919
970
  selected: boolean;
920
971
  uid?: string;
@@ -927,7 +978,7 @@ type MediaType = ValueOf<typeof MEDIA_TYPE>;
927
978
  type ValueOf<T> = T[keyof T];
928
979
  type ParticipantRole = ValueOf<typeof PARTICIPANT_ROLE>;
929
980
  type NotificationType = 'info' | 'success' | 'warning' | 'error';
930
- type Platform$1 = ValueOf<typeof PLATFORM>;
981
+ type SDKPlatform = ValueOf<typeof SDK_PLATFORM>;
931
982
  type WebOSName = 'android' | 'ios' | 'macos' | 'windows' | 'linux' | 'unknown';
932
983
  interface ITrackOptions {
933
984
  cameraDeviceId?: string | null;
@@ -974,7 +1025,7 @@ type SDKEvents = Omit<_SDKEvents, 'onParticipantListChanged'> & {
974
1025
  onParticipantListChanged: (payload: Participant$1[]) => void;
975
1026
  };
976
1027
  type MobileSDKEvents = SDKEvents & {
977
- onAudioModeChanged: (payload: AudioMode$1['type']) => void;
1028
+ onAudioModeChanged: (payload: AudioMode['type']) => void;
978
1029
  onCameraFacingChanged: (payload: CameraFacing) => void;
979
1030
  onSwitchCameraButtonClicked: () => void;
980
1031
  onPictureInPictureLayoutEnabled: () => void;
@@ -1209,7 +1260,7 @@ interface TranslationState {
1209
1260
  translations: Record<string, typeof __json_default_export>;
1210
1261
  currentLocale: CometChatSupportedLocale | Omit<string, CometChatSupportedLocale>;
1211
1262
  }
1212
- declare const useTranslationStore: zustand3.UseBoundStore<Omit<zustand3.StoreApi<Omit<TranslationState, "reset" | "setLocale"> & {
1263
+ declare const useTranslationStore: zustand5.UseBoundStore<Omit<zustand5.StoreApi<Omit<TranslationState, "reset" | "setLocale"> & {
1213
1264
  reset: () => void;
1214
1265
  setLocale: (locale: CometChatSupportedLocale) => void;
1215
1266
  }>, "subscribe"> & {
@@ -2100,7 +2151,7 @@ type _Region = keyof typeof REGION;
2100
2151
  type Region = _Region | Omit<string, _Region>;
2101
2152
  type _THost = `rtc-${_Region}.cometchat.io`;
2102
2153
  type Host = _THost | Omit<string, _THost>;
2103
- interface AudioMode {
2154
+ interface AudioMode$1 {
2104
2155
  isSelected: boolean;
2105
2156
  mode: string;
2106
2157
  }
@@ -3747,7 +3798,7 @@ declare class CometChatCalls$1 {
3747
3798
  * Method to get all the available audio output devices.
3748
3799
  * @returns {Promise<AudioMode[]>}
3749
3800
  */
3750
- static getAudioOutputModes(): Promise<AudioMode[]>;
3801
+ static getAudioOutputModes(): Promise<AudioMode$1[]>;
3751
3802
  /**
3752
3803
  * Method to switch from audio call to video call.
3753
3804
  * @returns {void}
@@ -4028,6 +4079,7 @@ declare class CometChatCalls extends SessionMethodsCore {
4028
4079
  private static logoutInternal;
4029
4080
  private static callGenerateTokenAPI;
4030
4081
  private static callVerifyTokenAPI;
4082
+ private static getStorageKey;
4031
4083
  private static saveUser;
4032
4084
  private static getSavedUser;
4033
4085
  private static clearSavedUser;
@@ -4047,6 +4099,11 @@ declare class CometChatCalls extends SessionMethodsCore {
4047
4099
  static addEventListener<K$1 extends keyof MobileSDKEvents>(eventType: K$1, listener: MobileSDKEvents[K$1], options?: {
4048
4100
  signal?: AbortSignal;
4049
4101
  }): () => void;
4102
+ /**
4103
+ * Sets the audio output mode (mobile only).
4104
+ * @param mode - The audio mode to set (e.g., 'SPEAKER', 'EARPIECE', 'BLUETOOTH', 'HEADPHONES').
4105
+ */
4106
+ static setAudioMode(mode: AudioMode['type']): void;
4050
4107
  /**
4051
4108
  * Enables Picture-in-Picture (PIP) layout during the call.
4052
4109
  */
@@ -4057,5 +4114,4 @@ declare class CometChatCalls extends SessionMethodsCore {
4057
4114
  static disablePictureInPictureLayout(): void;
4058
4115
  }
4059
4116
  //#endregion
4060
- export { CometChatCalls };
4061
- //# sourceMappingURL=index.d.mts.map
4117
+ export { CometChatCalls };
package/dist/index.d.ts CHANGED
@@ -40,6 +40,16 @@ declare function sleep(ms?: number): Promise<void>;
40
40
  declare function isArrayOfObjEqual(arr1: any[], arr2: any[]): boolean;
41
41
  declare function isDeviceEqual(device1: MediaDeviceInfo | undefined, device2: MediaDeviceInfo | undefined): boolean;
42
42
  declare function getDefaultDevice<T extends MediaDeviceInfo>(devices: T[]): T;
43
+ /**
44
+ * Returns a promise that resolves when the given Zustand store
45
+ * satisfies the provided predicate. Resolves immediately if the
46
+ * condition is already met. Includes a timeout to avoid hanging
47
+ * forever (defaults to 5 000 ms).
48
+ */
49
+ declare function waitForStoreState<T>(store: {
50
+ getState: () => T;
51
+ subscribe: (listener: (state: T) => void) => () => void;
52
+ }, predicate: (state: T) => boolean, timeoutMs?: number): Promise<void>;
43
53
  //#endregion
44
54
  //#region calls-sdk-core/utils/constants.d.ts
45
55
  declare const MIN_ASPECT_RATIO: number;
@@ -87,10 +97,12 @@ declare const VIDEO_QUALITY_LEVELS: {
87
97
  LOW: number;
88
98
  NONE: number;
89
99
  };
90
- declare const PLATFORM: {
100
+ declare const SDK_PLATFORM: {
91
101
  readonly WEB: "web";
92
102
  readonly ANDROID: "android";
93
103
  readonly IOS: "ios";
104
+ readonly REACT_NATIVE_ANDROID: "react-native-android";
105
+ readonly REACT_NATIVE_IOS: "react-native-ios";
94
106
  };
95
107
  declare const EVENT_LISTENER_METHODS: {
96
108
  readonly SessionStatusListener: {
@@ -288,12 +300,15 @@ type AudioOutputDevice = MediaDeviceInfo & {
288
300
  type VideoInputDevice = MediaDeviceInfo & {
289
301
  kind: Extract<MediaDeviceKind, 'videoinput'>;
290
302
  };
303
+ type Subscription = (() => void) | {
304
+ remove: () => void;
305
+ };
291
306
  type BaseState = {
292
307
  participantListVisible: boolean;
293
308
  moreMenuVisible: boolean;
294
- subscriptions: any[];
309
+ subscriptions: Subscription[];
295
310
  isPIPLayoutEnabled: boolean;
296
- audioModes: AudioMode$1[];
311
+ audioModes: AudioMode[];
297
312
  audioInputDevices: AudioInputDevice[];
298
313
  audioOutputDevices: AudioOutputDevice[];
299
314
  videoInputDevices: VideoInputDevice[];
@@ -305,7 +320,7 @@ type BaseState = {
305
320
  skipSubscribe: boolean;
306
321
  };
307
322
  previewVideoInputDevice?: VideoInputDevice;
308
- selectedAudioModeType?: AudioMode$1['type'];
323
+ selectedAudioModeType?: AudioMode['type'];
309
324
  audioModeMenuVisible: boolean;
310
325
  layout: Layout;
311
326
  sidebarLayoutSetProgrammatically: boolean;
@@ -322,7 +337,7 @@ type BaseState = {
322
337
  desktopSharingFrameRate: 5 | 15 | 30;
323
338
  chatButtonUnreadCount: number;
324
339
  enableNoiseReduction: boolean;
325
- sdkPlatform: Platform;
340
+ sdkPlatform: SDKPlatform;
326
341
  webOSName?: WebOSName;
327
342
  previewVideoTrack?: any;
328
343
  isMobileBrowser: boolean;
@@ -347,7 +362,7 @@ type Actions$5 = {
347
362
  toggleParticipantListVisible: () => void;
348
363
  reset: () => void;
349
364
  toggleMoreMenuVisible: () => void;
350
- addSubscriptions: (subscriptions: any[]) => void;
365
+ addSubscriptions: (subscriptions: Subscription[]) => void;
351
366
  incrementConnectionRetryCount: () => void;
352
367
  clearIdealTimeoutTimer: () => void;
353
368
  restartIdealTimeoutTimer: () => void;
@@ -386,6 +401,7 @@ declare const useBaseStore: zustand1.UseBoundStore<Omit<Omit<zustand1.StoreApi<B
386
401
  declare const toggleParticipantListVisible: () => void;
387
402
  declare const hideParticipantList: () => void;
388
403
  declare const showParticipantList: () => void;
404
+ declare const toggleParticipantList: () => void;
389
405
  declare const toggleMoreMenuVisible: () => void;
390
406
  declare const toggleAudioModeMenuVisible: () => void;
391
407
  declare const setLayout: (layout: Layout, sidebarLayoutSetProgrammatically?: boolean) => void;
@@ -400,6 +416,7 @@ declare const hideVirtualBackgroundDialog: () => void;
400
416
  declare const toggleMirrorLocalVideo: () => void;
401
417
  declare const toggleEnableNoiseReduction: () => void;
402
418
  declare const setChatButtonUnreadCount: (count: number) => void;
419
+ declare const setAudioMode: (mode: AudioMode["type"]) => void;
403
420
  declare const getLayout: () => Layout;
404
421
  declare function initBaseStoreSubscriptions(): void;
405
422
  //#endregion
@@ -459,9 +476,10 @@ type ConfigStateInternal = {
459
476
  iAmRecorder: boolean;
460
477
  showFrameRate: boolean;
461
478
  enableCompanionMode: boolean;
479
+ sdkPlatform?: SDKPlatform;
462
480
  };
463
481
  type ConfigStateMobile = {
464
- audioMode?: AudioMode$1['type'];
482
+ audioMode?: AudioMode['type'];
465
483
  hideAudioModeButton: boolean;
466
484
  };
467
485
  type ConfigStateWeb = {
@@ -801,6 +819,7 @@ declare const useNonRecoverableError: () => any;
801
819
  declare const useIsSwitchCameraEnabledBrowser: () => any;
802
820
  declare const useIsAudioInputSelectionSupported: () => boolean;
803
821
  declare const useIsVideoInputSelectionSupported: () => boolean;
822
+ declare const useShouldMirrorLocalVideo: () => boolean;
804
823
  //#endregion
805
824
  //#region calls-sdk-core/store/utils/switch-camera.d.ts
806
825
  declare const switchCamera: () => void;
@@ -815,6 +834,11 @@ declare class SessionMethodsCore {
815
834
  * Unmutes the local user's audio during the call.
816
835
  */
817
836
  static unmuteAudio(): void;
837
+ /**
838
+ * Toggles the local user's audio mute state.
839
+ * If audio is muted, it will be unmuted, and vice versa.
840
+ */
841
+ static toggleAudio(): void;
818
842
  /**
819
843
  * Pauses the local user's video stream.
820
844
  */
@@ -823,6 +847,11 @@ declare class SessionMethodsCore {
823
847
  * Resumes the local user's video stream.
824
848
  */
825
849
  static resumeVideo(): void;
850
+ /**
851
+ * Toggles the local user's video stream.
852
+ * If video is paused, it will be resumed, and vice versa.
853
+ */
854
+ static toggleVideo(): void;
826
855
  /**
827
856
  * Local user leaves the current session.
828
857
  */
@@ -835,6 +864,11 @@ declare class SessionMethodsCore {
835
864
  * Lowers the user's virtual hand in the call.
836
865
  */
837
866
  static lowerHand(): void;
867
+ /**
868
+ * Toggles the user's virtual hand state.
869
+ * If the hand is raised, it will be lowered, and vice versa.
870
+ */
871
+ static toggleHand(): void;
838
872
  /**
839
873
  * Switches between the front and rear camera.
840
874
  */
@@ -852,6 +886,11 @@ declare class SessionMethodsCore {
852
886
  * Stops the ongoing call recording.
853
887
  */
854
888
  static stopRecording(): void;
889
+ /**
890
+ * Toggles the call recording state.
891
+ * If recording is active, it will be stopped, and vice versa.
892
+ */
893
+ static toggleRecording(): void;
855
894
  /**
856
895
  * Pins a participant's video to focus on them.
857
896
  * @param participantId - The ID of the participant to pin.
@@ -877,6 +916,18 @@ declare class SessionMethodsCore {
877
916
  * @param count - The number of unread messages.
878
917
  */
879
918
  static setChatButtonUnreadCount(count: number): void;
919
+ /**
920
+ * Toggles the visibility of the participant list panel.
921
+ */
922
+ static toggleParticipantList(): void;
923
+ /**
924
+ * Shows the participant list panel.
925
+ */
926
+ static showParticipantList(): void;
927
+ /**
928
+ * Hides the participant list panel.
929
+ */
930
+ static hideParticipantList(): void;
880
931
  /**
881
932
  * @deprecated switchToVideoCall is deprecated and not supported.
882
933
  */
@@ -914,7 +965,7 @@ declare function updateConfig(config: Partial<ConfigState>): void;
914
965
  //#endregion
915
966
  //#region calls-sdk-core/types/common.d.ts
916
967
  type AudioModeType = 'BLUETOOTH' | 'EARPIECE' | 'HEADPHONES' | 'SPEAKER';
917
- type AudioMode$1 = {
968
+ type AudioMode = {
918
969
  type: AudioModeType;
919
970
  selected: boolean;
920
971
  uid?: string;
@@ -927,7 +978,7 @@ type MediaType = ValueOf<typeof MEDIA_TYPE>;
927
978
  type ValueOf<T> = T[keyof T];
928
979
  type ParticipantRole = ValueOf<typeof PARTICIPANT_ROLE>;
929
980
  type NotificationType = 'info' | 'success' | 'warning' | 'error';
930
- type Platform = ValueOf<typeof PLATFORM>;
981
+ type SDKPlatform = ValueOf<typeof SDK_PLATFORM>;
931
982
  type WebOSName = 'android' | 'ios' | 'macos' | 'windows' | 'linux' | 'unknown';
932
983
  interface ITrackOptions {
933
984
  cameraDeviceId?: string | null;
@@ -974,7 +1025,7 @@ type SDKEvents = Omit<_SDKEvents, 'onParticipantListChanged'> & {
974
1025
  onParticipantListChanged: (payload: Participant$1[]) => void;
975
1026
  };
976
1027
  type MobileSDKEvents = SDKEvents & {
977
- onAudioModeChanged: (payload: AudioMode$1['type']) => void;
1028
+ onAudioModeChanged: (payload: AudioMode['type']) => void;
978
1029
  onCameraFacingChanged: (payload: CameraFacing) => void;
979
1030
  onSwitchCameraButtonClicked: () => void;
980
1031
  onPictureInPictureLayoutEnabled: () => void;
@@ -2100,7 +2151,7 @@ type _Region = keyof typeof REGION;
2100
2151
  type Region = _Region | Omit<string, _Region>;
2101
2152
  type _THost = `rtc-${_Region}.cometchat.io`;
2102
2153
  type Host = _THost | Omit<string, _THost>;
2103
- interface AudioMode {
2154
+ interface AudioMode$1 {
2104
2155
  isSelected: boolean;
2105
2156
  mode: string;
2106
2157
  }
@@ -3747,7 +3798,7 @@ declare class CometChatCalls$1 {
3747
3798
  * Method to get all the available audio output devices.
3748
3799
  * @returns {Promise<AudioMode[]>}
3749
3800
  */
3750
- static getAudioOutputModes(): Promise<AudioMode[]>;
3801
+ static getAudioOutputModes(): Promise<AudioMode$1[]>;
3751
3802
  /**
3752
3803
  * Method to switch from audio call to video call.
3753
3804
  * @returns {void}
@@ -4028,6 +4079,7 @@ declare class CometChatCalls extends SessionMethodsCore {
4028
4079
  private static logoutInternal;
4029
4080
  private static callGenerateTokenAPI;
4030
4081
  private static callVerifyTokenAPI;
4082
+ private static getStorageKey;
4031
4083
  private static saveUser;
4032
4084
  private static getSavedUser;
4033
4085
  private static clearSavedUser;
@@ -4047,6 +4099,11 @@ declare class CometChatCalls extends SessionMethodsCore {
4047
4099
  static addEventListener<K$1 extends keyof MobileSDKEvents>(eventType: K$1, listener: MobileSDKEvents[K$1], options?: {
4048
4100
  signal?: AbortSignal;
4049
4101
  }): () => void;
4102
+ /**
4103
+ * Sets the audio output mode (mobile only).
4104
+ * @param mode - The audio mode to set (e.g., 'SPEAKER', 'EARPIECE', 'BLUETOOTH', 'HEADPHONES').
4105
+ */
4106
+ static setAudioMode(mode: AudioMode['type']): void;
4050
4107
  /**
4051
4108
  * Enables Picture-in-Picture (PIP) layout during the call.
4052
4109
  */
@@ -4057,5 +4114,4 @@ declare class CometChatCalls extends SessionMethodsCore {
4057
4114
  static disablePictureInPictureLayout(): void;
4058
4115
  }
4059
4116
  //#endregion
4060
- export { CometChatCalls };
4061
- //# sourceMappingURL=index.d.ts.map
4117
+ export { CometChatCalls };