@stream-io/video-client 1.19.2 → 1.20.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 +15 -0
- package/dist/index.browser.es.js +33 -6
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +33 -6
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +33 -6
- package/dist/index.es.js.map +1 -1
- package/dist/src/Call.d.ts +19 -2
- package/dist/src/StreamSfuClient.d.ts +4 -0
- package/dist/src/gen/coordinator/index.d.ts +274 -836
- package/dist/src/gen/shims.d.ts +177 -0
- package/package.json +1 -1
- package/src/Call.ts +29 -6
- package/src/StreamSfuClient.ts +6 -0
- package/src/StreamVideoClient.ts +1 -0
- package/src/__tests__/StreamVideoClient.api.test.ts +1 -1
- package/src/gen/coordinator/index.ts +275 -833
- package/src/gen/shims.ts +192 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [1.20.0](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.19.3...@stream-io/video-client-1.20.0) (2025-04-24)
|
|
6
|
+
|
|
7
|
+
- bump test timeout ([7d922ed](https://github.com/GetStream/stream-video-js/commit/7d922ed34c46851a257fb36ee644f1ff5e4cb917))
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
- add getCallReport method ([#1767](https://github.com/GetStream/stream-video-js/issues/1767)) ([12e064f](https://github.com/GetStream/stream-video-js/commit/12e064f34a08731ded289651125bbe20e2bbf4f4))
|
|
12
|
+
|
|
13
|
+
## [1.19.3](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.19.2...@stream-io/video-client-1.19.3) (2025-04-15)
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
- fast reconnect shouldn't be followed up with full rejoining on network switch ([#1760](https://github.com/GetStream/stream-video-js/issues/1760)) ([71363bd](https://github.com/GetStream/stream-video-js/commit/71363bdf0fb6cd6273ff6c2a0faf9ea1eb53f121))
|
|
18
|
+
- watched calls should auto-subscribe for state updates ([#1762](https://github.com/GetStream/stream-video-js/issues/1762)) ([abcb45b](https://github.com/GetStream/stream-video-js/commit/abcb45b7fed4ca10e4ac6ea8ee18630ca5a9cb46)), closes [#1433](https://github.com/GetStream/stream-video-js/issues/1433)
|
|
19
|
+
|
|
5
20
|
## [1.19.2](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.19.1...@stream-io/video-client-1.19.2) (2025-04-11)
|
|
6
21
|
|
|
7
22
|
### Bug Fixes
|
package/dist/index.browser.es.js
CHANGED
|
@@ -5643,7 +5643,7 @@ const aggregate = (stats) => {
|
|
|
5643
5643
|
return report;
|
|
5644
5644
|
};
|
|
5645
5645
|
|
|
5646
|
-
const version = "1.
|
|
5646
|
+
const version = "1.20.0";
|
|
5647
5647
|
const [major, minor, patch] = version.split('.');
|
|
5648
5648
|
let sdkInfo = {
|
|
5649
5649
|
type: SdkType.PLAIN_JAVASCRIPT,
|
|
@@ -7266,6 +7266,10 @@ class StreamSfuClient {
|
|
|
7266
7266
|
* This is set to `true` when the user initiates the leave process.
|
|
7267
7267
|
*/
|
|
7268
7268
|
this.isLeaving = false;
|
|
7269
|
+
/**
|
|
7270
|
+
* Flag to indicate if the client is in the process of closing the connection.
|
|
7271
|
+
*/
|
|
7272
|
+
this.isClosing = false;
|
|
7269
7273
|
this.pingIntervalInMs = 10 * 1000;
|
|
7270
7274
|
this.unhealthyTimeoutInMs = this.pingIntervalInMs + 5 * 1000;
|
|
7271
7275
|
/**
|
|
@@ -7317,6 +7321,7 @@ class StreamSfuClient {
|
|
|
7317
7321
|
this.onSignalClose?.(`${e.code} ${e.reason}`);
|
|
7318
7322
|
};
|
|
7319
7323
|
this.close = (code = StreamSfuClient.NORMAL_CLOSURE, reason) => {
|
|
7324
|
+
this.isClosing = true;
|
|
7320
7325
|
if (this.signalWs.readyState === WebSocket.OPEN) {
|
|
7321
7326
|
this.logger('debug', `Closing SFU WS connection: ${code} - ${reason}`);
|
|
7322
7327
|
this.signalWs.close(code, `js-client: ${reason}`);
|
|
@@ -10507,6 +10512,11 @@ class Call {
|
|
|
10507
10512
|
*/
|
|
10508
10513
|
this.leaveCallHooks = new Set();
|
|
10509
10514
|
this.streamClientEventHandlers = new Map();
|
|
10515
|
+
/**
|
|
10516
|
+
* Sets up the call instance.
|
|
10517
|
+
*
|
|
10518
|
+
* @internal an internal method and should not be used outside the SDK.
|
|
10519
|
+
*/
|
|
10510
10520
|
this.setup = async () => {
|
|
10511
10521
|
await withoutConcurrency(this.joinLeaveConcurrencyTag, async () => {
|
|
10512
10522
|
if (this.initialized)
|
|
@@ -11277,7 +11287,7 @@ class Call {
|
|
|
11277
11287
|
callingState === CallingState.LEFT)
|
|
11278
11288
|
return;
|
|
11279
11289
|
// normal close, no need to reconnect
|
|
11280
|
-
if (sfuClient.isLeaving)
|
|
11290
|
+
if (sfuClient.isLeaving || sfuClient.isClosing)
|
|
11281
11291
|
return;
|
|
11282
11292
|
this.reconnect(WebsocketReconnectStrategy.REJOIN, reason).catch((err) => {
|
|
11283
11293
|
this.logger('warn', '[Reconnect] Error reconnecting', err);
|
|
@@ -11488,9 +11498,10 @@ class Call {
|
|
|
11488
11498
|
this.sfuStatsReporter?.start();
|
|
11489
11499
|
}
|
|
11490
11500
|
});
|
|
11491
|
-
this.leaveCallHooks
|
|
11492
|
-
|
|
11493
|
-
|
|
11501
|
+
this.leaveCallHooks
|
|
11502
|
+
.add(unregisterGoAway)
|
|
11503
|
+
.add(unregisterOnError)
|
|
11504
|
+
.add(unregisterNetworkChanged);
|
|
11494
11505
|
};
|
|
11495
11506
|
/**
|
|
11496
11507
|
* Restores the published tracks after a reconnection.
|
|
@@ -12113,11 +12124,26 @@ class Call {
|
|
|
12113
12124
|
*
|
|
12114
12125
|
* @param callSessionID the call session ID to retrieve statistics for.
|
|
12115
12126
|
* @returns The call stats.
|
|
12127
|
+
* @deprecated use `call.getCallReport` instead.
|
|
12128
|
+
* @internal
|
|
12116
12129
|
*/
|
|
12117
12130
|
this.getCallStats = async (callSessionID) => {
|
|
12118
12131
|
const endpoint = `${this.streamClientBasePath}/stats/${callSessionID}`;
|
|
12119
12132
|
return this.streamClient.get(endpoint);
|
|
12120
12133
|
};
|
|
12134
|
+
/**
|
|
12135
|
+
* Retrieve call report. If the `callSessionID` is not specified, then the
|
|
12136
|
+
* report for the latest call session is retrieved. If it is specified, then
|
|
12137
|
+
* the report for that particular session is retrieved if it exists.
|
|
12138
|
+
*
|
|
12139
|
+
* @param callSessionID the optional call session ID to retrieve statistics for
|
|
12140
|
+
* @returns the call report
|
|
12141
|
+
*/
|
|
12142
|
+
this.getCallReport = async (callSessionID = '') => {
|
|
12143
|
+
const endpoint = `${this.streamClientBasePath}/report`;
|
|
12144
|
+
const params = callSessionID !== '' ? { session_id: callSessionID } : {};
|
|
12145
|
+
return this.streamClient.get(endpoint, params);
|
|
12146
|
+
};
|
|
12121
12147
|
/**
|
|
12122
12148
|
* Submit user feedback for the call
|
|
12123
12149
|
*
|
|
@@ -13432,7 +13458,7 @@ class StreamClient {
|
|
|
13432
13458
|
this.getUserAgent = () => {
|
|
13433
13459
|
if (!this.cachedUserAgent) {
|
|
13434
13460
|
const { clientAppIdentifier = {} } = this.options;
|
|
13435
|
-
const { sdkName = 'js', sdkVersion = "1.
|
|
13461
|
+
const { sdkName = 'js', sdkVersion = "1.20.0", ...extras } = clientAppIdentifier;
|
|
13436
13462
|
this.cachedUserAgent = [
|
|
13437
13463
|
`stream-video-${sdkName}-v${sdkVersion}`,
|
|
13438
13464
|
...Object.entries(extras).map(([key, value]) => `${key}=${value}`),
|
|
@@ -13819,6 +13845,7 @@ class StreamVideoClient {
|
|
|
13819
13845
|
call.state.updateFromCallResponse(c.call);
|
|
13820
13846
|
await call.applyDeviceConfig(c.call.settings, false);
|
|
13821
13847
|
if (data.watch) {
|
|
13848
|
+
await call.setup();
|
|
13822
13849
|
this.writeableStateStore.registerCall(call);
|
|
13823
13850
|
}
|
|
13824
13851
|
calls.push(call);
|