@stream-io/video-client 1.15.2 → 1.15.4
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 +14 -0
- package/dist/index.browser.es.js +33 -16
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +33 -16
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +33 -16
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
- package/src/Call.ts +42 -20
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [1.15.4](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.15.3...@stream-io/video-client-1.15.4) (2025-01-23)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* leave ringing call if accepted or rejected elsewhere ([#1654](https://github.com/GetStream/stream-video-js/issues/1654)) ([9f25adf](https://github.com/GetStream/stream-video-js/commit/9f25adf8796db369f7e3e236e6a178f525ae8f55))
|
|
11
|
+
|
|
12
|
+
## [1.15.3](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.15.2...@stream-io/video-client-1.15.3) (2025-01-21)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* restore calling state if SFU connection fails during join ([#1652](https://github.com/GetStream/stream-video-js/issues/1652)) ([ff7f221](https://github.com/GetStream/stream-video-js/commit/ff7f221ad285ca1994fc3a780aa8183df2de3e99))
|
|
18
|
+
|
|
5
19
|
## [1.15.2](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.15.1...@stream-io/video-client-1.15.2) (2025-01-20)
|
|
6
20
|
|
|
7
21
|
|
package/dist/index.browser.es.js
CHANGED
|
@@ -3597,6 +3597,9 @@ const withoutConcurrency = createRunner(wrapWithContinuationTracking);
|
|
|
3597
3597
|
*/
|
|
3598
3598
|
const withCancellation = createRunner(wrapWithCancellation);
|
|
3599
3599
|
const pendingPromises = new Map();
|
|
3600
|
+
function hasPending(tag) {
|
|
3601
|
+
return pendingPromises.has(tag);
|
|
3602
|
+
}
|
|
3600
3603
|
async function settled(tag) {
|
|
3601
3604
|
await pendingPromises.get(tag)?.promise;
|
|
3602
3605
|
}
|
|
@@ -7353,7 +7356,7 @@ const aggregate = (stats) => {
|
|
|
7353
7356
|
return report;
|
|
7354
7357
|
};
|
|
7355
7358
|
|
|
7356
|
-
const version = "1.15.
|
|
7359
|
+
const version = "1.15.4";
|
|
7357
7360
|
const [major, minor, patch] = version.split('.');
|
|
7358
7361
|
let sdkInfo = {
|
|
7359
7362
|
type: SdkType.PLAIN_JAVASCRIPT,
|
|
@@ -10062,7 +10065,7 @@ class Call {
|
|
|
10062
10065
|
}
|
|
10063
10066
|
}));
|
|
10064
10067
|
this.leaveCallHooks.add(
|
|
10065
|
-
// cancel auto-drop when call is
|
|
10068
|
+
// cancel auto-drop when call is accepted or rejected
|
|
10066
10069
|
createSubscription(this.state.session$, (session) => {
|
|
10067
10070
|
if (!this.ringing)
|
|
10068
10071
|
return;
|
|
@@ -10074,6 +10077,13 @@ class Call {
|
|
|
10074
10077
|
if (isAcceptedByMe || isRejectedByMe) {
|
|
10075
10078
|
this.cancelAutoDrop();
|
|
10076
10079
|
}
|
|
10080
|
+
const isAcceptedElsewhere = isAcceptedByMe && this.state.callingState === CallingState.RINGING;
|
|
10081
|
+
if ((isAcceptedElsewhere || isRejectedByMe) &&
|
|
10082
|
+
!hasPending(this.joinLeaveConcurrencyTag)) {
|
|
10083
|
+
this.leave().catch(() => {
|
|
10084
|
+
this.logger('error', 'Could not leave a call that was accepted or rejected elsewhere');
|
|
10085
|
+
});
|
|
10086
|
+
}
|
|
10077
10087
|
}));
|
|
10078
10088
|
this.leaveCallHooks.add(
|
|
10079
10089
|
// "ringing" mode effects and event handlers
|
|
@@ -10454,19 +10464,26 @@ class Call {
|
|
|
10454
10464
|
const preferredSubscribeOptions = !isReconnecting
|
|
10455
10465
|
? this.getPreferredSubscribeOptions()
|
|
10456
10466
|
: [];
|
|
10457
|
-
|
|
10458
|
-
|
|
10459
|
-
|
|
10460
|
-
|
|
10461
|
-
|
|
10462
|
-
|
|
10463
|
-
|
|
10464
|
-
|
|
10465
|
-
|
|
10466
|
-
|
|
10467
|
-
|
|
10468
|
-
|
|
10469
|
-
|
|
10467
|
+
try {
|
|
10468
|
+
const { callState, fastReconnectDeadlineSeconds, publishOptions } = await sfuClient.join({
|
|
10469
|
+
subscriberSdp,
|
|
10470
|
+
publisherSdp,
|
|
10471
|
+
clientDetails,
|
|
10472
|
+
fastReconnect: performingFastReconnect,
|
|
10473
|
+
reconnectDetails,
|
|
10474
|
+
preferredPublishOptions,
|
|
10475
|
+
preferredSubscribeOptions,
|
|
10476
|
+
});
|
|
10477
|
+
this.currentPublishOptions = publishOptions;
|
|
10478
|
+
this.fastReconnectDeadlineSeconds = fastReconnectDeadlineSeconds;
|
|
10479
|
+
if (callState) {
|
|
10480
|
+
this.state.updateFromSfuCallState(callState, sfuClient.sessionId, reconnectDetails);
|
|
10481
|
+
}
|
|
10482
|
+
}
|
|
10483
|
+
catch (error) {
|
|
10484
|
+
// restore the previous call state if the join-flow fails
|
|
10485
|
+
this.state.setCallingState(callingState);
|
|
10486
|
+
throw error;
|
|
10470
10487
|
}
|
|
10471
10488
|
}
|
|
10472
10489
|
if (!performingMigration) {
|
|
@@ -12845,7 +12862,7 @@ class StreamClient {
|
|
|
12845
12862
|
return await this.wsConnection.connect(this.defaultWSTimeout);
|
|
12846
12863
|
};
|
|
12847
12864
|
this.getUserAgent = () => {
|
|
12848
|
-
const version = "1.15.
|
|
12865
|
+
const version = "1.15.4";
|
|
12849
12866
|
return (this.userAgent ||
|
|
12850
12867
|
`stream-video-javascript-client-${this.node ? 'node' : 'browser'}-${version}`);
|
|
12851
12868
|
};
|