@stream-io/video-client 0.4.7 → 0.4.8

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
+ ### [0.4.8](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-0.4.7...@stream-io/video-client-0.4.8) (2023-11-16)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * **device-api:** check for Permissions API availability ([#1193](https://github.com/GetStream/stream-video-js/issues/1193)) ([5ffeaa0](https://github.com/GetStream/stream-video-js/commit/5ffeaa0d2abdab401f9028a14b114d00723605c1)), closes [#1184](https://github.com/GetStream/stream-video-js/issues/1184)
11
+
5
12
  ### [0.4.7](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-0.4.6...@stream-io/video-client-0.4.7) (2023-11-13)
6
13
 
7
14
 
@@ -10464,8 +10464,11 @@ class InputMediaDeviceManagerState {
10464
10464
  */
10465
10465
  this.hasBrowserPermission$ = new Observable((subscriber) => {
10466
10466
  const notifyGranted = () => subscriber.next(true);
10467
- if (isReactNative() || !this.permissionName)
10467
+ const permissionsAPIAvailable = !!navigator?.permissions?.query;
10468
+ if (isReactNative() || !this.permissionName || !permissionsAPIAvailable) {
10469
+ getLogger(['devices'])('warn', `Permissions can't be queried. Assuming granted.`);
10468
10470
  return notifyGranted();
10471
+ }
10469
10472
  let permissionState;
10470
10473
  const notify = () => subscriber.next(permissionState.state === 'granted');
10471
10474
  navigator.permissions
@@ -12270,13 +12273,13 @@ class Call {
12270
12273
  this.camera.state.status === 'enabled') {
12271
12274
  this.camera
12272
12275
  .disable()
12273
- .catch((err) => this.logger('error', `Error disabling camera after pemission revoked`, err));
12276
+ .catch((err) => this.logger('error', `Error disabling camera after permission revoked`, err));
12274
12277
  }
12275
12278
  if (trackType === TrackType.AUDIO &&
12276
12279
  this.microphone.state.status === 'enabled') {
12277
12280
  this.microphone
12278
12281
  .disable()
12279
- .catch((err) => this.logger('error', `Error disabling microphone after pemission revoked`, err));
12282
+ .catch((err) => this.logger('error', `Error disabling microphone after permission revoked`, err));
12280
12283
  }
12281
12284
  });
12282
12285
  }
@@ -14010,7 +14013,7 @@ class StreamClient {
14010
14013
  });
14011
14014
  };
14012
14015
  this.getUserAgent = () => {
14013
- const version = "0.4.7" ;
14016
+ const version = "0.4.8" ;
14014
14017
  return (this.userAgent ||
14015
14018
  `stream-video-javascript-client-${this.node ? 'node' : 'browser'}-${version}`);
14016
14019
  };