@stream-io/video-client 0.0.19 → 0.0.21

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
@@ -11084,7 +11084,7 @@ class StreamClient {
11084
11084
  }
11085
11085
  getUserAgent() {
11086
11086
  return (this.userAgent ||
11087
- `stream-video-javascript-client-${this.node ? 'node' : 'browser'}-${"0.0.18"}`);
11087
+ `stream-video-javascript-client-${this.node ? 'node' : 'browser'}-${"0.0.20"}`);
11088
11088
  }
11089
11089
  setUserAgent(userAgent) {
11090
11090
  this.userAgent = userAgent;
@@ -11280,6 +11280,7 @@ class StreamVideoClient {
11280
11280
  * @param {string} push_provider the push provider name (eg. apn, firebase)
11281
11281
  * @param {string} push_provider_name user provided push provider name
11282
11282
  * @param {string} [userID] the user id (defaults to current user)
11283
+ * @param {boolean} [voip_token] enables use of VoIP token for push notifications on iOS platform
11283
11284
  */
11284
11285
  this.addDevice = (id, push_provider, push_provider_name, userID, voip_token) => __awaiter(this, void 0, void 0, function* () {
11285
11286
  return yield this.streamClient.post('/devices', Object.assign(Object.assign({ id,
@@ -11470,10 +11471,11 @@ class StreamVideoClient {
11470
11471
  }
11471
11472
  /**
11472
11473
  * createToken - Creates a token to authenticate this user. This function is used server side.
11473
- * The resulting token should be passed to the client side when the users registers or logs in.
11474
+ * The resulting token should be passed to the client side when the users register or logs in.
11474
11475
  *
11475
11476
  * @param {string} userID The User ID
11476
11477
  * @param {number} [exp] The expiration time for the token expressed in the number of seconds since the epoch
11478
+ * @param {number} [iat] The timestamp when a token has been issued
11477
11479
  * @param call_cids for anonymous tokens you have to provide the call cids the use can join
11478
11480
  *
11479
11481
  * @return {string} Returns a token
@@ -11729,6 +11731,11 @@ const disposeOfMediaStream = (stream) => {
11729
11731
  track.stop();
11730
11732
  stream.removeTrack(track);
11731
11733
  });
11734
+ // @ts-expect-error release() is present in react-native-webrtc and must be called to dispose the stream
11735
+ if (typeof stream.release === 'function') {
11736
+ // @ts-expect-error
11737
+ stream.release();
11738
+ }
11732
11739
  };
11733
11740
 
11734
11741
  const DETECTION_FREQUENCY_IN_MS = 500;