@cometchat/calls-sdk-react-native 5.0.0-beta.2 → 5.0.0-beta.3
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 +51 -56
- package/dist/index.d.ts +43 -48
- package/dist/index.js +160 -96
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +160 -96
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
|
-
import * as
|
|
2
|
+
import * as zustand3 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";
|
|
@@ -354,7 +354,7 @@ type Actions$5 = {
|
|
|
354
354
|
isMobileSDK: () => boolean;
|
|
355
355
|
isMobile: () => boolean;
|
|
356
356
|
};
|
|
357
|
-
declare const useBaseStore:
|
|
357
|
+
declare const useBaseStore: zustand3.UseBoundStore<Omit<Omit<zustand3.StoreApi<BaseState & Actions$5>, "subscribe"> & {
|
|
358
358
|
subscribe: {
|
|
359
359
|
(listener: (selectedState: BaseState & Actions$5, previousSelectedState: BaseState & Actions$5) => void): () => void;
|
|
360
360
|
<U>(selector: (state: BaseState & Actions$5) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
|
|
@@ -429,9 +429,10 @@ type Actions$4 = {
|
|
|
429
429
|
raiseHand: (participantId: string, timestamp: number) => void;
|
|
430
430
|
lowerHand: (participantId: string) => void;
|
|
431
431
|
leaveConference: () => Promise<void>;
|
|
432
|
+
endConference: () => Promise<void>;
|
|
432
433
|
stopRecording: () => Promise<void>;
|
|
433
434
|
};
|
|
434
|
-
declare const useConferenceStore:
|
|
435
|
+
declare const useConferenceStore: zustand3.UseBoundStore<Omit<zustand3.StoreApi<ConferenceState & Actions$4>, "subscribe"> & {
|
|
435
436
|
subscribe: {
|
|
436
437
|
(listener: (selectedState: ConferenceState & Actions$4, previousSelectedState: ConferenceState & Actions$4) => void): () => void;
|
|
437
438
|
<U>(selector: (state: ConferenceState & Actions$4) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
|
|
@@ -457,6 +458,7 @@ type ConfigStateInternal = {
|
|
|
457
458
|
sessionId?: string;
|
|
458
459
|
iAmRecorder: boolean;
|
|
459
460
|
showFrameRate: boolean;
|
|
461
|
+
enableCompanionMode: boolean;
|
|
460
462
|
};
|
|
461
463
|
type ConfigStateMobile = {
|
|
462
464
|
audioMode?: AudioMode$1['type'];
|
|
@@ -484,7 +486,6 @@ type ConfigStateBoth = {
|
|
|
484
486
|
hideToggleAudioButton: boolean;
|
|
485
487
|
hideToggleVideoButton: boolean;
|
|
486
488
|
hideParticipantListButton: boolean;
|
|
487
|
-
hideSwitchLayoutButton: boolean;
|
|
488
489
|
hideChatButton: boolean;
|
|
489
490
|
hideScreenSharingButton: boolean;
|
|
490
491
|
hideSessionTimer: boolean;
|
|
@@ -500,12 +501,13 @@ type ConfigStateBoth = {
|
|
|
500
501
|
idleTimeoutPeriodAfterPrompt: number;
|
|
501
502
|
enableSpotlightDrag: boolean;
|
|
502
503
|
enableSpotlightSwap: boolean;
|
|
504
|
+
isPeerCall: boolean;
|
|
503
505
|
};
|
|
504
506
|
type ConfigState = ConfigStateInternal & ConfigStateMobile & ConfigStateWeb & ConfigStateBoth;
|
|
505
507
|
type Actions$3 = {
|
|
506
508
|
reset: () => void;
|
|
507
509
|
};
|
|
508
|
-
declare const useConfigStore:
|
|
510
|
+
declare const useConfigStore: zustand3.UseBoundStore<Omit<zustand3.StoreApi<ConfigStateInternal & ConfigStateMobile & ConfigStateWeb & ConfigStateBoth & Actions$3>, "subscribe"> & {
|
|
509
511
|
subscribe: {
|
|
510
512
|
(listener: (selectedState: ConfigStateInternal & ConfigStateMobile & ConfigStateWeb & ConfigStateBoth & Actions$3, previousSelectedState: ConfigStateInternal & ConfigStateMobile & ConfigStateWeb & ConfigStateBoth & Actions$3) => void): () => void;
|
|
511
513
|
<U>(selector: (state: ConfigStateInternal & ConfigStateMobile & ConfigStateWeb & ConfigStateBoth & Actions$3) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
|
|
@@ -657,7 +659,7 @@ type Actions$2 = {
|
|
|
657
659
|
disconnect: () => Promise<void>;
|
|
658
660
|
reset: () => void;
|
|
659
661
|
};
|
|
660
|
-
declare const useConnectionStore:
|
|
662
|
+
declare const useConnectionStore: zustand3.UseBoundStore<Omit<zustand3.StoreApi<ConnectionState & Actions$2>, "subscribe"> & {
|
|
661
663
|
subscribe: {
|
|
662
664
|
(listener: (selectedState: ConnectionState & Actions$2, previousSelectedState: ConnectionState & Actions$2) => void): () => void;
|
|
663
665
|
<U>(selector: (state: ConnectionState & Actions$2) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
|
|
@@ -666,6 +668,7 @@ declare const useConnectionStore: zustand9.UseBoundStore<Omit<zustand9.StoreApi<
|
|
|
666
668
|
} | undefined): () => void;
|
|
667
669
|
};
|
|
668
670
|
}>;
|
|
671
|
+
declare function waitForConnection(): Promise<void>;
|
|
669
672
|
//#endregion
|
|
670
673
|
//#region calls-sdk-core/utils/schema/human-participant.d.ts
|
|
671
674
|
declare const HumanParticipantSchema: v.ObjectSchema<{
|
|
@@ -707,7 +710,7 @@ type Actions$1 = {
|
|
|
707
710
|
getParticipantById: (pid: string) => HumanParticipant | undefined;
|
|
708
711
|
reset: () => void;
|
|
709
712
|
};
|
|
710
|
-
declare const useParticipantStore:
|
|
713
|
+
declare const useParticipantStore: zustand3.UseBoundStore<Omit<zustand3.StoreApi<ParticipantsState & Actions$1>, "subscribe"> & {
|
|
711
714
|
subscribe: {
|
|
712
715
|
(listener: (selectedState: ParticipantsState & Actions$1, previousSelectedState: ParticipantsState & Actions$1) => void): () => void;
|
|
713
716
|
<U>(selector: (state: ParticipantsState & Actions$1) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
|
|
@@ -753,7 +756,7 @@ type Actions = {
|
|
|
753
756
|
updateTrack: (originalTrack: any, updatedTrack: Partial<Track>) => void;
|
|
754
757
|
updateLocalTrack: (mediaType: MediaType, updatedTrack: Partial<Track>) => void;
|
|
755
758
|
};
|
|
756
|
-
declare const useTracksStore:
|
|
759
|
+
declare const useTracksStore: zustand3.UseBoundStore<Omit<zustand3.StoreApi<TracksState & Actions>, "subscribe"> & {
|
|
757
760
|
subscribe: {
|
|
758
761
|
(listener: (selectedState: TracksState & Actions, previousSelectedState: TracksState & Actions) => void): () => void;
|
|
759
762
|
<U>(selector: (state: TracksState & Actions) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
|
|
@@ -824,14 +827,6 @@ declare class SessionMethodsCore {
|
|
|
824
827
|
* Local user leaves the current session.
|
|
825
828
|
*/
|
|
826
829
|
static leaveSession(): void;
|
|
827
|
-
/**
|
|
828
|
-
* Starts sharing the user's screen with other participants.
|
|
829
|
-
*/
|
|
830
|
-
static startScreenSharing(): void;
|
|
831
|
-
/**
|
|
832
|
-
* Stops the ongoing screen sharing session.
|
|
833
|
-
*/
|
|
834
|
-
static stopScreenSharing(): void;
|
|
835
830
|
/**
|
|
836
831
|
* Raises the user's virtual hand in the call.
|
|
837
832
|
*/
|
|
@@ -857,14 +852,6 @@ declare class SessionMethodsCore {
|
|
|
857
852
|
* Stops the ongoing call recording.
|
|
858
853
|
*/
|
|
859
854
|
static stopRecording(): void;
|
|
860
|
-
/**
|
|
861
|
-
* Enables Picture-in-Picture (PIP) layout during the call.
|
|
862
|
-
*/
|
|
863
|
-
static enablePictureInPictureLayout(): void;
|
|
864
|
-
/**
|
|
865
|
-
* Disables Picture-in-Picture (PIP) layout.
|
|
866
|
-
*/
|
|
867
|
-
static disablePictureInPictureLayout(): void;
|
|
868
855
|
/**
|
|
869
856
|
* Pins a participant's video to focus on them.
|
|
870
857
|
* @param participantId - The ID of the participant to pin.
|
|
@@ -890,14 +877,6 @@ declare class SessionMethodsCore {
|
|
|
890
877
|
* @param count - The number of unread messages.
|
|
891
878
|
*/
|
|
892
879
|
static setChatButtonUnreadCount(count: number): void;
|
|
893
|
-
/**
|
|
894
|
-
* @deprecated use startScreenSharing() instead
|
|
895
|
-
*/
|
|
896
|
-
static startScreenShare(): void;
|
|
897
|
-
/**
|
|
898
|
-
* @deprecated use stopScreenSharing() instead
|
|
899
|
-
*/
|
|
900
|
-
static stopScreenShare(): void;
|
|
901
880
|
/**
|
|
902
881
|
* @deprecated switchToVideoCall is deprecated and not supported.
|
|
903
882
|
*/
|
|
@@ -927,7 +906,7 @@ type Failure<E> = {
|
|
|
927
906
|
error: E;
|
|
928
907
|
};
|
|
929
908
|
type Result<T, E = Error> = Success<T> | Failure<E>;
|
|
930
|
-
declare function tryCatch<T, E = Error>(promise: Promise<T
|
|
909
|
+
declare function tryCatch<T, E = Error>(promise: Promise<T>, timeoutMs?: number): Promise<Result<T, E>>;
|
|
931
910
|
declare function tryCatchSync<T, E = Error>(fn: () => T): Result<T, E>;
|
|
932
911
|
//#endregion
|
|
933
912
|
//#region calls-sdk-core/utils/update-config.d.ts
|
|
@@ -1051,17 +1030,20 @@ declare class EventBus {
|
|
|
1051
1030
|
startEmitting(): void;
|
|
1052
1031
|
stopEmitting(): void;
|
|
1053
1032
|
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]
|
|
1033
|
+
subscribe<K$1 extends keyof AllEvents>(actionType: K$1, listener: AllEvents[K$1], options?: {
|
|
1034
|
+
signal?: AbortSignal;
|
|
1035
|
+
}): () => void;
|
|
1055
1036
|
}
|
|
1056
1037
|
declare const eventBus: EventBus;
|
|
1057
1038
|
//#endregion
|
|
1058
1039
|
//#region calls-sdk-core/handlers/conference.d.ts
|
|
1059
|
-
declare function
|
|
1040
|
+
declare function _createConference(): Promise<void>;
|
|
1041
|
+
declare function createConference(): Promise<void>;
|
|
1060
1042
|
declare function muteParticipant(participantId: string): void;
|
|
1061
1043
|
declare function pauseParticipantVideo(participantId: string): void;
|
|
1062
1044
|
//#endregion
|
|
1063
1045
|
//#region calls-sdk-core/handlers/connection.d.ts
|
|
1064
|
-
declare function connect(
|
|
1046
|
+
declare function connect(autoJoinConference?: boolean): Promise<void>;
|
|
1065
1047
|
//#endregion
|
|
1066
1048
|
//#region calls-sdk-core/handlers/devices.d.ts
|
|
1067
1049
|
declare function areDevicesDifferent(existingDevices?: MediaDeviceInfo[], newDevices?: MediaDeviceInfo[]): boolean;
|
|
@@ -1077,7 +1059,9 @@ declare function removeScreenShareParticipant(participantId: string): void;
|
|
|
1077
1059
|
//#endregion
|
|
1078
1060
|
//#region calls-sdk-core/handlers/session.d.ts
|
|
1079
1061
|
declare function startSession(): void;
|
|
1080
|
-
declare function leaveSession(
|
|
1062
|
+
declare function leaveSession(options?: {
|
|
1063
|
+
forceLeave?: boolean;
|
|
1064
|
+
}): Promise<void>;
|
|
1081
1065
|
declare function leaveSessionDueToIdleTimeout(): Promise<void>;
|
|
1082
1066
|
declare function reconnectSession(): Promise<void>;
|
|
1083
1067
|
declare function cancelPendingReconnect(): void;
|
|
@@ -1085,6 +1069,7 @@ declare function cancelPendingReconnect(): void;
|
|
|
1085
1069
|
//#region calls-sdk-core/handlers/track.d.ts
|
|
1086
1070
|
declare function createLocalTrackF(type: 'audio' | 'video', deviceId?: string | null, timeout?: number | null, additionalOptions?: ITrackOptions): Promise<any>;
|
|
1087
1071
|
declare function createLocalTrack(type: 'audio' | 'video', deviceId?: string | null, cameraFacing?: CameraFacingInternal): Promise<void>;
|
|
1072
|
+
declare function createLocalTracks(): void;
|
|
1088
1073
|
declare function updateAudioInputDevice(deviceId: string): void;
|
|
1089
1074
|
declare function updateAudioInputDeviceState(device?: AudioInputDevice, skipSubscribe?: boolean): void;
|
|
1090
1075
|
declare function updateVideoInputDevice(deviceId: string | null, cameraFacing?: CameraFacingInternal): Promise<void>;
|
|
@@ -1224,7 +1209,7 @@ interface TranslationState {
|
|
|
1224
1209
|
translations: Record<string, typeof __json_default_export>;
|
|
1225
1210
|
currentLocale: CometChatSupportedLocale | Omit<string, CometChatSupportedLocale>;
|
|
1226
1211
|
}
|
|
1227
|
-
declare const useTranslationStore:
|
|
1212
|
+
declare const useTranslationStore: zustand3.UseBoundStore<Omit<zustand3.StoreApi<Omit<TranslationState, "reset" | "setLocale"> & {
|
|
1228
1213
|
reset: () => void;
|
|
1229
1214
|
setLocale: (locale: CometChatSupportedLocale) => void;
|
|
1230
1215
|
}>, "subscribe"> & {
|
|
@@ -1362,6 +1347,18 @@ declare const useTranslation: () => {
|
|
|
1362
1347
|
}>;
|
|
1363
1348
|
};
|
|
1364
1349
|
//#endregion
|
|
1350
|
+
//#region src/app-settings.d.ts
|
|
1351
|
+
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>]>;
|
|
1352
|
+
declare const CallAppSettingsSchema: v.ObjectSchema<{
|
|
1353
|
+
readonly appId: v.StringSchema<undefined>;
|
|
1354
|
+
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>]>;
|
|
1355
|
+
readonly authKey: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1356
|
+
readonly adminHost: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1357
|
+
readonly clientHost: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1358
|
+
readonly host: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1359
|
+
}, undefined>;
|
|
1360
|
+
type CallAppSettings = v.InferOutput<typeof CallAppSettingsSchema>;
|
|
1361
|
+
//#endregion
|
|
1365
1362
|
//#region src/native-communication/native-to-js.native.d.ts
|
|
1366
1363
|
declare function setupNativeEventListeners(): void;
|
|
1367
1364
|
//#endregion
|
|
@@ -2596,25 +2593,12 @@ declare class MainVideoContainerSetting {
|
|
|
2596
2593
|
setUserListButtonParams(position?: Position, visibility?: boolean): void;
|
|
2597
2594
|
}
|
|
2598
2595
|
//#endregion
|
|
2599
|
-
//#region src/
|
|
2596
|
+
//#region src/AppReactNativeSDK.d.ts
|
|
2600
2597
|
interface AppProps extends Partial<ConfigStateMobile & ConfigStateBoth> {
|
|
2601
2598
|
callToken: string;
|
|
2602
|
-
|
|
2599
|
+
sessionSettings?: CallSettings | Partial<ConfigStateMobile & ConfigStateBoth>;
|
|
2603
2600
|
}
|
|
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>;
|
|
2601
|
+
declare function AppReactNativeSDK(props: AppProps): React.JSX.Element;
|
|
2618
2602
|
//#endregion
|
|
2619
2603
|
//#region src/v4/models/ListnerHandler.d.ts
|
|
2620
2604
|
interface IMultiOngoingCallListener extends OngoingCallListener {
|
|
@@ -3961,7 +3945,7 @@ declare class CometChatCalls extends SessionMethodsCore {
|
|
|
3961
3945
|
static OngoingCallListener: typeof OngoingCallListener;
|
|
3962
3946
|
static CallSettingsBuilder: typeof CallSettingsBuilder;
|
|
3963
3947
|
static CallAppSettingsBuilder: typeof CallAppSettingsBuilder;
|
|
3964
|
-
static Component: typeof
|
|
3948
|
+
static Component: typeof AppReactNativeSDK;
|
|
3965
3949
|
/**
|
|
3966
3950
|
* Initializes the CometChat Calls SDK with the provided app settings.
|
|
3967
3951
|
* Must be called before any other SDK methods.
|
|
@@ -4057,9 +4041,20 @@ declare class CometChatCalls extends SessionMethodsCore {
|
|
|
4057
4041
|
* Adds an event listener for SDK events.
|
|
4058
4042
|
* @param eventType - The type of event to listen for.
|
|
4059
4043
|
* @param listener - The callback function to invoke when the event fires.
|
|
4044
|
+
* @param options - Optional configuration including an AbortSignal for automatic cleanup.
|
|
4060
4045
|
* @returns An unsubscribe function to remove the listener.
|
|
4061
4046
|
*/
|
|
4062
|
-
static addEventListener<K$1 extends keyof MobileSDKEvents>(eventType: K$1, listener: MobileSDKEvents[K$1]
|
|
4047
|
+
static addEventListener<K$1 extends keyof MobileSDKEvents>(eventType: K$1, listener: MobileSDKEvents[K$1], options?: {
|
|
4048
|
+
signal?: AbortSignal;
|
|
4049
|
+
}): () => void;
|
|
4050
|
+
/**
|
|
4051
|
+
* Enables Picture-in-Picture (PIP) layout during the call.
|
|
4052
|
+
*/
|
|
4053
|
+
static enablePictureInPictureLayout(): void;
|
|
4054
|
+
/**
|
|
4055
|
+
* Disables Picture-in-Picture (PIP) layout.
|
|
4056
|
+
*/
|
|
4057
|
+
static disablePictureInPictureLayout(): void;
|
|
4063
4058
|
}
|
|
4064
4059
|
//#endregion
|
|
4065
4060
|
export { CometChatCalls };
|
package/dist/index.d.ts
CHANGED
|
@@ -429,6 +429,7 @@ type Actions$4 = {
|
|
|
429
429
|
raiseHand: (participantId: string, timestamp: number) => void;
|
|
430
430
|
lowerHand: (participantId: string) => void;
|
|
431
431
|
leaveConference: () => Promise<void>;
|
|
432
|
+
endConference: () => Promise<void>;
|
|
432
433
|
stopRecording: () => Promise<void>;
|
|
433
434
|
};
|
|
434
435
|
declare const useConferenceStore: zustand1.UseBoundStore<Omit<zustand1.StoreApi<ConferenceState & Actions$4>, "subscribe"> & {
|
|
@@ -457,6 +458,7 @@ type ConfigStateInternal = {
|
|
|
457
458
|
sessionId?: string;
|
|
458
459
|
iAmRecorder: boolean;
|
|
459
460
|
showFrameRate: boolean;
|
|
461
|
+
enableCompanionMode: boolean;
|
|
460
462
|
};
|
|
461
463
|
type ConfigStateMobile = {
|
|
462
464
|
audioMode?: AudioMode$1['type'];
|
|
@@ -484,7 +486,6 @@ type ConfigStateBoth = {
|
|
|
484
486
|
hideToggleAudioButton: boolean;
|
|
485
487
|
hideToggleVideoButton: boolean;
|
|
486
488
|
hideParticipantListButton: boolean;
|
|
487
|
-
hideSwitchLayoutButton: boolean;
|
|
488
489
|
hideChatButton: boolean;
|
|
489
490
|
hideScreenSharingButton: boolean;
|
|
490
491
|
hideSessionTimer: boolean;
|
|
@@ -500,6 +501,7 @@ type ConfigStateBoth = {
|
|
|
500
501
|
idleTimeoutPeriodAfterPrompt: number;
|
|
501
502
|
enableSpotlightDrag: boolean;
|
|
502
503
|
enableSpotlightSwap: boolean;
|
|
504
|
+
isPeerCall: boolean;
|
|
503
505
|
};
|
|
504
506
|
type ConfigState = ConfigStateInternal & ConfigStateMobile & ConfigStateWeb & ConfigStateBoth;
|
|
505
507
|
type Actions$3 = {
|
|
@@ -666,6 +668,7 @@ declare const useConnectionStore: zustand1.UseBoundStore<Omit<zustand1.StoreApi<
|
|
|
666
668
|
} | undefined): () => void;
|
|
667
669
|
};
|
|
668
670
|
}>;
|
|
671
|
+
declare function waitForConnection(): Promise<void>;
|
|
669
672
|
//#endregion
|
|
670
673
|
//#region calls-sdk-core/utils/schema/human-participant.d.ts
|
|
671
674
|
declare const HumanParticipantSchema: v.ObjectSchema<{
|
|
@@ -824,14 +827,6 @@ declare class SessionMethodsCore {
|
|
|
824
827
|
* Local user leaves the current session.
|
|
825
828
|
*/
|
|
826
829
|
static leaveSession(): void;
|
|
827
|
-
/**
|
|
828
|
-
* Starts sharing the user's screen with other participants.
|
|
829
|
-
*/
|
|
830
|
-
static startScreenSharing(): void;
|
|
831
|
-
/**
|
|
832
|
-
* Stops the ongoing screen sharing session.
|
|
833
|
-
*/
|
|
834
|
-
static stopScreenSharing(): void;
|
|
835
830
|
/**
|
|
836
831
|
* Raises the user's virtual hand in the call.
|
|
837
832
|
*/
|
|
@@ -857,14 +852,6 @@ declare class SessionMethodsCore {
|
|
|
857
852
|
* Stops the ongoing call recording.
|
|
858
853
|
*/
|
|
859
854
|
static stopRecording(): void;
|
|
860
|
-
/**
|
|
861
|
-
* Enables Picture-in-Picture (PIP) layout during the call.
|
|
862
|
-
*/
|
|
863
|
-
static enablePictureInPictureLayout(): void;
|
|
864
|
-
/**
|
|
865
|
-
* Disables Picture-in-Picture (PIP) layout.
|
|
866
|
-
*/
|
|
867
|
-
static disablePictureInPictureLayout(): void;
|
|
868
855
|
/**
|
|
869
856
|
* Pins a participant's video to focus on them.
|
|
870
857
|
* @param participantId - The ID of the participant to pin.
|
|
@@ -890,14 +877,6 @@ declare class SessionMethodsCore {
|
|
|
890
877
|
* @param count - The number of unread messages.
|
|
891
878
|
*/
|
|
892
879
|
static setChatButtonUnreadCount(count: number): void;
|
|
893
|
-
/**
|
|
894
|
-
* @deprecated use startScreenSharing() instead
|
|
895
|
-
*/
|
|
896
|
-
static startScreenShare(): void;
|
|
897
|
-
/**
|
|
898
|
-
* @deprecated use stopScreenSharing() instead
|
|
899
|
-
*/
|
|
900
|
-
static stopScreenShare(): void;
|
|
901
880
|
/**
|
|
902
881
|
* @deprecated switchToVideoCall is deprecated and not supported.
|
|
903
882
|
*/
|
|
@@ -927,7 +906,7 @@ type Failure<E> = {
|
|
|
927
906
|
error: E;
|
|
928
907
|
};
|
|
929
908
|
type Result<T, E = Error> = Success<T> | Failure<E>;
|
|
930
|
-
declare function tryCatch<T, E = Error>(promise: Promise<T
|
|
909
|
+
declare function tryCatch<T, E = Error>(promise: Promise<T>, timeoutMs?: number): Promise<Result<T, E>>;
|
|
931
910
|
declare function tryCatchSync<T, E = Error>(fn: () => T): Result<T, E>;
|
|
932
911
|
//#endregion
|
|
933
912
|
//#region calls-sdk-core/utils/update-config.d.ts
|
|
@@ -1051,17 +1030,20 @@ declare class EventBus {
|
|
|
1051
1030
|
startEmitting(): void;
|
|
1052
1031
|
stopEmitting(): void;
|
|
1053
1032
|
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]
|
|
1033
|
+
subscribe<K$1 extends keyof AllEvents>(actionType: K$1, listener: AllEvents[K$1], options?: {
|
|
1034
|
+
signal?: AbortSignal;
|
|
1035
|
+
}): () => void;
|
|
1055
1036
|
}
|
|
1056
1037
|
declare const eventBus: EventBus;
|
|
1057
1038
|
//#endregion
|
|
1058
1039
|
//#region calls-sdk-core/handlers/conference.d.ts
|
|
1059
|
-
declare function
|
|
1040
|
+
declare function _createConference(): Promise<void>;
|
|
1041
|
+
declare function createConference(): Promise<void>;
|
|
1060
1042
|
declare function muteParticipant(participantId: string): void;
|
|
1061
1043
|
declare function pauseParticipantVideo(participantId: string): void;
|
|
1062
1044
|
//#endregion
|
|
1063
1045
|
//#region calls-sdk-core/handlers/connection.d.ts
|
|
1064
|
-
declare function connect(
|
|
1046
|
+
declare function connect(autoJoinConference?: boolean): Promise<void>;
|
|
1065
1047
|
//#endregion
|
|
1066
1048
|
//#region calls-sdk-core/handlers/devices.d.ts
|
|
1067
1049
|
declare function areDevicesDifferent(existingDevices?: MediaDeviceInfo[], newDevices?: MediaDeviceInfo[]): boolean;
|
|
@@ -1077,7 +1059,9 @@ declare function removeScreenShareParticipant(participantId: string): void;
|
|
|
1077
1059
|
//#endregion
|
|
1078
1060
|
//#region calls-sdk-core/handlers/session.d.ts
|
|
1079
1061
|
declare function startSession(): void;
|
|
1080
|
-
declare function leaveSession(
|
|
1062
|
+
declare function leaveSession(options?: {
|
|
1063
|
+
forceLeave?: boolean;
|
|
1064
|
+
}): Promise<void>;
|
|
1081
1065
|
declare function leaveSessionDueToIdleTimeout(): Promise<void>;
|
|
1082
1066
|
declare function reconnectSession(): Promise<void>;
|
|
1083
1067
|
declare function cancelPendingReconnect(): void;
|
|
@@ -1085,6 +1069,7 @@ declare function cancelPendingReconnect(): void;
|
|
|
1085
1069
|
//#region calls-sdk-core/handlers/track.d.ts
|
|
1086
1070
|
declare function createLocalTrackF(type: 'audio' | 'video', deviceId?: string | null, timeout?: number | null, additionalOptions?: ITrackOptions): Promise<any>;
|
|
1087
1071
|
declare function createLocalTrack(type: 'audio' | 'video', deviceId?: string | null, cameraFacing?: CameraFacingInternal): Promise<void>;
|
|
1072
|
+
declare function createLocalTracks(): void;
|
|
1088
1073
|
declare function updateAudioInputDevice(deviceId: string): void;
|
|
1089
1074
|
declare function updateAudioInputDeviceState(device?: AudioInputDevice, skipSubscribe?: boolean): void;
|
|
1090
1075
|
declare function updateVideoInputDevice(deviceId: string | null, cameraFacing?: CameraFacingInternal): Promise<void>;
|
|
@@ -1362,6 +1347,18 @@ declare const useTranslation: () => {
|
|
|
1362
1347
|
}>;
|
|
1363
1348
|
};
|
|
1364
1349
|
//#endregion
|
|
1350
|
+
//#region src/app-settings.d.ts
|
|
1351
|
+
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>]>;
|
|
1352
|
+
declare const CallAppSettingsSchema: v.ObjectSchema<{
|
|
1353
|
+
readonly appId: v.StringSchema<undefined>;
|
|
1354
|
+
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>]>;
|
|
1355
|
+
readonly authKey: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1356
|
+
readonly adminHost: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1357
|
+
readonly clientHost: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1358
|
+
readonly host: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1359
|
+
}, undefined>;
|
|
1360
|
+
type CallAppSettings = v.InferOutput<typeof CallAppSettingsSchema>;
|
|
1361
|
+
//#endregion
|
|
1365
1362
|
//#region src/native-communication/native-to-js.native.d.ts
|
|
1366
1363
|
declare function setupNativeEventListeners(): void;
|
|
1367
1364
|
//#endregion
|
|
@@ -2596,25 +2593,12 @@ declare class MainVideoContainerSetting {
|
|
|
2596
2593
|
setUserListButtonParams(position?: Position, visibility?: boolean): void;
|
|
2597
2594
|
}
|
|
2598
2595
|
//#endregion
|
|
2599
|
-
//#region src/
|
|
2596
|
+
//#region src/AppReactNativeSDK.d.ts
|
|
2600
2597
|
interface AppProps extends Partial<ConfigStateMobile & ConfigStateBoth> {
|
|
2601
2598
|
callToken: string;
|
|
2602
|
-
|
|
2599
|
+
sessionSettings?: CallSettings | Partial<ConfigStateMobile & ConfigStateBoth>;
|
|
2603
2600
|
}
|
|
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>;
|
|
2601
|
+
declare function AppReactNativeSDK(props: AppProps): React.JSX.Element;
|
|
2618
2602
|
//#endregion
|
|
2619
2603
|
//#region src/v4/models/ListnerHandler.d.ts
|
|
2620
2604
|
interface IMultiOngoingCallListener extends OngoingCallListener {
|
|
@@ -3961,7 +3945,7 @@ declare class CometChatCalls extends SessionMethodsCore {
|
|
|
3961
3945
|
static OngoingCallListener: typeof OngoingCallListener;
|
|
3962
3946
|
static CallSettingsBuilder: typeof CallSettingsBuilder;
|
|
3963
3947
|
static CallAppSettingsBuilder: typeof CallAppSettingsBuilder;
|
|
3964
|
-
static Component: typeof
|
|
3948
|
+
static Component: typeof AppReactNativeSDK;
|
|
3965
3949
|
/**
|
|
3966
3950
|
* Initializes the CometChat Calls SDK with the provided app settings.
|
|
3967
3951
|
* Must be called before any other SDK methods.
|
|
@@ -4057,9 +4041,20 @@ declare class CometChatCalls extends SessionMethodsCore {
|
|
|
4057
4041
|
* Adds an event listener for SDK events.
|
|
4058
4042
|
* @param eventType - The type of event to listen for.
|
|
4059
4043
|
* @param listener - The callback function to invoke when the event fires.
|
|
4044
|
+
* @param options - Optional configuration including an AbortSignal for automatic cleanup.
|
|
4060
4045
|
* @returns An unsubscribe function to remove the listener.
|
|
4061
4046
|
*/
|
|
4062
|
-
static addEventListener<K$1 extends keyof MobileSDKEvents>(eventType: K$1, listener: MobileSDKEvents[K$1]
|
|
4047
|
+
static addEventListener<K$1 extends keyof MobileSDKEvents>(eventType: K$1, listener: MobileSDKEvents[K$1], options?: {
|
|
4048
|
+
signal?: AbortSignal;
|
|
4049
|
+
}): () => void;
|
|
4050
|
+
/**
|
|
4051
|
+
* Enables Picture-in-Picture (PIP) layout during the call.
|
|
4052
|
+
*/
|
|
4053
|
+
static enablePictureInPictureLayout(): void;
|
|
4054
|
+
/**
|
|
4055
|
+
* Disables Picture-in-Picture (PIP) layout.
|
|
4056
|
+
*/
|
|
4057
|
+
static disablePictureInPictureLayout(): void;
|
|
4063
4058
|
}
|
|
4064
4059
|
//#endregion
|
|
4065
4060
|
export { CometChatCalls };
|