@stream-io/video-client 1.11.10 → 1.11.11

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.11.11](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.11.10...@stream-io/video-client-1.11.11) (2024-11-29)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * revert [#1604](https://github.com/GetStream/stream-video-js/issues/1604) ([#1607](https://github.com/GetStream/stream-video-js/issues/1607)) ([567e4fb](https://github.com/GetStream/stream-video-js/commit/567e4fb309509b6b0d814826856d0a15efe16271))
11
+
5
12
  ## [1.11.10](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.11.9...@stream-io/video-client-1.11.10) (2024-11-28)
6
13
 
7
14
 
@@ -3297,7 +3297,7 @@ const retryable = async (rpc, signal) => {
3297
3297
  return result;
3298
3298
  };
3299
3299
 
3300
- const version = "1.11.10";
3300
+ const version = "1.11.11";
3301
3301
  const [major, minor, patch] = version.split('.');
3302
3302
  let sdkInfo = {
3303
3303
  type: SdkType.PLAIN_JAVASCRIPT,
@@ -8346,7 +8346,7 @@ const getAudioStream = async (trackConstraints) => {
8346
8346
  const constraints = {
8347
8347
  audio: {
8348
8348
  ...audioDeviceConstraints.audio,
8349
- ...normalizeContraints(trackConstraints),
8349
+ ...trackConstraints,
8350
8350
  },
8351
8351
  };
8352
8352
  try {
@@ -8357,6 +8357,13 @@ const getAudioStream = async (trackConstraints) => {
8357
8357
  return await getStream(constraints);
8358
8358
  }
8359
8359
  catch (error) {
8360
+ if (error instanceof DOMException &&
8361
+ error.name === 'OverconstrainedError' &&
8362
+ trackConstraints?.deviceId) {
8363
+ const { deviceId, ...relaxedContraints } = trackConstraints;
8364
+ getLogger(['devices'])('warn', 'Failed to get audio stream, will try again with relaxed contraints', { error, constraints, relaxedContraints });
8365
+ return getAudioStream(relaxedContraints);
8366
+ }
8360
8367
  getLogger(['devices'])('error', 'Failed to get audio stream', {
8361
8368
  error,
8362
8369
  constraints,
@@ -8376,7 +8383,7 @@ const getVideoStream = async (trackConstraints) => {
8376
8383
  const constraints = {
8377
8384
  video: {
8378
8385
  ...videoDeviceConstraints.video,
8379
- ...normalizeContraints(trackConstraints),
8386
+ ...trackConstraints,
8380
8387
  },
8381
8388
  };
8382
8389
  try {
@@ -8387,6 +8394,13 @@ const getVideoStream = async (trackConstraints) => {
8387
8394
  return await getStream(constraints);
8388
8395
  }
8389
8396
  catch (error) {
8397
+ if (error instanceof DOMException &&
8398
+ error.name === 'OverconstrainedError' &&
8399
+ trackConstraints?.deviceId) {
8400
+ const { deviceId, ...relaxedContraints } = trackConstraints;
8401
+ getLogger(['devices'])('warn', 'Failed to get video stream, will try again with relaxed contraints', { error, constraints, relaxedContraints });
8402
+ return getVideoStream(relaxedContraints);
8403
+ }
8390
8404
  getLogger(['devices'])('error', 'Failed to get video stream', {
8391
8405
  error,
8392
8406
  constraints,
@@ -8394,16 +8408,6 @@ const getVideoStream = async (trackConstraints) => {
8394
8408
  throw error;
8395
8409
  }
8396
8410
  };
8397
- function normalizeContraints(constraints) {
8398
- if (constraints?.deviceId === 'default' ||
8399
- (typeof constraints?.deviceId === 'object' &&
8400
- 'exact' in constraints.deviceId &&
8401
- constraints.deviceId.exact === 'default')) {
8402
- const { deviceId, ...contraintsWithoutDeviceId } = constraints;
8403
- return contraintsWithoutDeviceId;
8404
- }
8405
- return constraints;
8406
- }
8407
8411
  /**
8408
8412
  * Prompts the user for a permission to share a screen.
8409
8413
  * If the user grants the permission, a screen sharing stream is returned. Throws otherwise.
@@ -8630,7 +8634,6 @@ class InputMediaDeviceManager {
8630
8634
  }
8631
8635
  catch (error) {
8632
8636
  this.state.setDevice(prevDeviceId);
8633
- await this.applySettingsToStream();
8634
8637
  throw error;
8635
8638
  }
8636
8639
  }
@@ -12617,7 +12620,7 @@ class StreamClient {
12617
12620
  return await this.wsConnection.connect(this.defaultWSTimeout);
12618
12621
  };
12619
12622
  this.getUserAgent = () => {
12620
- const version = "1.11.10";
12623
+ const version = "1.11.11";
12621
12624
  return (this.userAgent ||
12622
12625
  `stream-video-javascript-client-${this.node ? 'node' : 'browser'}-${version}`);
12623
12626
  };