@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/dist/index.es.js CHANGED
@@ -10467,8 +10467,11 @@ class InputMediaDeviceManagerState {
10467
10467
  */
10468
10468
  this.hasBrowserPermission$ = new Observable((subscriber) => {
10469
10469
  const notifyGranted = () => subscriber.next(true);
10470
- if (isReactNative() || !this.permissionName)
10470
+ const permissionsAPIAvailable = !!navigator?.permissions?.query;
10471
+ if (isReactNative() || !this.permissionName || !permissionsAPIAvailable) {
10472
+ getLogger(['devices'])('warn', `Permissions can't be queried. Assuming granted.`);
10471
10473
  return notifyGranted();
10474
+ }
10472
10475
  let permissionState;
10473
10476
  const notify = () => subscriber.next(permissionState.state === 'granted');
10474
10477
  navigator.permissions
@@ -12273,13 +12276,13 @@ class Call {
12273
12276
  this.camera.state.status === 'enabled') {
12274
12277
  this.camera
12275
12278
  .disable()
12276
- .catch((err) => this.logger('error', `Error disabling camera after pemission revoked`, err));
12279
+ .catch((err) => this.logger('error', `Error disabling camera after permission revoked`, err));
12277
12280
  }
12278
12281
  if (trackType === TrackType.AUDIO &&
12279
12282
  this.microphone.state.status === 'enabled') {
12280
12283
  this.microphone
12281
12284
  .disable()
12282
- .catch((err) => this.logger('error', `Error disabling microphone after pemission revoked`, err));
12285
+ .catch((err) => this.logger('error', `Error disabling microphone after permission revoked`, err));
12283
12286
  }
12284
12287
  });
12285
12288
  }
@@ -14014,7 +14017,7 @@ class StreamClient {
14014
14017
  });
14015
14018
  };
14016
14019
  this.getUserAgent = () => {
14017
- const version = "0.4.7" ;
14020
+ const version = "0.4.8" ;
14018
14021
  return (this.userAgent ||
14019
14022
  `stream-video-javascript-client-${this.node ? 'node' : 'browser'}-${version}`);
14020
14023
  };