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