@cometchat/calls-sdk-react-native 5.0.3 → 5.0.5
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 +703 -28
- package/dist/index.d.ts +712 -37
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/ios/Modules/MultitaskingCamera.m +75 -0
- package/package.json +29 -2
package/dist/index.d.mts
CHANGED
|
@@ -127,6 +127,8 @@ declare const EVENT_LISTENER_METHODS: {
|
|
|
127
127
|
readonly onVideoResumed: "onVideoResumed";
|
|
128
128
|
readonly onRecordingStarted: "onRecordingStarted";
|
|
129
129
|
readonly onRecordingStopped: "onRecordingStopped";
|
|
130
|
+
readonly onStreamingStarted: "onStreamingStarted";
|
|
131
|
+
readonly onStreamingStopped: "onStreamingStopped";
|
|
130
132
|
readonly onScreenShareStarted: "onScreenShareStarted";
|
|
131
133
|
readonly onScreenShareStopped: "onScreenShareStopped";
|
|
132
134
|
};
|
|
@@ -143,6 +145,8 @@ declare const EVENT_LISTENER_METHODS: {
|
|
|
143
145
|
readonly onParticipantStoppedScreenShare: "onParticipantStoppedScreenShare";
|
|
144
146
|
readonly onParticipantStartedRecording: "onParticipantStartedRecording";
|
|
145
147
|
readonly onParticipantStoppedRecording: "onParticipantStoppedRecording";
|
|
148
|
+
readonly onParticipantStartedStreaming: "onParticipantStartedStreaming";
|
|
149
|
+
readonly onParticipantStoppedStreaming: "onParticipantStoppedStreaming";
|
|
146
150
|
readonly onDominantSpeakerChanged: "onDominantSpeakerChanged";
|
|
147
151
|
readonly onParticipantListChanged: "onParticipantListChanged";
|
|
148
152
|
};
|
|
@@ -178,6 +182,8 @@ declare const EVENT_LISTENER_METHODS_WEB: {
|
|
|
178
182
|
readonly onVideoResumed: "onVideoResumed";
|
|
179
183
|
readonly onRecordingStarted: "onRecordingStarted";
|
|
180
184
|
readonly onRecordingStopped: "onRecordingStopped";
|
|
185
|
+
readonly onStreamingStarted: "onStreamingStarted";
|
|
186
|
+
readonly onStreamingStopped: "onStreamingStopped";
|
|
181
187
|
readonly onScreenShareStarted: "onScreenShareStarted";
|
|
182
188
|
readonly onScreenShareStopped: "onScreenShareStopped";
|
|
183
189
|
};
|
|
@@ -205,6 +211,8 @@ declare const EVENT_LISTENER_METHODS_WEB: {
|
|
|
205
211
|
readonly onParticipantStoppedScreenShare: "onParticipantStoppedScreenShare";
|
|
206
212
|
readonly onParticipantStartedRecording: "onParticipantStartedRecording";
|
|
207
213
|
readonly onParticipantStoppedRecording: "onParticipantStoppedRecording";
|
|
214
|
+
readonly onParticipantStartedStreaming: "onParticipantStartedStreaming";
|
|
215
|
+
readonly onParticipantStoppedStreaming: "onParticipantStoppedStreaming";
|
|
208
216
|
readonly onDominantSpeakerChanged: "onDominantSpeakerChanged";
|
|
209
217
|
readonly onParticipantListChanged: "onParticipantListChanged";
|
|
210
218
|
};
|
|
@@ -237,6 +245,8 @@ declare const EVENT_LISTENER_METHODS_MOBILE: {
|
|
|
237
245
|
readonly onVideoResumed: "onVideoResumed";
|
|
238
246
|
readonly onRecordingStarted: "onRecordingStarted";
|
|
239
247
|
readonly onRecordingStopped: "onRecordingStopped";
|
|
248
|
+
readonly onStreamingStarted: "onStreamingStarted";
|
|
249
|
+
readonly onStreamingStopped: "onStreamingStopped";
|
|
240
250
|
readonly onScreenShareStarted: "onScreenShareStarted";
|
|
241
251
|
readonly onScreenShareStopped: "onScreenShareStopped";
|
|
242
252
|
};
|
|
@@ -284,6 +294,8 @@ declare const EVENT_LISTENER_METHODS_MOBILE: {
|
|
|
284
294
|
readonly onParticipantStoppedScreenShare: "onParticipantStoppedScreenShare";
|
|
285
295
|
readonly onParticipantStartedRecording: "onParticipantStartedRecording";
|
|
286
296
|
readonly onParticipantStoppedRecording: "onParticipantStoppedRecording";
|
|
297
|
+
readonly onParticipantStartedStreaming: "onParticipantStartedStreaming";
|
|
298
|
+
readonly onParticipantStoppedStreaming: "onParticipantStoppedStreaming";
|
|
287
299
|
readonly onDominantSpeakerChanged: "onDominantSpeakerChanged";
|
|
288
300
|
readonly onParticipantListChanged: "onParticipantListChanged";
|
|
289
301
|
};
|
|
@@ -300,6 +312,64 @@ declare const INTERNAL_EVENTS: {
|
|
|
300
312
|
readonly SDKInitialized: "internal.SDKInitialized";
|
|
301
313
|
};
|
|
302
314
|
};
|
|
315
|
+
declare const CAPTION_LANGUAGES: readonly [{
|
|
316
|
+
readonly code: "en-US";
|
|
317
|
+
readonly label: "English (United States)";
|
|
318
|
+
}, {
|
|
319
|
+
readonly code: "de-DE";
|
|
320
|
+
readonly label: "German (Germany)";
|
|
321
|
+
}, {
|
|
322
|
+
readonly code: "en-GB";
|
|
323
|
+
readonly label: "English (United Kingdom)";
|
|
324
|
+
}, {
|
|
325
|
+
readonly code: "es-ES";
|
|
326
|
+
readonly label: "Spanish (Spain)";
|
|
327
|
+
}, {
|
|
328
|
+
readonly code: "fr-FR";
|
|
329
|
+
readonly label: "French (France)";
|
|
330
|
+
}, {
|
|
331
|
+
readonly code: "hi-IN";
|
|
332
|
+
readonly label: "Hindi (India)";
|
|
333
|
+
}, {
|
|
334
|
+
readonly code: "hu-HU";
|
|
335
|
+
readonly label: "Hungarian (Hungary)";
|
|
336
|
+
}, {
|
|
337
|
+
readonly code: "it-IT";
|
|
338
|
+
readonly label: "Italian (Italy)";
|
|
339
|
+
}, {
|
|
340
|
+
readonly code: "ja-JP";
|
|
341
|
+
readonly label: "Japanese (Japan)";
|
|
342
|
+
}, {
|
|
343
|
+
readonly code: "ko-KR";
|
|
344
|
+
readonly label: "Korean (South Korea)";
|
|
345
|
+
}, {
|
|
346
|
+
readonly code: "lt-LT";
|
|
347
|
+
readonly label: "Lithuanian (Lithuania)";
|
|
348
|
+
}, {
|
|
349
|
+
readonly code: "ms-MY";
|
|
350
|
+
readonly label: "Malay (Malaysia)";
|
|
351
|
+
}, {
|
|
352
|
+
readonly code: "nl-NL";
|
|
353
|
+
readonly label: "Dutch (Netherlands)";
|
|
354
|
+
}, {
|
|
355
|
+
readonly code: "pt-PT";
|
|
356
|
+
readonly label: "Portuguese (Portugal)";
|
|
357
|
+
}, {
|
|
358
|
+
readonly code: "ru-RU";
|
|
359
|
+
readonly label: "Russian (Russia)";
|
|
360
|
+
}, {
|
|
361
|
+
readonly code: "sv-SE";
|
|
362
|
+
readonly label: "Swedish (Sweden)";
|
|
363
|
+
}, {
|
|
364
|
+
readonly code: "tr-TR";
|
|
365
|
+
readonly label: "Turkish (Turkey)";
|
|
366
|
+
}, {
|
|
367
|
+
readonly code: "zh";
|
|
368
|
+
readonly label: "Chinese Mandarin (Simplified, China)";
|
|
369
|
+
}, {
|
|
370
|
+
readonly code: "zh-TW";
|
|
371
|
+
readonly label: "Chinese Mandarin (Traditional, Taiwan)";
|
|
372
|
+
}];
|
|
303
373
|
//#endregion
|
|
304
374
|
//#region calls-sdk-core/utils/debounce.d.ts
|
|
305
375
|
declare function debounce<T extends (...args: any[]) => any>(func: T, delay: number): (...args: Parameters<T>) => void;
|
|
@@ -317,7 +387,7 @@ type VideoInputDevice = MediaDeviceInfo & {
|
|
|
317
387
|
type Subscription = (() => void) | {
|
|
318
388
|
remove: () => void;
|
|
319
389
|
};
|
|
320
|
-
type SettingsDialogTab = 'audio' | 'video';
|
|
390
|
+
type SettingsDialogTab = 'audio' | 'video' | 'closedCaption';
|
|
321
391
|
type BaseState = {
|
|
322
392
|
participantListVisible: boolean;
|
|
323
393
|
moreMenuVisible: boolean;
|
|
@@ -466,6 +536,7 @@ type ConferenceState = {
|
|
|
466
536
|
initiator?: any;
|
|
467
537
|
};
|
|
468
538
|
isRecording: boolean;
|
|
539
|
+
isStreaming: boolean;
|
|
469
540
|
};
|
|
470
541
|
type Actions$4 = {
|
|
471
542
|
reset: () => void;
|
|
@@ -474,7 +545,6 @@ type Actions$4 = {
|
|
|
474
545
|
lowerHand: (participantId: string) => void;
|
|
475
546
|
leaveConference: () => Promise<void>;
|
|
476
547
|
endConference: () => Promise<void>;
|
|
477
|
-
stopRecording: () => Promise<void>;
|
|
478
548
|
};
|
|
479
549
|
declare const useConferenceStore: zustand0.UseBoundStore<Omit<zustand0.StoreApi<ConferenceState & Actions$4>, "subscribe"> & {
|
|
480
550
|
subscribe: {
|
|
@@ -490,9 +560,12 @@ declare function raisedHandLocal(): void;
|
|
|
490
560
|
declare function lowerHandLocal(): void;
|
|
491
561
|
declare function toggleRaiseHand(): void;
|
|
492
562
|
declare const useIsRecording: () => boolean;
|
|
563
|
+
declare const useIsStreaming: () => boolean;
|
|
493
564
|
declare function startRecording(): Promise<void>;
|
|
494
565
|
declare function stopRecording(): Promise<void>;
|
|
495
566
|
declare function toggleRecording(): Promise<void>;
|
|
567
|
+
declare function startStreaming(streamUrl: string, streamKey: string): Promise<void>;
|
|
568
|
+
declare function stopStreaming(): Promise<void>;
|
|
496
569
|
declare const getIsConferenceJoined: () => boolean;
|
|
497
570
|
//#endregion
|
|
498
571
|
//#region calls-sdk-core/store/config.d.ts
|
|
@@ -538,6 +611,20 @@ type ConfigStateMobile = {
|
|
|
538
611
|
* @default true
|
|
539
612
|
*/
|
|
540
613
|
enableSpotlightSwap: boolean;
|
|
614
|
+
/**
|
|
615
|
+
* iOS only (React Native). When enabled, the call automatically enters the
|
|
616
|
+
* system Picture-in-Picture window when the app moves to the background,
|
|
617
|
+
* showing the active speaker's video (or the active screen share), and
|
|
618
|
+
* returns to the app automatically when it is foregrounded.
|
|
619
|
+
*
|
|
620
|
+
* Requires iOS 15+ and the "Audio, AirPlay, and Picture in Picture"
|
|
621
|
+
* background mode capability in the host app. Ignored on Android and on
|
|
622
|
+
* older iOS versions. Not related to `enablePictureInPictureLayout()`,
|
|
623
|
+
* which shrinks the in-app call UI to a tile.
|
|
624
|
+
*
|
|
625
|
+
* @default false
|
|
626
|
+
*/
|
|
627
|
+
enableIOSPictureInPicture: boolean;
|
|
541
628
|
};
|
|
542
629
|
/**
|
|
543
630
|
* Configuration that only applies on the web platform.
|
|
@@ -630,6 +717,14 @@ type ConfigStateBoth = {
|
|
|
630
717
|
* @default false
|
|
631
718
|
*/
|
|
632
719
|
autoStartRecording: boolean;
|
|
720
|
+
/**
|
|
721
|
+
* Automatically starts live transcription as soon as the call begins,
|
|
722
|
+
* without the user pressing the transcription button. Transcription must
|
|
723
|
+
* be enabled for your app for this to take effect.
|
|
724
|
+
*
|
|
725
|
+
* @default false
|
|
726
|
+
*/
|
|
727
|
+
autoStartTranscription: boolean;
|
|
633
728
|
/**
|
|
634
729
|
* Hides the recording button from the call controls, preventing the user
|
|
635
730
|
* from manually starting or stopping recording from within the SDK UI.
|
|
@@ -637,6 +732,29 @@ type ConfigStateBoth = {
|
|
|
637
732
|
* @default true
|
|
638
733
|
*/
|
|
639
734
|
hideRecordingButton: boolean;
|
|
735
|
+
/**
|
|
736
|
+
* Hides the streaming button from the call controls, preventing the user
|
|
737
|
+
* from manually starting or stopping a live stream from within the SDK UI.
|
|
738
|
+
*
|
|
739
|
+
* @default true
|
|
740
|
+
*/
|
|
741
|
+
hideStreamingButton: boolean;
|
|
742
|
+
/**
|
|
743
|
+
* The RTMP URL to stream to when the user starts a live stream from the
|
|
744
|
+
* call controls. When set, pressing the start-streaming button skips the
|
|
745
|
+
* confirmation dialog (which normally asks for a URL and key) and starts
|
|
746
|
+
* streaming to this URL immediately.
|
|
747
|
+
*
|
|
748
|
+
* @default undefined — the user is asked for a URL when starting a stream
|
|
749
|
+
*/
|
|
750
|
+
streamUrl?: string;
|
|
751
|
+
/**
|
|
752
|
+
* The stream key sent along with `streamUrl` when a live stream is
|
|
753
|
+
* started. Ignored when `streamUrl` is not set.
|
|
754
|
+
*
|
|
755
|
+
* @default undefined
|
|
756
|
+
*/
|
|
757
|
+
streamKey?: string;
|
|
640
758
|
/**
|
|
641
759
|
* Hides the entire bottom control bar (mic, camera, leave, and every other
|
|
642
760
|
* call control). Useful when the host app provides its own controls.
|
|
@@ -723,6 +841,13 @@ type ConfigStateBoth = {
|
|
|
723
841
|
* @default false
|
|
724
842
|
*/
|
|
725
843
|
hideRecordingStatusIndicator: boolean;
|
|
844
|
+
/**
|
|
845
|
+
* Hides the "streaming live" badge shown while the session is being
|
|
846
|
+
* streamed. The stream itself is unaffected.
|
|
847
|
+
*
|
|
848
|
+
* @default false
|
|
849
|
+
*/
|
|
850
|
+
hideStreamingStatusIndicator: boolean;
|
|
726
851
|
/**
|
|
727
852
|
* Hides the button that switches between the front and rear cameras.
|
|
728
853
|
* Mainly relevant on mobile devices with more than one camera.
|
|
@@ -730,6 +855,28 @@ type ConfigStateBoth = {
|
|
|
730
855
|
* @default false
|
|
731
856
|
*/
|
|
732
857
|
hideSwitchCameraButton: boolean;
|
|
858
|
+
/**
|
|
859
|
+
* Hides the closed-caption button that lets the user show or hide live
|
|
860
|
+
* captions on screen. Even when set to `false`, the button only appears
|
|
861
|
+
* while transcription is running, since captions are produced from the
|
|
862
|
+
* live transcript.
|
|
863
|
+
*
|
|
864
|
+
* @default true
|
|
865
|
+
*/
|
|
866
|
+
hideClosedCaptionButton: boolean;
|
|
867
|
+
/**
|
|
868
|
+
* Hides the transcription button from the call controls, preventing the
|
|
869
|
+
* user from manually starting or stopping live transcription from within
|
|
870
|
+
* the SDK UI.
|
|
871
|
+
*
|
|
872
|
+
* @default true
|
|
873
|
+
*/
|
|
874
|
+
hideTranscriptionButton: boolean;
|
|
875
|
+
/**
|
|
876
|
+
* The currently selected caption/transcription language code (e.g.
|
|
877
|
+
* `en-US`). Selected from the closed-caption settings dropdown.
|
|
878
|
+
*/
|
|
879
|
+
captionLanguage: CaptionLanguageCode;
|
|
733
880
|
/**
|
|
734
881
|
* Enables the per-participant context menu — opened by right-clicking (web)
|
|
735
882
|
* or long-pressing (mobile) a participant's tile — that exposes actions such
|
|
@@ -1058,6 +1205,7 @@ declare const getMainParticipantFromState: (state: {
|
|
|
1058
1205
|
dominantSpeakers: string[];
|
|
1059
1206
|
localParticipant: HumanParticipant;
|
|
1060
1207
|
}) => Participant$2;
|
|
1208
|
+
declare const getParticipantMediaType: (participant?: Participant$2) => "video" | "screenshare";
|
|
1061
1209
|
//#endregion
|
|
1062
1210
|
//#region calls-sdk-core/store/toast.d.ts
|
|
1063
1211
|
interface ToastAction {
|
|
@@ -1141,6 +1289,109 @@ declare const pauseVideoTrack: (authority?: number) => void;
|
|
|
1141
1289
|
declare const resumeVideoTrack: (authority?: number) => Promise<void>;
|
|
1142
1290
|
declare const toggleVideoTrack: () => void;
|
|
1143
1291
|
//#endregion
|
|
1292
|
+
//#region calls-sdk-core/store/transcription.d.ts
|
|
1293
|
+
/**
|
|
1294
|
+
* A single entry inside a transcription-result `transcript` array.
|
|
1295
|
+
*/
|
|
1296
|
+
interface TranscriptSegment {
|
|
1297
|
+
confidence: number;
|
|
1298
|
+
text: string;
|
|
1299
|
+
}
|
|
1300
|
+
/**
|
|
1301
|
+
* The participant metadata attached to a transcription-result message.
|
|
1302
|
+
*/
|
|
1303
|
+
interface TranscriptionParticipant {
|
|
1304
|
+
id: string;
|
|
1305
|
+
name: string;
|
|
1306
|
+
identity_name: string;
|
|
1307
|
+
identity_group_id: string;
|
|
1308
|
+
avatar_url?: string;
|
|
1309
|
+
}
|
|
1310
|
+
/**
|
|
1311
|
+
* Shape of the payload received in `onEndpointMessageReceived` when
|
|
1312
|
+
* `type === 'transcription-result'`. This is stored as the value of each
|
|
1313
|
+
* entry in `transcriptionsMessages`, keyed by `message_id`.
|
|
1314
|
+
*/
|
|
1315
|
+
interface TranscriptionMessage {
|
|
1316
|
+
transcript: TranscriptSegment[];
|
|
1317
|
+
is_interim: boolean;
|
|
1318
|
+
language: string;
|
|
1319
|
+
message_id: string;
|
|
1320
|
+
event: string;
|
|
1321
|
+
type: 'transcription-result';
|
|
1322
|
+
participant: TranscriptionParticipant;
|
|
1323
|
+
stability: number;
|
|
1324
|
+
timestamp: number;
|
|
1325
|
+
}
|
|
1326
|
+
interface TranscriptionState {
|
|
1327
|
+
transcriptionsMessages: Map<string, TranscriptionMessage>;
|
|
1328
|
+
/**
|
|
1329
|
+
* Whether the live caption overlay should be shown. Toggled by the
|
|
1330
|
+
* closed-caption button in the control pane / more menu.
|
|
1331
|
+
*/
|
|
1332
|
+
showLiveCaption: boolean;
|
|
1333
|
+
/**
|
|
1334
|
+
* Whether transcription is currently active for the session.
|
|
1335
|
+
*/
|
|
1336
|
+
isTranscribing: boolean;
|
|
1337
|
+
/**
|
|
1338
|
+
* Whether the transcriber has joined the session.
|
|
1339
|
+
*/
|
|
1340
|
+
transcriberJoined: boolean;
|
|
1341
|
+
/**
|
|
1342
|
+
* The currently selected caption/transcription language code (e.g.
|
|
1343
|
+
* `en-US`). Selected from the closed-caption settings dropdown.
|
|
1344
|
+
*/
|
|
1345
|
+
captionLanguage: CaptionLanguageCode;
|
|
1346
|
+
}
|
|
1347
|
+
interface TranscriptionActions {
|
|
1348
|
+
/**
|
|
1349
|
+
* Insert or update a transcription message by key. Because a Map `set`
|
|
1350
|
+
* overwrites an existing key, this handles both "add" and "update".
|
|
1351
|
+
*/
|
|
1352
|
+
setTranscriptionMessage: (key: string, value: TranscriptionMessage) => void;
|
|
1353
|
+
/**
|
|
1354
|
+
* Remove all transcription messages.
|
|
1355
|
+
*/
|
|
1356
|
+
clearTranscriptionMessages: () => void;
|
|
1357
|
+
/**
|
|
1358
|
+
* Toggle the live caption overlay on/off.
|
|
1359
|
+
*/
|
|
1360
|
+
toggleShowLiveCaption: () => void;
|
|
1361
|
+
reset: () => void;
|
|
1362
|
+
}
|
|
1363
|
+
declare const useTranscriptionStore: zustand0.UseBoundStore<Omit<zustand0.StoreApi<TranscriptionState & TranscriptionActions>, "subscribe"> & {
|
|
1364
|
+
subscribe: {
|
|
1365
|
+
(listener: (selectedState: TranscriptionState & TranscriptionActions, previousSelectedState: TranscriptionState & TranscriptionActions) => void): () => void;
|
|
1366
|
+
<U>(selector: (state: TranscriptionState & TranscriptionActions) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
|
|
1367
|
+
equalityFn?: ((a: U, b: U) => boolean) | undefined;
|
|
1368
|
+
fireImmediately?: boolean;
|
|
1369
|
+
} | undefined): () => void;
|
|
1370
|
+
};
|
|
1371
|
+
}>;
|
|
1372
|
+
/**
|
|
1373
|
+
* Returns the transcription messages as an array, ordered by their arrival
|
|
1374
|
+
* (Map insertion order). Re-renders only when the underlying Map reference
|
|
1375
|
+
* changes, i.e. when a message is added, updated, or cleared.
|
|
1376
|
+
*/
|
|
1377
|
+
declare function useTranscriptionMessages(): TranscriptionMessage[];
|
|
1378
|
+
/**
|
|
1379
|
+
* Returns whether the live caption overlay is currently shown.
|
|
1380
|
+
*/
|
|
1381
|
+
declare function useShowLiveCaption(): boolean;
|
|
1382
|
+
/**
|
|
1383
|
+
* Toggle the live caption overlay. Safe to call from outside React (e.g.
|
|
1384
|
+
* button click handlers in the control pane).
|
|
1385
|
+
*/
|
|
1386
|
+
declare function toggleShowLiveCaption(): void;
|
|
1387
|
+
/**
|
|
1388
|
+
* Returns whether transcription is currently active for the session.
|
|
1389
|
+
*/
|
|
1390
|
+
declare const useIsTranscribing: () => boolean;
|
|
1391
|
+
declare function startTranscription(): Promise<void>;
|
|
1392
|
+
declare function stopTranscription(): Promise<void>;
|
|
1393
|
+
declare function toggleTranscription(): Promise<void>;
|
|
1394
|
+
//#endregion
|
|
1144
1395
|
//#region calls-sdk-core/store/utils/hooks.d.ts
|
|
1145
1396
|
declare const useHideMuteAudioButton: () => boolean;
|
|
1146
1397
|
declare const useHideToggleVideoButton: () => boolean;
|
|
@@ -1148,6 +1399,8 @@ declare const useIsConferenceJoined: () => boolean;
|
|
|
1148
1399
|
declare const useHideScreenSharingButton: () => boolean;
|
|
1149
1400
|
declare const useHideSwitchCameraButton: () => boolean;
|
|
1150
1401
|
declare const useHideChatButton: () => boolean;
|
|
1402
|
+
declare const useHideClosedCaptionButton: () => boolean;
|
|
1403
|
+
declare const useHideTranscriptionButton: () => boolean;
|
|
1151
1404
|
declare const useLocalParticipant: <T = HumanParticipant>(selector?: (local: HumanParticipant) => T) => T;
|
|
1152
1405
|
declare const useScreenShareRunning: () => any;
|
|
1153
1406
|
declare const useTrackMuted: (mediaType: MediaType, participantId?: string) => boolean;
|
|
@@ -1155,6 +1408,7 @@ declare const useMainParticipant: () => Participant$2;
|
|
|
1155
1408
|
declare const getMainParticipant: () => Participant$2;
|
|
1156
1409
|
declare const useIsReconnecting: () => boolean;
|
|
1157
1410
|
declare const useHideRecordingButton: () => boolean;
|
|
1411
|
+
declare const useHideStreamingButton: () => boolean;
|
|
1158
1412
|
declare const useHideVirtualBackgroundButton: () => boolean;
|
|
1159
1413
|
declare const useLayout: () => Layout;
|
|
1160
1414
|
declare const useEnableParticipantContextMenu: () => boolean;
|
|
@@ -1176,9 +1430,15 @@ declare const switchCamera: () => void;
|
|
|
1176
1430
|
//#region calls-sdk-core/utils/session-methods-core.d.ts
|
|
1177
1431
|
declare class SessionMethodsCore {
|
|
1178
1432
|
/**
|
|
1179
|
-
* Mutes the local user's audio during the call.
|
|
1433
|
+
* Mutes or unmutes the local user's audio during the call.
|
|
1434
|
+
*
|
|
1435
|
+
* The boolean parameter exists for backward compatibility with the v4 SDK,
|
|
1436
|
+
* where `muteAudio(false)` was the way to unmute. New code should prefer
|
|
1437
|
+
* {@link SessionMethodsCore.unmuteAudio} for clarity.
|
|
1438
|
+
*
|
|
1439
|
+
* @param muteAudio - `true` (default) mutes the local audio track, `false` unmutes it.
|
|
1180
1440
|
*/
|
|
1181
|
-
static muteAudio(): void;
|
|
1441
|
+
static muteAudio(muteAudio?: boolean): void;
|
|
1182
1442
|
/**
|
|
1183
1443
|
* Unmutes the local user's audio during the call.
|
|
1184
1444
|
*/
|
|
@@ -1189,9 +1449,15 @@ declare class SessionMethodsCore {
|
|
|
1189
1449
|
*/
|
|
1190
1450
|
static toggleAudio(): void;
|
|
1191
1451
|
/**
|
|
1192
|
-
* Pauses the local user's video stream.
|
|
1452
|
+
* Pauses or resumes the local user's video stream.
|
|
1453
|
+
*
|
|
1454
|
+
* The boolean parameter exists for backward compatibility with the v4 SDK,
|
|
1455
|
+
* where `pauseVideo(false)` was the way to resume. New code should prefer
|
|
1456
|
+
* {@link SessionMethodsCore.resumeVideo} for clarity.
|
|
1457
|
+
*
|
|
1458
|
+
* @param pauseVideo - `true` (default) pauses the local video track, `false` resumes it.
|
|
1193
1459
|
*/
|
|
1194
|
-
static pauseVideo(): void;
|
|
1460
|
+
static pauseVideo(pauseVideo?: boolean): void;
|
|
1195
1461
|
/**
|
|
1196
1462
|
* Resumes the local user's video stream.
|
|
1197
1463
|
*/
|
|
@@ -1232,6 +1498,16 @@ declare class SessionMethodsCore {
|
|
|
1232
1498
|
* @param layout - The type of layout to set (tile, sidebar or spotlight).
|
|
1233
1499
|
*/
|
|
1234
1500
|
static setLayout(layout: Layout): void;
|
|
1501
|
+
/**
|
|
1502
|
+
* Starts streaming the call to the given RTMP destination.
|
|
1503
|
+
* @param streamUrl - The RTMP ingest URL (e.g., "rtmp://a.rtmp.youtube.com/live2").
|
|
1504
|
+
* @param streamKey - The stream key for the destination (e.g., "xxxx-xxxx-xxxx-xxxx-xxxx").
|
|
1505
|
+
*/
|
|
1506
|
+
static startStreaming(streamUrl: string, streamKey: string): void;
|
|
1507
|
+
/**
|
|
1508
|
+
* Stops the ongoing call streaming.
|
|
1509
|
+
*/
|
|
1510
|
+
static stopStreaming(): void;
|
|
1235
1511
|
/**
|
|
1236
1512
|
* Starts recording the call.
|
|
1237
1513
|
*/
|
|
@@ -1245,6 +1521,14 @@ declare class SessionMethodsCore {
|
|
|
1245
1521
|
* If recording is active, it will be stopped, and vice versa.
|
|
1246
1522
|
*/
|
|
1247
1523
|
static toggleRecording(): void;
|
|
1524
|
+
/**
|
|
1525
|
+
* Starts transcription of the call.
|
|
1526
|
+
*/
|
|
1527
|
+
static startTranscription(): void;
|
|
1528
|
+
/**
|
|
1529
|
+
* Stops the ongoing call transcription.
|
|
1530
|
+
*/
|
|
1531
|
+
static stopTranscription(): void;
|
|
1248
1532
|
/**
|
|
1249
1533
|
* Pins a participant's video to focus on them.
|
|
1250
1534
|
* @param participantId - The ID of the participant to pin.
|
|
@@ -1323,6 +1607,7 @@ type AudioMode = {
|
|
|
1323
1607
|
type: AudioModeType;
|
|
1324
1608
|
selected: boolean;
|
|
1325
1609
|
uid?: string;
|
|
1610
|
+
name?: string;
|
|
1326
1611
|
};
|
|
1327
1612
|
type CameraFacingInternal = ValueOf<typeof CAMERA_FACING_INTERNAL>;
|
|
1328
1613
|
type CameraFacing = ValueOf<typeof CAMERA_FACING>;
|
|
@@ -1330,9 +1615,9 @@ type SessionType = ValueOf<typeof SESSION_TYPE>;
|
|
|
1330
1615
|
type Layout = ValueOf<typeof LAYOUT>;
|
|
1331
1616
|
type MediaType = ValueOf<typeof MEDIA_TYPE>;
|
|
1332
1617
|
type ValueOf<T> = T[keyof T];
|
|
1333
|
-
type ParticipantRole = ValueOf<typeof PARTICIPANT_ROLE>;
|
|
1334
1618
|
type NotificationType = 'info' | 'success' | 'warning' | 'error';
|
|
1335
1619
|
type SDKPlatform = ValueOf<typeof SDK_PLATFORM>;
|
|
1620
|
+
type CaptionLanguageCode = (typeof CAPTION_LANGUAGES)[number]['code'] | (string & {});
|
|
1336
1621
|
interface ITrackOptions {
|
|
1337
1622
|
cameraDeviceId?: string | null;
|
|
1338
1623
|
constraints?: {
|
|
@@ -1522,6 +1807,7 @@ declare namespace controlPanel {
|
|
|
1522
1807
|
export namespace tabs {
|
|
1523
1808
|
let audio: string;
|
|
1524
1809
|
let video: string;
|
|
1810
|
+
let closedCaption: string;
|
|
1525
1811
|
}
|
|
1526
1812
|
export namespace deviceLabels {
|
|
1527
1813
|
let microphone: string;
|
|
@@ -1538,6 +1824,10 @@ declare namespace controlPanel {
|
|
|
1538
1824
|
let enableNoiseReduction: string;
|
|
1539
1825
|
}
|
|
1540
1826
|
export { audioSettings_1 as audioSettings };
|
|
1827
|
+
export namespace closedCaptionSettings {
|
|
1828
|
+
let language: string;
|
|
1829
|
+
let enableClosedCaptions: string;
|
|
1830
|
+
}
|
|
1541
1831
|
export namespace videoSettings_1 {
|
|
1542
1832
|
let mirrorMyVideo: string;
|
|
1543
1833
|
let selectCameraToSeePreview: string;
|
|
@@ -1565,6 +1855,16 @@ declare namespace controlPanel {
|
|
|
1565
1855
|
let cancel_1: string;
|
|
1566
1856
|
export { cancel_1 as cancel };
|
|
1567
1857
|
}
|
|
1858
|
+
namespace streaming {
|
|
1859
|
+
export let startStreaming: string;
|
|
1860
|
+
export let stopStreaming: string;
|
|
1861
|
+
export let startStreamingConfirmation: string;
|
|
1862
|
+
export let stopStreamingConfirmation: string;
|
|
1863
|
+
export let streamUrlPlaceholder: string;
|
|
1864
|
+
export let streamKeyPlaceholder: string;
|
|
1865
|
+
let cancel_2: string;
|
|
1866
|
+
export { cancel_2 as cancel };
|
|
1867
|
+
}
|
|
1568
1868
|
let raiseHand: string;
|
|
1569
1869
|
let lowerHand: string;
|
|
1570
1870
|
let startScreenSharing: string;
|
|
@@ -1606,19 +1906,43 @@ declare namespace virtualBackground {
|
|
|
1606
1906
|
export let addBackground: string;
|
|
1607
1907
|
export let noCameraFeed: string;
|
|
1608
1908
|
export namespace buttons_2 {
|
|
1609
|
-
let
|
|
1610
|
-
export {
|
|
1909
|
+
let cancel_3: string;
|
|
1910
|
+
export { cancel_3 as cancel };
|
|
1611
1911
|
let done_1: string;
|
|
1612
1912
|
export { done_1 as done };
|
|
1613
1913
|
}
|
|
1614
1914
|
export { buttons_2 as buttons };
|
|
1615
1915
|
}
|
|
1916
|
+
declare namespace indicators {
|
|
1917
|
+
export namespace recording_1 {
|
|
1918
|
+
let label: string;
|
|
1919
|
+
let tooltip: string;
|
|
1920
|
+
}
|
|
1921
|
+
export { recording_1 as recording };
|
|
1922
|
+
export namespace streaming_1 {
|
|
1923
|
+
let label_1: string;
|
|
1924
|
+
export { label_1 as label };
|
|
1925
|
+
let tooltip_1: string;
|
|
1926
|
+
export { tooltip_1 as tooltip };
|
|
1927
|
+
}
|
|
1928
|
+
export { streaming_1 as streaming };
|
|
1929
|
+
}
|
|
1930
|
+
declare namespace notifications {
|
|
1931
|
+
let recordingStarted: string;
|
|
1932
|
+
let recordingStopped: string;
|
|
1933
|
+
let streamingStarted: string;
|
|
1934
|
+
let streamingStopped: string;
|
|
1935
|
+
}
|
|
1936
|
+
declare namespace closedCaptions {
|
|
1937
|
+
let emptyState_1: string;
|
|
1938
|
+
export { emptyState_1 as emptyState };
|
|
1939
|
+
}
|
|
1616
1940
|
declare namespace general {
|
|
1617
1941
|
let error: string;
|
|
1618
1942
|
}
|
|
1619
1943
|
declare let other: {};
|
|
1620
1944
|
declare namespace __json_default_export {
|
|
1621
|
-
export { header, controlPanel, idealTimeout, participantList, virtualBackground, general, other };
|
|
1945
|
+
export { header, controlPanel, idealTimeout, participantList, virtualBackground, indicators, notifications, closedCaptions, general, other };
|
|
1622
1946
|
}
|
|
1623
1947
|
//#endregion
|
|
1624
1948
|
//#region calls-sdk-core/i18n/state.d.ts
|
|
@@ -1651,6 +1975,11 @@ declare const useTranslationStore: zustand0.UseBoundStore<Omit<zustand0.StoreApi
|
|
|
1651
1975
|
}>;
|
|
1652
1976
|
//#endregion
|
|
1653
1977
|
//#region calls-sdk-core/i18n/hook.d.ts
|
|
1978
|
+
/**
|
|
1979
|
+
* Non-hook variant of `t` for code that runs outside React (stores,
|
|
1980
|
+
* event subscribers). Reads the translation store imperatively.
|
|
1981
|
+
*/
|
|
1982
|
+
declare function translate(key: Paths<TranslationResource>): string;
|
|
1654
1983
|
declare const useTranslation: () => {
|
|
1655
1984
|
t: (key: Paths<TranslationResource>) => string;
|
|
1656
1985
|
currentLocale: "en-US" | Omit<string, "en-US">;
|
|
@@ -1681,6 +2010,7 @@ declare const useTranslation: () => {
|
|
|
1681
2010
|
tabs: {
|
|
1682
2011
|
audio: string;
|
|
1683
2012
|
video: string;
|
|
2013
|
+
closedCaption: string;
|
|
1684
2014
|
};
|
|
1685
2015
|
deviceLabels: {
|
|
1686
2016
|
microphone: string;
|
|
@@ -1696,6 +2026,10 @@ declare const useTranslation: () => {
|
|
|
1696
2026
|
audioSettings: {
|
|
1697
2027
|
enableNoiseReduction: string;
|
|
1698
2028
|
};
|
|
2029
|
+
closedCaptionSettings: {
|
|
2030
|
+
language: string;
|
|
2031
|
+
enableClosedCaptions: string;
|
|
2032
|
+
};
|
|
1699
2033
|
videoSettings: {
|
|
1700
2034
|
mirrorMyVideo: string;
|
|
1701
2035
|
selectCameraToSeePreview: string;
|
|
@@ -1721,6 +2055,15 @@ declare const useTranslation: () => {
|
|
|
1721
2055
|
stopRecordingConfirmation: string;
|
|
1722
2056
|
cancel: string;
|
|
1723
2057
|
};
|
|
2058
|
+
streaming: {
|
|
2059
|
+
startStreaming: string;
|
|
2060
|
+
stopStreaming: string;
|
|
2061
|
+
startStreamingConfirmation: string;
|
|
2062
|
+
stopStreamingConfirmation: string;
|
|
2063
|
+
streamUrlPlaceholder: string;
|
|
2064
|
+
streamKeyPlaceholder: string;
|
|
2065
|
+
cancel: string;
|
|
2066
|
+
};
|
|
1724
2067
|
raiseHand: string;
|
|
1725
2068
|
lowerHand: string;
|
|
1726
2069
|
startScreenSharing: string;
|
|
@@ -1759,6 +2102,25 @@ declare const useTranslation: () => {
|
|
|
1759
2102
|
done: string;
|
|
1760
2103
|
};
|
|
1761
2104
|
};
|
|
2105
|
+
indicators: {
|
|
2106
|
+
recording: {
|
|
2107
|
+
label: string;
|
|
2108
|
+
tooltip: string;
|
|
2109
|
+
};
|
|
2110
|
+
streaming: {
|
|
2111
|
+
label: string;
|
|
2112
|
+
tooltip: string;
|
|
2113
|
+
};
|
|
2114
|
+
};
|
|
2115
|
+
notifications: {
|
|
2116
|
+
recordingStarted: string;
|
|
2117
|
+
recordingStopped: string;
|
|
2118
|
+
streamingStarted: string;
|
|
2119
|
+
streamingStopped: string;
|
|
2120
|
+
};
|
|
2121
|
+
closedCaptions: {
|
|
2122
|
+
emptyState: string;
|
|
2123
|
+
};
|
|
1762
2124
|
general: {
|
|
1763
2125
|
error: string;
|
|
1764
2126
|
};
|
|
@@ -2642,11 +3004,15 @@ interface IOngoingCallListener {
|
|
|
2642
3004
|
onRecordingStarted: (data: Partial<ICallEventsData['onRecordingStarted']>) => void;
|
|
2643
3005
|
onRecordingStopped: (data: Partial<ICallEventsData['onRecordingStopped']>) => void;
|
|
2644
3006
|
onUserMuted: (test: Partial<ICallEventsData['onUserMuted']>) => void;
|
|
3007
|
+
/**
|
|
3008
|
+
* @deprecated `switchToVideoCall` is deprecated and unsupported by the
|
|
3009
|
+
* underlying SDK, so this callback is never invoked.
|
|
3010
|
+
*/
|
|
2645
3011
|
onCallSwitchedToVideo: (data: Partial<ICallEventsData['onCallSwitchedToVideo']>) => void;
|
|
2646
3012
|
onCallEnded: () => void;
|
|
2647
3013
|
onSessionTimeout: () => void;
|
|
2648
3014
|
onCallEndButtonPressed: () => void;
|
|
2649
|
-
onAudioModesUpdated: (
|
|
3015
|
+
onAudioModesUpdated: (audioModes: AudioMode[]) => void;
|
|
2650
3016
|
onError: (error: CometChatCallsException) => void;
|
|
2651
3017
|
}
|
|
2652
3018
|
declare class OngoingCallListener {
|
|
@@ -2696,6 +3062,9 @@ declare class OngoingCallListener {
|
|
|
2696
3062
|
onUserMuted?: IOngoingCallListener['onUserMuted'];
|
|
2697
3063
|
/**
|
|
2698
3064
|
* This event is triggered when an audio call is switched to a video call.
|
|
3065
|
+
*
|
|
3066
|
+
* @deprecated `switchToVideoCall` is deprecated and unsupported by the
|
|
3067
|
+
* underlying SDK, so this callback is never invoked.
|
|
2699
3068
|
*/
|
|
2700
3069
|
onCallSwitchedToVideo?: IOngoingCallListener['onCallSwitchedToVideo'];
|
|
2701
3070
|
constructor(eventObj: Partial<IOngoingCallListener>);
|
|
@@ -3415,6 +3784,133 @@ declare class Recording {
|
|
|
3415
3784
|
static getRecordingFromJson(data: any): Recording;
|
|
3416
3785
|
}
|
|
3417
3786
|
//#endregion
|
|
3787
|
+
//#region src/v4/models/Transcription.d.ts
|
|
3788
|
+
/**
|
|
3789
|
+
* Represents a transcript artifact attached to a call log.
|
|
3790
|
+
*
|
|
3791
|
+
* Only present when the list request opted in via
|
|
3792
|
+
* `CallLogRequestBuilder.setHasTranscriptions(true)` — the server omits the
|
|
3793
|
+
* `transcriptions` array otherwise.
|
|
3794
|
+
*
|
|
3795
|
+
* A record is a *pointer* to a downloadable transcript file, not the transcript
|
|
3796
|
+
* text itself: fetch {@link Transcription.getTranscriptURL} separately to
|
|
3797
|
+
* retrieve the content.
|
|
3798
|
+
*/
|
|
3799
|
+
declare class Transcription {
|
|
3800
|
+
/**
|
|
3801
|
+
* The transcript ID.
|
|
3802
|
+
*/
|
|
3803
|
+
private tid;
|
|
3804
|
+
/**
|
|
3805
|
+
* The meeting ID; absent until the pipeline sends `uniqueMeetingId`.
|
|
3806
|
+
*/
|
|
3807
|
+
private mid;
|
|
3808
|
+
/**
|
|
3809
|
+
* The room name of the meeting the transcript belongs to.
|
|
3810
|
+
*/
|
|
3811
|
+
private roomName;
|
|
3812
|
+
/**
|
|
3813
|
+
* The start time of the transcribed meeting, in epoch seconds.
|
|
3814
|
+
*/
|
|
3815
|
+
private startTime;
|
|
3816
|
+
/**
|
|
3817
|
+
* The end time of the transcribed meeting, in epoch seconds.
|
|
3818
|
+
*/
|
|
3819
|
+
private endTime;
|
|
3820
|
+
/**
|
|
3821
|
+
* The transcript date.
|
|
3822
|
+
*/
|
|
3823
|
+
private transcriptDate;
|
|
3824
|
+
/**
|
|
3825
|
+
* The URL of the downloadable transcript JSON.
|
|
3826
|
+
*/
|
|
3827
|
+
private transcriptUrl;
|
|
3828
|
+
/**
|
|
3829
|
+
* Creates a new instance of the Transcription class.
|
|
3830
|
+
* @param data - The data to initialize the transcription object.
|
|
3831
|
+
*/
|
|
3832
|
+
constructor(data: any);
|
|
3833
|
+
/**
|
|
3834
|
+
* Gets the transcript ID.
|
|
3835
|
+
* @returns The transcript ID.
|
|
3836
|
+
*/
|
|
3837
|
+
getTid(): string;
|
|
3838
|
+
/**
|
|
3839
|
+
* Sets the transcript ID.
|
|
3840
|
+
* @param value - The transcript ID to set.
|
|
3841
|
+
*/
|
|
3842
|
+
setTid(value: string): void;
|
|
3843
|
+
/**
|
|
3844
|
+
* Gets the meeting ID.
|
|
3845
|
+
* @returns The meeting ID.
|
|
3846
|
+
*/
|
|
3847
|
+
getMid(): string;
|
|
3848
|
+
/**
|
|
3849
|
+
* Sets the meeting ID.
|
|
3850
|
+
* @param value - The meeting ID to set.
|
|
3851
|
+
*/
|
|
3852
|
+
setMid(value: string): void;
|
|
3853
|
+
/**
|
|
3854
|
+
* Gets the room name.
|
|
3855
|
+
* @returns The room name.
|
|
3856
|
+
*/
|
|
3857
|
+
getRoomName(): string;
|
|
3858
|
+
/**
|
|
3859
|
+
* Sets the room name.
|
|
3860
|
+
* @param value - The room name to set.
|
|
3861
|
+
*/
|
|
3862
|
+
setRoomName(value: string): void;
|
|
3863
|
+
/**
|
|
3864
|
+
* Gets the start time of the transcribed meeting.
|
|
3865
|
+
* @returns The start time, in epoch seconds.
|
|
3866
|
+
*/
|
|
3867
|
+
getStartTime(): number;
|
|
3868
|
+
/**
|
|
3869
|
+
* Sets the start time of the transcribed meeting.
|
|
3870
|
+
* @param value - The start time, in epoch seconds.
|
|
3871
|
+
*/
|
|
3872
|
+
setStartTime(value: number): void;
|
|
3873
|
+
/**
|
|
3874
|
+
* Gets the end time of the transcribed meeting.
|
|
3875
|
+
* @returns The end time, in epoch seconds.
|
|
3876
|
+
*/
|
|
3877
|
+
getEndTime(): number;
|
|
3878
|
+
/**
|
|
3879
|
+
* Sets the end time of the transcribed meeting.
|
|
3880
|
+
* @param value - The end time, in epoch seconds.
|
|
3881
|
+
*/
|
|
3882
|
+
setEndTime(value: number): void;
|
|
3883
|
+
/**
|
|
3884
|
+
* Gets the transcript date.
|
|
3885
|
+
* @returns The transcript date.
|
|
3886
|
+
*/
|
|
3887
|
+
getTranscriptDate(): string;
|
|
3888
|
+
/**
|
|
3889
|
+
* Sets the transcript date.
|
|
3890
|
+
* @param value - The transcript date to set.
|
|
3891
|
+
*/
|
|
3892
|
+
setTranscriptDate(value: string): void;
|
|
3893
|
+
/**
|
|
3894
|
+
* Gets the URL of the downloadable transcript JSON.
|
|
3895
|
+
* @returns The transcript URL.
|
|
3896
|
+
*/
|
|
3897
|
+
getTranscriptURL(): string;
|
|
3898
|
+
/**
|
|
3899
|
+
* Sets the URL of the downloadable transcript JSON.
|
|
3900
|
+
* @param value - The transcript URL to set.
|
|
3901
|
+
*/
|
|
3902
|
+
setTranscriptURL(value: string): void;
|
|
3903
|
+
/**
|
|
3904
|
+
* Creates a new Transcription object from the given JSON data.
|
|
3905
|
+
*
|
|
3906
|
+
* Every key is passed through untouched, so newly-added server fields survive
|
|
3907
|
+
* without an SDK release.
|
|
3908
|
+
* @param data - The JSON data to create the Transcription object from.
|
|
3909
|
+
* @returns A new Transcription object.
|
|
3910
|
+
*/
|
|
3911
|
+
static getTranscriptionFromJson(data: any): Transcription;
|
|
3912
|
+
}
|
|
3913
|
+
//#endregion
|
|
3418
3914
|
//#region src/v4/models/CallLog.d.ts
|
|
3419
3915
|
/**
|
|
3420
3916
|
* Represents a call log.
|
|
@@ -3444,10 +3940,22 @@ declare class CallLog {
|
|
|
3444
3940
|
* The time the call was initiated at.
|
|
3445
3941
|
*/
|
|
3446
3942
|
private initiatedAt;
|
|
3943
|
+
/**
|
|
3944
|
+
* The time the call started at. Sent by the calls host in place of
|
|
3945
|
+
* `initiatedAt`; read {@link getStartedAt} and fall back to
|
|
3946
|
+
* {@link getInitiatedAt} when only one of the two is present.
|
|
3947
|
+
*/
|
|
3948
|
+
private startedAt;
|
|
3447
3949
|
/**
|
|
3448
3950
|
* The call category of the call log.
|
|
3449
3951
|
*/
|
|
3450
3952
|
private callCategory;
|
|
3953
|
+
/**
|
|
3954
|
+
* The mode of the call log. Sent by the calls host in place of
|
|
3955
|
+
* `callCategory`; read {@link getMode} and fall back to
|
|
3956
|
+
* {@link getCallCategory} when only one of the two is present.
|
|
3957
|
+
*/
|
|
3958
|
+
private mode;
|
|
3451
3959
|
/**
|
|
3452
3960
|
* @type {CallUser}
|
|
3453
3961
|
* The initiator of the call log.
|
|
@@ -3496,6 +4004,12 @@ declare class CallLog {
|
|
|
3496
4004
|
* The recordings of the call log.
|
|
3497
4005
|
*/
|
|
3498
4006
|
private recordings;
|
|
4007
|
+
/**
|
|
4008
|
+
* @type {Transcription[]}
|
|
4009
|
+
* The transcripts of the call log. Only populated when the request opted in
|
|
4010
|
+
* via `CallLogRequestBuilder.setHasTranscriptions(true)`.
|
|
4011
|
+
*/
|
|
4012
|
+
private transcriptions;
|
|
3499
4013
|
/**
|
|
3500
4014
|
* Creates a new instance of CallLog.
|
|
3501
4015
|
* @param data - The data to initialize the call log with.
|
|
@@ -3561,6 +4075,26 @@ declare class CallLog {
|
|
|
3561
4075
|
* @param value - The time the call was initiated at.
|
|
3562
4076
|
*/
|
|
3563
4077
|
setInitiatedAt(value: number): void;
|
|
4078
|
+
/**
|
|
4079
|
+
* Gets the time the call started at.
|
|
4080
|
+
* @returns The time the call started at.
|
|
4081
|
+
*/
|
|
4082
|
+
getStartedAt(): number;
|
|
4083
|
+
/**
|
|
4084
|
+
* Sets the time the call started at.
|
|
4085
|
+
* @param value - The time the call started at.
|
|
4086
|
+
*/
|
|
4087
|
+
setStartedAt(value: number): void;
|
|
4088
|
+
/**
|
|
4089
|
+
* Gets the mode of the call log.
|
|
4090
|
+
* @returns The mode of the call log.
|
|
4091
|
+
*/
|
|
4092
|
+
getMode(): string;
|
|
4093
|
+
/**
|
|
4094
|
+
* Sets the mode of the call log.
|
|
4095
|
+
* @param value - The mode to set.
|
|
4096
|
+
*/
|
|
4097
|
+
setMode(value: string): void;
|
|
3564
4098
|
/**
|
|
3565
4099
|
* Gets the call category of the call log.
|
|
3566
4100
|
* @returns The call category of the call log.
|
|
@@ -3681,6 +4215,19 @@ declare class CallLog {
|
|
|
3681
4215
|
* @param value - The recordings to set.
|
|
3682
4216
|
*/
|
|
3683
4217
|
setRecordings(value: Recording[]): void;
|
|
4218
|
+
/**
|
|
4219
|
+
* Gets the transcripts of the call log.
|
|
4220
|
+
* @returns The transcripts of the call log, or an empty array when the server
|
|
4221
|
+
* omitted them — never `undefined`. The array is absent unless the request
|
|
4222
|
+
* opted in via `CallLogRequestBuilder.setHasTranscriptions(true)`, and the
|
|
4223
|
+
* server currently omits it even then, so callers must not have to null-check.
|
|
4224
|
+
*/
|
|
4225
|
+
getTranscriptions(): Transcription[];
|
|
4226
|
+
/**
|
|
4227
|
+
* Sets the transcripts of the call log.
|
|
4228
|
+
* @param value - The transcripts to set.
|
|
4229
|
+
*/
|
|
4230
|
+
setTranscriptions(value: Transcription[]): void;
|
|
3684
4231
|
/**
|
|
3685
4232
|
* Creates a new instance of CallLog from JSON data.
|
|
3686
4233
|
* @param data - The JSON data to create the call log from.
|
|
@@ -3718,6 +4265,11 @@ declare class CallLogRequest {
|
|
|
3718
4265
|
* Whether the call has a recording or not.
|
|
3719
4266
|
*/
|
|
3720
4267
|
private hasRecording;
|
|
4268
|
+
/**
|
|
4269
|
+
* Whether to restrict the list to calls that have transcripts (and have the
|
|
4270
|
+
* server attach each call's `transcriptions` array).
|
|
4271
|
+
*/
|
|
4272
|
+
private hasTranscriptions;
|
|
3721
4273
|
/**
|
|
3722
4274
|
* The category of call to filter by.
|
|
3723
4275
|
*/
|
|
@@ -3762,18 +4314,6 @@ declare class CallLogRequest {
|
|
|
3762
4314
|
* The affix of the call log.
|
|
3763
4315
|
*/
|
|
3764
4316
|
private affix;
|
|
3765
|
-
/**
|
|
3766
|
-
* The last affix of the call log.
|
|
3767
|
-
*/
|
|
3768
|
-
private lastAffix;
|
|
3769
|
-
/**
|
|
3770
|
-
* The current method of the call log.
|
|
3771
|
-
*/
|
|
3772
|
-
private currentMethod;
|
|
3773
|
-
/**
|
|
3774
|
-
* The pagination metadata of the call log.
|
|
3775
|
-
*/
|
|
3776
|
-
private paginationMeta;
|
|
3777
4317
|
/**
|
|
3778
4318
|
* Creates a new CallLogRequest instance.
|
|
3779
4319
|
* @param builder The builder object to use for constructing the request.
|
|
@@ -3789,6 +4329,16 @@ declare class CallLogRequest {
|
|
|
3789
4329
|
* @returns A promise that resolves to an array of CallLog objects, or an empty array if there are no previous pages, or rejects with a CometChatCallsException if there was an error..
|
|
3790
4330
|
*/
|
|
3791
4331
|
fetchPrevious(): Promise<CallLog[] | []>;
|
|
4332
|
+
/**
|
|
4333
|
+
* Gets the page the cursor currently sits on.
|
|
4334
|
+
* @returns The current page, or `0` before the first successful fetch.
|
|
4335
|
+
*/
|
|
4336
|
+
getCurrentPage(): number;
|
|
4337
|
+
/**
|
|
4338
|
+
* Gets the number of pages the server reported.
|
|
4339
|
+
* @returns The total page count, or `0` before the first successful fetch.
|
|
4340
|
+
*/
|
|
4341
|
+
getTotalPages(): number;
|
|
3792
4342
|
/**
|
|
3793
4343
|
* Makes an API call to fetch call logs.
|
|
3794
4344
|
* @param isFetchNext Whether to fetch the next page of call logs.
|
|
@@ -3816,6 +4366,7 @@ declare class CallLogRequestBuilder {
|
|
|
3816
4366
|
callType: string;
|
|
3817
4367
|
callStatus: string;
|
|
3818
4368
|
hasRecording: boolean;
|
|
4369
|
+
hasTranscriptions: boolean;
|
|
3819
4370
|
callCategory: string;
|
|
3820
4371
|
callDirection: string;
|
|
3821
4372
|
uid: string;
|
|
@@ -3845,6 +4396,14 @@ declare class CallLogRequestBuilder {
|
|
|
3845
4396
|
* @returns The CallLogRequestBuilder object.
|
|
3846
4397
|
*/
|
|
3847
4398
|
setHasRecording(hasRecording: boolean): this;
|
|
4399
|
+
/**
|
|
4400
|
+
* Sets whether only calls that have transcripts should be fetched. Opting in
|
|
4401
|
+
* also makes the server attach each call's `transcriptions` array, readable
|
|
4402
|
+
* via `CallLog.getTranscriptions()`.
|
|
4403
|
+
* @param hasTranscriptions - Whether to restrict the list to transcribed calls.
|
|
4404
|
+
* @returns The CallLogRequestBuilder object.
|
|
4405
|
+
*/
|
|
4406
|
+
setHasTranscriptions(hasTranscriptions: boolean): this;
|
|
3848
4407
|
/**
|
|
3849
4408
|
* Sets the category of call to be fetched.
|
|
3850
4409
|
* @param callCategory - The category of call to be fetched. Can be either 'call' or 'meet'.
|
|
@@ -4284,6 +4843,10 @@ declare class CallLogFilterParams {
|
|
|
4284
4843
|
* Whether the call has recordings.
|
|
4285
4844
|
*/
|
|
4286
4845
|
private hasRecording;
|
|
4846
|
+
/**
|
|
4847
|
+
* Whether the call has transcripts.
|
|
4848
|
+
*/
|
|
4849
|
+
private hasTranscriptions;
|
|
4287
4850
|
/**
|
|
4288
4851
|
* The user ID.
|
|
4289
4852
|
*/
|
|
@@ -4292,10 +4855,6 @@ declare class CallLogFilterParams {
|
|
|
4292
4855
|
* The group ID.
|
|
4293
4856
|
*/
|
|
4294
4857
|
private guid;
|
|
4295
|
-
/**
|
|
4296
|
-
* Creates a new instance of the CallLogFilterParams class.
|
|
4297
|
-
* @param data - The data to initialize the call log filter parameters object.
|
|
4298
|
-
*/
|
|
4299
4858
|
/**
|
|
4300
4859
|
* Sets the direction of the call.
|
|
4301
4860
|
* @param value - The direction of the call.
|
|
@@ -4331,6 +4890,11 @@ declare class CallLogFilterParams {
|
|
|
4331
4890
|
* @param value - Whether the call has recordings.
|
|
4332
4891
|
*/
|
|
4333
4892
|
setHasRecordings(value: boolean): void;
|
|
4893
|
+
/**
|
|
4894
|
+
* Sets whether the call has transcripts.
|
|
4895
|
+
* @param value - Whether the call has transcripts.
|
|
4896
|
+
*/
|
|
4897
|
+
setHasTranscriptions(value: boolean): void;
|
|
4334
4898
|
/**
|
|
4335
4899
|
* Sets the user ID.
|
|
4336
4900
|
* @param value - The user ID.
|
|
@@ -4354,6 +4918,113 @@ declare class CallLogFilterParams {
|
|
|
4354
4918
|
declare const addCallEventListener: typeof ListenerHandlers.addCallEventListener;
|
|
4355
4919
|
declare const removeCallEventListener: typeof ListenerHandlers.removeCallEventListener;
|
|
4356
4920
|
//#endregion
|
|
4921
|
+
//#region src/transcripts/types.d.ts
|
|
4922
|
+
/**
|
|
4923
|
+
* A single meeting transcript record, as returned by the paginated
|
|
4924
|
+
* transcript-retrieval API.
|
|
4925
|
+
*
|
|
4926
|
+
* Every field is optional: the server strips empty keys before responding, so a
|
|
4927
|
+
* sparse record is normal and must parse without error. Unknown server keys are
|
|
4928
|
+
* preserved untouched so newly-added fields survive without an SDK release.
|
|
4929
|
+
*/
|
|
4930
|
+
interface Transcript {
|
|
4931
|
+
/** Transcript id. */
|
|
4932
|
+
tid?: string;
|
|
4933
|
+
/** Meeting id. */
|
|
4934
|
+
mid?: string;
|
|
4935
|
+
/** Room / session name. */
|
|
4936
|
+
roomName?: string;
|
|
4937
|
+
/** Meeting start time, epoch SECONDS. */
|
|
4938
|
+
startTime?: number;
|
|
4939
|
+
/** Meeting end time, epoch SECONDS. */
|
|
4940
|
+
endTime?: number;
|
|
4941
|
+
/** Meeting URL. */
|
|
4942
|
+
url?: string;
|
|
4943
|
+
/** Human-readable transcript date. */
|
|
4944
|
+
transcriptDate?: string;
|
|
4945
|
+
/**
|
|
4946
|
+
* URL to fetch the transcript content. The content itself must be fetched
|
|
4947
|
+
* separately.
|
|
4948
|
+
*/
|
|
4949
|
+
transcriptUrl?: string;
|
|
4950
|
+
/** Arbitrary server-provided metadata. */
|
|
4951
|
+
metaData?: Record<string, unknown>;
|
|
4952
|
+
}
|
|
4953
|
+
//#endregion
|
|
4954
|
+
//#region src/transcripts/TranscriptRequest.d.ts
|
|
4955
|
+
/**
|
|
4956
|
+
* A paginated request for a meeting's transcripts. Created via
|
|
4957
|
+
* {@link TranscriptRequestBuilder.build}. Holds the pagination cursor and issues
|
|
4958
|
+
* one page per `fetchNext()` / `fetchPrevious()` call.
|
|
4959
|
+
*/
|
|
4960
|
+
declare class TranscriptRequest {
|
|
4961
|
+
private readonly sessionId;
|
|
4962
|
+
private readonly limit;
|
|
4963
|
+
/** Total pages reported by the server (`null` = no response read yet). */
|
|
4964
|
+
private totalPages;
|
|
4965
|
+
/** Last page successfully fetched (`0` = none fetched yet). */
|
|
4966
|
+
private currentPage;
|
|
4967
|
+
/** Whether a fetch is currently in flight. */
|
|
4968
|
+
private inProgress;
|
|
4969
|
+
constructor(builder: TranscriptRequestBuilder);
|
|
4970
|
+
/**
|
|
4971
|
+
* Fetches the next page of transcripts. Resolves `[]` once the last page has
|
|
4972
|
+
* been reached (including the empty-session `total_pages: 0` case).
|
|
4973
|
+
* @returns A promise resolving to the page's transcripts.
|
|
4974
|
+
* @throws Rejects with a {@link CometChatCallsException} on error.
|
|
4975
|
+
*/
|
|
4976
|
+
fetchNext(): Promise<Transcript[]>;
|
|
4977
|
+
/**
|
|
4978
|
+
* Fetches the previous page of transcripts. Resolves `[]` when there is no
|
|
4979
|
+
* previous page (a fresh request, or the first page) — it never requests
|
|
4980
|
+
* `page < 1`.
|
|
4981
|
+
* @returns A promise resolving to the page's transcripts, or `[]`.
|
|
4982
|
+
* @throws Rejects with a {@link CometChatCallsException} on error.
|
|
4983
|
+
*/
|
|
4984
|
+
fetchPrevious(): Promise<Transcript[] | []>;
|
|
4985
|
+
private makeAPICall;
|
|
4986
|
+
/**
|
|
4987
|
+
* Advances the pagination cursor from the response `meta`. A missing / malformed
|
|
4988
|
+
* `meta` is treated as a single page (the fetched rows still resolve — we never
|
|
4989
|
+
* throw a raw `TypeError` the way the CallLog builder does).
|
|
4990
|
+
*/
|
|
4991
|
+
private updatePagination;
|
|
4992
|
+
}
|
|
4993
|
+
/**
|
|
4994
|
+
* Builder for a {@link TranscriptRequest}.
|
|
4995
|
+
*
|
|
4996
|
+
* @example
|
|
4997
|
+
* const request = new CometChatCalls.TranscriptRequestBuilder()
|
|
4998
|
+
* .setSessionId('v1.us.2547167fe69871fd.pranav')
|
|
4999
|
+
* .setLimit(10)
|
|
5000
|
+
* .build();
|
|
5001
|
+
* const page = await request.fetchNext();
|
|
5002
|
+
*/
|
|
5003
|
+
declare class TranscriptRequestBuilder {
|
|
5004
|
+
sessionId: string;
|
|
5005
|
+
limit: number;
|
|
5006
|
+
/**
|
|
5007
|
+
* Sets the session (meeting) id whose transcripts to fetch. Required.
|
|
5008
|
+
* @param sessionId - The meeting session id.
|
|
5009
|
+
* @returns This builder.
|
|
5010
|
+
*/
|
|
5011
|
+
setSessionId(sessionId: string): this;
|
|
5012
|
+
/**
|
|
5013
|
+
* Sets the page size. Defaults to 30 and is clamped to the range 1–1000.
|
|
5014
|
+
* Non-finite values are ignored.
|
|
5015
|
+
* @param limit - The number of transcripts per page.
|
|
5016
|
+
* @returns This builder.
|
|
5017
|
+
*/
|
|
5018
|
+
setLimit(limit: number): this;
|
|
5019
|
+
/**
|
|
5020
|
+
* Builds the {@link TranscriptRequest}.
|
|
5021
|
+
* @returns A ready-to-use request.
|
|
5022
|
+
* @throws {CometChatCallsException} `NOT_INITIALIZED` if `CometChatCalls.init()`
|
|
5023
|
+
* has not been called, or `SESSION_ID_REQUIRED` if no session id was set.
|
|
5024
|
+
*/
|
|
5025
|
+
build(): TranscriptRequest;
|
|
5026
|
+
}
|
|
5027
|
+
//#endregion
|
|
4357
5028
|
//#region src/CometChatCalls.d.ts
|
|
4358
5029
|
interface User {
|
|
4359
5030
|
uid: string;
|
|
@@ -4402,6 +5073,10 @@ declare class CometChatCalls extends SessionMethodsCore {
|
|
|
4402
5073
|
static CallSettingsBuilder: typeof CallSettingsBuilder;
|
|
4403
5074
|
static CallAppSettingsBuilder: typeof CallAppSettingsBuilder;
|
|
4404
5075
|
static Component: typeof AppReactNativeSDK;
|
|
5076
|
+
static CallLogRequestBuilder: typeof CallLogRequestBuilder;
|
|
5077
|
+
static CallLog: typeof CallLog;
|
|
5078
|
+
static Transcription: typeof Transcription;
|
|
5079
|
+
static TranscriptRequestBuilder: typeof TranscriptRequestBuilder;
|
|
4405
5080
|
/**
|
|
4406
5081
|
* Initializes the CometChat Calls SDK with the provided app settings.
|
|
4407
5082
|
* Must be called before any other SDK methods.
|
|
@@ -4563,4 +5238,4 @@ declare class CometChatCalls extends SessionMethodsCore {
|
|
|
4563
5238
|
static disablePictureInPictureLayout(): void;
|
|
4564
5239
|
}
|
|
4565
5240
|
//#endregion
|
|
4566
|
-
export { CometChatCalls };
|
|
5241
|
+
export { CometChatCalls, type Transcript };
|