@stream-io/video-client 0.3.3 → 0.3.5

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
+ ### [0.3.5](https://github.com/GetStream/stream-video-js/compare/client0.3.4...client0.3.5) (2023-08-22)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * Change the backtage default value to true ([#969](https://github.com/GetStream/stream-video-js/issues/969)) ([5aff8b4](https://github.com/GetStream/stream-video-js/commit/5aff8b4695373de660d625a4945e300d1ff90610))
11
+
12
+ ### [0.3.4](https://github.com/GetStream/stream-video-js/compare/client0.3.3...client0.3.4) (2023-08-21)
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * guest auth didn't wait for some API calls ([#965](https://github.com/GetStream/stream-video-js/issues/965)) ([5d9e1c6](https://github.com/GetStream/stream-video-js/commit/5d9e1c6ebb09901a8f3e12c435736e0640af62dc))
18
+
5
19
  ### [0.3.3](https://github.com/GetStream/stream-video-js/compare/client0.3.2...client0.3.3) (2023-08-18)
6
20
 
7
21
 
@@ -8020,7 +8020,7 @@ class CallState {
8020
8020
  *
8021
8021
  */
8022
8022
  constructor() {
8023
- this.backstageSubject = new BehaviorSubject(false);
8023
+ this.backstageSubject = new BehaviorSubject(true);
8024
8024
  this.blockedUserIdsSubject = new BehaviorSubject([]);
8025
8025
  this.createdAtSubject = new BehaviorSubject(new Date());
8026
8026
  this.endedAtSubject = new BehaviorSubject(undefined);
@@ -12452,7 +12452,7 @@ class WSConnectionFallback {
12452
12452
  }
12453
12453
  }
12454
12454
 
12455
- const version = '0.3.3';
12455
+ const version = '0.3.5';
12456
12456
 
12457
12457
  const logger = getLogger(['location']);
12458
12458
  const HINT_URL = `https://hint.stream-io-video.com/`;
@@ -12652,6 +12652,14 @@ class StreamClient {
12652
12652
  this.rejectConnectionId = undefined;
12653
12653
  this.resolveConnectionId = undefined;
12654
12654
  });
12655
+ this.connectGuestUser = (user) => __awaiter(this, void 0, void 0, function* () {
12656
+ this.guestUserCreatePromise = this.doAxiosRequest('post', '/guest', {
12657
+ user: Object.assign(Object.assign({}, user), { role: 'guest' }),
12658
+ }, { publicEndpoint: true });
12659
+ const response = yield this.guestUserCreatePromise;
12660
+ this.guestUserCreatePromise.finally(() => (this.guestUserCreatePromise = undefined));
12661
+ return this.connectUser(response.user, response.access_token);
12662
+ });
12655
12663
  /**
12656
12664
  * connectAnonymousUser - Set an anonymous user and open a WebSocket connection
12657
12665
  */
@@ -12731,6 +12739,7 @@ class StreamClient {
12731
12739
  if (!options.publicEndpoint) {
12732
12740
  yield Promise.all([
12733
12741
  this.tokenManager.tokenReady(),
12742
+ this.guestUserCreatePromise,
12734
12743
  this.connectionIdPromise,
12735
12744
  ]);
12736
12745
  }
@@ -13292,10 +13301,7 @@ class StreamVideoClient {
13292
13301
  };
13293
13302
  if (user.type === 'guest') {
13294
13303
  connectUser = () => __awaiter(this, void 0, void 0, function* () {
13295
- const response = yield this.createGuestUser({
13296
- user: Object.assign(Object.assign({}, user), { role: 'guest' }),
13297
- });
13298
- return this.streamClient.connectUser(response.user, response.access_token);
13304
+ return this.streamClient.connectGuestUser(user);
13299
13305
  });
13300
13306
  }
13301
13307
  this.connectionPromise = this.disconnectionPromise