@stream-io/video-client 1.61.0 → 2.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -10
- package/dist/index.browser.es.js +358 -611
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +357 -611
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +358 -611
- package/dist/index.es.js.map +1 -1
- package/dist/src/Call.d.ts +3 -3
- package/dist/src/StreamVideoClient.d.ts +15 -21
- package/dist/src/store/CallState.d.ts +108 -266
- package/dist/src/store/ClientState.d.ts +62 -0
- package/dist/src/store/index.d.ts +1 -1
- package/dist/src/store/subjects.d.ts +15 -0
- package/dist/src/store/types.d.ts +22 -0
- package/dist/src/types.d.ts +3 -3
- package/package.json +2 -2
- package/src/Call.ts +14 -18
- package/src/StreamVideoClient.ts +40 -47
- package/src/__tests__/Call.autodrop.test.ts +4 -4
- package/src/__tests__/Call.getRingState.test.ts +2 -2
- package/src/__tests__/Call.lifecycle.test.ts +8 -8
- package/src/__tests__/Call.publishing.test.ts +2 -2
- package/src/__tests__/Call.ringSettled.test.ts +4 -4
- package/src/__tests__/Call.ringingLifecycle.test.ts +2 -2
- package/src/__tests__/StreamVideoClient.disconnect.test.ts +62 -0
- package/src/devices/__tests__/CameraManager.test.ts +2 -2
- package/src/devices/__tests__/DeviceManager.test.ts +2 -2
- package/src/devices/__tests__/DeviceManagerFilters.test.ts +2 -2
- package/src/devices/__tests__/MicrophoneManager.test.ts +2 -2
- package/src/devices/__tests__/MicrophoneManagerRN.test.ts +2 -2
- package/src/devices/__tests__/ScreenShareManager.test.ts +3 -3
- package/src/devices/__tests__/SpeakerManager.test.ts +4 -4
- package/src/events/__tests__/call.test.ts +3 -3
- package/src/helpers/__tests__/AudioBindingsWatchdog.test.ts +2 -2
- package/src/helpers/__tests__/DynascaleManager.test.ts +2 -2
- package/src/helpers/__tests__/ViewportTracker.test.ts +2 -2
- package/src/ringing/__tests__/RingStatePoller.test.ts +7 -7
- package/src/ringing/__tests__/RingTimeout.test.ts +4 -4
- package/src/ringing/__tests__/reconcileRingState.test.ts +3 -3
- package/src/rtc/__tests__/Call.reconnect.test.ts +5 -5
- package/src/store/CallState.ts +281 -551
- package/src/store/ClientState.ts +101 -0
- package/src/store/__tests__/CallState.test.ts +1 -1
- package/src/store/__tests__/ClientState.test.ts +35 -0
- package/src/store/__tests__/rxUtils.test.ts +67 -1
- package/src/store/index.ts +1 -1
- package/src/store/rxUtils.ts +8 -4
- package/src/store/subjects.ts +30 -0
- package/src/store/types.ts +45 -0
- package/src/types.ts +3 -3
- package/dist/src/store/stateStore.d.ts +0 -84
- package/src/store/stateStore.ts +0 -156
package/dist/src/Call.d.ts
CHANGED
|
@@ -109,7 +109,7 @@ export declare class Call {
|
|
|
109
109
|
private lastStatsOptions?;
|
|
110
110
|
private ringTimeout;
|
|
111
111
|
private ringStatePoller;
|
|
112
|
-
private readonly
|
|
112
|
+
private readonly clientState;
|
|
113
113
|
readonly streamClient: StreamClient;
|
|
114
114
|
readonly clientEventReporter: ClientEventReporter;
|
|
115
115
|
private sfuClient?;
|
|
@@ -167,7 +167,7 @@ export declare class Call {
|
|
|
167
167
|
* Use the [`StreamVideoClient.call`](./StreamVideoClient.md/#call)
|
|
168
168
|
* method to construct a `Call` instance.
|
|
169
169
|
*/
|
|
170
|
-
constructor({ type, id, streamClient, clientEventReporter, members, ownCapabilities, sortParticipantsBy,
|
|
170
|
+
constructor({ type, id, streamClient, clientEventReporter, members, ownCapabilities, sortParticipantsBy, clientState, ringing, watching, }: CallConstructor);
|
|
171
171
|
/**
|
|
172
172
|
* Sets up the call instance.
|
|
173
173
|
*
|
|
@@ -521,7 +521,7 @@ export declare class Call {
|
|
|
521
521
|
*/
|
|
522
522
|
notifyTrackMuteState: (muted: boolean, ...trackTypes: TrackType[]) => Promise<void>;
|
|
523
523
|
/**
|
|
524
|
-
* Will enhance the reported stats with additional participant-specific information (`callStatsReport$` state
|
|
524
|
+
* Will enhance the reported stats with additional participant-specific information (the `callStatsReport$` state variable).
|
|
525
525
|
* This is usually helpful when detailed stats for a specific participant are needed.
|
|
526
526
|
*
|
|
527
527
|
* @param sessionId the sessionId to start reporting for.
|
|
@@ -1,28 +1,22 @@
|
|
|
1
1
|
import { Call } from './Call';
|
|
2
2
|
import { StreamClient } from './coordinator/connection/client';
|
|
3
|
-
import {
|
|
3
|
+
import { ClientState } from './store';
|
|
4
4
|
import type { ConnectedEvent, CreateDeviceRequest, CreateGuestRequest, CreateGuestResponse, GetEdgesResponse, ListDevicesResponse, QueryAggregateCallStatsRequest, QueryAggregateCallStatsResponse, QueryCallsRequest, QueryCallStatsRequest, QueryCallStatsResponse } from './gen/coordinator';
|
|
5
5
|
import { AllClientEvents, ClientEventListener, StreamClientOptions, TokenOrProvider, User } from './coordinator/connection/types';
|
|
6
6
|
import type { StreamVideoClientOptions } from './types';
|
|
7
7
|
import { ScopedLogger } from './logger';
|
|
8
|
-
import { ClientEventReporter } from './reporting';
|
|
9
8
|
/**
|
|
10
9
|
* A `StreamVideoClient` instance lets you communicate with our API, and authenticate users.
|
|
11
10
|
*/
|
|
12
11
|
export declare class StreamVideoClient {
|
|
13
12
|
/**
|
|
14
|
-
*
|
|
13
|
+
* The reactive state of this client.
|
|
15
14
|
* You can subscribe to changes of the different state variables.
|
|
16
|
-
* Our library is built in a way that all state changes are exposed in this store,
|
|
17
|
-
* o all UI changes in your application should be handled by subscribing to these variables.
|
|
18
|
-
*
|
|
19
|
-
* @deprecated use the `client.state` getter.
|
|
20
15
|
*/
|
|
21
|
-
readonly
|
|
16
|
+
readonly state: ClientState;
|
|
22
17
|
readonly logger: ScopedLogger;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
readonly clientEventReporter: ClientEventReporter;
|
|
18
|
+
readonly streamClient: StreamClient;
|
|
19
|
+
private readonly clientEventReporter;
|
|
26
20
|
private effectsRegistered;
|
|
27
21
|
private eventHandlersToUnregister;
|
|
28
22
|
private readonly connectionConcurrencyTag;
|
|
@@ -40,10 +34,6 @@ export declare class StreamVideoClient {
|
|
|
40
34
|
user: User;
|
|
41
35
|
}): StreamVideoClient;
|
|
42
36
|
private registerClientInstance;
|
|
43
|
-
/**
|
|
44
|
-
* Return the reactive state store, use this if you want to be notified about changes to the client state
|
|
45
|
-
*/
|
|
46
|
-
get state(): StreamVideoReadOnlyStateStore;
|
|
47
37
|
private registerEffects;
|
|
48
38
|
/**
|
|
49
39
|
* Initializes a call from a call created or ringing event.
|
|
@@ -62,26 +52,30 @@ export declare class StreamVideoClient {
|
|
|
62
52
|
private rewatchCalls;
|
|
63
53
|
/**
|
|
64
54
|
* Connects the given user to the client.
|
|
65
|
-
* Only one user can connect at a time, if you want to change users, call `disconnectUser` before connecting a new user.
|
|
66
|
-
* If the connection is successful, the connected user [state variable](#readonlystatestore) will be updated accordingly.
|
|
67
55
|
*
|
|
68
56
|
* @param user the user to connect.
|
|
69
57
|
* @param tokenOrProvider a token or a function that returns a token.
|
|
70
58
|
*/
|
|
71
59
|
connectUser: (user: User, tokenOrProvider?: TokenOrProvider) => Promise<void | ConnectedEvent>;
|
|
60
|
+
/**
|
|
61
|
+
* Leaves every call this client still tracks. Runs while the coordinator
|
|
62
|
+
* connection is alive, so that the leave requests each call sends reach the
|
|
63
|
+
* backend.
|
|
64
|
+
*/
|
|
65
|
+
private leaveAllCalls;
|
|
72
66
|
/**
|
|
73
67
|
* Disconnects the currently connected user from the client.
|
|
74
|
-
*
|
|
75
|
-
* If the connection is successfully disconnected, the connected user [state variable](#readonlystatestore) will be updated accordingly
|
|
68
|
+
* Leaves every call the user is still in, and updates `client.state`accordingly.
|
|
76
69
|
*
|
|
77
70
|
* @param timeout Max number of ms, to wait for close event of websocket, before forcefully assuming successful disconnection.
|
|
78
|
-
* https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent
|
|
79
71
|
*/
|
|
80
72
|
disconnectUser: (timeout?: number) => Promise<void>;
|
|
81
73
|
/**
|
|
82
74
|
* You can subscribe to WebSocket events provided by the API.
|
|
83
75
|
* To remove a subscription, call the `off` method or, execute the returned unsubscribe function.
|
|
84
|
-
* Please note that subscribing to WebSocket events is an advanced use-case,
|
|
76
|
+
* Please note that subscribing to WebSocket events is an advanced use-case,
|
|
77
|
+
* for most use-cases it should be enough to watch for changes in the reactive
|
|
78
|
+
* `client.state`.
|
|
85
79
|
*
|
|
86
80
|
* @param eventName the event name or 'all'.
|
|
87
81
|
* @param callback the callback which will be called when the event is emitted.
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type { Patch } from './rxUtils';
|
|
1
|
+
import { type Patch } from './rxUtils';
|
|
3
2
|
import { CallingState } from './CallingState';
|
|
4
3
|
import { type ClosedCaptionsSettings, type StreamVideoParticipant, type StreamVideoParticipantPatch, type StreamVideoParticipantPatches, type SubscriptionChanges, VideoTrackType } from '../types';
|
|
5
4
|
import { CallStatsReport } from '../stats';
|
|
@@ -19,6 +18,9 @@ type OrphanedTrack = {
|
|
|
19
18
|
* @react You don't have to use this class directly, as we are exposing the state through Hooks.
|
|
20
19
|
*/
|
|
21
20
|
export declare class CallState {
|
|
21
|
+
readonly logger: import("@stream-io/logger").Logger<string & {}>;
|
|
22
|
+
/** A list of comparators that are used to sort the participants. */
|
|
23
|
+
private sortParticipantsBy;
|
|
22
24
|
private backstageSubject;
|
|
23
25
|
private blockedUserIdsSubject;
|
|
24
26
|
private createdAtSubject;
|
|
@@ -48,59 +50,86 @@ export declare class CallState {
|
|
|
48
50
|
private participantsSubject;
|
|
49
51
|
private callStatsReportSubject;
|
|
50
52
|
private closedCaptionsSubject;
|
|
51
|
-
private orphanedTracks;
|
|
52
53
|
private callGrantsSubject;
|
|
54
|
+
/** The backstage state. */
|
|
55
|
+
backstage$: import("rxjs").Observable<boolean>;
|
|
56
|
+
/** Will provide the list of blocked user IDs. */
|
|
57
|
+
blockedUserIds$: import("rxjs").Observable<string[]>;
|
|
58
|
+
/** Will provide the time when this call has been created. */
|
|
59
|
+
createdAt$: import("rxjs").Observable<Date>;
|
|
60
|
+
/** Will provide the time when this call has been ended. */
|
|
61
|
+
endedAt$: import("rxjs").Observable<Date | undefined>;
|
|
62
|
+
/** Will provide the time when this call has been scheduled to start. */
|
|
63
|
+
startsAt$: import("rxjs").Observable<Date | undefined>;
|
|
64
|
+
/** Will provide the time when this call has been updated. */
|
|
65
|
+
updatedAt$: import("rxjs").Observable<Date>;
|
|
66
|
+
/** Will provide the user who created this call. */
|
|
67
|
+
createdBy$: import("rxjs").Observable<UserResponse | undefined>;
|
|
68
|
+
/** Will provide the custom data of this call. */
|
|
69
|
+
custom$: import("rxjs").Observable<Record<string, any>>;
|
|
70
|
+
/** Will provide the egress data of this call. */
|
|
71
|
+
egress$: import("rxjs").Observable<EgressResponse | undefined>;
|
|
72
|
+
/** Will provide the ingress data of this call. */
|
|
73
|
+
ingress$: import("rxjs").Observable<CallIngressResponse | undefined>;
|
|
74
|
+
/** Will provide the recording state of this call. */
|
|
75
|
+
recording$: import("rxjs").Observable<boolean>;
|
|
76
|
+
/** Will provide the recording state of this call. */
|
|
77
|
+
individualRecording$: import("rxjs").Observable<boolean>;
|
|
78
|
+
/** Will provide the recording state of this call. */
|
|
79
|
+
rawRecording$: import("rxjs").Observable<boolean>;
|
|
80
|
+
/** Will provide the session data of this call. */
|
|
81
|
+
session$: import("rxjs").Observable<CallSessionResponse | undefined>;
|
|
82
|
+
/** Will provide the settings of this call. */
|
|
83
|
+
settings$: import("rxjs").Observable<CallSettingsResponse | undefined>;
|
|
84
|
+
/** Will provide the transcribing state of this call. */
|
|
85
|
+
transcribing$: import("rxjs").Observable<boolean>;
|
|
86
|
+
/** Will provide the closed captioning state of this call. */
|
|
87
|
+
captioning$: import("rxjs").Observable<boolean>;
|
|
88
|
+
/**
|
|
89
|
+
* Whether end-to-end encryption is active for this call, as reported by the
|
|
90
|
+
* SFU in the join response.
|
|
91
|
+
*/
|
|
92
|
+
e2eeEnabled$: import("rxjs").Observable<boolean>;
|
|
93
|
+
/** Will provide the user who ended this call. */
|
|
94
|
+
endedBy$: import("rxjs").Observable<UserResponse | undefined>;
|
|
95
|
+
/** Will provide the thumbnails of this call. */
|
|
96
|
+
thumbnails$: import("rxjs").Observable<ThumbnailResponse | undefined>;
|
|
97
|
+
/** The list of members in the current call. */
|
|
98
|
+
members$: import("rxjs").Observable<MemberResponse[]>;
|
|
99
|
+
/** The calling state. */
|
|
100
|
+
callingState$: import("rxjs").Observable<CallingState>;
|
|
53
101
|
/**
|
|
54
102
|
* The time the call session actually started.
|
|
55
103
|
* Useful for displaying the call duration.
|
|
56
104
|
*/
|
|
57
|
-
startedAt$: Observable<Date | undefined>;
|
|
105
|
+
startedAt$: import("rxjs").Observable<Date | undefined>;
|
|
58
106
|
/**
|
|
59
107
|
* The server-side counted number of participants connected to the current call.
|
|
60
108
|
* This number includes the anonymous participants as well.
|
|
61
109
|
*/
|
|
62
|
-
participantCount$: Observable<number>;
|
|
110
|
+
participantCount$: import("rxjs").Observable<number>;
|
|
63
111
|
/**
|
|
64
112
|
* The server-side counted number of anonymous participants connected to the current call.
|
|
65
113
|
* This number excludes the regular participants.
|
|
66
114
|
*/
|
|
67
|
-
anonymousParticipantCount$: Observable<number>;
|
|
115
|
+
anonymousParticipantCount$: import("rxjs").Observable<number>;
|
|
68
116
|
/**
|
|
69
117
|
* All participants of the current call (this includes the current user and other participants as well),
|
|
70
118
|
* unsorted. This observable only updates when participants join or leave the call.
|
|
71
119
|
*/
|
|
72
|
-
rawParticipants$: Observable<StreamVideoParticipant[]>;
|
|
73
|
-
/**
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
participants
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
localParticipant$: Observable<StreamVideoParticipant | undefined>;
|
|
86
|
-
/**
|
|
87
|
-
* Pinned participants of the current call.
|
|
88
|
-
*/
|
|
89
|
-
pinnedParticipants$: Observable<StreamVideoParticipant[]>;
|
|
90
|
-
/**
|
|
91
|
-
* The currently elected dominant speaker in the current call.
|
|
92
|
-
*/
|
|
93
|
-
dominantSpeaker$: Observable<StreamVideoParticipant | undefined>;
|
|
94
|
-
/**
|
|
95
|
-
* Emits true whenever there is an active screen sharing session within
|
|
96
|
-
* the current call. Useful for displaying a "screen sharing" indicator and
|
|
97
|
-
* switching the layout to a screen sharing layout.
|
|
98
|
-
*
|
|
99
|
-
* The actual screen sharing track isn't exposed here, but can be retrieved
|
|
100
|
-
* from the list of call participants. We also don't want to be limiting
|
|
101
|
-
* to the number of share screen tracks are displayed in a call.
|
|
102
|
-
*/
|
|
103
|
-
hasOngoingScreenShare$: Observable<boolean>;
|
|
120
|
+
rawParticipants$: import("rxjs").Observable<StreamVideoParticipant[]>;
|
|
121
|
+
/** All participants of the current call sorted according to the current `sortByParticipantsBy` setting. */
|
|
122
|
+
participants$: import("rxjs").Observable<StreamVideoParticipant[]>;
|
|
123
|
+
/** The local participant of the current call. */
|
|
124
|
+
localParticipant$: import("rxjs").Observable<StreamVideoParticipant | undefined>;
|
|
125
|
+
/** Remote participants of the current call (all except the local participant). */
|
|
126
|
+
remoteParticipants$: import("rxjs").Observable<StreamVideoParticipant[]>;
|
|
127
|
+
/** Pinned participants of the current call. */
|
|
128
|
+
pinnedParticipants$: import("rxjs").Observable<StreamVideoParticipant[]>;
|
|
129
|
+
/** The currently elected dominant speaker in the current call. */
|
|
130
|
+
dominantSpeaker$: import("rxjs").Observable<StreamVideoParticipant | undefined>;
|
|
131
|
+
/** Emits true whenever there is an active screen sharing session within the current call. */
|
|
132
|
+
hasOngoingScreenShare$: import("rxjs").Observable<boolean>;
|
|
104
133
|
/**
|
|
105
134
|
* The latest stats report of the current call.
|
|
106
135
|
* When stats gathering is enabled, this observable will emit a new value
|
|
@@ -109,123 +138,19 @@ export declare class CallState {
|
|
|
109
138
|
* Consumers of this observable can implement their own batching logic
|
|
110
139
|
* in case they want to show historical stats data.
|
|
111
140
|
*/
|
|
112
|
-
callStatsReport$: Observable<CallStatsReport | undefined>;
|
|
113
|
-
/**
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
*/
|
|
120
|
-
ownCapabilities$: Observable<OwnCapability[]>;
|
|
121
|
-
/**
|
|
122
|
-
* The calling state.
|
|
123
|
-
*/
|
|
124
|
-
callingState$: Observable<CallingState>;
|
|
125
|
-
/**
|
|
126
|
-
* The backstage state.
|
|
127
|
-
*/
|
|
128
|
-
backstage$: Observable<boolean>;
|
|
129
|
-
/**
|
|
130
|
-
* Will provide the list of blocked user IDs.
|
|
131
|
-
*/
|
|
132
|
-
blockedUserIds$: Observable<string[]>;
|
|
133
|
-
/**
|
|
134
|
-
* Will provide the time when this call has been created.
|
|
135
|
-
*/
|
|
136
|
-
createdAt$: Observable<Date>;
|
|
137
|
-
/**
|
|
138
|
-
* Will provide the time when this call has been ended.
|
|
139
|
-
*/
|
|
140
|
-
endedAt$: Observable<Date | undefined>;
|
|
141
|
-
/**
|
|
142
|
-
* Will provide the time when this call has been scheduled to start.
|
|
143
|
-
*/
|
|
144
|
-
startsAt$: Observable<Date | undefined>;
|
|
145
|
-
/**
|
|
146
|
-
* Will provide the time when this call has been updated.
|
|
147
|
-
*/
|
|
148
|
-
updatedAt$: Observable<Date>;
|
|
149
|
-
/**
|
|
150
|
-
* Will provide the user who created this call.
|
|
151
|
-
*/
|
|
152
|
-
createdBy$: Observable<UserResponse | undefined>;
|
|
153
|
-
/**
|
|
154
|
-
* Will provide the custom data of this call.
|
|
155
|
-
*/
|
|
156
|
-
custom$: Observable<Record<string, any>>;
|
|
157
|
-
/**
|
|
158
|
-
* Will provide the egress data of this call.
|
|
159
|
-
*/
|
|
160
|
-
egress$: Observable<EgressResponse | undefined>;
|
|
161
|
-
/**
|
|
162
|
-
* Will provide the ingress data of this call.
|
|
163
|
-
*/
|
|
164
|
-
ingress$: Observable<CallIngressResponse | undefined>;
|
|
165
|
-
/**
|
|
166
|
-
* Will provide the recording state of this call.
|
|
167
|
-
*/
|
|
168
|
-
recording$: Observable<boolean>;
|
|
169
|
-
/**
|
|
170
|
-
* Will provide the recording state of this call.
|
|
171
|
-
*/
|
|
172
|
-
individualRecording$: Observable<boolean>;
|
|
173
|
-
/**
|
|
174
|
-
* Will provide the recording state of this call.
|
|
175
|
-
*/
|
|
176
|
-
rawRecording$: Observable<boolean>;
|
|
177
|
-
/**
|
|
178
|
-
* Will provide the session data of this call.
|
|
179
|
-
*/
|
|
180
|
-
session$: Observable<CallSessionResponse | undefined>;
|
|
181
|
-
/**
|
|
182
|
-
* Will provide the settings of this call.
|
|
183
|
-
*/
|
|
184
|
-
settings$: Observable<CallSettingsResponse | undefined>;
|
|
185
|
-
/**
|
|
186
|
-
* Will provide the transcribing state of this call.
|
|
187
|
-
*/
|
|
188
|
-
transcribing$: Observable<boolean>;
|
|
189
|
-
/**
|
|
190
|
-
* Will provide the closed captioning state of this call.
|
|
191
|
-
*/
|
|
192
|
-
captioning$: Observable<boolean>;
|
|
193
|
-
/**
|
|
194
|
-
* Whether end-to-end encryption is active for this call, as reported by the
|
|
195
|
-
* SFU in the join response.
|
|
196
|
-
*/
|
|
197
|
-
e2eeEnabled$: Observable<boolean>;
|
|
198
|
-
/**
|
|
199
|
-
* Will provide the user who ended this call.
|
|
200
|
-
*/
|
|
201
|
-
endedBy$: Observable<UserResponse | undefined>;
|
|
202
|
-
/**
|
|
203
|
-
* Will provide the thumbnails of this call.
|
|
204
|
-
*/
|
|
205
|
-
thumbnails$: Observable<ThumbnailResponse | undefined>;
|
|
206
|
-
/**
|
|
207
|
-
* The queue of closed captions.
|
|
208
|
-
*/
|
|
209
|
-
closedCaptions$: Observable<CallClosedCaption[]>;
|
|
210
|
-
readonly logger: import("@stream-io/logger").Logger<string & {}>;
|
|
211
|
-
/**
|
|
212
|
-
* A list of comparators that are used to sort the participants.
|
|
213
|
-
*/
|
|
214
|
-
private sortParticipantsBy;
|
|
215
|
-
/**
|
|
216
|
-
* The closed captions configuration.
|
|
217
|
-
*/
|
|
141
|
+
callStatsReport$: import("rxjs").Observable<CallStatsReport | undefined>;
|
|
142
|
+
/** The queue of closed captions. */
|
|
143
|
+
closedCaptions$: import("rxjs").Observable<CallClosedCaption[]>;
|
|
144
|
+
/** The list of capabilities of the current user. */
|
|
145
|
+
ownCapabilities$: import("rxjs").Observable<OwnCapability[]>;
|
|
146
|
+
private orphanedTracks;
|
|
147
|
+
/** The closed captions configuration. */
|
|
218
148
|
private closedCaptionsSettings;
|
|
219
149
|
private closedCaptionsTasks;
|
|
220
150
|
private readonly eventHandlers;
|
|
221
|
-
/**
|
|
222
|
-
* Creates a new instance of the CallState class.
|
|
223
|
-
*
|
|
224
|
-
*/
|
|
151
|
+
/** Creates a new instance of the CallState class. */
|
|
225
152
|
constructor();
|
|
226
|
-
/**
|
|
227
|
-
* Runs the cleanup tasks.
|
|
228
|
-
*/
|
|
153
|
+
/** Runs the cleanup tasks. */
|
|
229
154
|
dispose: () => void;
|
|
230
155
|
/**
|
|
231
156
|
* Sets the list of criteria that are used to sort the participants.
|
|
@@ -234,29 +159,8 @@ export declare class CallState {
|
|
|
234
159
|
* @param comparator the comparator to use to sort the participants.
|
|
235
160
|
*/
|
|
236
161
|
setSortParticipantsBy: (comparator: Comparator<StreamVideoParticipant>) => void;
|
|
237
|
-
/**
|
|
238
|
-
* Returns the comparator currently used to sort the participants.
|
|
239
|
-
*/
|
|
162
|
+
/** Returns the comparator currently used to sort the participants. */
|
|
240
163
|
getSortParticipantsBy: () => Comparator<StreamVideoParticipant>;
|
|
241
|
-
/**
|
|
242
|
-
* Gets the current value of an observable, or undefined if the observable has
|
|
243
|
-
* not emitted a value yet.
|
|
244
|
-
*
|
|
245
|
-
* @param observable$ the observable to get the value from.
|
|
246
|
-
*/
|
|
247
|
-
getCurrentValue: <T>(observable$: Observable<T>) => T;
|
|
248
|
-
/**
|
|
249
|
-
* Updates the value of the provided Subject.
|
|
250
|
-
* An `update` can either be a new value or a function which takes
|
|
251
|
-
* the current value and returns a new value.
|
|
252
|
-
*
|
|
253
|
-
* @internal
|
|
254
|
-
*
|
|
255
|
-
* @param subject the subject to update.
|
|
256
|
-
* @param update the update to apply to the subject.
|
|
257
|
-
* @return the updated value.
|
|
258
|
-
*/
|
|
259
|
-
setCurrentValue: <T>(subject: import("rxjs").Subject<T>, update: Patch<T>) => T;
|
|
260
164
|
/**
|
|
261
165
|
* The server-side counted number of participants connected to the current call.
|
|
262
166
|
* This number includes the anonymous participants as well.
|
|
@@ -281,9 +185,7 @@ export declare class CallState {
|
|
|
281
185
|
* @param startedAt the time the call session actually started.
|
|
282
186
|
*/
|
|
283
187
|
setStartedAt: (startedAt: Patch<Date | undefined>) => Date | undefined;
|
|
284
|
-
/**
|
|
285
|
-
* Returns whether closed captions are enabled in the current call.
|
|
286
|
-
*/
|
|
188
|
+
/** Returns whether closed captions are enabled in the current call. */
|
|
287
189
|
get captioning(): boolean;
|
|
288
190
|
/**
|
|
289
191
|
* Sets the closed captioning state of the current call.
|
|
@@ -308,13 +210,9 @@ export declare class CallState {
|
|
|
308
210
|
* @param count the number of anonymous participants.
|
|
309
211
|
*/
|
|
310
212
|
setAnonymousParticipantCount: (count: Patch<number>) => number;
|
|
311
|
-
/**
|
|
312
|
-
* The list of participants in the current call.
|
|
313
|
-
*/
|
|
213
|
+
/** The list of participants in the current call. */
|
|
314
214
|
get participants(): StreamVideoParticipant[];
|
|
315
|
-
/**
|
|
316
|
-
* The stable list of participants in the current call, unsorted.
|
|
317
|
-
*/
|
|
215
|
+
/** The stable list of participants in the current call, unsorted. */
|
|
318
216
|
get rawParticipants(): StreamVideoParticipant[];
|
|
319
217
|
/**
|
|
320
218
|
* Returns the current participants array directly from the BehaviorSubject.
|
|
@@ -333,29 +231,17 @@ export declare class CallState {
|
|
|
333
231
|
* @param participants the list of participants.
|
|
334
232
|
*/
|
|
335
233
|
setParticipants: (participants: Patch<StreamVideoParticipant[]>) => StreamVideoParticipant[];
|
|
336
|
-
/**
|
|
337
|
-
* The local participant in the current call.
|
|
338
|
-
*/
|
|
234
|
+
/** The local participant in the current call. */
|
|
339
235
|
get localParticipant(): StreamVideoParticipant | undefined;
|
|
340
|
-
/**
|
|
341
|
-
* The list of remote participants in the current call.
|
|
342
|
-
*/
|
|
236
|
+
/** The list of remote participants in the current call. */
|
|
343
237
|
get remoteParticipants(): StreamVideoParticipant[];
|
|
344
|
-
/**
|
|
345
|
-
* The dominant speaker in the current call.
|
|
346
|
-
*/
|
|
238
|
+
/** The dominant speaker in the current call. */
|
|
347
239
|
get dominantSpeaker(): StreamVideoParticipant | undefined;
|
|
348
|
-
/**
|
|
349
|
-
* The list of pinned participants in the current call.
|
|
350
|
-
*/
|
|
240
|
+
/** The list of pinned participants in the current call. */
|
|
351
241
|
get pinnedParticipants(): StreamVideoParticipant[];
|
|
352
|
-
/**
|
|
353
|
-
* Tell if there is an ongoing screen share in this call.
|
|
354
|
-
*/
|
|
242
|
+
/** Tell if there is an ongoing screen share in this call. */
|
|
355
243
|
get hasOngoingScreenShare(): boolean;
|
|
356
|
-
/**
|
|
357
|
-
* The calling state.
|
|
358
|
-
*/
|
|
244
|
+
/** The calling state. */
|
|
359
245
|
get callingState(): CallingState;
|
|
360
246
|
/**
|
|
361
247
|
* Sets the calling state.
|
|
@@ -364,9 +250,7 @@ export declare class CallState {
|
|
|
364
250
|
* @param state the new calling state.
|
|
365
251
|
*/
|
|
366
252
|
setCallingState: (state: Patch<CallingState>) => CallingState;
|
|
367
|
-
/**
|
|
368
|
-
* The call stats report.
|
|
369
|
-
*/
|
|
253
|
+
/** The call stats report. */
|
|
370
254
|
get callStatsReport(): CallStatsReport | undefined;
|
|
371
255
|
/**
|
|
372
256
|
* Returns whether the call stats report is being observed or not.
|
|
@@ -380,9 +264,7 @@ export declare class CallState {
|
|
|
380
264
|
* @param report the report to set.
|
|
381
265
|
*/
|
|
382
266
|
setCallStatsReport: (report: Patch<CallStatsReport | undefined>) => CallStatsReport | undefined;
|
|
383
|
-
/**
|
|
384
|
-
* The members of the current call.
|
|
385
|
-
*/
|
|
267
|
+
/** The members of the current call. */
|
|
386
268
|
get members(): MemberResponse[];
|
|
387
269
|
/**
|
|
388
270
|
* Sets the members of the current call.
|
|
@@ -391,9 +273,7 @@ export declare class CallState {
|
|
|
391
273
|
* @param members the members to set.
|
|
392
274
|
*/
|
|
393
275
|
setMembers: (members: Patch<MemberResponse[]>) => void;
|
|
394
|
-
/**
|
|
395
|
-
* The capabilities of the current user for the current call.
|
|
396
|
-
*/
|
|
276
|
+
/** The capabilities of the current user for the current call. */
|
|
397
277
|
get ownCapabilities(): OwnCapability[];
|
|
398
278
|
/**
|
|
399
279
|
* Sets the own capabilities.
|
|
@@ -409,95 +289,59 @@ export declare class CallState {
|
|
|
409
289
|
* @param grants the grants to set.
|
|
410
290
|
*/
|
|
411
291
|
setCallGrants: (grants: Patch<CallGrants>) => CallGrants;
|
|
412
|
-
/**
|
|
413
|
-
* The backstage state.
|
|
414
|
-
*/
|
|
292
|
+
/** The backstage state. */
|
|
415
293
|
get backstage(): boolean;
|
|
416
294
|
/**
|
|
417
295
|
* Sets the backstage state.
|
|
418
296
|
* @param backstage the backstage state.
|
|
419
297
|
*/
|
|
420
298
|
setBackstage: (backstage: Patch<boolean>) => boolean;
|
|
421
|
-
/**
|
|
422
|
-
* Will provide the list of blocked user IDs.
|
|
423
|
-
*/
|
|
299
|
+
/** Will provide the list of blocked user IDs. */
|
|
424
300
|
get blockedUserIds(): string[];
|
|
425
|
-
/**
|
|
426
|
-
* Will provide the time when this call has been created.
|
|
427
|
-
*/
|
|
301
|
+
/** Will provide the time when this call has been created. */
|
|
428
302
|
get createdAt(): Date;
|
|
429
|
-
/**
|
|
430
|
-
* Will provide the time when this call has been ended.
|
|
431
|
-
*/
|
|
303
|
+
/** Will provide the time when this call has been ended. */
|
|
432
304
|
get endedAt(): Date | undefined;
|
|
433
305
|
/**
|
|
434
306
|
* Sets the time when this call has been ended.
|
|
435
307
|
* @param endedAt the time when this call has been ended.
|
|
436
308
|
*/
|
|
437
309
|
setEndedAt: (endedAt: Patch<Date | undefined>) => Date | undefined;
|
|
438
|
-
/**
|
|
439
|
-
* Will provide the time when this call has been scheduled to start.
|
|
440
|
-
*/
|
|
310
|
+
/** Will provide the time when this call has been scheduled to start. */
|
|
441
311
|
get startsAt(): Date | undefined;
|
|
442
|
-
/**
|
|
443
|
-
* Will provide the time when this call has been updated.
|
|
444
|
-
*/
|
|
312
|
+
/** Will provide the time when this call has been updated. */
|
|
445
313
|
get updatedAt(): Date;
|
|
446
|
-
/**
|
|
447
|
-
* Will provide the user who created this call.
|
|
448
|
-
*/
|
|
314
|
+
/** Will provide the user who created this call. */
|
|
449
315
|
get createdBy(): UserResponse | undefined;
|
|
450
|
-
/**
|
|
451
|
-
* Will provide the custom data of this call.
|
|
452
|
-
*/
|
|
316
|
+
/** Will provide the custom data of this call. */
|
|
453
317
|
get custom(): Record<string, any>;
|
|
454
318
|
/**
|
|
455
319
|
* Will provide the egress data of this call.
|
|
456
320
|
*/
|
|
457
321
|
get egress(): EgressResponse | undefined;
|
|
458
|
-
/**
|
|
459
|
-
* Will provide the ingress data of this call.
|
|
460
|
-
*/
|
|
322
|
+
/** Will provide the ingress data of this call. */
|
|
461
323
|
get ingress(): CallIngressResponse | undefined;
|
|
462
|
-
/**
|
|
463
|
-
* Will provide the composite recording state of this call.
|
|
464
|
-
*/
|
|
324
|
+
/** Will provide the composite recording state of this call. */
|
|
465
325
|
get recording(): boolean;
|
|
466
|
-
/**
|
|
467
|
-
* Will provide the individual recording state of this call.
|
|
468
|
-
*/
|
|
326
|
+
/** Will provide the individual recording state of this call. */
|
|
469
327
|
get individualRecording(): boolean;
|
|
470
|
-
/**
|
|
471
|
-
* Will provide the raw recording state of this call.
|
|
472
|
-
*/
|
|
328
|
+
/** Will provide the raw recording state of this call. */
|
|
473
329
|
get rawRecording(): boolean;
|
|
474
|
-
/**
|
|
475
|
-
* Will provide the session data of this call.
|
|
476
|
-
*/
|
|
330
|
+
/** Will provide the session data of this call. */
|
|
477
331
|
get session(): CallSessionResponse | undefined;
|
|
478
|
-
/**
|
|
479
|
-
* Will provide the settings of this call.
|
|
480
|
-
*/
|
|
332
|
+
/** Will provide the settings of this call. */
|
|
481
333
|
get settings(): CallSettingsResponse | undefined;
|
|
482
|
-
/**
|
|
483
|
-
* Will provide the transcribing state of this call.
|
|
484
|
-
*/
|
|
334
|
+
/** Will provide the transcribing state of this call. */
|
|
485
335
|
get transcribing(): boolean;
|
|
486
|
-
/**
|
|
487
|
-
* Whether end-to-end encryption is active for this call.
|
|
488
|
-
*/
|
|
336
|
+
/** Whether end-to-end encryption is active for this call. */
|
|
489
337
|
get e2eeEnabled(): boolean;
|
|
490
|
-
/**
|
|
491
|
-
* Will provide the user who ended this call.
|
|
492
|
-
*/
|
|
338
|
+
/** Will provide the user who ended this call. */
|
|
493
339
|
get endedBy(): UserResponse | undefined;
|
|
494
340
|
/**
|
|
495
341
|
* Will provide the thumbnails of this call, if enabled in the call settings.
|
|
496
342
|
*/
|
|
497
343
|
get thumbnails(): ThumbnailResponse | undefined;
|
|
498
|
-
/**
|
|
499
|
-
* Returns the current queue of closed captions.
|
|
500
|
-
*/
|
|
344
|
+
/** Returns the current queue of closed captions. */
|
|
501
345
|
get closedCaptions(): CallClosedCaption[];
|
|
502
346
|
/**
|
|
503
347
|
* Will try to find the participant with the given sessionId in the current call.
|
|
@@ -506,9 +350,7 @@ export declare class CallState {
|
|
|
506
350
|
* @returns the participant with the given sessionId or undefined if not found.
|
|
507
351
|
*/
|
|
508
352
|
findParticipantBySessionId: (sessionId: string) => StreamVideoParticipant | undefined;
|
|
509
|
-
/**
|
|
510
|
-
* Returns a new lookup table of participants indexed by their session ID.
|
|
511
|
-
*/
|
|
353
|
+
/** Returns a new lookup table of participants indexed by their session ID. */
|
|
512
354
|
getParticipantLookupBySessionId: () => {
|
|
513
355
|
[sessionId: string]: StreamVideoParticipant | undefined;
|
|
514
356
|
};
|