@stream-io/video-client 0.0.25 → 0.0.27

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.0.27](https://github.com/GetStream/stream-video-js/compare/client0.0.26...client0.0.27) (2023-06-27)
6
+
7
+
8
+ ### Documentation
9
+
10
+ * Tutorial rewrite ([#709](https://github.com/GetStream/stream-video-js/issues/709)) ([9a14188](https://github.com/GetStream/stream-video-js/commit/9a141883ec2e402e7130c7e41f464439d5cb2800))
11
+
12
+ ### [0.0.26](https://github.com/GetStream/stream-video-js/compare/client0.0.25...client0.0.26) (2023-06-23)
13
+
14
+
15
+ ### Features
16
+
17
+ * Add user that mutes others in `CallUserMuted` event ([#704](https://github.com/GetStream/stream-video-js/issues/704)) ([f57fbbd](https://github.com/GetStream/stream-video-js/commit/f57fbbdcf9002add174aceba191211f3884cdc62))
18
+
5
19
  ### [0.0.25](https://github.com/GetStream/stream-video-js/compare/client0.0.24...client0.0.25) (2023-06-23)
6
20
 
7
21
 
@@ -6502,6 +6502,7 @@ class StreamVideoWriteableStateStore {
6502
6502
  // leave all calls when the user disconnects.
6503
6503
  if (!user) {
6504
6504
  for (const call of this.calls) {
6505
+ getLogger(['client-state'])('info', `User disconnected, leaving call: ${call.cid}`);
6505
6506
  yield call.leave();
6506
6507
  }
6507
6508
  }
@@ -8552,6 +8553,7 @@ class Call {
8552
8553
  this.join = (data) => __awaiter(this, void 0, void 0, function* () {
8553
8554
  var _e, _f;
8554
8555
  if ([CallingState.JOINED, CallingState.JOINING].includes(this.state.callingState)) {
8556
+ this.logger('warn', 'Join method called twice, you should only call this once');
8555
8557
  throw new Error(`Illegal State: Already joined.`);
8556
8558
  }
8557
8559
  if (this.state.callingState === CallingState.LEFT) {
@@ -8559,6 +8561,7 @@ class Call {
8559
8561
  }
8560
8562
  const previousCallingState = this.state.callingState;
8561
8563
  this.state.setCallingState(CallingState.JOINING);
8564
+ this.logger('debug', 'Starting join flow');
8562
8565
  if ((data === null || data === void 0 ? void 0 : data.ring) && !this.ringing) {
8563
8566
  this.ringingSubject.next(true);
8564
8567
  }
@@ -8796,6 +8799,7 @@ class Call {
8796
8799
  // otherwise we risk breaking the ICETrickle flow.
8797
8800
  yield this.assertCallJoined();
8798
8801
  if (!this.publisher) {
8802
+ this.logger('error', 'Trying to publish video before join is completed');
8799
8803
  throw new Error(`Call not joined yet.`);
8800
8804
  }
8801
8805
  const [videoTrack] = videoStream.getVideoTracks();
@@ -8820,6 +8824,7 @@ class Call {
8820
8824
  // otherwise we risk breaking the ICETrickle flow.
8821
8825
  yield this.assertCallJoined();
8822
8826
  if (!this.publisher) {
8827
+ this.logger('error', 'Trying to publish audio before join is completed');
8823
8828
  throw new Error(`Call not joined yet.`);
8824
8829
  }
8825
8830
  const [audioTrack] = audioStream.getAudioTracks();
@@ -8843,6 +8848,7 @@ class Call {
8843
8848
  // otherwise we risk breaking the ICETrickle flow.
8844
8849
  yield this.assertCallJoined();
8845
8850
  if (!this.publisher) {
8851
+ this.logger('error', 'Trying to publish screen share before join is completed');
8846
8852
  throw new Error(`Call not joined yet.`);
8847
8853
  }
8848
8854
  const [screenShareTrack] = screenShareStream.getVideoTracks();
@@ -9391,6 +9397,7 @@ class Call {
9391
9397
  const currentUserId = this.currentUserId;
9392
9398
  if (currentUserId &&
9393
9399
  metadata.blocked_user_ids.includes(currentUserId)) {
9400
+ this.logger('info', 'Leaving call bacause of being blocked');
9394
9401
  yield this.leave();
9395
9402
  }
9396
9403
  })),
@@ -10938,7 +10945,6 @@ class StreamClient {
10938
10945
  if (!(key in this.listeners)) {
10939
10946
  this.listeners[key] = [];
10940
10947
  }
10941
- this.logger('info', `Attaching listener for ${key} event`);
10942
10948
  this.listeners[key].push(callback);
10943
10949
  return () => {
10944
10950
  this.off(key, callback);
@@ -11098,7 +11104,7 @@ class StreamClient {
11098
11104
  }
11099
11105
  getUserAgent() {
11100
11106
  return (this.userAgent ||
11101
- `stream-video-javascript-client-${this.node ? 'node' : 'browser'}-${"0.0.24"}`);
11107
+ `stream-video-javascript-client-${this.node ? 'node' : 'browser'}-${"0.0.26"}`);
11102
11108
  }
11103
11109
  setUserAgent(userAgent) {
11104
11110
  this.userAgent = userAgent;
@@ -11409,6 +11415,7 @@ class StreamVideoClient {
11409
11415
  const callsToReWatch = this.writeableStateStore.calls
11410
11416
  .filter((call) => call.watching)
11411
11417
  .map((call) => call.cid);
11418
+ this.logger('info', `Rewatching calls after connection changed ${callsToReWatch.join(', ')}`);
11412
11419
  if (callsToReWatch.length > 0) {
11413
11420
  this.queryCalls({
11414
11421
  watch: true,
@@ -11430,6 +11437,7 @@ class StreamVideoClient {
11430
11437
  this.logger('warn', 'Received `call.created` sent by the current user');
11431
11438
  return;
11432
11439
  }
11440
+ this.logger('info', `New call created and registered: ${call.cid}`);
11433
11441
  this.writeableStateStore.registerCall(new Call({
11434
11442
  streamClient: this.streamClient,
11435
11443
  type: call.type,