@cometchat/calls-sdk-react-native 5.0.0-beta.11 → 5.0.0-beta.12
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 +9 -9
- package/dist/index.d.ts +9 -9
- package/dist/index.js +4 -1
- package/dist/index.mjs +4 -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 zustand7 from "zustand";
|
|
3
3
|
import * as zustand_middleware0 from "zustand/middleware";
|
|
4
4
|
import React from "react";
|
|
5
5
|
import JitsiMeetJS from "@cometchat/calls-lib-webrtc";
|
|
@@ -375,7 +375,7 @@ type Actions$5 = {
|
|
|
375
375
|
isMobileSDK: () => boolean;
|
|
376
376
|
isMobile: () => boolean;
|
|
377
377
|
};
|
|
378
|
-
declare const useBaseStore:
|
|
378
|
+
declare const useBaseStore: zustand7.UseBoundStore<Omit<Omit<zustand7.StoreApi<BaseState & Actions$5>, "subscribe"> & {
|
|
379
379
|
subscribe: {
|
|
380
380
|
(listener: (selectedState: BaseState & Actions$5, previousSelectedState: BaseState & Actions$5) => void): () => void;
|
|
381
381
|
<U>(selector: (state: BaseState & Actions$5) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
|
|
@@ -455,7 +455,7 @@ type Actions$4 = {
|
|
|
455
455
|
endConference: () => Promise<void>;
|
|
456
456
|
stopRecording: () => Promise<void>;
|
|
457
457
|
};
|
|
458
|
-
declare const useConferenceStore:
|
|
458
|
+
declare const useConferenceStore: zustand7.UseBoundStore<Omit<zustand7.StoreApi<ConferenceState & Actions$4>, "subscribe"> & {
|
|
459
459
|
subscribe: {
|
|
460
460
|
(listener: (selectedState: ConferenceState & Actions$4, previousSelectedState: ConferenceState & Actions$4) => void): () => void;
|
|
461
461
|
<U>(selector: (state: ConferenceState & Actions$4) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
|
|
@@ -540,7 +540,7 @@ type ConfigState = ConfigStateInternal & ConfigStateMobile & ConfigStateWeb & Co
|
|
|
540
540
|
type Actions$3 = {
|
|
541
541
|
reset: () => void;
|
|
542
542
|
};
|
|
543
|
-
declare const useConfigStore:
|
|
543
|
+
declare const useConfigStore: zustand7.UseBoundStore<Omit<zustand7.StoreApi<ConfigStateInternal & ConfigStateMobile & ConfigStateWeb & ConfigStateBoth & Actions$3>, "subscribe"> & {
|
|
544
544
|
subscribe: {
|
|
545
545
|
(listener: (selectedState: ConfigStateInternal & ConfigStateMobile & ConfigStateWeb & ConfigStateBoth & Actions$3, previousSelectedState: ConfigStateInternal & ConfigStateMobile & ConfigStateWeb & ConfigStateBoth & Actions$3) => void): () => void;
|
|
546
546
|
<U>(selector: (state: ConfigStateInternal & ConfigStateMobile & ConfigStateWeb & ConfigStateBoth & Actions$3) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
|
|
@@ -692,7 +692,7 @@ type Actions$2 = {
|
|
|
692
692
|
disconnect: () => Promise<void>;
|
|
693
693
|
reset: () => void;
|
|
694
694
|
};
|
|
695
|
-
declare const useConnectionStore:
|
|
695
|
+
declare const useConnectionStore: zustand7.UseBoundStore<Omit<zustand7.StoreApi<ConnectionState & Actions$2>, "subscribe"> & {
|
|
696
696
|
subscribe: {
|
|
697
697
|
(listener: (selectedState: ConnectionState & Actions$2, previousSelectedState: ConnectionState & Actions$2) => void): () => void;
|
|
698
698
|
<U>(selector: (state: ConnectionState & Actions$2) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
|
|
@@ -743,7 +743,7 @@ type Actions$1 = {
|
|
|
743
743
|
getParticipantById: (pid: string) => HumanParticipant | undefined;
|
|
744
744
|
reset: () => void;
|
|
745
745
|
};
|
|
746
|
-
declare const useParticipantStore:
|
|
746
|
+
declare const useParticipantStore: zustand7.UseBoundStore<Omit<zustand7.StoreApi<ParticipantsState & Actions$1>, "subscribe"> & {
|
|
747
747
|
subscribe: {
|
|
748
748
|
(listener: (selectedState: ParticipantsState & Actions$1, previousSelectedState: ParticipantsState & Actions$1) => void): () => void;
|
|
749
749
|
<U>(selector: (state: ParticipantsState & Actions$1) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
|
|
@@ -788,7 +788,7 @@ interface ToastActions {
|
|
|
788
788
|
clearAll: () => void;
|
|
789
789
|
reset: () => void;
|
|
790
790
|
}
|
|
791
|
-
declare const useToastStore:
|
|
791
|
+
declare const useToastStore: zustand7.UseBoundStore<zustand7.StoreApi<ToastState & ToastActions>>;
|
|
792
792
|
declare function showToast(params: {
|
|
793
793
|
message: string;
|
|
794
794
|
type?: NotificationType;
|
|
@@ -821,7 +821,7 @@ type Actions = {
|
|
|
821
821
|
updateTrack: (originalTrack: any, updatedTrack: Partial<Track>) => void;
|
|
822
822
|
updateLocalTrack: (mediaType: MediaType, updatedTrack: Partial<Track>) => void;
|
|
823
823
|
};
|
|
824
|
-
declare const useTracksStore:
|
|
824
|
+
declare const useTracksStore: zustand7.UseBoundStore<Omit<zustand7.StoreApi<TracksState & Actions>, "subscribe"> & {
|
|
825
825
|
subscribe: {
|
|
826
826
|
(listener: (selectedState: TracksState & Actions, previousSelectedState: TracksState & Actions) => void): () => void;
|
|
827
827
|
<U>(selector: (state: TracksState & Actions) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
|
|
@@ -1312,7 +1312,7 @@ interface TranslationState {
|
|
|
1312
1312
|
translations: Record<string, typeof __json_default_export>;
|
|
1313
1313
|
currentLocale: CometChatSupportedLocale | Omit<string, CometChatSupportedLocale>;
|
|
1314
1314
|
}
|
|
1315
|
-
declare const useTranslationStore:
|
|
1315
|
+
declare const useTranslationStore: zustand7.UseBoundStore<Omit<zustand7.StoreApi<Omit<TranslationState, "reset" | "setLocale"> & {
|
|
1316
1316
|
reset: () => void;
|
|
1317
1317
|
setLocale: (locale: CometChatSupportedLocale) => void;
|
|
1318
1318
|
}>, "subscribe"> & {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as zustand3 from "zustand";
|
|
2
2
|
import * as zustand_middleware0 from "zustand/middleware";
|
|
3
3
|
import { AppStateStatus } from "react-native";
|
|
4
4
|
import JitsiMeetJS from "@cometchat/calls-lib-webrtc";
|
|
@@ -375,7 +375,7 @@ type Actions$5 = {
|
|
|
375
375
|
isMobileSDK: () => boolean;
|
|
376
376
|
isMobile: () => boolean;
|
|
377
377
|
};
|
|
378
|
-
declare const useBaseStore:
|
|
378
|
+
declare const useBaseStore: zustand3.UseBoundStore<Omit<Omit<zustand3.StoreApi<BaseState & Actions$5>, "subscribe"> & {
|
|
379
379
|
subscribe: {
|
|
380
380
|
(listener: (selectedState: BaseState & Actions$5, previousSelectedState: BaseState & Actions$5) => void): () => void;
|
|
381
381
|
<U>(selector: (state: BaseState & Actions$5) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
|
|
@@ -455,7 +455,7 @@ type Actions$4 = {
|
|
|
455
455
|
endConference: () => Promise<void>;
|
|
456
456
|
stopRecording: () => Promise<void>;
|
|
457
457
|
};
|
|
458
|
-
declare const useConferenceStore:
|
|
458
|
+
declare const useConferenceStore: zustand3.UseBoundStore<Omit<zustand3.StoreApi<ConferenceState & Actions$4>, "subscribe"> & {
|
|
459
459
|
subscribe: {
|
|
460
460
|
(listener: (selectedState: ConferenceState & Actions$4, previousSelectedState: ConferenceState & Actions$4) => void): () => void;
|
|
461
461
|
<U>(selector: (state: ConferenceState & Actions$4) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
|
|
@@ -540,7 +540,7 @@ type ConfigState = ConfigStateInternal & ConfigStateMobile & ConfigStateWeb & Co
|
|
|
540
540
|
type Actions$3 = {
|
|
541
541
|
reset: () => void;
|
|
542
542
|
};
|
|
543
|
-
declare const useConfigStore:
|
|
543
|
+
declare const useConfigStore: zustand3.UseBoundStore<Omit<zustand3.StoreApi<ConfigStateInternal & ConfigStateMobile & ConfigStateWeb & ConfigStateBoth & Actions$3>, "subscribe"> & {
|
|
544
544
|
subscribe: {
|
|
545
545
|
(listener: (selectedState: ConfigStateInternal & ConfigStateMobile & ConfigStateWeb & ConfigStateBoth & Actions$3, previousSelectedState: ConfigStateInternal & ConfigStateMobile & ConfigStateWeb & ConfigStateBoth & Actions$3) => void): () => void;
|
|
546
546
|
<U>(selector: (state: ConfigStateInternal & ConfigStateMobile & ConfigStateWeb & ConfigStateBoth & Actions$3) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
|
|
@@ -692,7 +692,7 @@ type Actions$2 = {
|
|
|
692
692
|
disconnect: () => Promise<void>;
|
|
693
693
|
reset: () => void;
|
|
694
694
|
};
|
|
695
|
-
declare const useConnectionStore:
|
|
695
|
+
declare const useConnectionStore: zustand3.UseBoundStore<Omit<zustand3.StoreApi<ConnectionState & Actions$2>, "subscribe"> & {
|
|
696
696
|
subscribe: {
|
|
697
697
|
(listener: (selectedState: ConnectionState & Actions$2, previousSelectedState: ConnectionState & Actions$2) => void): () => void;
|
|
698
698
|
<U>(selector: (state: ConnectionState & Actions$2) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
|
|
@@ -743,7 +743,7 @@ type Actions$1 = {
|
|
|
743
743
|
getParticipantById: (pid: string) => HumanParticipant | undefined;
|
|
744
744
|
reset: () => void;
|
|
745
745
|
};
|
|
746
|
-
declare const useParticipantStore:
|
|
746
|
+
declare const useParticipantStore: zustand3.UseBoundStore<Omit<zustand3.StoreApi<ParticipantsState & Actions$1>, "subscribe"> & {
|
|
747
747
|
subscribe: {
|
|
748
748
|
(listener: (selectedState: ParticipantsState & Actions$1, previousSelectedState: ParticipantsState & Actions$1) => void): () => void;
|
|
749
749
|
<U>(selector: (state: ParticipantsState & Actions$1) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
|
|
@@ -788,7 +788,7 @@ interface ToastActions {
|
|
|
788
788
|
clearAll: () => void;
|
|
789
789
|
reset: () => void;
|
|
790
790
|
}
|
|
791
|
-
declare const useToastStore:
|
|
791
|
+
declare const useToastStore: zustand3.UseBoundStore<zustand3.StoreApi<ToastState & ToastActions>>;
|
|
792
792
|
declare function showToast(params: {
|
|
793
793
|
message: string;
|
|
794
794
|
type?: NotificationType;
|
|
@@ -821,7 +821,7 @@ type Actions = {
|
|
|
821
821
|
updateTrack: (originalTrack: any, updatedTrack: Partial<Track>) => void;
|
|
822
822
|
updateLocalTrack: (mediaType: MediaType, updatedTrack: Partial<Track>) => void;
|
|
823
823
|
};
|
|
824
|
-
declare const useTracksStore:
|
|
824
|
+
declare const useTracksStore: zustand3.UseBoundStore<Omit<zustand3.StoreApi<TracksState & Actions>, "subscribe"> & {
|
|
825
825
|
subscribe: {
|
|
826
826
|
(listener: (selectedState: TracksState & Actions, previousSelectedState: TracksState & Actions) => void): () => void;
|
|
827
827
|
<U>(selector: (state: TracksState & Actions) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
|
|
@@ -1312,7 +1312,7 @@ interface TranslationState {
|
|
|
1312
1312
|
translations: Record<string, typeof __json_default_export>;
|
|
1313
1313
|
currentLocale: CometChatSupportedLocale | Omit<string, CometChatSupportedLocale>;
|
|
1314
1314
|
}
|
|
1315
|
-
declare const useTranslationStore:
|
|
1315
|
+
declare const useTranslationStore: zustand3.UseBoundStore<Omit<zustand3.StoreApi<Omit<TranslationState, "reset" | "setLocale"> & {
|
|
1316
1316
|
reset: () => void;
|
|
1317
1317
|
setLocale: (locale: CometChatSupportedLocale) => void;
|
|
1318
1318
|
}>, "subscribe"> & {
|
package/dist/index.js
CHANGED
|
@@ -1270,7 +1270,7 @@ function sendInitialConfig() {
|
|
|
1270
1270
|
user_agent: useBaseStore.getState().userAgent,
|
|
1271
1271
|
meeting_id: conference.room?.xmpp?.getJid?.() ?? config.sessionId,
|
|
1272
1272
|
mode: config.layout,
|
|
1273
|
-
commit_id: "
|
|
1273
|
+
commit_id: "bffd2c83"
|
|
1274
1274
|
};
|
|
1275
1275
|
conference.room.addOrReplaceInPresence(CONFERENCE_COMMANDS.initialConfig, { attributes });
|
|
1276
1276
|
}
|
|
@@ -3643,6 +3643,9 @@ eventBus.subscribe(INTERNAL_EVENTS.lifecycle.componentDidMount, () => {
|
|
|
3643
3643
|
});
|
|
3644
3644
|
});
|
|
3645
3645
|
useBaseStore.subscribe((state) => state.appState, (appState) => {
|
|
3646
|
+
if (!getIsConferenceJoined()) {
|
|
3647
|
+
return;
|
|
3648
|
+
}
|
|
3646
3649
|
const sessionType = useConfigStore.getState().sessionType;
|
|
3647
3650
|
if (sessionType !== SESSION_TYPE.VIDEO) {
|
|
3648
3651
|
return;
|
package/dist/index.mjs
CHANGED
|
@@ -1238,7 +1238,7 @@ function sendInitialConfig() {
|
|
|
1238
1238
|
user_agent: useBaseStore.getState().userAgent,
|
|
1239
1239
|
meeting_id: conference.room?.xmpp?.getJid?.() ?? config.sessionId,
|
|
1240
1240
|
mode: config.layout,
|
|
1241
|
-
commit_id: "
|
|
1241
|
+
commit_id: "bffd2c83"
|
|
1242
1242
|
};
|
|
1243
1243
|
conference.room.addOrReplaceInPresence(CONFERENCE_COMMANDS.initialConfig, { attributes });
|
|
1244
1244
|
}
|
|
@@ -3611,6 +3611,9 @@ eventBus.subscribe(INTERNAL_EVENTS.lifecycle.componentDidMount, () => {
|
|
|
3611
3611
|
});
|
|
3612
3612
|
});
|
|
3613
3613
|
useBaseStore.subscribe((state) => state.appState, (appState) => {
|
|
3614
|
+
if (!getIsConferenceJoined()) {
|
|
3615
|
+
return;
|
|
3616
|
+
}
|
|
3614
3617
|
const sessionType = useConfigStore.getState().sessionType;
|
|
3615
3618
|
if (sessionType !== SESSION_TYPE.VIDEO) {
|
|
3616
3619
|
return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cometchat/calls-sdk-react-native",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.12",
|
|
4
4
|
"description": "CometChat Calls SDK for React Native provides voice and video calling capabilities for React Native applications.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"main": "dist/index.js",
|