@100mslive/react-native-hms 1.6.1 → 1.6.2

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.
@@ -3,12 +3,14 @@ import type { HMSMessageType } from './HMSMessageType';
3
3
  import type { HMSPeer } from './HMSPeer';
4
4
  export declare class HMSMessage {
5
5
  message: string;
6
+ messageId: string;
6
7
  type: HMSMessageType;
7
8
  time: Date;
8
9
  sender?: HMSPeer;
9
10
  recipient: HMSMessageRecipient;
10
11
  constructor(params: {
11
12
  message: string;
13
+ messageId: string;
12
14
  type: HMSMessageType;
13
15
  time: Date;
14
16
  sender?: HMSPeer;
@@ -152,7 +152,9 @@ export declare class HMSSDK {
152
152
  * @param {message: string} and @param {type: string}
153
153
  * @memberof HMSSDK
154
154
  */
155
- sendBroadcastMessage: (message: string, type?: HMSMessageType) => Promise<any>;
155
+ sendBroadcastMessage: (message: string, type?: HMSMessageType) => Promise<{
156
+ messageId: string | undefined;
157
+ }>;
156
158
  /**
157
159
  * - sendGroupMessage sends a message to specific set of roles, whoever has any of those role in room
158
160
  * will get the message in onMessage listener.
@@ -161,7 +163,9 @@ export declare class HMSSDK {
161
163
  *
162
164
  * @memberof HMSSDK
163
165
  */
164
- sendGroupMessage: (message: string, roles: HMSRole[], type?: HMSMessageType) => Promise<any>;
166
+ sendGroupMessage: (message: string, roles: HMSRole[], type?: HMSMessageType) => Promise<{
167
+ messageId: string | undefined;
168
+ }>;
165
169
  /**
166
170
  * - sendDirectMessage sends a private message to a single peer, only that peer will get the message
167
171
  * in onMessage Listener.
@@ -170,7 +174,9 @@ export declare class HMSSDK {
170
174
  *
171
175
  * @memberof HMSSDK
172
176
  */
173
- sendDirectMessage: (message: string, peer: HMSPeer, type?: HMSMessageType) => Promise<any>;
177
+ sendDirectMessage: (message: string, peer: HMSPeer, type?: HMSMessageType) => Promise<{
178
+ messageId: string | undefined;
179
+ }>;
174
180
  /**
175
181
  * - changeMetadata changes a specific field in localPeer which is [metadata] it is a string that can
176
182
  * be used for various functionalities like raiseHand, beRightBack and many more that explains the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@100mslive/react-native-hms",
3
- "version": "1.6.1",
3
+ "version": "1.6.2",
4
4
  "description": "Integrate Real Time Audio and Video conferencing, Interactive Live Streaming, and Chat in your apps with 100ms React Native SDK. With support for HLS and RTMP Live Streaming and Recording, Picture-in-Picture (PiP), one-to-one Video Call Modes, Audio Rooms, Video Player and much more, add immersive real-time communications to your apps.",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -30,7 +30,8 @@
30
30
  "release": "release-it",
31
31
  "example": "yarn --cwd example",
32
32
  "pods": "cd example && pod-install --quiet",
33
- "bootstrap": "yarn example && yarn && yarn pods"
33
+ "bootstrap": "yarn example && yarn && yarn pods",
34
+ "typedoc": "npx typedoc src/index.ts --excludePrivate --excludeProtected --excludeInternal"
34
35
  },
35
36
  "keywords": [
36
37
  "react-native",
@@ -112,10 +113,11 @@
112
113
  "husky": "^4.2.5",
113
114
  "jest": "^26.0.1",
114
115
  "prettier": "^2.0.5",
115
- "react-native-builder-bob": "^0.18.0",
116
- "typescript": "^4.6.3",
117
116
  "react": "17.0.1",
118
- "react-native": "0.64.4"
117
+ "react-native": "0.64.4",
118
+ "react-native-builder-bob": "^0.18.0",
119
+ "typedoc": "^0.24.7",
120
+ "typescript": "^4.6.3"
119
121
  },
120
122
  "peerDependencies": {
121
123
  "react": "*",
package/sdk-versions.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "ios": "0.9.4",
3
3
  "iOSBroadcastExtension": "0.0.9",
4
- "android": "2.6.3"
4
+ "android": "2.6.4"
5
5
  }
@@ -528,6 +528,7 @@ export class HMSEncoder {
528
528
  if (data) {
529
529
  return new HMSMessage({
530
530
  message: data?.message,
531
+ messageId: data?.messageId,
531
532
  type: data?.type,
532
533
  time: new Date(parseInt(data?.time)),
533
534
  sender: this.encodeHmsPeer(data?.sender),
@@ -3,8 +3,8 @@ import type { HMSMessageType } from './HMSMessageType';
3
3
  import type { HMSPeer } from './HMSPeer';
4
4
 
5
5
  export class HMSMessage {
6
- // endpoint: string;
7
6
  public message: string;
7
+ public messageId: string;
8
8
  public type: HMSMessageType;
9
9
  public time: Date;
10
10
  public sender?: HMSPeer;
@@ -12,12 +12,14 @@ export class HMSMessage {
12
12
 
13
13
  constructor(params: {
14
14
  message: string;
15
+ messageId: string;
15
16
  type: HMSMessageType;
16
17
  time: Date;
17
18
  sender?: HMSPeer;
18
19
  recipient: HMSMessageRecipient;
19
20
  }) {
20
21
  this.message = params.message;
22
+ this.messageId = params.messageId;
21
23
  this.type = params.type;
22
24
  this.time = params.time;
23
25
  this.sender = params.sender;
@@ -314,11 +314,14 @@ export class HMSSDK {
314
314
  type: type || null,
315
315
  id: this.id,
316
316
  });
317
- return await HMSManager.sendBroadcastMessage({
318
- message,
319
- type: type || null,
320
- id: this.id,
321
- });
317
+ const data: { messageId: string | undefined } =
318
+ await HMSManager.sendBroadcastMessage({
319
+ message,
320
+ type: type || null,
321
+ id: this.id,
322
+ });
323
+
324
+ return data;
322
325
  };
323
326
 
324
327
  /**
@@ -340,12 +343,15 @@ export class HMSSDK {
340
343
  id: this.id,
341
344
  type: type || null,
342
345
  });
343
- return await HMSManager.sendGroupMessage({
344
- message,
345
- roles: HMSHelper.getRoleNames(roles),
346
- id: this.id,
347
- type: type || null,
348
- });
346
+ const data: { messageId: string | undefined } =
347
+ await HMSManager.sendGroupMessage({
348
+ message,
349
+ roles: HMSHelper.getRoleNames(roles),
350
+ id: this.id,
351
+ type: type || null,
352
+ });
353
+
354
+ return data;
349
355
  };
350
356
 
351
357
  /**
@@ -367,12 +373,15 @@ export class HMSSDK {
367
373
  id: this.id,
368
374
  type: type || null,
369
375
  });
370
- return await HMSManager.sendDirectMessage({
371
- message,
372
- peerId: peer.peerID,
373
- id: this.id,
374
- type: type || null,
375
- });
376
+ const data: { messageId: string | undefined } =
377
+ await HMSManager.sendDirectMessage({
378
+ message,
379
+ peerId: peer.peerID,
380
+ id: this.id,
381
+ type: type || null,
382
+ });
383
+
384
+ return data;
376
385
  };
377
386
 
378
387
  /**