@stream-io/video-client 1.16.0 → 1.16.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 CHANGED
@@ -2,6 +2,16 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [1.16.1](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.16.0...@stream-io/video-client-1.16.1) (2025-02-05)
6
+
7
+
8
+ * add trace log for call unregister ([e20d9dc](https://github.com/GetStream/stream-video-js/commit/e20d9dc28b35c5dd0c921ccc3e18923a344ae5ab))
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * do not mute track on camera flip ([#1671](https://github.com/GetStream/stream-video-js/issues/1671)) ([963eb4d](https://github.com/GetStream/stream-video-js/commit/963eb4d4e5d6b96afb61b4da23a05ad92bcb3973))
14
+
5
15
  ## [1.16.0](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.15.7...@stream-io/video-client-1.16.0) (2025-01-31)
6
16
 
7
17
 
@@ -3896,6 +3896,8 @@ class StreamVideoWriteableStateStore {
3896
3896
  * @param call the call to remove
3897
3897
  */
3898
3898
  this.unregisterCall = (call) => {
3899
+ const logger = getLogger(['client-state']);
3900
+ logger('trace', `Unregistering call: ${call.cid}`);
3899
3901
  return this.setCalls((calls) => calls.filter((c) => c !== call));
3900
3902
  };
3901
3903
  /**
@@ -7392,7 +7394,7 @@ const aggregate = (stats) => {
7392
7394
  return report;
7393
7395
  };
7394
7396
 
7395
- const version = "1.16.0";
7397
+ const version = "1.16.1";
7396
7398
  const [major, minor, patch] = version.split('.');
7397
7399
  let sdkInfo = {
7398
7400
  type: SdkType.PLAIN_JAVASCRIPT,
@@ -9249,10 +9251,34 @@ class CameraManager extends InputMediaDeviceManager {
9249
9251
  */
9250
9252
  async selectDirection(direction) {
9251
9253
  if (this.isDirectionSupportedByDevice()) {
9252
- this.state.setDirection(direction);
9253
- // Providing both device id and direction doesn't work, so we deselect the device
9254
- this.state.setDevice(undefined);
9255
- await this.applySettingsToStream();
9254
+ if (isReactNative()) {
9255
+ const videoTrack = this.getTracks()[0];
9256
+ if (!videoTrack)
9257
+ return;
9258
+ // @ts-expect-error _switchCamera() is only present in react-native-webrtc 124 and below
9259
+ if (typeof videoTrack._switchCamera === 'function') {
9260
+ // @ts-expect-error for older versions of react-native-webrtc support
9261
+ videoTrack._switchCamera();
9262
+ }
9263
+ else {
9264
+ const constraints = {
9265
+ facingMode: direction === 'front' ? 'user' : 'environment',
9266
+ };
9267
+ await videoTrack.applyConstraints(constraints);
9268
+ }
9269
+ this.state.setDirection(direction);
9270
+ this.state.setDevice(undefined);
9271
+ }
9272
+ else {
9273
+ // web mobile
9274
+ this.state.setDirection(direction);
9275
+ // Providing both device id and direction doesn't work, so we deselect the device
9276
+ this.state.setDevice(undefined);
9277
+ this.getTracks().forEach((track) => {
9278
+ track.stop();
9279
+ });
9280
+ await this.unmuteStream();
9281
+ }
9256
9282
  }
9257
9283
  else {
9258
9284
  this.logger('warn', 'Camera direction ignored for desktop devices');
@@ -12975,7 +13001,7 @@ class StreamClient {
12975
13001
  return await this.wsConnection.connect(this.defaultWSTimeout);
12976
13002
  };
12977
13003
  this.getUserAgent = () => {
12978
- const version = "1.16.0";
13004
+ const version = "1.16.1";
12979
13005
  return (this.userAgent ||
12980
13006
  `stream-video-javascript-client-${this.node ? 'node' : 'browser'}-${version}`);
12981
13007
  };