@stream-io/video-client 1.11.9 → 1.11.10
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 +9 -6
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +9 -6
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +9 -6
- package/dist/index.es.js.map +1 -1
- package/dist/src/types.d.ts +0 -2
- package/package.json +1 -1
- package/src/Call.ts +4 -3
- package/src/events/call.ts +5 -3
- package/src/types.ts +0 -2
package/dist/index.cjs.js
CHANGED
|
@@ -3318,7 +3318,7 @@ const retryable = async (rpc, signal) => {
|
|
|
3318
3318
|
return result;
|
|
3319
3319
|
};
|
|
3320
3320
|
|
|
3321
|
-
const version = "1.11.
|
|
3321
|
+
const version = "1.11.10";
|
|
3322
3322
|
const [major, minor, patch] = version.split('.');
|
|
3323
3323
|
let sdkInfo = {
|
|
3324
3324
|
type: SdkType.PLAIN_JAVASCRIPT,
|
|
@@ -6802,7 +6802,9 @@ const watchCallEnded = (call) => {
|
|
|
6802
6802
|
const { callingState } = call.state;
|
|
6803
6803
|
if (callingState !== exports.CallingState.IDLE &&
|
|
6804
6804
|
callingState !== exports.CallingState.LEFT) {
|
|
6805
|
-
call
|
|
6805
|
+
call
|
|
6806
|
+
.leave({ reason: 'call.ended event received', reject: false })
|
|
6807
|
+
.catch((err) => {
|
|
6806
6808
|
call.logger('error', 'Failed to leave call after call.ended ', err);
|
|
6807
6809
|
});
|
|
6808
6810
|
}
|
|
@@ -9944,7 +9946,7 @@ class Call {
|
|
|
9944
9946
|
/**
|
|
9945
9947
|
* Leave the call and stop the media streams that were published by the call.
|
|
9946
9948
|
*/
|
|
9947
|
-
this.leave = async ({ reject
|
|
9949
|
+
this.leave = async ({ reject, reason = 'user is leaving the call', } = {}) => {
|
|
9948
9950
|
await withoutConcurrency(this.joinLeaveConcurrencyTag, async () => {
|
|
9949
9951
|
const callingState = this.state.callingState;
|
|
9950
9952
|
if (callingState === exports.CallingState.LEFT) {
|
|
@@ -9960,14 +9962,15 @@ class Call {
|
|
|
9960
9962
|
};
|
|
9961
9963
|
await waitUntilCallJoined();
|
|
9962
9964
|
}
|
|
9963
|
-
if (callingState === exports.CallingState.RINGING) {
|
|
9965
|
+
if (callingState === exports.CallingState.RINGING && reject !== false) {
|
|
9964
9966
|
if (reject) {
|
|
9965
9967
|
await this.reject(reason);
|
|
9966
9968
|
}
|
|
9967
9969
|
else {
|
|
9970
|
+
// if reject was undefined, we still have to cancel the call automatically
|
|
9971
|
+
// when I am the creator and everyone else left the call
|
|
9968
9972
|
const hasOtherParticipants = this.state.remoteParticipants.length > 0;
|
|
9969
9973
|
if (this.isCreatedByMe && !hasOtherParticipants) {
|
|
9970
|
-
// I'm the one who started the call, so I should cancel it when there are no other participants.
|
|
9971
9974
|
await this.reject('cancel');
|
|
9972
9975
|
}
|
|
9973
9976
|
}
|
|
@@ -12633,7 +12636,7 @@ class StreamClient {
|
|
|
12633
12636
|
return await this.wsConnection.connect(this.defaultWSTimeout);
|
|
12634
12637
|
};
|
|
12635
12638
|
this.getUserAgent = () => {
|
|
12636
|
-
const version = "1.11.
|
|
12639
|
+
const version = "1.11.10";
|
|
12637
12640
|
return (this.userAgent ||
|
|
12638
12641
|
`stream-video-javascript-client-${this.node ? 'node' : 'browser'}-${version}`);
|
|
12639
12642
|
};
|