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

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
@@ -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;
@@ -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
@@ -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
@@ -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
  };