@stream-io/video-client 1.15.3 → 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 +7 -0
- package/dist/index.browser.es.js +13 -3
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +13 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +13 -3
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
- package/src/Call.ts +17 -2
package/dist/index.cjs.js
CHANGED
|
@@ -3599,6 +3599,9 @@ const withoutConcurrency = createRunner(wrapWithContinuationTracking);
|
|
|
3599
3599
|
*/
|
|
3600
3600
|
const withCancellation = createRunner(wrapWithCancellation);
|
|
3601
3601
|
const pendingPromises = new Map();
|
|
3602
|
+
function hasPending(tag) {
|
|
3603
|
+
return pendingPromises.has(tag);
|
|
3604
|
+
}
|
|
3602
3605
|
async function settled(tag) {
|
|
3603
3606
|
await pendingPromises.get(tag)?.promise;
|
|
3604
3607
|
}
|
|
@@ -7355,7 +7358,7 @@ const aggregate = (stats) => {
|
|
|
7355
7358
|
return report;
|
|
7356
7359
|
};
|
|
7357
7360
|
|
|
7358
|
-
const version = "1.15.
|
|
7361
|
+
const version = "1.15.4";
|
|
7359
7362
|
const [major, minor, patch] = version.split('.');
|
|
7360
7363
|
let sdkInfo = {
|
|
7361
7364
|
type: SdkType.PLAIN_JAVASCRIPT,
|
|
@@ -10064,7 +10067,7 @@ class Call {
|
|
|
10064
10067
|
}
|
|
10065
10068
|
}));
|
|
10066
10069
|
this.leaveCallHooks.add(
|
|
10067
|
-
// cancel auto-drop when call is
|
|
10070
|
+
// cancel auto-drop when call is accepted or rejected
|
|
10068
10071
|
createSubscription(this.state.session$, (session) => {
|
|
10069
10072
|
if (!this.ringing)
|
|
10070
10073
|
return;
|
|
@@ -10076,6 +10079,13 @@ class Call {
|
|
|
10076
10079
|
if (isAcceptedByMe || isRejectedByMe) {
|
|
10077
10080
|
this.cancelAutoDrop();
|
|
10078
10081
|
}
|
|
10082
|
+
const isAcceptedElsewhere = isAcceptedByMe && this.state.callingState === exports.CallingState.RINGING;
|
|
10083
|
+
if ((isAcceptedElsewhere || isRejectedByMe) &&
|
|
10084
|
+
!hasPending(this.joinLeaveConcurrencyTag)) {
|
|
10085
|
+
this.leave().catch(() => {
|
|
10086
|
+
this.logger('error', 'Could not leave a call that was accepted or rejected elsewhere');
|
|
10087
|
+
});
|
|
10088
|
+
}
|
|
10079
10089
|
}));
|
|
10080
10090
|
this.leaveCallHooks.add(
|
|
10081
10091
|
// "ringing" mode effects and event handlers
|
|
@@ -12852,7 +12862,7 @@ class StreamClient {
|
|
|
12852
12862
|
return await this.wsConnection.connect(this.defaultWSTimeout);
|
|
12853
12863
|
};
|
|
12854
12864
|
this.getUserAgent = () => {
|
|
12855
|
-
const version = "1.15.
|
|
12865
|
+
const version = "1.15.4";
|
|
12856
12866
|
return (this.userAgent ||
|
|
12857
12867
|
`stream-video-javascript-client-${this.node ? 'node' : 'browser'}-${version}`);
|
|
12858
12868
|
};
|