@stream-io/video-client 1.10.1 → 1.10.3

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,20 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [1.10.3](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.10.2...@stream-io/video-client-1.10.3) (2024-11-05)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * camera flip did not work in react-native ([#1554](https://github.com/GetStream/stream-video-js/issues/1554)) ([423890c](https://github.com/GetStream/stream-video-js/commit/423890cb2d1925366d8a63c29f93c4c92c8104ad)), closes [#1521](https://github.com/GetStream/stream-video-js/issues/1521)
11
+
12
+ ## [1.10.2](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.10.1...@stream-io/video-client-1.10.2) (2024-11-01)
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * camera not enabled on foreground notifications ([#1546](https://github.com/GetStream/stream-video-js/issues/1546)) ([67c920a](https://github.com/GetStream/stream-video-js/commit/67c920ac4bca35a414b88f6c9829b08396a6260b))
18
+
5
19
  ## [1.10.1](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.10.0...@stream-io/video-client-1.10.1) (2024-10-30)
6
20
 
7
21
 
@@ -3108,7 +3108,7 @@ const retryable = async (rpc, signal) => {
3108
3108
  return result;
3109
3109
  };
3110
3110
 
3111
- const version = "1.10.1";
3111
+ const version = "1.10.3";
3112
3112
  const [major, minor, patch] = version.split('.');
3113
3113
  let sdkInfo = {
3114
3114
  type: SdkType.PLAIN_JAVASCRIPT,
@@ -8224,6 +8224,7 @@ class InputMediaDeviceManager {
8224
8224
  * Starts stream.
8225
8225
  */
8226
8226
  async enable() {
8227
+ this.state.prevStatus = this.state.optimisticStatus;
8227
8228
  if (this.state.optimisticStatus === 'enabled') {
8228
8229
  return;
8229
8230
  }
@@ -8245,7 +8246,7 @@ class InputMediaDeviceManager {
8245
8246
  * @param {boolean} [forceStop=false] when true, stops the tracks regardless of the state.disableMode
8246
8247
  */
8247
8248
  async disable(forceStop = false) {
8248
- this.state.prevStatus = this.state.status;
8249
+ this.state.prevStatus = this.state.optimisticStatus;
8249
8250
  if (!forceStop && this.state.optimisticStatus === 'disabled') {
8250
8251
  return;
8251
8252
  }
@@ -8274,7 +8275,7 @@ class InputMediaDeviceManager {
8274
8275
  */
8275
8276
  async resume() {
8276
8277
  if (this.state.prevStatus === 'enabled' &&
8277
- this.state.status === 'disabled') {
8278
+ this.state.status !== 'enabled') {
8278
8279
  await this.enable();
8279
8280
  }
8280
8281
  }
@@ -8774,13 +8775,16 @@ class CameraManager extends InputMediaDeviceManager {
8774
8775
  height: 720,
8775
8776
  };
8776
8777
  }
8778
+ isDirectionSupportedByDevice() {
8779
+ return isReactNative() || isMobile();
8780
+ }
8777
8781
  /**
8778
8782
  * Select the camera direction.
8779
8783
  *
8780
8784
  * @param direction the direction of the camera to select.
8781
8785
  */
8782
8786
  async selectDirection(direction) {
8783
- if (isMobile()) {
8787
+ if (this.isDirectionSupportedByDevice()) {
8784
8788
  this.state.setDirection(direction);
8785
8789
  // Providing both device id and direction doesn't work, so we deselect the device
8786
8790
  this.state.setDevice(undefined);
@@ -8845,7 +8849,9 @@ class CameraManager extends InputMediaDeviceManager {
8845
8849
  constraints.height = this.targetResolution.height;
8846
8850
  // We can't set both device id and facing mode
8847
8851
  // Device id has higher priority
8848
- if (!constraints.deviceId && this.state.direction && isMobile()) {
8852
+ if (!constraints.deviceId &&
8853
+ this.state.direction &&
8854
+ this.isDirectionSupportedByDevice()) {
8849
8855
  constraints.facingMode =
8850
8856
  this.state.direction === 'front' ? 'user' : 'environment';
8851
8857
  }
@@ -12695,7 +12701,7 @@ class StreamClient {
12695
12701
  });
12696
12702
  };
12697
12703
  this.getUserAgent = () => {
12698
- const version = "1.10.1";
12704
+ const version = "1.10.3";
12699
12705
  return (this.userAgent ||
12700
12706
  `stream-video-javascript-client-${this.node ? 'node' : 'browser'}-${version}`);
12701
12707
  };