@stream-io/video-client 0.1.8 → 0.1.9

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.cjs.js CHANGED
@@ -11668,7 +11668,7 @@ class WSConnectionFallback {
11668
11668
  }
11669
11669
  }
11670
11670
 
11671
- const version = '0.1.8';
11671
+ const version = '0.1.9';
11672
11672
 
11673
11673
  const logger = getLogger(['location']);
11674
11674
  const HINT_URL = `https://hint.stream-io-video.com/`;
@@ -12646,15 +12646,12 @@ const getDevices = (constraints) => {
12646
12646
  navigator.mediaDevices.enumerateDevices().then((devices) => {
12647
12647
  subscriber.next(devices);
12648
12648
  // If we stop the tracks before enumerateDevices -> the labels won't show up in Firefox
12649
- media.getTracks().forEach((t) => t.stop());
12649
+ disposeOfMediaStream(media);
12650
12650
  subscriber.complete();
12651
12651
  });
12652
12652
  })
12653
12653
  .catch((error) => {
12654
- const logger = getLogger(['devices']);
12655
- if (logger) {
12656
- logger('error', 'Failed to get devices', error);
12657
- }
12654
+ getLogger(['devices'])('error', 'Failed to get devices', error);
12658
12655
  subscriber.error(error);
12659
12656
  });
12660
12657
  });
@@ -12725,12 +12722,11 @@ const getAudioOutputDevices = () => {
12725
12722
  return audioDevices$.pipe(rxjs.map((values) => values.filter((d) => d.kind === 'audiooutput')));
12726
12723
  };
12727
12724
  const getStream = (constraints) => __awaiter(void 0, void 0, void 0, function* () {
12728
- var _a;
12729
12725
  try {
12730
12726
  return yield navigator.mediaDevices.getUserMedia(constraints);
12731
12727
  }
12732
12728
  catch (e) {
12733
- (_a = getLogger(['devices'])) === null || _a === void 0 ? void 0 : _a('error', `Failed get user media`, {
12729
+ getLogger(['devices'])('error', `Failed get user media`, {
12734
12730
  error: e,
12735
12731
  constraints: constraints,
12736
12732
  });
@@ -12776,12 +12772,11 @@ const getVideoStream = (trackConstraints) => __awaiter(void 0, void 0, void 0, f
12776
12772
  * @param options any additional options to pass to the [`getDisplayMedia`](https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getDisplayMedia) API.
12777
12773
  */
12778
12774
  const getScreenShareStream = (options) => __awaiter(void 0, void 0, void 0, function* () {
12779
- var _b;
12780
12775
  try {
12781
12776
  return yield navigator.mediaDevices.getDisplayMedia(Object.assign({ video: true, audio: false }, options));
12782
12777
  }
12783
12778
  catch (e) {
12784
- (_b = getLogger(['devices'])) === null || _b === void 0 ? void 0 : _b('error', 'Failed to get screen share stream', e);
12779
+ getLogger(['devices'])('error', 'Failed to get screen share stream', e);
12785
12780
  throw e;
12786
12781
  }
12787
12782
  });