@cometchat/calls-sdk-react-native 5.0.0-beta.2 → 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 +115 -64
- package/dist/index.d.ts +107 -56
- package/dist/index.js +468 -213
- package/dist/index.mjs +467 -213
- package/package.json +1 -1
- package/android/.gradle/8.9/checksums/checksums.lock +0 -0
- package/android/.gradle/8.9/dependencies-accessors/gc.properties +0 -0
- package/android/.gradle/8.9/fileChanges/last-build.bin +0 -0
- package/android/.gradle/8.9/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/8.9/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +0 -2
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/dist/index.js.map +0 -1
- package/dist/index.mjs.map +0 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
|
-
import * as
|
|
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
|
|
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:
|
|
309
|
+
subscriptions: Subscription[];
|
|
295
310
|
isPIPLayoutEnabled: boolean;
|
|
296
|
-
audioModes: AudioMode
|
|
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
|
|
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:
|
|
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:
|
|
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:
|
|
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: zustand9.UseBoundStore<Omit<Omit<zustand9.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
|
|
@@ -429,9 +446,10 @@ type Actions$4 = {
|
|
|
429
446
|
raiseHand: (participantId: string, timestamp: number) => void;
|
|
430
447
|
lowerHand: (participantId: string) => void;
|
|
431
448
|
leaveConference: () => Promise<void>;
|
|
449
|
+
endConference: () => Promise<void>;
|
|
432
450
|
stopRecording: () => Promise<void>;
|
|
433
451
|
};
|
|
434
|
-
declare const useConferenceStore:
|
|
452
|
+
declare const useConferenceStore: zustand5.UseBoundStore<Omit<zustand5.StoreApi<ConferenceState & Actions$4>, "subscribe"> & {
|
|
435
453
|
subscribe: {
|
|
436
454
|
(listener: (selectedState: ConferenceState & Actions$4, previousSelectedState: ConferenceState & Actions$4) => void): () => void;
|
|
437
455
|
<U>(selector: (state: ConferenceState & Actions$4) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
|
|
@@ -457,9 +475,11 @@ type ConfigStateInternal = {
|
|
|
457
475
|
sessionId?: string;
|
|
458
476
|
iAmRecorder: boolean;
|
|
459
477
|
showFrameRate: boolean;
|
|
478
|
+
enableCompanionMode: boolean;
|
|
479
|
+
sdkPlatform?: SDKPlatform;
|
|
460
480
|
};
|
|
461
481
|
type ConfigStateMobile = {
|
|
462
|
-
audioMode?: AudioMode
|
|
482
|
+
audioMode?: AudioMode['type'];
|
|
463
483
|
hideAudioModeButton: boolean;
|
|
464
484
|
};
|
|
465
485
|
type ConfigStateWeb = {
|
|
@@ -484,7 +504,6 @@ type ConfigStateBoth = {
|
|
|
484
504
|
hideToggleAudioButton: boolean;
|
|
485
505
|
hideToggleVideoButton: boolean;
|
|
486
506
|
hideParticipantListButton: boolean;
|
|
487
|
-
hideSwitchLayoutButton: boolean;
|
|
488
507
|
hideChatButton: boolean;
|
|
489
508
|
hideScreenSharingButton: boolean;
|
|
490
509
|
hideSessionTimer: boolean;
|
|
@@ -500,12 +519,13 @@ type ConfigStateBoth = {
|
|
|
500
519
|
idleTimeoutPeriodAfterPrompt: number;
|
|
501
520
|
enableSpotlightDrag: boolean;
|
|
502
521
|
enableSpotlightSwap: boolean;
|
|
522
|
+
isPeerCall: boolean;
|
|
503
523
|
};
|
|
504
524
|
type ConfigState = ConfigStateInternal & ConfigStateMobile & ConfigStateWeb & ConfigStateBoth;
|
|
505
525
|
type Actions$3 = {
|
|
506
526
|
reset: () => void;
|
|
507
527
|
};
|
|
508
|
-
declare const useConfigStore:
|
|
528
|
+
declare const useConfigStore: zustand5.UseBoundStore<Omit<zustand5.StoreApi<ConfigStateInternal & ConfigStateMobile & ConfigStateWeb & ConfigStateBoth & Actions$3>, "subscribe"> & {
|
|
509
529
|
subscribe: {
|
|
510
530
|
(listener: (selectedState: ConfigStateInternal & ConfigStateMobile & ConfigStateWeb & ConfigStateBoth & Actions$3, previousSelectedState: ConfigStateInternal & ConfigStateMobile & ConfigStateWeb & ConfigStateBoth & Actions$3) => void): () => void;
|
|
511
531
|
<U>(selector: (state: ConfigStateInternal & ConfigStateMobile & ConfigStateWeb & ConfigStateBoth & Actions$3) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
|
|
@@ -657,7 +677,7 @@ type Actions$2 = {
|
|
|
657
677
|
disconnect: () => Promise<void>;
|
|
658
678
|
reset: () => void;
|
|
659
679
|
};
|
|
660
|
-
declare const useConnectionStore:
|
|
680
|
+
declare const useConnectionStore: zustand5.UseBoundStore<Omit<zustand5.StoreApi<ConnectionState & Actions$2>, "subscribe"> & {
|
|
661
681
|
subscribe: {
|
|
662
682
|
(listener: (selectedState: ConnectionState & Actions$2, previousSelectedState: ConnectionState & Actions$2) => void): () => void;
|
|
663
683
|
<U>(selector: (state: ConnectionState & Actions$2) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
|
|
@@ -666,6 +686,7 @@ declare const useConnectionStore: zustand9.UseBoundStore<Omit<zustand9.StoreApi<
|
|
|
666
686
|
} | undefined): () => void;
|
|
667
687
|
};
|
|
668
688
|
}>;
|
|
689
|
+
declare function waitForConnection(): Promise<void>;
|
|
669
690
|
//#endregion
|
|
670
691
|
//#region calls-sdk-core/utils/schema/human-participant.d.ts
|
|
671
692
|
declare const HumanParticipantSchema: v.ObjectSchema<{
|
|
@@ -707,7 +728,7 @@ type Actions$1 = {
|
|
|
707
728
|
getParticipantById: (pid: string) => HumanParticipant | undefined;
|
|
708
729
|
reset: () => void;
|
|
709
730
|
};
|
|
710
|
-
declare const useParticipantStore:
|
|
731
|
+
declare const useParticipantStore: zustand5.UseBoundStore<Omit<zustand5.StoreApi<ParticipantsState & Actions$1>, "subscribe"> & {
|
|
711
732
|
subscribe: {
|
|
712
733
|
(listener: (selectedState: ParticipantsState & Actions$1, previousSelectedState: ParticipantsState & Actions$1) => void): () => void;
|
|
713
734
|
<U>(selector: (state: ParticipantsState & Actions$1) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
|
|
@@ -753,7 +774,7 @@ type Actions = {
|
|
|
753
774
|
updateTrack: (originalTrack: any, updatedTrack: Partial<Track>) => void;
|
|
754
775
|
updateLocalTrack: (mediaType: MediaType, updatedTrack: Partial<Track>) => void;
|
|
755
776
|
};
|
|
756
|
-
declare const useTracksStore:
|
|
777
|
+
declare const useTracksStore: zustand5.UseBoundStore<Omit<zustand5.StoreApi<TracksState & Actions>, "subscribe"> & {
|
|
757
778
|
subscribe: {
|
|
758
779
|
(listener: (selectedState: TracksState & Actions, previousSelectedState: TracksState & Actions) => void): () => void;
|
|
759
780
|
<U>(selector: (state: TracksState & Actions) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
|
|
@@ -798,6 +819,7 @@ declare const useNonRecoverableError: () => any;
|
|
|
798
819
|
declare const useIsSwitchCameraEnabledBrowser: () => any;
|
|
799
820
|
declare const useIsAudioInputSelectionSupported: () => boolean;
|
|
800
821
|
declare const useIsVideoInputSelectionSupported: () => boolean;
|
|
822
|
+
declare const useShouldMirrorLocalVideo: () => boolean;
|
|
801
823
|
//#endregion
|
|
802
824
|
//#region calls-sdk-core/store/utils/switch-camera.d.ts
|
|
803
825
|
declare const switchCamera: () => void;
|
|
@@ -812,6 +834,11 @@ declare class SessionMethodsCore {
|
|
|
812
834
|
* Unmutes the local user's audio during the call.
|
|
813
835
|
*/
|
|
814
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;
|
|
815
842
|
/**
|
|
816
843
|
* Pauses the local user's video stream.
|
|
817
844
|
*/
|
|
@@ -821,17 +848,14 @@ declare class SessionMethodsCore {
|
|
|
821
848
|
*/
|
|
822
849
|
static resumeVideo(): void;
|
|
823
850
|
/**
|
|
824
|
-
*
|
|
825
|
-
|
|
826
|
-
static leaveSession(): void;
|
|
827
|
-
/**
|
|
828
|
-
* Starts sharing the user's screen with other participants.
|
|
851
|
+
* Toggles the local user's video stream.
|
|
852
|
+
* If video is paused, it will be resumed, and vice versa.
|
|
829
853
|
*/
|
|
830
|
-
static
|
|
854
|
+
static toggleVideo(): void;
|
|
831
855
|
/**
|
|
832
|
-
*
|
|
856
|
+
* Local user leaves the current session.
|
|
833
857
|
*/
|
|
834
|
-
static
|
|
858
|
+
static leaveSession(): void;
|
|
835
859
|
/**
|
|
836
860
|
* Raises the user's virtual hand in the call.
|
|
837
861
|
*/
|
|
@@ -840,6 +864,11 @@ declare class SessionMethodsCore {
|
|
|
840
864
|
* Lowers the user's virtual hand in the call.
|
|
841
865
|
*/
|
|
842
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;
|
|
843
872
|
/**
|
|
844
873
|
* Switches between the front and rear camera.
|
|
845
874
|
*/
|
|
@@ -858,13 +887,10 @@ declare class SessionMethodsCore {
|
|
|
858
887
|
*/
|
|
859
888
|
static stopRecording(): void;
|
|
860
889
|
/**
|
|
861
|
-
*
|
|
862
|
-
|
|
863
|
-
static enablePictureInPictureLayout(): void;
|
|
864
|
-
/**
|
|
865
|
-
* Disables Picture-in-Picture (PIP) layout.
|
|
890
|
+
* Toggles the call recording state.
|
|
891
|
+
* If recording is active, it will be stopped, and vice versa.
|
|
866
892
|
*/
|
|
867
|
-
static
|
|
893
|
+
static toggleRecording(): void;
|
|
868
894
|
/**
|
|
869
895
|
* Pins a participant's video to focus on them.
|
|
870
896
|
* @param participantId - The ID of the participant to pin.
|
|
@@ -891,13 +917,17 @@ declare class SessionMethodsCore {
|
|
|
891
917
|
*/
|
|
892
918
|
static setChatButtonUnreadCount(count: number): void;
|
|
893
919
|
/**
|
|
894
|
-
*
|
|
920
|
+
* Toggles the visibility of the participant list panel.
|
|
921
|
+
*/
|
|
922
|
+
static toggleParticipantList(): void;
|
|
923
|
+
/**
|
|
924
|
+
* Shows the participant list panel.
|
|
895
925
|
*/
|
|
896
|
-
static
|
|
926
|
+
static showParticipantList(): void;
|
|
897
927
|
/**
|
|
898
|
-
*
|
|
928
|
+
* Hides the participant list panel.
|
|
899
929
|
*/
|
|
900
|
-
static
|
|
930
|
+
static hideParticipantList(): void;
|
|
901
931
|
/**
|
|
902
932
|
* @deprecated switchToVideoCall is deprecated and not supported.
|
|
903
933
|
*/
|
|
@@ -927,7 +957,7 @@ type Failure<E> = {
|
|
|
927
957
|
error: E;
|
|
928
958
|
};
|
|
929
959
|
type Result<T, E = Error> = Success<T> | Failure<E>;
|
|
930
|
-
declare function tryCatch<T, E = Error>(promise: Promise<T
|
|
960
|
+
declare function tryCatch<T, E = Error>(promise: Promise<T>, timeoutMs?: number): Promise<Result<T, E>>;
|
|
931
961
|
declare function tryCatchSync<T, E = Error>(fn: () => T): Result<T, E>;
|
|
932
962
|
//#endregion
|
|
933
963
|
//#region calls-sdk-core/utils/update-config.d.ts
|
|
@@ -935,7 +965,7 @@ declare function updateConfig(config: Partial<ConfigState>): void;
|
|
|
935
965
|
//#endregion
|
|
936
966
|
//#region calls-sdk-core/types/common.d.ts
|
|
937
967
|
type AudioModeType = 'BLUETOOTH' | 'EARPIECE' | 'HEADPHONES' | 'SPEAKER';
|
|
938
|
-
type AudioMode
|
|
968
|
+
type AudioMode = {
|
|
939
969
|
type: AudioModeType;
|
|
940
970
|
selected: boolean;
|
|
941
971
|
uid?: string;
|
|
@@ -948,7 +978,7 @@ type MediaType = ValueOf<typeof MEDIA_TYPE>;
|
|
|
948
978
|
type ValueOf<T> = T[keyof T];
|
|
949
979
|
type ParticipantRole = ValueOf<typeof PARTICIPANT_ROLE>;
|
|
950
980
|
type NotificationType = 'info' | 'success' | 'warning' | 'error';
|
|
951
|
-
type
|
|
981
|
+
type SDKPlatform = ValueOf<typeof SDK_PLATFORM>;
|
|
952
982
|
type WebOSName = 'android' | 'ios' | 'macos' | 'windows' | 'linux' | 'unknown';
|
|
953
983
|
interface ITrackOptions {
|
|
954
984
|
cameraDeviceId?: string | null;
|
|
@@ -995,7 +1025,7 @@ type SDKEvents = Omit<_SDKEvents, 'onParticipantListChanged'> & {
|
|
|
995
1025
|
onParticipantListChanged: (payload: Participant$1[]) => void;
|
|
996
1026
|
};
|
|
997
1027
|
type MobileSDKEvents = SDKEvents & {
|
|
998
|
-
onAudioModeChanged: (payload: AudioMode
|
|
1028
|
+
onAudioModeChanged: (payload: AudioMode['type']) => void;
|
|
999
1029
|
onCameraFacingChanged: (payload: CameraFacing) => void;
|
|
1000
1030
|
onSwitchCameraButtonClicked: () => void;
|
|
1001
1031
|
onPictureInPictureLayoutEnabled: () => void;
|
|
@@ -1051,17 +1081,20 @@ declare class EventBus {
|
|
|
1051
1081
|
startEmitting(): void;
|
|
1052
1082
|
stopEmitting(): void;
|
|
1053
1083
|
publish<K$1 extends keyof AllEvents>(action: EventBusAction<K$1>, forceEmit?: boolean): void;
|
|
1054
|
-
subscribe<K$1 extends keyof AllEvents>(actionType: K$1, listener: AllEvents[K$1]
|
|
1084
|
+
subscribe<K$1 extends keyof AllEvents>(actionType: K$1, listener: AllEvents[K$1], options?: {
|
|
1085
|
+
signal?: AbortSignal;
|
|
1086
|
+
}): () => void;
|
|
1055
1087
|
}
|
|
1056
1088
|
declare const eventBus: EventBus;
|
|
1057
1089
|
//#endregion
|
|
1058
1090
|
//#region calls-sdk-core/handlers/conference.d.ts
|
|
1059
|
-
declare function
|
|
1091
|
+
declare function _createConference(): Promise<void>;
|
|
1092
|
+
declare function createConference(): Promise<void>;
|
|
1060
1093
|
declare function muteParticipant(participantId: string): void;
|
|
1061
1094
|
declare function pauseParticipantVideo(participantId: string): void;
|
|
1062
1095
|
//#endregion
|
|
1063
1096
|
//#region calls-sdk-core/handlers/connection.d.ts
|
|
1064
|
-
declare function connect(
|
|
1097
|
+
declare function connect(autoJoinConference?: boolean): Promise<void>;
|
|
1065
1098
|
//#endregion
|
|
1066
1099
|
//#region calls-sdk-core/handlers/devices.d.ts
|
|
1067
1100
|
declare function areDevicesDifferent(existingDevices?: MediaDeviceInfo[], newDevices?: MediaDeviceInfo[]): boolean;
|
|
@@ -1077,7 +1110,9 @@ declare function removeScreenShareParticipant(participantId: string): void;
|
|
|
1077
1110
|
//#endregion
|
|
1078
1111
|
//#region calls-sdk-core/handlers/session.d.ts
|
|
1079
1112
|
declare function startSession(): void;
|
|
1080
|
-
declare function leaveSession(
|
|
1113
|
+
declare function leaveSession(options?: {
|
|
1114
|
+
forceLeave?: boolean;
|
|
1115
|
+
}): Promise<void>;
|
|
1081
1116
|
declare function leaveSessionDueToIdleTimeout(): Promise<void>;
|
|
1082
1117
|
declare function reconnectSession(): Promise<void>;
|
|
1083
1118
|
declare function cancelPendingReconnect(): void;
|
|
@@ -1085,6 +1120,7 @@ declare function cancelPendingReconnect(): void;
|
|
|
1085
1120
|
//#region calls-sdk-core/handlers/track.d.ts
|
|
1086
1121
|
declare function createLocalTrackF(type: 'audio' | 'video', deviceId?: string | null, timeout?: number | null, additionalOptions?: ITrackOptions): Promise<any>;
|
|
1087
1122
|
declare function createLocalTrack(type: 'audio' | 'video', deviceId?: string | null, cameraFacing?: CameraFacingInternal): Promise<void>;
|
|
1123
|
+
declare function createLocalTracks(): void;
|
|
1088
1124
|
declare function updateAudioInputDevice(deviceId: string): void;
|
|
1089
1125
|
declare function updateAudioInputDeviceState(device?: AudioInputDevice, skipSubscribe?: boolean): void;
|
|
1090
1126
|
declare function updateVideoInputDevice(deviceId: string | null, cameraFacing?: CameraFacingInternal): Promise<void>;
|
|
@@ -1224,7 +1260,7 @@ interface TranslationState {
|
|
|
1224
1260
|
translations: Record<string, typeof __json_default_export>;
|
|
1225
1261
|
currentLocale: CometChatSupportedLocale | Omit<string, CometChatSupportedLocale>;
|
|
1226
1262
|
}
|
|
1227
|
-
declare const useTranslationStore:
|
|
1263
|
+
declare const useTranslationStore: zustand5.UseBoundStore<Omit<zustand5.StoreApi<Omit<TranslationState, "reset" | "setLocale"> & {
|
|
1228
1264
|
reset: () => void;
|
|
1229
1265
|
setLocale: (locale: CometChatSupportedLocale) => void;
|
|
1230
1266
|
}>, "subscribe"> & {
|
|
@@ -1362,6 +1398,18 @@ declare const useTranslation: () => {
|
|
|
1362
1398
|
}>;
|
|
1363
1399
|
};
|
|
1364
1400
|
//#endregion
|
|
1401
|
+
//#region src/app-settings.d.ts
|
|
1402
|
+
declare const RegionSchema: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TransformAction<string, string>, v.UnionSchema<[v.LiteralSchema<"eu", undefined>, v.LiteralSchema<"us", undefined>, v.LiteralSchema<"in", undefined>, v.LiteralSchema<"EU", undefined>, v.LiteralSchema<"US", undefined>, v.LiteralSchema<"IN", undefined>], undefined>]>;
|
|
1403
|
+
declare const CallAppSettingsSchema: v.ObjectSchema<{
|
|
1404
|
+
readonly appId: v.StringSchema<undefined>;
|
|
1405
|
+
readonly region: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TransformAction<string, string>, v.UnionSchema<[v.LiteralSchema<"eu", undefined>, v.LiteralSchema<"us", undefined>, v.LiteralSchema<"in", undefined>, v.LiteralSchema<"EU", undefined>, v.LiteralSchema<"US", undefined>, v.LiteralSchema<"IN", undefined>], undefined>]>;
|
|
1406
|
+
readonly authKey: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1407
|
+
readonly adminHost: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1408
|
+
readonly clientHost: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1409
|
+
readonly host: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1410
|
+
}, undefined>;
|
|
1411
|
+
type CallAppSettings = v.InferOutput<typeof CallAppSettingsSchema>;
|
|
1412
|
+
//#endregion
|
|
1365
1413
|
//#region src/native-communication/native-to-js.native.d.ts
|
|
1366
1414
|
declare function setupNativeEventListeners(): void;
|
|
1367
1415
|
//#endregion
|
|
@@ -2103,7 +2151,7 @@ type _Region = keyof typeof REGION;
|
|
|
2103
2151
|
type Region = _Region | Omit<string, _Region>;
|
|
2104
2152
|
type _THost = `rtc-${_Region}.cometchat.io`;
|
|
2105
2153
|
type Host = _THost | Omit<string, _THost>;
|
|
2106
|
-
interface AudioMode {
|
|
2154
|
+
interface AudioMode$1 {
|
|
2107
2155
|
isSelected: boolean;
|
|
2108
2156
|
mode: string;
|
|
2109
2157
|
}
|
|
@@ -2596,25 +2644,12 @@ declare class MainVideoContainerSetting {
|
|
|
2596
2644
|
setUserListButtonParams(position?: Position, visibility?: boolean): void;
|
|
2597
2645
|
}
|
|
2598
2646
|
//#endregion
|
|
2599
|
-
//#region src/
|
|
2647
|
+
//#region src/AppReactNativeSDK.d.ts
|
|
2600
2648
|
interface AppProps extends Partial<ConfigStateMobile & ConfigStateBoth> {
|
|
2601
2649
|
callToken: string;
|
|
2602
|
-
|
|
2650
|
+
sessionSettings?: CallSettings | Partial<ConfigStateMobile & ConfigStateBoth>;
|
|
2603
2651
|
}
|
|
2604
|
-
declare function
|
|
2605
|
-
declare const AppComponent: typeof App;
|
|
2606
|
-
//#endregion
|
|
2607
|
-
//#region src/app-settings.d.ts
|
|
2608
|
-
declare const RegionSchema: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TransformAction<string, string>, v.UnionSchema<[v.LiteralSchema<"eu", undefined>, v.LiteralSchema<"us", undefined>, v.LiteralSchema<"in", undefined>, v.LiteralSchema<"EU", undefined>, v.LiteralSchema<"US", undefined>, v.LiteralSchema<"IN", undefined>], undefined>]>;
|
|
2609
|
-
declare const CallAppSettingsSchema: v.ObjectSchema<{
|
|
2610
|
-
readonly appId: v.StringSchema<undefined>;
|
|
2611
|
-
readonly region: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TransformAction<string, string>, v.UnionSchema<[v.LiteralSchema<"eu", undefined>, v.LiteralSchema<"us", undefined>, v.LiteralSchema<"in", undefined>, v.LiteralSchema<"EU", undefined>, v.LiteralSchema<"US", undefined>, v.LiteralSchema<"IN", undefined>], undefined>]>;
|
|
2612
|
-
readonly authKey: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2613
|
-
readonly adminHost: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2614
|
-
readonly clientHost: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2615
|
-
readonly host: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2616
|
-
}, undefined>;
|
|
2617
|
-
type CallAppSettings = v.InferOutput<typeof CallAppSettingsSchema>;
|
|
2652
|
+
declare function AppReactNativeSDK(props: AppProps): React.JSX.Element;
|
|
2618
2653
|
//#endregion
|
|
2619
2654
|
//#region src/v4/models/ListnerHandler.d.ts
|
|
2620
2655
|
interface IMultiOngoingCallListener extends OngoingCallListener {
|
|
@@ -3763,7 +3798,7 @@ declare class CometChatCalls$1 {
|
|
|
3763
3798
|
* Method to get all the available audio output devices.
|
|
3764
3799
|
* @returns {Promise<AudioMode[]>}
|
|
3765
3800
|
*/
|
|
3766
|
-
static getAudioOutputModes(): Promise<AudioMode[]>;
|
|
3801
|
+
static getAudioOutputModes(): Promise<AudioMode$1[]>;
|
|
3767
3802
|
/**
|
|
3768
3803
|
* Method to switch from audio call to video call.
|
|
3769
3804
|
* @returns {void}
|
|
@@ -3961,7 +3996,7 @@ declare class CometChatCalls extends SessionMethodsCore {
|
|
|
3961
3996
|
static OngoingCallListener: typeof OngoingCallListener;
|
|
3962
3997
|
static CallSettingsBuilder: typeof CallSettingsBuilder;
|
|
3963
3998
|
static CallAppSettingsBuilder: typeof CallAppSettingsBuilder;
|
|
3964
|
-
static Component: typeof
|
|
3999
|
+
static Component: typeof AppReactNativeSDK;
|
|
3965
4000
|
/**
|
|
3966
4001
|
* Initializes the CometChat Calls SDK with the provided app settings.
|
|
3967
4002
|
* Must be called before any other SDK methods.
|
|
@@ -4044,6 +4079,7 @@ declare class CometChatCalls extends SessionMethodsCore {
|
|
|
4044
4079
|
private static logoutInternal;
|
|
4045
4080
|
private static callGenerateTokenAPI;
|
|
4046
4081
|
private static callVerifyTokenAPI;
|
|
4082
|
+
private static getStorageKey;
|
|
4047
4083
|
private static saveUser;
|
|
4048
4084
|
private static getSavedUser;
|
|
4049
4085
|
private static clearSavedUser;
|
|
@@ -4057,10 +4093,25 @@ declare class CometChatCalls extends SessionMethodsCore {
|
|
|
4057
4093
|
* Adds an event listener for SDK events.
|
|
4058
4094
|
* @param eventType - The type of event to listen for.
|
|
4059
4095
|
* @param listener - The callback function to invoke when the event fires.
|
|
4096
|
+
* @param options - Optional configuration including an AbortSignal for automatic cleanup.
|
|
4060
4097
|
* @returns An unsubscribe function to remove the listener.
|
|
4061
4098
|
*/
|
|
4062
|
-
static addEventListener<K$1 extends keyof MobileSDKEvents>(eventType: K$1, listener: MobileSDKEvents[K$1]
|
|
4099
|
+
static addEventListener<K$1 extends keyof MobileSDKEvents>(eventType: K$1, listener: MobileSDKEvents[K$1], options?: {
|
|
4100
|
+
signal?: AbortSignal;
|
|
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;
|
|
4107
|
+
/**
|
|
4108
|
+
* Enables Picture-in-Picture (PIP) layout during the call.
|
|
4109
|
+
*/
|
|
4110
|
+
static enablePictureInPictureLayout(): void;
|
|
4111
|
+
/**
|
|
4112
|
+
* Disables Picture-in-Picture (PIP) layout.
|
|
4113
|
+
*/
|
|
4114
|
+
static disablePictureInPictureLayout(): void;
|
|
4063
4115
|
}
|
|
4064
4116
|
//#endregion
|
|
4065
|
-
export { CometChatCalls };
|
|
4066
|
-
//# sourceMappingURL=index.d.mts.map
|
|
4117
|
+
export { CometChatCalls };
|