@cometchat/calls-sdk-react-native 5.0.2-beta.1 → 5.0.3-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import * as zustand0 from "zustand";
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";
@@ -300,64 +300,6 @@ declare const INTERNAL_EVENTS: {
300
300
  readonly SDKInitialized: "internal.SDKInitialized";
301
301
  };
302
302
  };
303
- declare const CAPTION_LANGUAGES: readonly [{
304
- readonly code: "en-US";
305
- readonly label: "English (United States)";
306
- }, {
307
- readonly code: "de-DE";
308
- readonly label: "German (Germany)";
309
- }, {
310
- readonly code: "en-GB";
311
- readonly label: "English (United Kingdom)";
312
- }, {
313
- readonly code: "es-ES";
314
- readonly label: "Spanish (Spain)";
315
- }, {
316
- readonly code: "fr-FR";
317
- readonly label: "French (France)";
318
- }, {
319
- readonly code: "hi-IN";
320
- readonly label: "Hindi (India)";
321
- }, {
322
- readonly code: "hu-HU";
323
- readonly label: "Hungarian (Hungary)";
324
- }, {
325
- readonly code: "it-IT";
326
- readonly label: "Italian (Italy)";
327
- }, {
328
- readonly code: "ja-JP";
329
- readonly label: "Japanese (Japan)";
330
- }, {
331
- readonly code: "ko-KR";
332
- readonly label: "Korean (South Korea)";
333
- }, {
334
- readonly code: "lt-LT";
335
- readonly label: "Lithuanian (Lithuania)";
336
- }, {
337
- readonly code: "ms-MY";
338
- readonly label: "Malay (Malaysia)";
339
- }, {
340
- readonly code: "nl-NL";
341
- readonly label: "Dutch (Netherlands)";
342
- }, {
343
- readonly code: "pt-PT";
344
- readonly label: "Portuguese (Portugal)";
345
- }, {
346
- readonly code: "ru-RU";
347
- readonly label: "Russian (Russia)";
348
- }, {
349
- readonly code: "sv-SE";
350
- readonly label: "Swedish (Sweden)";
351
- }, {
352
- readonly code: "tr-TR";
353
- readonly label: "Turkish (Turkey)";
354
- }, {
355
- readonly code: "zh";
356
- readonly label: "Chinese Mandarin (Simplified, China)";
357
- }, {
358
- readonly code: "zh-TW";
359
- readonly label: "Chinese Mandarin (Traditional, Taiwan)";
360
- }];
361
303
  //#endregion
362
304
  //#region calls-sdk-core/utils/debounce.d.ts
363
305
  declare function debounce<T extends (...args: any[]) => any>(func: T, delay: number): (...args: Parameters<T>) => void;
@@ -375,7 +317,7 @@ type VideoInputDevice = MediaDeviceInfo & {
375
317
  type Subscription = (() => void) | {
376
318
  remove: () => void;
377
319
  };
378
- type SettingsDialogTab = 'audio' | 'video' | 'closedCaption';
320
+ type SettingsDialogTab = 'audio' | 'video';
379
321
  type BaseState = {
380
322
  participantListVisible: boolean;
381
323
  moreMenuVisible: boolean;
@@ -448,7 +390,7 @@ type Actions$5 = {
448
390
  isMobileSDK: () => boolean;
449
391
  isMobile: () => boolean;
450
392
  };
451
- declare const useBaseStore: zustand0.UseBoundStore<Omit<Omit<zustand0.StoreApi<BaseState & Actions$5>, "subscribe"> & {
393
+ declare const useBaseStore: zustand3.UseBoundStore<Omit<Omit<zustand3.StoreApi<BaseState & Actions$5>, "subscribe"> & {
452
394
  subscribe: {
453
395
  (listener: (selectedState: BaseState & Actions$5, previousSelectedState: BaseState & Actions$5) => void): () => void;
454
396
  <U>(selector: (state: BaseState & Actions$5) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
@@ -534,7 +476,7 @@ type Actions$4 = {
534
476
  endConference: () => Promise<void>;
535
477
  stopRecording: () => Promise<void>;
536
478
  };
537
- declare const useConferenceStore: zustand0.UseBoundStore<Omit<zustand0.StoreApi<ConferenceState & Actions$4>, "subscribe"> & {
479
+ declare const useConferenceStore: zustand3.UseBoundStore<Omit<zustand3.StoreApi<ConferenceState & Actions$4>, "subscribe"> & {
538
480
  subscribe: {
539
481
  (listener: (selectedState: ConferenceState & Actions$4, previousSelectedState: ConferenceState & Actions$4) => void): () => void;
540
482
  <U>(selector: (state: ConferenceState & Actions$4) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
@@ -688,14 +630,6 @@ type ConfigStateBoth = {
688
630
  * @default false
689
631
  */
690
632
  autoStartRecording: boolean;
691
- /**
692
- * Automatically starts live transcription as soon as the call begins,
693
- * without the user pressing the transcription button. Transcription must
694
- * be enabled for your app for this to take effect.
695
- *
696
- * @default false
697
- */
698
- autoStartTranscription: boolean;
699
633
  /**
700
634
  * Hides the recording button from the call controls, preventing the user
701
635
  * from manually starting or stopping recording from within the SDK UI.
@@ -796,28 +730,6 @@ type ConfigStateBoth = {
796
730
  * @default false
797
731
  */
798
732
  hideSwitchCameraButton: boolean;
799
- /**
800
- * Hides the closed-caption button that lets the user show or hide live
801
- * captions on screen. Even when set to `false`, the button only appears
802
- * while transcription is running, since captions are produced from the
803
- * live transcript.
804
- *
805
- * @default true
806
- */
807
- hideClosedCaptionButton: boolean;
808
- /**
809
- * Hides the transcription button from the call controls, preventing the
810
- * user from manually starting or stopping live transcription from within
811
- * the SDK UI.
812
- *
813
- * @default true
814
- */
815
- hideTranscriptionButton: boolean;
816
- /**
817
- * The currently selected caption/transcription language code (e.g.
818
- * `en-US`). Selected from the closed-caption settings dropdown.
819
- */
820
- captionLanguage: CaptionLanguageCode;
821
733
  /**
822
734
  * Enables the per-participant context menu — opened by right-clicking (web)
823
735
  * or long-pressing (mobile) a participant's tile — that exposes actions such
@@ -921,7 +833,7 @@ type ConfigState = ConfigStateInternal & ConfigStateMobile & ConfigStateWeb & Co
921
833
  type Actions$3 = {
922
834
  reset: () => void;
923
835
  };
924
- declare const useConfigStore: zustand0.UseBoundStore<Omit<zustand0.StoreApi<ConfigStateInternal & ConfigStateMobile & ConfigStateWeb & ConfigStateBoth & Actions$3>, "subscribe"> & {
836
+ declare const useConfigStore: zustand3.UseBoundStore<Omit<zustand3.StoreApi<ConfigStateInternal & ConfigStateMobile & ConfigStateWeb & ConfigStateBoth & Actions$3>, "subscribe"> & {
925
837
  subscribe: {
926
838
  (listener: (selectedState: ConfigStateInternal & ConfigStateMobile & ConfigStateWeb & ConfigStateBoth & Actions$3, previousSelectedState: ConfigStateInternal & ConfigStateMobile & ConfigStateWeb & ConfigStateBoth & Actions$3) => void): () => void;
927
839
  <U>(selector: (state: ConfigStateInternal & ConfigStateMobile & ConfigStateWeb & ConfigStateBoth & Actions$3) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
@@ -1074,7 +986,7 @@ type Actions$2 = {
1074
986
  disconnect: () => Promise<void>;
1075
987
  reset: () => void;
1076
988
  };
1077
- declare const useConnectionStore: zustand0.UseBoundStore<Omit<zustand0.StoreApi<ConnectionState & Actions$2>, "subscribe"> & {
989
+ declare const useConnectionStore: zustand3.UseBoundStore<Omit<zustand3.StoreApi<ConnectionState & Actions$2>, "subscribe"> & {
1078
990
  subscribe: {
1079
991
  (listener: (selectedState: ConnectionState & Actions$2, previousSelectedState: ConnectionState & Actions$2) => void): () => void;
1080
992
  <U>(selector: (state: ConnectionState & Actions$2) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
@@ -1125,7 +1037,7 @@ type Actions$1 = {
1125
1037
  getParticipantById: (pid: string) => HumanParticipant | undefined;
1126
1038
  reset: () => void;
1127
1039
  };
1128
- declare const useParticipantStore: zustand0.UseBoundStore<Omit<zustand0.StoreApi<ParticipantsState & Actions$1>, "subscribe"> & {
1040
+ declare const useParticipantStore: zustand3.UseBoundStore<Omit<zustand3.StoreApi<ParticipantsState & Actions$1>, "subscribe"> & {
1129
1041
  subscribe: {
1130
1042
  (listener: (selectedState: ParticipantsState & Actions$1, previousSelectedState: ParticipantsState & Actions$1) => void): () => void;
1131
1043
  <U>(selector: (state: ParticipantsState & Actions$1) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
@@ -1172,7 +1084,7 @@ interface ToastActions {
1172
1084
  clearAll: () => void;
1173
1085
  reset: () => void;
1174
1086
  }
1175
- declare const useToastStore: zustand0.UseBoundStore<zustand0.StoreApi<ToastState & ToastActions>>;
1087
+ declare const useToastStore: zustand3.UseBoundStore<zustand3.StoreApi<ToastState & ToastActions>>;
1176
1088
  declare function showToast(params: {
1177
1089
  id?: string;
1178
1090
  message: string;
@@ -1208,7 +1120,7 @@ type Actions = {
1208
1120
  updateTrack: (originalTrack: any, updatedTrack: Partial<Track>) => void;
1209
1121
  updateLocalTrack: (mediaType: MediaType, updatedTrack: Partial<Track>) => void;
1210
1122
  };
1211
- declare const useTracksStore: zustand0.UseBoundStore<Omit<zustand0.StoreApi<TracksState & Actions>, "subscribe"> & {
1123
+ declare const useTracksStore: zustand3.UseBoundStore<Omit<zustand3.StoreApi<TracksState & Actions>, "subscribe"> & {
1212
1124
  subscribe: {
1213
1125
  (listener: (selectedState: TracksState & Actions, previousSelectedState: TracksState & Actions) => void): () => void;
1214
1126
  <U>(selector: (state: TracksState & Actions) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
@@ -1229,109 +1141,6 @@ declare const pauseVideoTrack: (authority?: number) => void;
1229
1141
  declare const resumeVideoTrack: (authority?: number) => Promise<void>;
1230
1142
  declare const toggleVideoTrack: () => void;
1231
1143
  //#endregion
1232
- //#region calls-sdk-core/store/transcription.d.ts
1233
- /**
1234
- * A single entry inside a transcription-result `transcript` array.
1235
- */
1236
- interface TranscriptSegment {
1237
- confidence: number;
1238
- text: string;
1239
- }
1240
- /**
1241
- * The participant metadata attached to a transcription-result message.
1242
- */
1243
- interface TranscriptionParticipant {
1244
- id: string;
1245
- name: string;
1246
- identity_name: string;
1247
- identity_group_id: string;
1248
- avatar_url?: string;
1249
- }
1250
- /**
1251
- * Shape of the payload received in `onEndpointMessageReceived` when
1252
- * `type === 'transcription-result'`. This is stored as the value of each
1253
- * entry in `transcriptionsMessages`, keyed by `message_id`.
1254
- */
1255
- interface TranscriptionMessage {
1256
- transcript: TranscriptSegment[];
1257
- is_interim: boolean;
1258
- language: string;
1259
- message_id: string;
1260
- event: string;
1261
- type: 'transcription-result';
1262
- participant: TranscriptionParticipant;
1263
- stability: number;
1264
- timestamp: number;
1265
- }
1266
- interface TranscriptionState {
1267
- transcriptionsMessages: Map<string, TranscriptionMessage>;
1268
- /**
1269
- * Whether the live caption overlay should be shown. Toggled by the
1270
- * closed-caption button in the control pane / more menu.
1271
- */
1272
- showLiveCaption: boolean;
1273
- /**
1274
- * Whether transcription is currently active for the session.
1275
- */
1276
- isTranscribing: boolean;
1277
- /**
1278
- * Whether the transcriber has joined the session.
1279
- */
1280
- transcriberJoined: boolean;
1281
- /**
1282
- * The currently selected caption/transcription language code (e.g.
1283
- * `en-US`). Selected from the closed-caption settings dropdown.
1284
- */
1285
- captionLanguage: CaptionLanguageCode;
1286
- }
1287
- interface TranscriptionActions {
1288
- /**
1289
- * Insert or update a transcription message by key. Because a Map `set`
1290
- * overwrites an existing key, this handles both "add" and "update".
1291
- */
1292
- setTranscriptionMessage: (key: string, value: TranscriptionMessage) => void;
1293
- /**
1294
- * Remove all transcription messages.
1295
- */
1296
- clearTranscriptionMessages: () => void;
1297
- /**
1298
- * Toggle the live caption overlay on/off.
1299
- */
1300
- toggleShowLiveCaption: () => void;
1301
- reset: () => void;
1302
- }
1303
- declare const useTranscriptionStore: zustand0.UseBoundStore<Omit<zustand0.StoreApi<TranscriptionState & TranscriptionActions>, "subscribe"> & {
1304
- subscribe: {
1305
- (listener: (selectedState: TranscriptionState & TranscriptionActions, previousSelectedState: TranscriptionState & TranscriptionActions) => void): () => void;
1306
- <U>(selector: (state: TranscriptionState & TranscriptionActions) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
1307
- equalityFn?: ((a: U, b: U) => boolean) | undefined;
1308
- fireImmediately?: boolean;
1309
- } | undefined): () => void;
1310
- };
1311
- }>;
1312
- /**
1313
- * Returns the transcription messages as an array, ordered by their arrival
1314
- * (Map insertion order). Re-renders only when the underlying Map reference
1315
- * changes, i.e. when a message is added, updated, or cleared.
1316
- */
1317
- declare function useTranscriptionMessages(): TranscriptionMessage[];
1318
- /**
1319
- * Returns whether the live caption overlay is currently shown.
1320
- */
1321
- declare function useShowLiveCaption(): boolean;
1322
- /**
1323
- * Toggle the live caption overlay. Safe to call from outside React (e.g.
1324
- * button click handlers in the control pane).
1325
- */
1326
- declare function toggleShowLiveCaption(): void;
1327
- /**
1328
- * Returns whether transcription is currently active for the session.
1329
- */
1330
- declare const useIsTranscribing: () => boolean;
1331
- declare function startTranscription(): Promise<void>;
1332
- declare function stopTranscription(): Promise<void>;
1333
- declare function toggleTranscription(): Promise<void>;
1334
- //#endregion
1335
1144
  //#region calls-sdk-core/store/utils/hooks.d.ts
1336
1145
  declare const useHideMuteAudioButton: () => boolean;
1337
1146
  declare const useHideToggleVideoButton: () => boolean;
@@ -1339,8 +1148,6 @@ declare const useIsConferenceJoined: () => boolean;
1339
1148
  declare const useHideScreenSharingButton: () => boolean;
1340
1149
  declare const useHideSwitchCameraButton: () => boolean;
1341
1150
  declare const useHideChatButton: () => boolean;
1342
- declare const useHideClosedCaptionButton: () => boolean;
1343
- declare const useHideTranscriptionButton: () => boolean;
1344
1151
  declare const useLocalParticipant: <T = HumanParticipant>(selector?: (local: HumanParticipant) => T) => T;
1345
1152
  declare const useScreenShareRunning: () => any;
1346
1153
  declare const useTrackMuted: (mediaType: MediaType, participantId?: string) => boolean;
@@ -1438,14 +1245,6 @@ declare class SessionMethodsCore {
1438
1245
  * If recording is active, it will be stopped, and vice versa.
1439
1246
  */
1440
1247
  static toggleRecording(): void;
1441
- /**
1442
- * Starts transcription of the call.
1443
- */
1444
- static startTranscription(): void;
1445
- /**
1446
- * Stops the ongoing call transcription.
1447
- */
1448
- static stopTranscription(): void;
1449
1248
  /**
1450
1249
  * Pins a participant's video to focus on them.
1451
1250
  * @param participantId - The ID of the participant to pin.
@@ -1534,7 +1333,6 @@ type ValueOf<T> = T[keyof T];
1534
1333
  type ParticipantRole = ValueOf<typeof PARTICIPANT_ROLE>;
1535
1334
  type NotificationType = 'info' | 'success' | 'warning' | 'error';
1536
1335
  type SDKPlatform = ValueOf<typeof SDK_PLATFORM>;
1537
- type CaptionLanguageCode = (typeof CAPTION_LANGUAGES)[number]['code'] | (string & {});
1538
1336
  interface ITrackOptions {
1539
1337
  cameraDeviceId?: string | null;
1540
1338
  constraints?: {
@@ -1724,7 +1522,6 @@ declare namespace controlPanel {
1724
1522
  export namespace tabs {
1725
1523
  let audio: string;
1726
1524
  let video: string;
1727
- let closedCaption: string;
1728
1525
  }
1729
1526
  export namespace deviceLabels {
1730
1527
  let microphone: string;
@@ -1741,10 +1538,6 @@ declare namespace controlPanel {
1741
1538
  let enableNoiseReduction: string;
1742
1539
  }
1743
1540
  export { audioSettings_1 as audioSettings };
1744
- export namespace closedCaptionSettings {
1745
- let language: string;
1746
- let enableClosedCaptions: string;
1747
- }
1748
1541
  export namespace videoSettings_1 {
1749
1542
  let mirrorMyVideo: string;
1750
1543
  let selectCameraToSeePreview: string;
@@ -1820,16 +1613,12 @@ declare namespace virtualBackground {
1820
1613
  }
1821
1614
  export { buttons_2 as buttons };
1822
1615
  }
1823
- declare namespace closedCaptions {
1824
- let emptyState_1: string;
1825
- export { emptyState_1 as emptyState };
1826
- }
1827
1616
  declare namespace general {
1828
1617
  let error: string;
1829
1618
  }
1830
1619
  declare let other: {};
1831
1620
  declare namespace __json_default_export {
1832
- export { header, controlPanel, idealTimeout, participantList, virtualBackground, closedCaptions, general, other };
1621
+ export { header, controlPanel, idealTimeout, participantList, virtualBackground, general, other };
1833
1622
  }
1834
1623
  //#endregion
1835
1624
  //#region calls-sdk-core/i18n/state.d.ts
@@ -1839,7 +1628,7 @@ interface TranslationState {
1839
1628
  translations: Record<string, typeof __json_default_export>;
1840
1629
  currentLocale: CometChatSupportedLocale | Omit<string, CometChatSupportedLocale>;
1841
1630
  }
1842
- declare const useTranslationStore: zustand0.UseBoundStore<Omit<zustand0.StoreApi<Omit<TranslationState, "reset" | "setLocale"> & {
1631
+ declare const useTranslationStore: zustand3.UseBoundStore<Omit<zustand3.StoreApi<Omit<TranslationState, "reset" | "setLocale"> & {
1843
1632
  reset: () => void;
1844
1633
  setLocale: (locale: CometChatSupportedLocale) => void;
1845
1634
  }>, "subscribe"> & {
@@ -1892,7 +1681,6 @@ declare const useTranslation: () => {
1892
1681
  tabs: {
1893
1682
  audio: string;
1894
1683
  video: string;
1895
- closedCaption: string;
1896
1684
  };
1897
1685
  deviceLabels: {
1898
1686
  microphone: string;
@@ -1908,10 +1696,6 @@ declare const useTranslation: () => {
1908
1696
  audioSettings: {
1909
1697
  enableNoiseReduction: string;
1910
1698
  };
1911
- closedCaptionSettings: {
1912
- language: string;
1913
- enableClosedCaptions: string;
1914
- };
1915
1699
  videoSettings: {
1916
1700
  mirrorMyVideo: string;
1917
1701
  selectCameraToSeePreview: string;
@@ -1975,9 +1759,6 @@ declare const useTranslation: () => {
1975
1759
  done: string;
1976
1760
  };
1977
1761
  };
1978
- closedCaptions: {
1979
- emptyState: string;
1980
- };
1981
1762
  general: {
1982
1763
  error: string;
1983
1764
  };