@stream-io/video-client 1.23.5 → 1.24.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.
- package/CHANGELOG.md +11 -0
- package/dist/index.browser.es.js +130 -12
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +131 -11
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +130 -12
- package/dist/index.es.js.map +1 -1
- package/dist/src/Call.d.ts +9 -2
- package/dist/src/gen/coordinator/index.d.ts +407 -117
- package/dist/src/gen/shims.d.ts +4 -2
- package/dist/src/stats/types.d.ts +25 -0
- package/dist/src/store/CallState.d.ts +5 -0
- package/package.json +1 -1
- package/src/Call.ts +20 -7
- package/src/gen/coordinator/index.ts +398 -117
- package/src/gen/shims.ts +1 -3
- package/src/stats/CallStateStatsReporter.ts +7 -3
- package/src/stats/types.ts +25 -0
- package/src/store/CallState.ts +11 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [1.24.0](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.23.5...@stream-io/video-client-1.24.0) (2025-06-12)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
- moderation support ([#1822](https://github.com/GetStream/stream-video-js/issues/1822)) ([3948fae](https://github.com/GetStream/stream-video-js/commit/3948faeb2fa7ace8dd9c1df990f6e41e73fc0a26))
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
- configurable call stats reporting interval ([#1824](https://github.com/GetStream/stream-video-js/issues/1824)) ([74f72c0](https://github.com/GetStream/stream-video-js/commit/74f72c024d0cb34ae3e0fee4bd8f061fb51e4479))
|
|
14
|
+
- don't compute call stats report if no one subscribed to it ([#1825](https://github.com/GetStream/stream-video-js/issues/1825)) ([fb6a8c9](https://github.com/GetStream/stream-video-js/commit/fb6a8c9e19c80be313d73fadb68810e7f7c1f071))
|
|
15
|
+
|
|
5
16
|
## [1.23.5](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.23.4...@stream-io/video-client-1.23.5) (2025-06-04)
|
|
6
17
|
|
|
7
18
|
### Bug Fixes
|
package/dist/index.browser.es.js
CHANGED
|
@@ -172,6 +172,90 @@ const RecordSettingsRequestQualityEnum = {
|
|
|
172
172
|
PORTRAIT_1440X2560: 'portrait-1440x2560',
|
|
173
173
|
PORTRAIT_2160X3840: 'portrait-2160x3840',
|
|
174
174
|
};
|
|
175
|
+
/**
|
|
176
|
+
* @export
|
|
177
|
+
*/
|
|
178
|
+
const StartClosedCaptionsRequestLanguageEnum = {
|
|
179
|
+
AUTO: 'auto',
|
|
180
|
+
EN: 'en',
|
|
181
|
+
FR: 'fr',
|
|
182
|
+
ES: 'es',
|
|
183
|
+
DE: 'de',
|
|
184
|
+
IT: 'it',
|
|
185
|
+
NL: 'nl',
|
|
186
|
+
PT: 'pt',
|
|
187
|
+
PL: 'pl',
|
|
188
|
+
CA: 'ca',
|
|
189
|
+
CS: 'cs',
|
|
190
|
+
DA: 'da',
|
|
191
|
+
EL: 'el',
|
|
192
|
+
FI: 'fi',
|
|
193
|
+
ID: 'id',
|
|
194
|
+
JA: 'ja',
|
|
195
|
+
RU: 'ru',
|
|
196
|
+
SV: 'sv',
|
|
197
|
+
TA: 'ta',
|
|
198
|
+
TH: 'th',
|
|
199
|
+
TR: 'tr',
|
|
200
|
+
HU: 'hu',
|
|
201
|
+
RO: 'ro',
|
|
202
|
+
ZH: 'zh',
|
|
203
|
+
AR: 'ar',
|
|
204
|
+
TL: 'tl',
|
|
205
|
+
HE: 'he',
|
|
206
|
+
HI: 'hi',
|
|
207
|
+
HR: 'hr',
|
|
208
|
+
KO: 'ko',
|
|
209
|
+
MS: 'ms',
|
|
210
|
+
NO: 'no',
|
|
211
|
+
UK: 'uk',
|
|
212
|
+
BG: 'bg',
|
|
213
|
+
ET: 'et',
|
|
214
|
+
SL: 'sl',
|
|
215
|
+
SK: 'sk',
|
|
216
|
+
};
|
|
217
|
+
/**
|
|
218
|
+
* @export
|
|
219
|
+
*/
|
|
220
|
+
const StartTranscriptionRequestLanguageEnum = {
|
|
221
|
+
AUTO: 'auto',
|
|
222
|
+
EN: 'en',
|
|
223
|
+
FR: 'fr',
|
|
224
|
+
ES: 'es',
|
|
225
|
+
DE: 'de',
|
|
226
|
+
IT: 'it',
|
|
227
|
+
NL: 'nl',
|
|
228
|
+
PT: 'pt',
|
|
229
|
+
PL: 'pl',
|
|
230
|
+
CA: 'ca',
|
|
231
|
+
CS: 'cs',
|
|
232
|
+
DA: 'da',
|
|
233
|
+
EL: 'el',
|
|
234
|
+
FI: 'fi',
|
|
235
|
+
ID: 'id',
|
|
236
|
+
JA: 'ja',
|
|
237
|
+
RU: 'ru',
|
|
238
|
+
SV: 'sv',
|
|
239
|
+
TA: 'ta',
|
|
240
|
+
TH: 'th',
|
|
241
|
+
TR: 'tr',
|
|
242
|
+
HU: 'hu',
|
|
243
|
+
RO: 'ro',
|
|
244
|
+
ZH: 'zh',
|
|
245
|
+
AR: 'ar',
|
|
246
|
+
TL: 'tl',
|
|
247
|
+
HE: 'he',
|
|
248
|
+
HI: 'hi',
|
|
249
|
+
HR: 'hr',
|
|
250
|
+
KO: 'ko',
|
|
251
|
+
MS: 'ms',
|
|
252
|
+
NO: 'no',
|
|
253
|
+
UK: 'uk',
|
|
254
|
+
BG: 'bg',
|
|
255
|
+
ET: 'et',
|
|
256
|
+
SL: 'sl',
|
|
257
|
+
SK: 'sk',
|
|
258
|
+
};
|
|
175
259
|
/**
|
|
176
260
|
* @export
|
|
177
261
|
*/
|
|
@@ -217,6 +301,10 @@ const TranscriptionSettingsRequestLanguageEnum = {
|
|
|
217
301
|
MS: 'ms',
|
|
218
302
|
NO: 'no',
|
|
219
303
|
UK: 'uk',
|
|
304
|
+
BG: 'bg',
|
|
305
|
+
ET: 'et',
|
|
306
|
+
SL: 'sl',
|
|
307
|
+
SK: 'sk',
|
|
220
308
|
};
|
|
221
309
|
/**
|
|
222
310
|
* @export
|
|
@@ -271,6 +359,10 @@ const TranscriptionSettingsResponseLanguageEnum = {
|
|
|
271
359
|
MS: 'ms',
|
|
272
360
|
NO: 'no',
|
|
273
361
|
UK: 'uk',
|
|
362
|
+
BG: 'bg',
|
|
363
|
+
ET: 'et',
|
|
364
|
+
SL: 'sl',
|
|
365
|
+
SK: 'sk',
|
|
274
366
|
};
|
|
275
367
|
/**
|
|
276
368
|
* @export
|
|
@@ -5094,11 +5186,14 @@ class CallState {
|
|
|
5094
5186
|
this.eventHandlers = {
|
|
5095
5187
|
// these events are not updating the call state:
|
|
5096
5188
|
'call.frame_recording_ready': undefined,
|
|
5189
|
+
'call.moderation_blur': undefined,
|
|
5190
|
+
'call.moderation_warning': undefined,
|
|
5097
5191
|
'call.permission_request': undefined,
|
|
5098
5192
|
'call.recording_ready': undefined,
|
|
5099
5193
|
'call.rtmp_broadcast_failed': undefined,
|
|
5100
5194
|
'call.rtmp_broadcast_started': undefined,
|
|
5101
5195
|
'call.rtmp_broadcast_stopped': undefined,
|
|
5196
|
+
'call.stats_report_ready': undefined,
|
|
5102
5197
|
'call.transcription_ready': undefined,
|
|
5103
5198
|
'call.user_muted': undefined,
|
|
5104
5199
|
'connection.error': undefined,
|
|
@@ -5255,6 +5350,13 @@ class CallState {
|
|
|
5255
5350
|
get callStatsReport() {
|
|
5256
5351
|
return this.getCurrentValue(this.callStatsReport$);
|
|
5257
5352
|
}
|
|
5353
|
+
/**
|
|
5354
|
+
* Returns whether the call stats report is being observed or not.
|
|
5355
|
+
* @internal
|
|
5356
|
+
*/
|
|
5357
|
+
get isCallStatsReportObserved() {
|
|
5358
|
+
return this.callStatsReportSubject.observed;
|
|
5359
|
+
}
|
|
5258
5360
|
/**
|
|
5259
5361
|
* The members of the current call.
|
|
5260
5362
|
*/
|
|
@@ -5541,9 +5643,13 @@ const createStatsReporter = ({ subscriber, publisher, state, datacenter, polling
|
|
|
5541
5643
|
let timeoutId;
|
|
5542
5644
|
if (pollingIntervalInMs > 0) {
|
|
5543
5645
|
const loop = async () => {
|
|
5544
|
-
|
|
5545
|
-
|
|
5546
|
-
|
|
5646
|
+
// bail out of the loop as we don't want to collect stats
|
|
5647
|
+
// (they are expensive) if no one is listening to them
|
|
5648
|
+
if (state.isCallStatsReportObserved) {
|
|
5649
|
+
await run().catch((e) => {
|
|
5650
|
+
logger('debug', 'Failed to collect stats', e);
|
|
5651
|
+
});
|
|
5652
|
+
}
|
|
5547
5653
|
timeoutId = setTimeout(loop, pollingIntervalInMs);
|
|
5548
5654
|
};
|
|
5549
5655
|
void loop();
|
|
@@ -5685,7 +5791,7 @@ const aggregate = (stats) => {
|
|
|
5685
5791
|
return report;
|
|
5686
5792
|
};
|
|
5687
5793
|
|
|
5688
|
-
const version = "1.
|
|
5794
|
+
const version = "1.24.0";
|
|
5689
5795
|
const [major, minor, patch] = version.split('.');
|
|
5690
5796
|
let sdkInfo = {
|
|
5691
5797
|
type: SdkType.PLAIN_JAVASCRIPT,
|
|
@@ -10913,6 +11019,7 @@ class Call {
|
|
|
10913
11019
|
* @private
|
|
10914
11020
|
*/
|
|
10915
11021
|
this.dispatcher = new Dispatcher();
|
|
11022
|
+
this.statsReportingIntervalInMs = 2000;
|
|
10916
11023
|
this.sfuClientTag = 0;
|
|
10917
11024
|
this.reconnectConcurrencyTag = Symbol('reconnectConcurrencyTag');
|
|
10918
11025
|
this.reconnectAttempts = 0;
|
|
@@ -11639,12 +11746,15 @@ class Call {
|
|
|
11639
11746
|
});
|
|
11640
11747
|
}
|
|
11641
11748
|
this.statsReporter?.stop();
|
|
11642
|
-
this.
|
|
11643
|
-
|
|
11644
|
-
|
|
11645
|
-
|
|
11646
|
-
|
|
11647
|
-
|
|
11749
|
+
if (this.statsReportingIntervalInMs > 0) {
|
|
11750
|
+
this.statsReporter = createStatsReporter({
|
|
11751
|
+
subscriber: this.subscriber,
|
|
11752
|
+
publisher: this.publisher,
|
|
11753
|
+
state: this.state,
|
|
11754
|
+
datacenter: sfuClient.edgeName,
|
|
11755
|
+
pollingIntervalInMs: this.statsReportingIntervalInMs,
|
|
11756
|
+
});
|
|
11757
|
+
}
|
|
11648
11758
|
this.tracer.setEnabled(enableTracing);
|
|
11649
11759
|
this.sfuStatsReporter?.stop();
|
|
11650
11760
|
if (statsOptions?.reporting_interval_ms > 0) {
|
|
@@ -12134,6 +12244,14 @@ class Call {
|
|
|
12134
12244
|
this.stopReportingStatsFor = (sessionId) => {
|
|
12135
12245
|
return this.statsReporter?.stopReportingStatsFor(sessionId);
|
|
12136
12246
|
};
|
|
12247
|
+
/**
|
|
12248
|
+
* Sets the frequency of the call stats reporting.
|
|
12249
|
+
*
|
|
12250
|
+
* @param intervalInMs the interval in milliseconds to report the stats.
|
|
12251
|
+
*/
|
|
12252
|
+
this.setStatsReportingIntervalInMs = (intervalInMs) => {
|
|
12253
|
+
this.statsReportingIntervalInMs = intervalInMs;
|
|
12254
|
+
};
|
|
12137
12255
|
/**
|
|
12138
12256
|
* Resets the last sent reaction for the user holding the given `sessionId`. This is a local action, it won't reset the reaction on the backend.
|
|
12139
12257
|
*
|
|
@@ -13899,7 +14017,7 @@ class StreamClient {
|
|
|
13899
14017
|
this.getUserAgent = () => {
|
|
13900
14018
|
if (!this.cachedUserAgent) {
|
|
13901
14019
|
const { clientAppIdentifier = {} } = this.options;
|
|
13902
|
-
const { sdkName = 'js', sdkVersion = "1.
|
|
14020
|
+
const { sdkName = 'js', sdkVersion = "1.24.0", ...extras } = clientAppIdentifier;
|
|
13903
14021
|
this.cachedUserAgent = [
|
|
13904
14022
|
`stream-video-${sdkName}-v${sdkVersion}`,
|
|
13905
14023
|
...Object.entries(extras).map(([key, value]) => `${key}=${value}`),
|
|
@@ -14448,5 +14566,5 @@ class StreamVideoClient {
|
|
|
14448
14566
|
}
|
|
14449
14567
|
StreamVideoClient._instances = new Map();
|
|
14450
14568
|
|
|
14451
|
-
export { AudioSettingsRequestDefaultDeviceEnum, AudioSettingsResponseDefaultDeviceEnum, browsers as Browsers, Call, CallState, CallType, CallTypes, CallingState, CameraManager, CameraManagerState, CreateDeviceRequestPushProviderEnum, DebounceType, DynascaleManager, ErrorFromResponse, FrameRecordingSettingsRequestModeEnum, FrameRecordingSettingsRequestQualityEnum, FrameRecordingSettingsResponseModeEnum, InputMediaDeviceManager, InputMediaDeviceManagerState, LayoutSettingsRequestNameEnum, MicrophoneManager, MicrophoneManagerState, NoiseCancellationSettingsModeEnum, OwnCapability, RTMPBroadcastRequestQualityEnum, RTMPSettingsRequestQualityEnum, RecordSettingsRequestModeEnum, RecordSettingsRequestQualityEnum, rxUtils as RxUtils, ScreenShareManager, ScreenShareState, events as SfuEvents, models as SfuModels, SpeakerManager, SpeakerState, StreamSfuClient, StreamVideoClient, StreamVideoReadOnlyStateStore, StreamVideoWriteableStateStore, TranscriptionSettingsRequestClosedCaptionModeEnum, TranscriptionSettingsRequestLanguageEnum, TranscriptionSettingsRequestModeEnum, TranscriptionSettingsResponseClosedCaptionModeEnum, TranscriptionSettingsResponseLanguageEnum, TranscriptionSettingsResponseModeEnum, VideoSettingsRequestCameraFacingEnum, VideoSettingsResponseCameraFacingEnum, ViewportTracker, VisibilityState, checkIfAudioOutputChangeSupported, combineComparators, conditional, createSoundDetector, defaultSortPreset, descending, deviceIds$, disposeOfMediaStream, dominantSpeaker, getAudioBrowserPermission, getAudioDevices, getAudioOutputDevices, getAudioStream, getClientDetails, getDeviceState, getLogLevel, getLogger, getScreenShareStream, getSdkInfo, getVideoBrowserPermission, getVideoDevices, getVideoStream, getWebRTCInfo, hasAudio, hasScreenShare, hasScreenShareAudio, hasVideo, isPinned, livestreamOrAudioRoomSortPreset, logLevels, logToConsole, name, noopComparator, paginatedLayoutSortPreset, pinned, publishingAudio, publishingVideo, reactionType, role, screenSharing, setDeviceInfo, setLogLevel, setLogger, setOSInfo, setPowerState, setSdkInfo, setThermalState, setWebRTCInfo, speakerLayoutSortPreset, speaking };
|
|
14569
|
+
export { AudioSettingsRequestDefaultDeviceEnum, AudioSettingsResponseDefaultDeviceEnum, browsers as Browsers, Call, CallState, CallType, CallTypes, CallingState, CameraManager, CameraManagerState, CreateDeviceRequestPushProviderEnum, DebounceType, DynascaleManager, ErrorFromResponse, FrameRecordingSettingsRequestModeEnum, FrameRecordingSettingsRequestQualityEnum, FrameRecordingSettingsResponseModeEnum, InputMediaDeviceManager, InputMediaDeviceManagerState, LayoutSettingsRequestNameEnum, MicrophoneManager, MicrophoneManagerState, NoiseCancellationSettingsModeEnum, OwnCapability, RTMPBroadcastRequestQualityEnum, RTMPSettingsRequestQualityEnum, RecordSettingsRequestModeEnum, RecordSettingsRequestQualityEnum, rxUtils as RxUtils, ScreenShareManager, ScreenShareState, events as SfuEvents, models as SfuModels, SpeakerManager, SpeakerState, StartClosedCaptionsRequestLanguageEnum, StartTranscriptionRequestLanguageEnum, StreamSfuClient, StreamVideoClient, StreamVideoReadOnlyStateStore, StreamVideoWriteableStateStore, TranscriptionSettingsRequestClosedCaptionModeEnum, TranscriptionSettingsRequestLanguageEnum, TranscriptionSettingsRequestModeEnum, TranscriptionSettingsResponseClosedCaptionModeEnum, TranscriptionSettingsResponseLanguageEnum, TranscriptionSettingsResponseModeEnum, VideoSettingsRequestCameraFacingEnum, VideoSettingsResponseCameraFacingEnum, ViewportTracker, VisibilityState, checkIfAudioOutputChangeSupported, combineComparators, conditional, createSoundDetector, defaultSortPreset, descending, deviceIds$, disposeOfMediaStream, dominantSpeaker, getAudioBrowserPermission, getAudioDevices, getAudioOutputDevices, getAudioStream, getClientDetails, getDeviceState, getLogLevel, getLogger, getScreenShareStream, getSdkInfo, getVideoBrowserPermission, getVideoDevices, getVideoStream, getWebRTCInfo, hasAudio, hasScreenShare, hasScreenShareAudio, hasVideo, isPinned, livestreamOrAudioRoomSortPreset, logLevels, logToConsole, name, noopComparator, paginatedLayoutSortPreset, pinned, publishingAudio, publishingVideo, reactionType, role, screenSharing, setDeviceInfo, setLogLevel, setLogger, setOSInfo, setPowerState, setSdkInfo, setThermalState, setWebRTCInfo, speakerLayoutSortPreset, speaking };
|
|
14452
14570
|
//# sourceMappingURL=index.browser.es.js.map
|