@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.
@@ -106,6 +106,7 @@ export declare class StreamVideoClient {
106
106
  * @param {string} push_provider the push provider name (eg. apn, firebase)
107
107
  * @param {string} push_provider_name user provided push provider name
108
108
  * @param {string} [userID] the user id (defaults to current user)
109
+ * @param {boolean} [voip_token] enables use of VoIP token for push notifications on iOS platform
109
110
  */
110
111
  addDevice: (id: string, push_provider: string, push_provider_name?: string, userID?: string, voip_token?: boolean) => Promise<CreateDeviceRequest>;
111
112
  /**
@@ -132,10 +133,11 @@ export declare class StreamVideoClient {
132
133
  removeDevice: (id: string, userID?: string) => Promise<unknown>;
133
134
  /**
134
135
  * createToken - Creates a token to authenticate this user. This function is used server side.
135
- * The resulting token should be passed to the client side when the users registers or logs in.
136
+ * The resulting token should be passed to the client side when the users register or logs in.
136
137
  *
137
138
  * @param {string} userID The User ID
138
139
  * @param {number} [exp] The expiration time for the token expressed in the number of seconds since the epoch
140
+ * @param {number} [iat] The timestamp when a token has been issued
139
141
  * @param call_cids for anonymous tokens you have to provide the call cids the use can join
140
142
  *
141
143
  * @return {string} Returns a token
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stream-io/video-client",
3
- "version": "0.0.19",
3
+ "version": "0.0.21",
4
4
  "packageManager": "yarn@3.2.4",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.es.js",
@@ -393,6 +393,7 @@ export class StreamVideoClient {
393
393
  * @param {string} push_provider the push provider name (eg. apn, firebase)
394
394
  * @param {string} push_provider_name user provided push provider name
395
395
  * @param {string} [userID] the user id (defaults to current user)
396
+ * @param {boolean} [voip_token] enables use of VoIP token for push notifications on iOS platform
396
397
  */
397
398
  addDevice = async (
398
399
  id: string,
@@ -460,10 +461,11 @@ export class StreamVideoClient {
460
461
 
461
462
  /**
462
463
  * createToken - Creates a token to authenticate this user. This function is used server side.
463
- * The resulting token should be passed to the client side when the users registers or logs in.
464
+ * The resulting token should be passed to the client side when the users register or logs in.
464
465
  *
465
466
  * @param {string} userID The User ID
466
467
  * @param {number} [exp] The expiration time for the token expressed in the number of seconds since the epoch
468
+ * @param {number} [iat] The timestamp when a token has been issued
467
469
  * @param call_cids for anonymous tokens you have to provide the call cids the use can join
468
470
  *
469
471
  * @return {string} Returns a token
@@ -342,4 +342,9 @@ export const disposeOfMediaStream = (stream: MediaStream) => {
342
342
  track.stop();
343
343
  stream.removeTrack(track);
344
344
  });
345
+ // @ts-expect-error release() is present in react-native-webrtc and must be called to dispose the stream
346
+ if (typeof stream.release === 'function') {
347
+ // @ts-expect-error
348
+ stream.release();
349
+ }
345
350
  };