@stream-io/video-client 1.20.1 → 1.20.2

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 CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [1.20.2](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.20.1...@stream-io/video-client-1.20.2) (2025-05-01)
6
+
7
+ ### Bug Fixes
8
+
9
+ - add options for 4K RTMP and Recording ([#1775](https://github.com/GetStream/stream-video-js/issues/1775)) ([c09213d](https://github.com/GetStream/stream-video-js/commit/c09213df5fc8a46f5a8c5c1ef18f07fd05e1d547))
10
+ - use timeout reason when auto-dropping calls (instead of decline) ([#1776](https://github.com/GetStream/stream-video-js/issues/1776)) ([a043148](https://github.com/GetStream/stream-video-js/commit/a04314814e728c3d05d53c8940e9c223fec18fcc))
11
+
5
12
  ## [1.20.1](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.20.0...@stream-io/video-client-1.20.1) (2025-04-29)
6
13
 
7
14
  ### Bug Fixes
@@ -117,6 +117,7 @@ const FrameRecordingSettingsRequestQualityEnum = {
117
117
  _720P: '720p',
118
118
  _1080P: '1080p',
119
119
  _1440P: '1440p',
120
+ _2160P: '2160p',
120
121
  };
121
122
  /**
122
123
  * @export
@@ -189,11 +190,13 @@ const RTMPBroadcastRequestQualityEnum = {
189
190
  _720P: '720p',
190
191
  _1080P: '1080p',
191
192
  _1440P: '1440p',
193
+ _2160P: '2160p',
192
194
  PORTRAIT_360X640: 'portrait-360x640',
193
195
  PORTRAIT_480X854: 'portrait-480x854',
194
196
  PORTRAIT_720X1280: 'portrait-720x1280',
195
197
  PORTRAIT_1080X1920: 'portrait-1080x1920',
196
198
  PORTRAIT_1440X2560: 'portrait-1440x2560',
199
+ PORTRAIT_2160X3840: 'portrait-2160x3840',
197
200
  };
198
201
  /**
199
202
  * @export
@@ -204,11 +207,13 @@ const RTMPSettingsRequestQualityEnum = {
204
207
  _720P: '720p',
205
208
  _1080P: '1080p',
206
209
  _1440P: '1440p',
210
+ _2160P: '2160p',
207
211
  PORTRAIT_360X640: 'portrait-360x640',
208
212
  PORTRAIT_480X854: 'portrait-480x854',
209
213
  PORTRAIT_720X1280: 'portrait-720x1280',
210
214
  PORTRAIT_1080X1920: 'portrait-1080x1920',
211
215
  PORTRAIT_1440X2560: 'portrait-1440x2560',
216
+ PORTRAIT_2160X3840: 'portrait-2160x3840',
212
217
  };
213
218
  /**
214
219
  * @export
@@ -227,11 +232,13 @@ const RecordSettingsRequestQualityEnum = {
227
232
  _720P: '720p',
228
233
  _1080P: '1080p',
229
234
  _1440P: '1440p',
235
+ _2160P: '2160p',
230
236
  PORTRAIT_360X640: 'portrait-360x640',
231
237
  PORTRAIT_480X854: 'portrait-480x854',
232
238
  PORTRAIT_720X1280: 'portrait-720x1280',
233
239
  PORTRAIT_1080X1920: 'portrait-1080x1920',
234
240
  PORTRAIT_1440X2560: 'portrait-1440x2560',
241
+ PORTRAIT_2160X3840: 'portrait-2160x3840',
235
242
  };
236
243
  /**
237
244
  * @export
@@ -4058,7 +4065,7 @@ class StreamVideoWriteableStateStore {
4058
4065
  continue;
4059
4066
  logger('info', `User disconnected, leaving call: ${call.cid}`);
4060
4067
  await call
4061
- .leave({ reason: 'client.disconnectUser() called' })
4068
+ .leave({ message: 'client.disconnectUser() called' })
4062
4069
  .catch((err) => {
4063
4070
  logger('error', `Error leaving call: ${call.cid}`, err);
4064
4071
  });
@@ -5643,7 +5650,7 @@ const aggregate = (stats) => {
5643
5650
  return report;
5644
5651
  };
5645
5652
 
5646
- const version = "1.20.1";
5653
+ const version = "1.20.2";
5647
5654
  const [major, minor, patch] = version.split('.');
5648
5655
  let sdkInfo = {
5649
5656
  type: SdkType.PLAIN_JAVASCRIPT,
@@ -7601,13 +7608,17 @@ const watchCallRejected = (call) => {
7601
7608
  .every((m) => rejectedBy[m.user_id]);
7602
7609
  if (everyoneElseRejected) {
7603
7610
  call.logger('info', 'everyone rejected, leaving the call');
7604
- await call.leave({ reason: 'ring: everyone rejected' });
7611
+ await call.leave({
7612
+ reject: true,
7613
+ reason: 'cancel',
7614
+ message: 'ring: everyone rejected',
7615
+ });
7605
7616
  }
7606
7617
  }
7607
7618
  else {
7608
7619
  if (rejectedBy[eventCall.created_by.id]) {
7609
7620
  call.logger('info', 'call creator rejected, leaving call');
7610
- await call.leave({ reason: 'ring: creator rejected' });
7621
+ await call.leave({ message: 'ring: creator rejected' });
7611
7622
  }
7612
7623
  }
7613
7624
  };
@@ -7621,7 +7632,7 @@ const watchCallEnded = (call) => {
7621
7632
  if (callingState !== CallingState.IDLE &&
7622
7633
  callingState !== CallingState.LEFT) {
7623
7634
  call
7624
- .leave({ reason: 'call.ended event received', reject: false })
7635
+ .leave({ message: 'call.ended event received', reject: false })
7625
7636
  .catch((err) => {
7626
7637
  call.logger('error', 'Failed to leave call after call.ended ', err);
7627
7638
  });
@@ -7641,7 +7652,7 @@ const watchSfuCallEnded = (call) => {
7641
7652
  // update the call state to reflect the call has ended.
7642
7653
  call.state.setEndedAt(new Date());
7643
7654
  const reason = CallEndedReason[e.reason];
7644
- await call.leave({ reason: `callEnded received: ${reason}` });
7655
+ await call.leave({ message: `callEnded received: ${reason}` });
7645
7656
  }
7646
7657
  catch (err) {
7647
7658
  call.logger('error', 'Failed to leave call after being ended by the SFU', err);
@@ -7708,7 +7719,7 @@ const watchLiveEnded = (dispatcher, call) => {
7708
7719
  return;
7709
7720
  call.state.setBackstage(true);
7710
7721
  if (!call.permissionsContext.hasPermission(OwnCapability.JOIN_BACKSTAGE)) {
7711
- call.leave({ reason: 'live ended' }).catch((err) => {
7722
+ call.leave({ message: 'live ended' }).catch((err) => {
7712
7723
  call.logger('error', 'Failed to leave call after live ended', err);
7713
7724
  });
7714
7725
  }
@@ -10570,7 +10581,7 @@ class Call {
10570
10581
  const currentUserId = this.currentUserId;
10571
10582
  if (currentUserId && blockedUserIds.includes(currentUserId)) {
10572
10583
  this.logger('info', 'Leaving call because of being blocked');
10573
- await this.leave({ reason: 'user blocked' }).catch((err) => {
10584
+ await this.leave({ message: 'user blocked' }).catch((err) => {
10574
10585
  this.logger('error', 'Error leaving call after being blocked', err);
10575
10586
  });
10576
10587
  }
@@ -10723,7 +10734,7 @@ class Call {
10723
10734
  /**
10724
10735
  * Leave the call and stop the media streams that were published by the call.
10725
10736
  */
10726
- this.leave = async ({ reject, reason = 'user is leaving the call', } = {}) => {
10737
+ this.leave = async ({ reject, reason, message } = {}) => {
10727
10738
  await withoutConcurrency(this.joinLeaveConcurrencyTag, async () => {
10728
10739
  const callingState = this.state.callingState;
10729
10740
  if (callingState === CallingState.LEFT) {
@@ -10741,7 +10752,7 @@ class Call {
10741
10752
  }
10742
10753
  if (callingState === CallingState.RINGING && reject !== false) {
10743
10754
  if (reject) {
10744
- await this.reject('decline');
10755
+ await this.reject(reason ?? 'decline');
10745
10756
  }
10746
10757
  else {
10747
10758
  // if reject was undefined, we still have to cancel the call automatically
@@ -10760,7 +10771,7 @@ class Call {
10760
10771
  this.subscriber = undefined;
10761
10772
  this.publisher?.dispose();
10762
10773
  this.publisher = undefined;
10763
- await this.sfuClient?.leaveAndClose(reason);
10774
+ await this.sfuClient?.leaveAndClose(message ?? reason ?? 'user is leaving the call');
10764
10775
  this.sfuClient = undefined;
10765
10776
  this.dynascaleManager.setSfuClient(undefined);
10766
10777
  this.state.setCallingState(CallingState.LEFT);
@@ -11467,7 +11478,7 @@ class Call {
11467
11478
  if (strategy === WebsocketReconnectStrategy.UNSPECIFIED)
11468
11479
  return;
11469
11480
  if (strategy === WebsocketReconnectStrategy.DISCONNECT) {
11470
- this.leave({ reason: 'SFU instructed to disconnect' }).catch((err) => {
11481
+ this.leave({ message: 'SFU instructed to disconnect' }).catch((err) => {
11471
11482
  this.logger('warn', `Can't leave call after disconnect request`, err);
11472
11483
  });
11473
11484
  }
@@ -12097,7 +12108,11 @@ class Call {
12097
12108
  // e.g. it was already accepted and joined
12098
12109
  if (this.state.callingState !== CallingState.RINGING)
12099
12110
  return;
12100
- this.leave({ reject: true, reason: 'timeout' }).catch((err) => {
12111
+ this.leave({
12112
+ reject: true,
12113
+ reason: 'timeout',
12114
+ message: `ringing timeout - ${this.isCreatedByMe ? 'no one accepted' : `user didn't interact with incoming call screen`}`,
12115
+ }).catch((err) => {
12101
12116
  this.logger('error', 'Failed to drop call', err);
12102
12117
  });
12103
12118
  }, timeoutInMs);
@@ -13472,7 +13487,7 @@ class StreamClient {
13472
13487
  this.getUserAgent = () => {
13473
13488
  if (!this.cachedUserAgent) {
13474
13489
  const { clientAppIdentifier = {} } = this.options;
13475
- const { sdkName = 'js', sdkVersion = "1.20.1", ...extras } = clientAppIdentifier;
13490
+ const { sdkName = 'js', sdkVersion = "1.20.2", ...extras } = clientAppIdentifier;
13476
13491
  this.cachedUserAgent = [
13477
13492
  `stream-video-${sdkName}-v${sdkVersion}`,
13478
13493
  ...Object.entries(extras).map(([key, value]) => `${key}=${value}`),