@stream-io/video-client 1.28.0 → 1.28.1
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 +6 -0
- package/dist/index.browser.es.js +54 -47
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +54 -47
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +54 -47
- package/dist/index.es.js.map +1 -1
- package/dist/src/Call.d.ts +1 -0
- package/package.json +1 -1
- package/src/Call.ts +54 -43
- package/src/events/callEventHandlers.ts +0 -5
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [1.28.1](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.28.0...@stream-io/video-client-1.28.1) (2025-08-22)
|
|
6
|
+
|
|
7
|
+
### Bug Fixes
|
|
8
|
+
|
|
9
|
+
- handle pre ended calls on ringing push arrival ([#1897](https://github.com/GetStream/stream-video-js/issues/1897)) ([935e375](https://github.com/GetStream/stream-video-js/commit/935e3756035639c651b3ac4469321a64b8576a0e))
|
|
10
|
+
|
|
5
11
|
## [1.28.0](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.27.5...@stream-io/video-client-1.28.0) (2025-08-21)
|
|
6
12
|
|
|
7
13
|
### Features
|
package/dist/index.browser.es.js
CHANGED
|
@@ -5653,7 +5653,7 @@ const getSdkVersion = (sdk) => {
|
|
|
5653
5653
|
return sdk ? `${sdk.major}.${sdk.minor}.${sdk.patch}` : '0.0.0-development';
|
|
5654
5654
|
};
|
|
5655
5655
|
|
|
5656
|
-
const version = "1.28.
|
|
5656
|
+
const version = "1.28.1";
|
|
5657
5657
|
const [major, minor, patch] = version.split('.');
|
|
5658
5658
|
let sdkInfo = {
|
|
5659
5659
|
type: SdkType.PLAIN_JAVASCRIPT,
|
|
@@ -8743,10 +8743,6 @@ const registerEventHandlers = (call, dispatcher) => {
|
|
|
8743
8743
|
call.on('inboundStateNotification', watchInboundStateNotification(state)),
|
|
8744
8744
|
handleRemoteSoftMute(call),
|
|
8745
8745
|
];
|
|
8746
|
-
if (call.ringing) {
|
|
8747
|
-
// these events are only relevant when the call is ringing
|
|
8748
|
-
eventHandlers.push(registerRingingCallEventHandlers(call));
|
|
8749
|
-
}
|
|
8750
8746
|
return () => {
|
|
8751
8747
|
eventHandlers.forEach((unsubscribe) => unsubscribe());
|
|
8752
8748
|
};
|
|
@@ -11538,6 +11534,21 @@ class Call {
|
|
|
11538
11534
|
});
|
|
11539
11535
|
}
|
|
11540
11536
|
}));
|
|
11537
|
+
if (this.ringing) {
|
|
11538
|
+
// if the call is ringing, we need to register the ringing call effects
|
|
11539
|
+
this.handleRingingCall();
|
|
11540
|
+
}
|
|
11541
|
+
else {
|
|
11542
|
+
// if the call is not ringing, we need to register the ringing call subscriptions
|
|
11543
|
+
// to handle the case when the call gets ringing flag after creation event
|
|
11544
|
+
this.leaveCallHooks.add(
|
|
11545
|
+
// "ringing" mode effects and event handlers
|
|
11546
|
+
createSubscription(this.ringingSubject, (isRinging) => {
|
|
11547
|
+
if (!isRinging)
|
|
11548
|
+
return;
|
|
11549
|
+
this.handleRingingCall();
|
|
11550
|
+
}));
|
|
11551
|
+
}
|
|
11541
11552
|
this.leaveCallHooks.add(
|
|
11542
11553
|
// cancel auto-drop when call is accepted or rejected
|
|
11543
11554
|
createSubscription(this.state.session$, (session) => {
|
|
@@ -11559,53 +11570,49 @@ class Call {
|
|
|
11559
11570
|
});
|
|
11560
11571
|
}
|
|
11561
11572
|
}));
|
|
11562
|
-
|
|
11563
|
-
|
|
11564
|
-
|
|
11565
|
-
|
|
11566
|
-
|
|
11567
|
-
|
|
11568
|
-
|
|
11569
|
-
|
|
11570
|
-
|
|
11571
|
-
|
|
11572
|
-
|
|
11573
|
-
|
|
11574
|
-
|
|
11575
|
-
|
|
11573
|
+
};
|
|
11574
|
+
this.handleRingingCall = () => {
|
|
11575
|
+
const callSession = this.state.session;
|
|
11576
|
+
const receiver_id = this.clientStore.connectedUser?.id;
|
|
11577
|
+
const ended_at = callSession?.ended_at;
|
|
11578
|
+
const created_by_id = this.state.createdBy?.id;
|
|
11579
|
+
const rejected_by = callSession?.rejected_by;
|
|
11580
|
+
const accepted_by = callSession?.accepted_by;
|
|
11581
|
+
let leaveCallIdle = false;
|
|
11582
|
+
if (ended_at) {
|
|
11583
|
+
// call was ended before it was accepted or rejected so we should leave it to idle
|
|
11584
|
+
leaveCallIdle = true;
|
|
11585
|
+
}
|
|
11586
|
+
else if (created_by_id && rejected_by) {
|
|
11587
|
+
if (rejected_by[created_by_id]) {
|
|
11588
|
+
// call was cancelled by the caller
|
|
11576
11589
|
leaveCallIdle = true;
|
|
11577
11590
|
}
|
|
11578
|
-
|
|
11579
|
-
|
|
11580
|
-
|
|
11581
|
-
|
|
11582
|
-
|
|
11583
|
-
}
|
|
11584
|
-
else if (receiver_id && rejected_by) {
|
|
11585
|
-
if (rejected_by[receiver_id]) {
|
|
11586
|
-
// call was rejected by the receiver in some other device
|
|
11587
|
-
leaveCallIdle = true;
|
|
11588
|
-
}
|
|
11591
|
+
}
|
|
11592
|
+
else if (receiver_id && rejected_by) {
|
|
11593
|
+
if (rejected_by[receiver_id]) {
|
|
11594
|
+
// call was rejected by the receiver in some other device
|
|
11595
|
+
leaveCallIdle = true;
|
|
11589
11596
|
}
|
|
11590
|
-
|
|
11591
|
-
|
|
11592
|
-
|
|
11593
|
-
|
|
11594
|
-
|
|
11597
|
+
}
|
|
11598
|
+
else if (receiver_id && accepted_by) {
|
|
11599
|
+
if (accepted_by[receiver_id]) {
|
|
11600
|
+
// call was accepted by the receiver in some other device
|
|
11601
|
+
leaveCallIdle = true;
|
|
11595
11602
|
}
|
|
11596
|
-
|
|
11597
|
-
|
|
11598
|
-
|
|
11599
|
-
|
|
11603
|
+
}
|
|
11604
|
+
if (leaveCallIdle) {
|
|
11605
|
+
if (this.state.callingState !== CallingState.IDLE) {
|
|
11606
|
+
this.state.setCallingState(CallingState.IDLE);
|
|
11600
11607
|
}
|
|
11601
|
-
|
|
11602
|
-
|
|
11603
|
-
|
|
11604
|
-
|
|
11605
|
-
this.scheduleAutoDrop();
|
|
11606
|
-
this.leaveCallHooks.add(registerRingingCallEventHandlers(this));
|
|
11608
|
+
}
|
|
11609
|
+
else {
|
|
11610
|
+
if (this.state.callingState === CallingState.IDLE) {
|
|
11611
|
+
this.state.setCallingState(CallingState.RINGING);
|
|
11607
11612
|
}
|
|
11608
|
-
|
|
11613
|
+
this.scheduleAutoDrop();
|
|
11614
|
+
this.leaveCallHooks.add(registerRingingCallEventHandlers(this));
|
|
11615
|
+
}
|
|
11609
11616
|
};
|
|
11610
11617
|
this.handleOwnCapabilitiesUpdated = async (ownCapabilities) => {
|
|
11611
11618
|
// update the permission context.
|
|
@@ -14562,7 +14569,7 @@ class StreamClient {
|
|
|
14562
14569
|
this.getUserAgent = () => {
|
|
14563
14570
|
if (!this.cachedUserAgent) {
|
|
14564
14571
|
const { clientAppIdentifier = {} } = this.options;
|
|
14565
|
-
const { sdkName = 'js', sdkVersion = "1.28.
|
|
14572
|
+
const { sdkName = 'js', sdkVersion = "1.28.1", ...extras } = clientAppIdentifier;
|
|
14566
14573
|
this.cachedUserAgent = [
|
|
14567
14574
|
`stream-video-${sdkName}-v${sdkVersion}`,
|
|
14568
14575
|
...Object.entries(extras).map(([key, value]) => `${key}=${value}`),
|