@stream-io/video-client 1.36.1 → 1.37.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 +12 -0
- package/dist/index.browser.es.js +29 -22
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +29 -22
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +29 -22
- package/dist/index.es.js.map +1 -1
- package/dist/src/Call.d.ts +6 -4
- package/dist/src/gen/coordinator/index.d.ts +726 -16
- package/dist/src/store/CallState.d.ts +9 -0
- package/package.json +1 -1
- package/src/Call.ts +12 -5
- package/src/StreamVideoClient.ts +2 -9
- package/src/__tests__/StreamVideoClient.api.test.ts +5 -19
- package/src/__tests__/StreamVideoClient.ringing.test.ts +55 -6
- package/src/gen/coordinator/index.ts +708 -16
- package/src/helpers/DynascaleManager.ts +9 -3
- package/src/store/CallState.ts +12 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [1.37.1](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.37.0...@stream-io/video-client-1.37.1) (2025-11-17)
|
|
6
|
+
|
|
7
|
+
### Bug Fixes
|
|
8
|
+
|
|
9
|
+
- dynascale manager doesnt pick up updated dimensions all the time ([#2001](https://github.com/GetStream/stream-video-js/issues/2001)) ([d91e008](https://github.com/GetStream/stream-video-js/commit/d91e008f27fa2a4324f22555fbe0a59afe702bbb))
|
|
10
|
+
|
|
11
|
+
## [1.37.0](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.36.1...@stream-io/video-client-1.37.0) (2025-11-14)
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
- ring individual members ([#1755](https://github.com/GetStream/stream-video-js/issues/1755)) ([57564d6](https://github.com/GetStream/stream-video-js/commit/57564d63f21da7b95b582f74c88b24af7e77659c))
|
|
16
|
+
|
|
5
17
|
## [1.36.1](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.36.0...@stream-io/video-client-1.36.1) (2025-11-12)
|
|
6
18
|
|
|
7
19
|
- enforce the client to publish options on SDP level ([#1976](https://github.com/GetStream/stream-video-js/issues/1976)) ([1d93f72](https://github.com/GetStream/stream-video-js/commit/1d93f72cb4395aaf9b487eb66e0c3b6a8111aca4))
|
package/dist/index.browser.es.js
CHANGED
|
@@ -52,7 +52,6 @@ const FrameRecordingSettingsRequestQualityEnum = {
|
|
|
52
52
|
_720P: '720p',
|
|
53
53
|
_1080P: '1080p',
|
|
54
54
|
_1440P: '1440p',
|
|
55
|
-
_2160P: '2160p',
|
|
56
55
|
};
|
|
57
56
|
/**
|
|
58
57
|
* @export
|
|
@@ -148,13 +147,11 @@ const RTMPBroadcastRequestQualityEnum = {
|
|
|
148
147
|
_720P: '720p',
|
|
149
148
|
_1080P: '1080p',
|
|
150
149
|
_1440P: '1440p',
|
|
151
|
-
_2160P: '2160p',
|
|
152
150
|
PORTRAIT_360X640: 'portrait-360x640',
|
|
153
151
|
PORTRAIT_480X854: 'portrait-480x854',
|
|
154
152
|
PORTRAIT_720X1280: 'portrait-720x1280',
|
|
155
153
|
PORTRAIT_1080X1920: 'portrait-1080x1920',
|
|
156
154
|
PORTRAIT_1440X2560: 'portrait-1440x2560',
|
|
157
|
-
PORTRAIT_2160X3840: 'portrait-2160x3840',
|
|
158
155
|
};
|
|
159
156
|
/**
|
|
160
157
|
* @export
|
|
@@ -165,13 +162,11 @@ const RTMPSettingsRequestQualityEnum = {
|
|
|
165
162
|
_720P: '720p',
|
|
166
163
|
_1080P: '1080p',
|
|
167
164
|
_1440P: '1440p',
|
|
168
|
-
_2160P: '2160p',
|
|
169
165
|
PORTRAIT_360X640: 'portrait-360x640',
|
|
170
166
|
PORTRAIT_480X854: 'portrait-480x854',
|
|
171
167
|
PORTRAIT_720X1280: 'portrait-720x1280',
|
|
172
168
|
PORTRAIT_1080X1920: 'portrait-1080x1920',
|
|
173
169
|
PORTRAIT_1440X2560: 'portrait-1440x2560',
|
|
174
|
-
PORTRAIT_2160X3840: 'portrait-2160x3840',
|
|
175
170
|
};
|
|
176
171
|
/**
|
|
177
172
|
* @export
|
|
@@ -190,13 +185,11 @@ const RecordSettingsRequestQualityEnum = {
|
|
|
190
185
|
_720P: '720p',
|
|
191
186
|
_1080P: '1080p',
|
|
192
187
|
_1440P: '1440p',
|
|
193
|
-
_2160P: '2160p',
|
|
194
188
|
PORTRAIT_360X640: 'portrait-360x640',
|
|
195
189
|
PORTRAIT_480X854: 'portrait-480x854',
|
|
196
190
|
PORTRAIT_720X1280: 'portrait-720x1280',
|
|
197
191
|
PORTRAIT_1080X1920: 'portrait-1080x1920',
|
|
198
192
|
PORTRAIT_1440X2560: 'portrait-1440x2560',
|
|
199
|
-
PORTRAIT_2160X3840: 'portrait-2160x3840',
|
|
200
193
|
};
|
|
201
194
|
/**
|
|
202
195
|
* @export
|
|
@@ -4997,6 +4990,17 @@ class CallState {
|
|
|
4997
4990
|
this.setAnonymousParticipantCount = (count) => {
|
|
4998
4991
|
return this.setCurrentValue(this.anonymousParticipantCountSubject, count);
|
|
4999
4992
|
};
|
|
4993
|
+
/**
|
|
4994
|
+
* Returns the current participants array directly from the BehaviorSubject.
|
|
4995
|
+
* This bypasses the observable pipeline and is guaranteed to be synchronous.
|
|
4996
|
+
* Use this when you need the absolute latest value without any potential
|
|
4997
|
+
* timing issues from shareReplay/refCount.
|
|
4998
|
+
*
|
|
4999
|
+
* @internal
|
|
5000
|
+
*/
|
|
5001
|
+
this.getParticipantsSnapshot = () => {
|
|
5002
|
+
return this.participantsSubject.getValue();
|
|
5003
|
+
};
|
|
5000
5004
|
/**
|
|
5001
5005
|
* Sets the list of participants in the current call.
|
|
5002
5006
|
*
|
|
@@ -5976,7 +5980,7 @@ const getSdkVersion = (sdk) => {
|
|
|
5976
5980
|
return sdk ? `${sdk.major}.${sdk.minor}.${sdk.patch}` : '0.0.0-development';
|
|
5977
5981
|
};
|
|
5978
5982
|
|
|
5979
|
-
const version = "1.
|
|
5983
|
+
const version = "1.37.1";
|
|
5980
5984
|
const [major, minor, patch] = version.split('.');
|
|
5981
5985
|
let sdkInfo = {
|
|
5982
5986
|
type: SdkType.PLAIN_JAVASCRIPT,
|
|
@@ -9453,13 +9457,19 @@ class DynascaleManager {
|
|
|
9453
9457
|
}
|
|
9454
9458
|
get trackSubscriptions() {
|
|
9455
9459
|
const subscriptions = [];
|
|
9456
|
-
|
|
9460
|
+
// Use getParticipantsSnapshot() to bypass the observable pipeline
|
|
9461
|
+
// and avoid stale data caused by shareReplay with no active subscribers
|
|
9462
|
+
const participants = this.callState.getParticipantsSnapshot();
|
|
9463
|
+
const videoTrackSubscriptionOverrides = this.videoTrackSubscriptionOverridesSubject.getValue();
|
|
9464
|
+
for (const p of participants) {
|
|
9465
|
+
if (p.isLocalParticipant)
|
|
9466
|
+
continue;
|
|
9457
9467
|
// NOTE: audio tracks don't have to be requested explicitly
|
|
9458
9468
|
// as the SFU will implicitly subscribe us to all of them,
|
|
9459
9469
|
// once they become available.
|
|
9460
9470
|
if (p.videoDimension && hasVideo(p)) {
|
|
9461
|
-
const override =
|
|
9462
|
-
|
|
9471
|
+
const override = videoTrackSubscriptionOverrides[p.sessionId] ??
|
|
9472
|
+
videoTrackSubscriptionOverrides[globalOverrideKey];
|
|
9463
9473
|
if (override?.enabled !== false) {
|
|
9464
9474
|
subscriptions.push({
|
|
9465
9475
|
userId: p.userId,
|
|
@@ -12105,6 +12115,7 @@ class Call {
|
|
|
12105
12115
|
* @param params.ring if set to true, a `call.ring` event will be sent to the call members.
|
|
12106
12116
|
* @param params.notify if set to true, a `call.notification` event will be sent to the call members.
|
|
12107
12117
|
* @param params.members_limit the total number of members to return as part of the response.
|
|
12118
|
+
* @param params.video if set to true, in a ringing scenario, mobile SDKs will show "incoming video call", audio only otherwise.
|
|
12108
12119
|
*/
|
|
12109
12120
|
this.get = async (params) => {
|
|
12110
12121
|
await this.setup();
|
|
@@ -12158,11 +12169,11 @@ class Call {
|
|
|
12158
12169
|
return this.streamClient.post(`${this.streamClientBasePath}/delete`, data);
|
|
12159
12170
|
};
|
|
12160
12171
|
/**
|
|
12161
|
-
*
|
|
12162
|
-
*
|
|
12172
|
+
* Sends a ring notification to the provided users who are not already in the call.
|
|
12173
|
+
* All users should be members of the call.
|
|
12163
12174
|
*/
|
|
12164
|
-
this.ring = async () => {
|
|
12165
|
-
return
|
|
12175
|
+
this.ring = async (data = {}) => {
|
|
12176
|
+
return this.streamClient.post(`${this.streamClientBasePath}/ring`, data);
|
|
12166
12177
|
};
|
|
12167
12178
|
/**
|
|
12168
12179
|
* A shortcut for {@link Call.get} with `notify` parameter set to `true`.
|
|
@@ -14879,7 +14890,7 @@ class StreamClient {
|
|
|
14879
14890
|
this.getUserAgent = () => {
|
|
14880
14891
|
if (!this.cachedUserAgent) {
|
|
14881
14892
|
const { clientAppIdentifier = {} } = this.options;
|
|
14882
|
-
const { sdkName = 'js', sdkVersion = "1.
|
|
14893
|
+
const { sdkName = 'js', sdkVersion = "1.37.1", ...extras } = clientAppIdentifier;
|
|
14883
14894
|
this.cachedUserAgent = [
|
|
14884
14895
|
`stream-video-${sdkName}-v${sdkVersion}`,
|
|
14885
14896
|
...Object.entries(extras).map(([key, value]) => `${key}=${value}`),
|
|
@@ -15099,10 +15110,6 @@ class StreamVideoClient {
|
|
|
15099
15110
|
* @param e the event.
|
|
15100
15111
|
*/
|
|
15101
15112
|
this.initCallFromEvent = async (e) => {
|
|
15102
|
-
if (this.state.connectedUser?.id === e.call.created_by.id) {
|
|
15103
|
-
this.logger.debug(`Ignoring ${e.type} event sent by the current user`);
|
|
15104
|
-
return;
|
|
15105
|
-
}
|
|
15106
15113
|
try {
|
|
15107
15114
|
const concurrencyTag = getCallInitConcurrencyTag(e.call_cid);
|
|
15108
15115
|
await withoutConcurrency(concurrencyTag, async () => {
|
|
@@ -15416,12 +15423,12 @@ class StreamVideoClient {
|
|
|
15416
15423
|
this.shouldRejectCall = (currentCallId) => {
|
|
15417
15424
|
if (!this.rejectCallWhenBusy)
|
|
15418
15425
|
return false;
|
|
15419
|
-
|
|
15426
|
+
return this.state.calls.some((c) => c.cid !== currentCallId &&
|
|
15420
15427
|
c.ringing &&
|
|
15428
|
+
!c.isCreatedByMe &&
|
|
15421
15429
|
c.state.callingState !== CallingState.IDLE &&
|
|
15422
15430
|
c.state.callingState !== CallingState.LEFT &&
|
|
15423
15431
|
c.state.callingState !== CallingState.RECONNECTING_FAILED);
|
|
15424
|
-
return hasOngoingRingingCall;
|
|
15425
15432
|
};
|
|
15426
15433
|
const apiKey = typeof apiKeyOrArgs === 'string' ? apiKeyOrArgs : apiKeyOrArgs.apiKey;
|
|
15427
15434
|
const clientOptions = typeof apiKeyOrArgs === 'string' ? opts : apiKeyOrArgs.options;
|