@stream-io/video-client 1.40.3 → 1.41.0

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.
@@ -1,8 +1,8 @@
1
1
  import { Publisher, Subscriber, TrackPublishOptions } from './rtc';
2
2
  import { CallState } from './store';
3
3
  import { ScopedLogger } from './logger';
4
- import type { AcceptCallResponse, BlockUserResponse, CallRingEvent, CallSettingsResponse, CollectUserFeedbackRequest, CollectUserFeedbackResponse, DeleteCallRequest, DeleteCallResponse, EndCallResponse, GetCallReportResponse, GetCallResponse, GetCallSessionParticipantStatsDetailsResponse, GetOrCreateCallRequest, GetOrCreateCallResponse, GoLiveRequest, GoLiveResponse, JoinCallResponse, KickUserRequest, KickUserResponse, ListRecordingsResponse, ListTranscriptionsResponse, MuteUsersResponse, PinRequest, PinResponse, QueryCallMembersRequest, QueryCallMembersResponse, QueryCallSessionParticipantStatsResponse, QueryCallSessionParticipantStatsTimelineResponse, QueryCallStatsMapResponse, RejectCallResponse, RequestPermissionRequest, RequestPermissionResponse, RingCallRequest, RingCallResponse, SendCallEventResponse, SendReactionRequest, SendReactionResponse, StartClosedCaptionsRequest, StartClosedCaptionsResponse, StartFrameRecordingRequest, StartFrameRecordingResponse, StartHLSBroadcastingResponse, StartRecordingRequest, StartRecordingResponse, StartRTMPBroadcastsRequest, StartRTMPBroadcastsResponse, StartTranscriptionRequest, StartTranscriptionResponse, StopAllRTMPBroadcastsResponse, StopClosedCaptionsRequest, StopClosedCaptionsResponse, StopFrameRecordingResponse, StopHLSBroadcastingResponse, StopLiveRequest, StopLiveResponse, StopRecordingResponse, StopRTMPBroadcastsResponse, StopTranscriptionResponse, UnblockUserResponse, UnpinRequest, UnpinResponse, UpdateCallMembersRequest, UpdateCallMembersResponse, UpdateCallRequest, UpdateCallResponse, UpdateUserPermissionsRequest, UpdateUserPermissionsResponse } from './gen/coordinator';
5
- import { AudioTrackType, CallConstructor, CallLeaveOptions, ClientPublishOptions, ClosedCaptionsSettings, JoinCallData, TrackMuteType, VideoTrackType } from './types';
4
+ import type { AcceptCallResponse, BlockUserResponse, CallRingEvent, CallSettingsResponse, CollectUserFeedbackRequest, CollectUserFeedbackResponse, DeleteCallRequest, DeleteCallResponse, EndCallResponse, GetCallReportResponse, GetCallResponse, GetCallSessionParticipantStatsDetailsResponse, GetOrCreateCallRequest, GetOrCreateCallResponse, GoLiveRequest, GoLiveResponse, JoinCallResponse, KickUserRequest, KickUserResponse, ListRecordingsResponse, ListTranscriptionsResponse, MuteUsersResponse, PinRequest, PinResponse, QueryCallMembersRequest, QueryCallMembersResponse, QueryCallSessionParticipantStatsResponse, QueryCallSessionParticipantStatsTimelineResponse, QueryCallStatsMapResponse, RejectCallResponse, RequestPermissionRequest, RequestPermissionResponse, RingCallRequest, RingCallResponse, SendCallEventResponse, SendReactionRequest, SendReactionResponse, StartClosedCaptionsRequest, StartClosedCaptionsResponse, StartFrameRecordingRequest, StartFrameRecordingResponse, StartHLSBroadcastingResponse, StartRTMPBroadcastsRequest, StartRTMPBroadcastsResponse, StartTranscriptionRequest, StartTranscriptionResponse, StopAllRTMPBroadcastsResponse, StopClosedCaptionsRequest, StopClosedCaptionsResponse, StopFrameRecordingResponse, StopHLSBroadcastingResponse, StopLiveRequest, StopLiveResponse, StopRecordingResponse, StopRTMPBroadcastsResponse, StopTranscriptionResponse, UnblockUserResponse, UnpinRequest, UnpinResponse, UpdateCallMembersRequest, UpdateCallMembersResponse, UpdateCallRequest, UpdateCallResponse, UpdateUserPermissionsRequest, UpdateUserPermissionsResponse } from './gen/coordinator';
5
+ import { AudioTrackType, CallConstructor, CallLeaveOptions, CallRecordingType, ClientPublishOptions, ClosedCaptionsSettings, JoinCallData, StartCallRecordingFnType, TrackMuteType, VideoTrackType } from './types';
6
6
  import { ClientCapability, TrackType, VideoDimension } from './gen/video/sfu/models/models';
7
7
  import { Tracer } from './stats';
8
8
  import { DynascaleManager } from './helpers/DynascaleManager';
@@ -475,11 +475,11 @@ export declare class Call {
475
475
  /**
476
476
  * Starts recording the call
477
477
  */
478
- startRecording: (request?: StartRecordingRequest) => Promise<StartRecordingResponse>;
478
+ startRecording: StartCallRecordingFnType;
479
479
  /**
480
480
  * Stops recording the call
481
481
  */
482
- stopRecording: () => Promise<StopRecordingResponse>;
482
+ stopRecording: (type?: CallRecordingType) => Promise<StopRecordingResponse>;
483
483
  /**
484
484
  * Starts the transcription of the call.
485
485
  *
@@ -40,8 +40,6 @@ export declare class SpeakerManager {
40
40
  /**
41
41
  * Set the volume of a participant.
42
42
  *
43
- * Note: This method is not supported in React Native.
44
- *
45
43
  * @param sessionId the participant's session id.
46
44
  * @param volume a number between 0 and 1. Set it to `undefined` to use the default volume.
47
45
  */
@@ -1525,6 +1525,12 @@ export interface CallRecordingFailedEvent {
1525
1525
  * @memberof CallRecordingFailedEvent
1526
1526
  */
1527
1527
  egress_id: string;
1528
+ /**
1529
+ * The type of recording
1530
+ * @type {string}
1531
+ * @memberof CallRecordingFailedEvent
1532
+ */
1533
+ recording_type: CallRecordingFailedEventRecordingTypeEnum;
1528
1534
  /**
1529
1535
  * The type of event: "call.recording_failed" in this case
1530
1536
  * @type {string}
@@ -1532,6 +1538,15 @@ export interface CallRecordingFailedEvent {
1532
1538
  */
1533
1539
  type: string;
1534
1540
  }
1541
+ /**
1542
+ * @export
1543
+ */
1544
+ export declare const CallRecordingFailedEventRecordingTypeEnum: {
1545
+ readonly COMPOSITE: "composite";
1546
+ readonly INDIVIDUAL: "individual";
1547
+ readonly RAW: "raw";
1548
+ };
1549
+ export type CallRecordingFailedEventRecordingTypeEnum = (typeof CallRecordingFailedEventRecordingTypeEnum)[keyof typeof CallRecordingFailedEventRecordingTypeEnum];
1535
1550
  /**
1536
1551
  * This event is sent when call recording is ready
1537
1552
  * @export
@@ -1562,6 +1577,12 @@ export interface CallRecordingReadyEvent {
1562
1577
  * @memberof CallRecordingReadyEvent
1563
1578
  */
1564
1579
  egress_id: string;
1580
+ /**
1581
+ * The type of recording
1582
+ * @type {string}
1583
+ * @memberof CallRecordingReadyEvent
1584
+ */
1585
+ recording_type: CallRecordingReadyEventRecordingTypeEnum;
1565
1586
  /**
1566
1587
  * The type of event: "call.recording_ready" in this case
1567
1588
  * @type {string}
@@ -1569,6 +1590,15 @@ export interface CallRecordingReadyEvent {
1569
1590
  */
1570
1591
  type: string;
1571
1592
  }
1593
+ /**
1594
+ * @export
1595
+ */
1596
+ export declare const CallRecordingReadyEventRecordingTypeEnum: {
1597
+ readonly COMPOSITE: "composite";
1598
+ readonly INDIVIDUAL: "individual";
1599
+ readonly RAW: "raw";
1600
+ };
1601
+ export type CallRecordingReadyEventRecordingTypeEnum = (typeof CallRecordingReadyEventRecordingTypeEnum)[keyof typeof CallRecordingReadyEventRecordingTypeEnum];
1572
1602
  /**
1573
1603
  * This event is sent when call recording has started
1574
1604
  * @export
@@ -1593,6 +1623,12 @@ export interface CallRecordingStartedEvent {
1593
1623
  * @memberof CallRecordingStartedEvent
1594
1624
  */
1595
1625
  egress_id: string;
1626
+ /**
1627
+ * The type of recording
1628
+ * @type {string}
1629
+ * @memberof CallRecordingStartedEvent
1630
+ */
1631
+ recording_type: CallRecordingStartedEventRecordingTypeEnum;
1596
1632
  /**
1597
1633
  * The type of event: "call.recording_started" in this case
1598
1634
  * @type {string}
@@ -1600,6 +1636,15 @@ export interface CallRecordingStartedEvent {
1600
1636
  */
1601
1637
  type: string;
1602
1638
  }
1639
+ /**
1640
+ * @export
1641
+ */
1642
+ export declare const CallRecordingStartedEventRecordingTypeEnum: {
1643
+ readonly COMPOSITE: "composite";
1644
+ readonly INDIVIDUAL: "individual";
1645
+ readonly RAW: "raw";
1646
+ };
1647
+ export type CallRecordingStartedEventRecordingTypeEnum = (typeof CallRecordingStartedEventRecordingTypeEnum)[keyof typeof CallRecordingStartedEventRecordingTypeEnum];
1603
1648
  /**
1604
1649
  * This event is sent when call recording has stopped
1605
1650
  * @export
@@ -1624,6 +1669,12 @@ export interface CallRecordingStoppedEvent {
1624
1669
  * @memberof CallRecordingStoppedEvent
1625
1670
  */
1626
1671
  egress_id: string;
1672
+ /**
1673
+ * The type of recording
1674
+ * @type {string}
1675
+ * @memberof CallRecordingStoppedEvent
1676
+ */
1677
+ recording_type: CallRecordingStoppedEventRecordingTypeEnum;
1627
1678
  /**
1628
1679
  * The type of event: "call.recording_stopped" in this case
1629
1680
  * @type {string}
@@ -1631,6 +1682,15 @@ export interface CallRecordingStoppedEvent {
1631
1682
  */
1632
1683
  type: string;
1633
1684
  }
1685
+ /**
1686
+ * @export
1687
+ */
1688
+ export declare const CallRecordingStoppedEventRecordingTypeEnum: {
1689
+ readonly COMPOSITE: "composite";
1690
+ readonly INDIVIDUAL: "individual";
1691
+ readonly RAW: "raw";
1692
+ };
1693
+ export type CallRecordingStoppedEventRecordingTypeEnum = (typeof CallRecordingStoppedEventRecordingTypeEnum)[keyof typeof CallRecordingStoppedEventRecordingTypeEnum];
1634
1694
  /**
1635
1695
  * This event is sent when a user rejects a notification to join a call.
1636
1696
  * @export
@@ -2385,6 +2445,12 @@ export interface CallSettingsRequest {
2385
2445
  * @memberof CallSettingsRequest
2386
2446
  */
2387
2447
  geofencing?: GeofenceSettingsRequest;
2448
+ /**
2449
+ *
2450
+ * @type {IndividualRecordingSettingsRequest}
2451
+ * @memberof CallSettingsRequest
2452
+ */
2453
+ individual_recording?: IndividualRecordingSettingsRequest;
2388
2454
  /**
2389
2455
  *
2390
2456
  * @type {IngressSettingsRequest}
@@ -2397,6 +2463,12 @@ export interface CallSettingsRequest {
2397
2463
  * @memberof CallSettingsRequest
2398
2464
  */
2399
2465
  limits?: LimitsSettingsRequest;
2466
+ /**
2467
+ *
2468
+ * @type {RawRecordingSettingsRequest}
2469
+ * @memberof CallSettingsRequest
2470
+ */
2471
+ raw_recording?: RawRecordingSettingsRequest;
2400
2472
  /**
2401
2473
  *
2402
2474
  * @type {RecordSettingsRequest}
@@ -2476,6 +2548,12 @@ export interface CallSettingsResponse {
2476
2548
  * @memberof CallSettingsResponse
2477
2549
  */
2478
2550
  geofencing: GeofenceSettingsResponse;
2551
+ /**
2552
+ *
2553
+ * @type {IndividualRecordingSettingsResponse}
2554
+ * @memberof CallSettingsResponse
2555
+ */
2556
+ individual_recording: IndividualRecordingSettingsResponse;
2479
2557
  /**
2480
2558
  *
2481
2559
  * @type {IngressSettingsResponse}
@@ -2488,6 +2566,12 @@ export interface CallSettingsResponse {
2488
2566
  * @memberof CallSettingsResponse
2489
2567
  */
2490
2568
  limits: LimitsSettingsResponse;
2569
+ /**
2570
+ *
2571
+ * @type {RawRecordingSettingsResponse}
2572
+ * @memberof CallSettingsResponse
2573
+ */
2574
+ raw_recording: RawRecordingSettingsResponse;
2491
2575
  /**
2492
2576
  *
2493
2577
  * @type {RecordSettingsResponse}
@@ -3507,6 +3591,19 @@ export interface CollectUserFeedbackResponse {
3507
3591
  */
3508
3592
  duration: string;
3509
3593
  }
3594
+ /**
3595
+ *
3596
+ * @export
3597
+ * @interface CompositeRecordingResponse
3598
+ */
3599
+ export interface CompositeRecordingResponse {
3600
+ /**
3601
+ *
3602
+ * @type {string}
3603
+ * @memberof CompositeRecordingResponse
3604
+ */
3605
+ status: string;
3606
+ }
3510
3607
  /**
3511
3608
  *
3512
3609
  * @export
@@ -4163,6 +4260,12 @@ export interface EgressResponse {
4163
4260
  * @memberof EgressResponse
4164
4261
  */
4165
4262
  broadcasting: boolean;
4263
+ /**
4264
+ *
4265
+ * @type {CompositeRecordingResponse}
4266
+ * @memberof EgressResponse
4267
+ */
4268
+ composite_recording?: CompositeRecordingResponse;
4166
4269
  /**
4167
4270
  *
4168
4271
  * @type {FrameRecordingResponse}
@@ -4175,6 +4278,18 @@ export interface EgressResponse {
4175
4278
  * @memberof EgressResponse
4176
4279
  */
4177
4280
  hls?: EgressHLSResponse;
4281
+ /**
4282
+ *
4283
+ * @type {IndividualRecordingResponse}
4284
+ * @memberof EgressResponse
4285
+ */
4286
+ individual_recording?: IndividualRecordingResponse;
4287
+ /**
4288
+ *
4289
+ * @type {RawRecordingResponse}
4290
+ * @memberof EgressResponse
4291
+ */
4292
+ raw_recording?: RawRecordingResponse;
4178
4293
  /**
4179
4294
  *
4180
4295
  * @type {Array<EgressRTMPResponse>}
@@ -4659,12 +4774,30 @@ export interface GoLiveRequest {
4659
4774
  * @memberof GoLiveRequest
4660
4775
  */
4661
4776
  start_closed_caption?: boolean;
4777
+ /**
4778
+ *
4779
+ * @type {boolean}
4780
+ * @memberof GoLiveRequest
4781
+ */
4782
+ start_composite_recording?: boolean;
4662
4783
  /**
4663
4784
  *
4664
4785
  * @type {boolean}
4665
4786
  * @memberof GoLiveRequest
4666
4787
  */
4667
4788
  start_hls?: boolean;
4789
+ /**
4790
+ *
4791
+ * @type {boolean}
4792
+ * @memberof GoLiveRequest
4793
+ */
4794
+ start_individual_recording?: boolean;
4795
+ /**
4796
+ *
4797
+ * @type {boolean}
4798
+ * @memberof GoLiveRequest
4799
+ */
4800
+ start_raw_recording?: boolean;
4668
4801
  /**
4669
4802
  *
4670
4803
  * @type {boolean}
@@ -4842,6 +4975,63 @@ export interface ICEServer {
4842
4975
  */
4843
4976
  username: string;
4844
4977
  }
4978
+ /**
4979
+ *
4980
+ * @export
4981
+ * @interface IndividualRecordingResponse
4982
+ */
4983
+ export interface IndividualRecordingResponse {
4984
+ /**
4985
+ *
4986
+ * @type {string}
4987
+ * @memberof IndividualRecordingResponse
4988
+ */
4989
+ status: string;
4990
+ }
4991
+ /**
4992
+ *
4993
+ * @export
4994
+ * @interface IndividualRecordingSettingsRequest
4995
+ */
4996
+ export interface IndividualRecordingSettingsRequest {
4997
+ /**
4998
+ *
4999
+ * @type {string}
5000
+ * @memberof IndividualRecordingSettingsRequest
5001
+ */
5002
+ mode: IndividualRecordingSettingsRequestModeEnum;
5003
+ }
5004
+ /**
5005
+ * @export
5006
+ */
5007
+ export declare const IndividualRecordingSettingsRequestModeEnum: {
5008
+ readonly AVAILABLE: "available";
5009
+ readonly DISABLED: "disabled";
5010
+ readonly AUTO_ON: "auto-on";
5011
+ };
5012
+ export type IndividualRecordingSettingsRequestModeEnum = (typeof IndividualRecordingSettingsRequestModeEnum)[keyof typeof IndividualRecordingSettingsRequestModeEnum];
5013
+ /**
5014
+ *
5015
+ * @export
5016
+ * @interface IndividualRecordingSettingsResponse
5017
+ */
5018
+ export interface IndividualRecordingSettingsResponse {
5019
+ /**
5020
+ *
5021
+ * @type {string}
5022
+ * @memberof IndividualRecordingSettingsResponse
5023
+ */
5024
+ mode: IndividualRecordingSettingsResponseModeEnum;
5025
+ }
5026
+ /**
5027
+ * @export
5028
+ */
5029
+ export declare const IndividualRecordingSettingsResponseModeEnum: {
5030
+ readonly AVAILABLE: "available";
5031
+ readonly DISABLED: "disabled";
5032
+ readonly AUTO_ON: "auto-on";
5033
+ };
5034
+ export type IndividualRecordingSettingsResponseModeEnum = (typeof IndividualRecordingSettingsResponseModeEnum)[keyof typeof IndividualRecordingSettingsResponseModeEnum];
4845
5035
  /**
4846
5036
  *
4847
5037
  * @export
@@ -5793,11 +5983,15 @@ export declare const OwnCapability: {
5793
5983
  readonly START_BROADCAST_CALL: "start-broadcast-call";
5794
5984
  readonly START_CLOSED_CAPTIONS_CALL: "start-closed-captions-call";
5795
5985
  readonly START_FRAME_RECORD_CALL: "start-frame-record-call";
5986
+ readonly START_INDIVIDUAL_RECORD_CALL: "start-individual-record-call";
5987
+ readonly START_RAW_RECORD_CALL: "start-raw-record-call";
5796
5988
  readonly START_RECORD_CALL: "start-record-call";
5797
5989
  readonly START_TRANSCRIPTION_CALL: "start-transcription-call";
5798
5990
  readonly STOP_BROADCAST_CALL: "stop-broadcast-call";
5799
5991
  readonly STOP_CLOSED_CAPTIONS_CALL: "stop-closed-captions-call";
5800
5992
  readonly STOP_FRAME_RECORD_CALL: "stop-frame-record-call";
5993
+ readonly STOP_INDIVIDUAL_RECORD_CALL: "stop-individual-record-call";
5994
+ readonly STOP_RAW_RECORD_CALL: "stop-raw-record-call";
5801
5995
  readonly STOP_RECORD_CALL: "stop-record-call";
5802
5996
  readonly STOP_TRANSCRIPTION_CALL: "stop-transcription-call";
5803
5997
  readonly UPDATE_CALL: "update-call";
@@ -7219,6 +7413,63 @@ export interface RTMPSettingsResponse {
7219
7413
  */
7220
7414
  quality: string;
7221
7415
  }
7416
+ /**
7417
+ *
7418
+ * @export
7419
+ * @interface RawRecordingResponse
7420
+ */
7421
+ export interface RawRecordingResponse {
7422
+ /**
7423
+ *
7424
+ * @type {string}
7425
+ * @memberof RawRecordingResponse
7426
+ */
7427
+ status: string;
7428
+ }
7429
+ /**
7430
+ *
7431
+ * @export
7432
+ * @interface RawRecordingSettingsRequest
7433
+ */
7434
+ export interface RawRecordingSettingsRequest {
7435
+ /**
7436
+ *
7437
+ * @type {string}
7438
+ * @memberof RawRecordingSettingsRequest
7439
+ */
7440
+ mode: RawRecordingSettingsRequestModeEnum;
7441
+ }
7442
+ /**
7443
+ * @export
7444
+ */
7445
+ export declare const RawRecordingSettingsRequestModeEnum: {
7446
+ readonly AVAILABLE: "available";
7447
+ readonly DISABLED: "disabled";
7448
+ readonly AUTO_ON: "auto-on";
7449
+ };
7450
+ export type RawRecordingSettingsRequestModeEnum = (typeof RawRecordingSettingsRequestModeEnum)[keyof typeof RawRecordingSettingsRequestModeEnum];
7451
+ /**
7452
+ *
7453
+ * @export
7454
+ * @interface RawRecordingSettingsResponse
7455
+ */
7456
+ export interface RawRecordingSettingsResponse {
7457
+ /**
7458
+ *
7459
+ * @type {string}
7460
+ * @memberof RawRecordingSettingsResponse
7461
+ */
7462
+ mode: RawRecordingSettingsResponseModeEnum;
7463
+ }
7464
+ /**
7465
+ * @export
7466
+ */
7467
+ export declare const RawRecordingSettingsResponseModeEnum: {
7468
+ readonly AVAILABLE: "available";
7469
+ readonly DISABLED: "disabled";
7470
+ readonly AUTO_ON: "auto-on";
7471
+ };
7472
+ export type RawRecordingSettingsResponseModeEnum = (typeof RawRecordingSettingsResponseModeEnum)[keyof typeof RawRecordingSettingsResponseModeEnum];
7222
7473
  /**
7223
7474
  *
7224
7475
  * @export
@@ -8665,12 +8916,30 @@ export interface StopLiveRequest {
8665
8916
  * @memberof StopLiveRequest
8666
8917
  */
8667
8918
  continue_closed_caption?: boolean;
8919
+ /**
8920
+ *
8921
+ * @type {boolean}
8922
+ * @memberof StopLiveRequest
8923
+ */
8924
+ continue_composite_recording?: boolean;
8668
8925
  /**
8669
8926
  *
8670
8927
  * @type {boolean}
8671
8928
  * @memberof StopLiveRequest
8672
8929
  */
8673
8930
  continue_hls?: boolean;
8931
+ /**
8932
+ *
8933
+ * @type {boolean}
8934
+ * @memberof StopLiveRequest
8935
+ */
8936
+ continue_individual_recording?: boolean;
8937
+ /**
8938
+ *
8939
+ * @type {boolean}
8940
+ * @memberof StopLiveRequest
8941
+ */
8942
+ continue_raw_recording?: boolean;
8674
8943
  /**
8675
8944
  *
8676
8945
  * @type {boolean}
@@ -6,6 +6,14 @@
6
6
  * @param sdp the SDP.
7
7
  */
8
8
  export declare const extractMid: (transceiver: RTCRtpTransceiver, transceiverInitIndex: number, sdp: string | undefined) => string;
9
+ /**
10
+ * Sets the start bitrate for the VP9, H264, and AV1 codecs in the SDP.
11
+ *
12
+ * @param offerSdp the offer SDP to modify.
13
+ * @param maxBitrateKbps the maximum bitrate in kbps.
14
+ * @param startBitrateFactor the factor (0-1) to multiply with maxBitrateKbps to get the start bitrate.
15
+ * @param targetMid the media ID to target.
16
+ */
9
17
  export declare const setStartBitrate: (offerSdp: string, maxBitrateKbps: number, startBitrateFactor: number, targetMid: string) => string;
10
18
  /**
11
19
  * Enables stereo in the answer SDP based on the offered stereo in the offer SDP.
@@ -5,7 +5,7 @@ import { type ClosedCaptionsSettings, type StreamVideoParticipant, type StreamVi
5
5
  import { CallStatsReport } from '../stats';
6
6
  import { CallClosedCaption, CallIngressResponse, CallResponse, CallSessionResponse, CallSettingsResponse, EgressResponse, MemberResponse, OwnCapability, ThumbnailResponse, UserResponse, VideoEvent } from '../gen/coordinator';
7
7
  import { ReconnectDetails } from '../gen/video/sfu/event/events';
8
- import { CallState as SfuCallState, Pin, TrackType, CallGrants } from '../gen/video/sfu/models/models';
8
+ import { CallGrants, CallState as SfuCallState, Pin, TrackType } from '../gen/video/sfu/models/models';
9
9
  import { Comparator } from '../sorting';
10
10
  type OrphanedTrack = {
11
11
  id: string;
@@ -29,6 +29,8 @@ export declare class CallState {
29
29
  private egressSubject;
30
30
  private ingressSubject;
31
31
  private recordingSubject;
32
+ private individualRecordingSubject;
33
+ private rawRecordingSubject;
32
34
  private sessionSubject;
33
35
  private settingsSubject;
34
36
  private transcribingSubject;
@@ -162,6 +164,14 @@ export declare class CallState {
162
164
  * Will provide the recording state of this call.
163
165
  */
164
166
  recording$: Observable<boolean>;
167
+ /**
168
+ * Will provide the recording state of this call.
169
+ */
170
+ individualRecording$: Observable<boolean>;
171
+ /**
172
+ * Will provide the recording state of this call.
173
+ */
174
+ rawRecording$: Observable<boolean>;
165
175
  /**
166
176
  * Will provide the session data of this call.
167
177
  */
@@ -439,9 +449,17 @@ export declare class CallState {
439
449
  */
440
450
  get ingress(): CallIngressResponse | undefined;
441
451
  /**
442
- * Will provide the recording state of this call.
452
+ * Will provide the composite recording state of this call.
443
453
  */
444
454
  get recording(): boolean;
455
+ /**
456
+ * Will provide the individual recording state of this call.
457
+ */
458
+ get individualRecording(): boolean;
459
+ /**
460
+ * Will provide the raw recording state of this call.
461
+ */
462
+ get rawRecording(): boolean;
445
463
  /**
446
464
  * Will provide the session data of this call.
447
465
  */
@@ -586,6 +604,7 @@ export declare class CallState {
586
604
  private updateFromMemberAdded;
587
605
  private updateFromHLSBroadcastStopped;
588
606
  private updateFromHLSBroadcastingFailed;
607
+ private updateFromRecordingEvent;
589
608
  private updateParticipantCountFromSession;
590
609
  private updateFromSessionParticipantCountUpdate;
591
610
  private updateFromSessionParticipantLeft;
@@ -1,5 +1,5 @@
1
1
  import type { Participant, TrackType, VideoDimension } from './gen/video/sfu/models/models';
2
- import type { JoinCallRequest, MemberResponse, OwnCapability, ReactionResponse } from './gen/coordinator';
2
+ import type { CallRecordingStartedEventRecordingTypeEnum, JoinCallRequest, MemberResponse, OwnCapability, ReactionResponse, AudioSettingsRequestDefaultDeviceEnum, StartRecordingRequest, StartRecordingResponse } from './gen/coordinator';
3
3
  import type { StreamClient } from './coordinator/connection/client';
4
4
  import type { Comparator } from './sorting';
5
5
  import type { StreamVideoWriteableStateStore } from './store';
@@ -273,6 +273,34 @@ export type CallConstructor = {
273
273
  */
274
274
  clientStore: StreamVideoWriteableStateStore;
275
275
  };
276
+ export type CallRecordingType = CallRecordingStartedEventRecordingTypeEnum;
277
+ export type StartCallRecordingFnType = {
278
+ (): Promise<StartRecordingResponse>;
279
+ (type: CallRecordingType): Promise<StartRecordingResponse>;
280
+ (request: StartRecordingRequest): Promise<StartRecordingResponse>;
281
+ (request: StartRecordingRequest, type: CallRecordingType): Promise<StartRecordingResponse>;
282
+ };
283
+ export type StreamRNVideoSDKGlobals = {
284
+ callManager: {
285
+ /**
286
+ * Sets up the in call manager.
287
+ */
288
+ setup({ default_device, }: {
289
+ default_device: AudioSettingsRequestDefaultDeviceEnum;
290
+ }): void;
291
+ /**
292
+ * Starts the in call manager.
293
+ */
294
+ start(): void;
295
+ /**
296
+ * Stops the in call manager.
297
+ */
298
+ stop(): void;
299
+ };
300
+ };
301
+ declare global {
302
+ var streamRNVideoSDK: StreamRNVideoSDKGlobals | undefined;
303
+ }
276
304
  /**
277
305
  * The options to pass to {@link Call.join} method.
278
306
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stream-io/video-client",
3
- "version": "1.40.3",
3
+ "version": "1.41.0",
4
4
  "main": "dist/index.cjs.js",
5
5
  "module": "dist/index.es.js",
6
6
  "browser": "dist/index.browser.es.js",
package/src/Call.ts CHANGED
@@ -109,9 +109,11 @@ import {
109
109
  AudioTrackType,
110
110
  CallConstructor,
111
111
  CallLeaveOptions,
112
+ CallRecordingType,
112
113
  ClientPublishOptions,
113
114
  ClosedCaptionsSettings,
114
115
  JoinCallData,
116
+ StartCallRecordingFnType,
115
117
  TrackMuteType,
116
118
  VideoTrackType,
117
119
  } from './types';
@@ -662,6 +664,8 @@ export class Call {
662
664
  this.cancelAutoDrop();
663
665
  this.clientStore.unregisterCall(this);
664
666
 
667
+ globalThis.streamRNVideoSDK?.callManager.stop();
668
+
665
669
  this.camera.dispose();
666
670
  this.microphone.dispose();
667
671
  this.screenShare.dispose();
@@ -1113,6 +1117,7 @@ export class Call {
1113
1117
  // re-apply them on later reconnections or server-side data fetches
1114
1118
  if (!this.deviceSettingsAppliedOnce && this.state.settings) {
1115
1119
  await this.applyDeviceConfig(this.state.settings, true);
1120
+ globalThis.streamRNVideoSDK?.callManager.start();
1116
1121
  this.deviceSettingsAppliedOnce = true;
1117
1122
  }
1118
1123
 
@@ -2096,20 +2101,33 @@ export class Call {
2096
2101
  /**
2097
2102
  * Starts recording the call
2098
2103
  */
2099
- startRecording = async (request?: StartRecordingRequest) => {
2104
+ startRecording: StartCallRecordingFnType = async (
2105
+ dataOrType?: StartRecordingRequest | CallRecordingType,
2106
+ type?: CallRecordingType,
2107
+ ): Promise<StartRecordingResponse> => {
2108
+ type = typeof dataOrType === 'string' ? dataOrType : type;
2109
+ dataOrType = typeof dataOrType === 'string' ? undefined : dataOrType;
2110
+
2111
+ const endpoint = !type
2112
+ ? `/start_recording`
2113
+ : `/recordings/${encodeURIComponent(type)}/start`;
2114
+
2100
2115
  return this.streamClient.post<
2101
2116
  StartRecordingResponse,
2102
2117
  StartRecordingRequest
2103
- >(`${this.streamClientBasePath}/start_recording`, request ? request : {});
2118
+ >(`${this.streamClientBasePath}${endpoint}`, dataOrType);
2104
2119
  };
2105
2120
 
2106
2121
  /**
2107
2122
  * Stops recording the call
2108
2123
  */
2109
- stopRecording = async () => {
2124
+ stopRecording = async (type?: CallRecordingType) => {
2125
+ const endpoint = !type
2126
+ ? `/stop_recording`
2127
+ : `/recordings/${encodeURIComponent(type)}/stop`;
2128
+
2110
2129
  return this.streamClient.post<StopRecordingResponse>(
2111
- `${this.streamClientBasePath}/stop_recording`,
2112
- {},
2130
+ `${this.streamClientBasePath}${endpoint}`,
2113
2131
  );
2114
2132
  };
2115
2133
 
@@ -2676,6 +2694,9 @@ export class Call {
2676
2694
  settings: CallSettingsResponse,
2677
2695
  publish: boolean,
2678
2696
  ) => {
2697
+ globalThis.streamRNVideoSDK?.callManager.setup({
2698
+ default_device: settings.audio.default_device,
2699
+ });
2679
2700
  await this.camera.apply(settings.video, publish).catch((err) => {
2680
2701
  this.logger.warn('Camera init failed', err);
2681
2702
  });
@@ -107,8 +107,6 @@ export class SpeakerManager {
107
107
  /**
108
108
  * Set the volume of a participant.
109
109
  *
110
- * Note: This method is not supported in React Native.
111
- *
112
110
  * @param sessionId the participant's session id.
113
111
  * @param volume a number between 0 and 1. Set it to `undefined` to use the default volume.
114
112
  */