@100mslive/react-native-hms 0.9.5 → 0.9.6

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.
Files changed (95) hide show
  1. package/android/.gradle/6.9/fileHashes/fileHashes.lock +0 -0
  2. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  3. package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
  4. package/android/.gradle/checksums/checksums.lock +0 -0
  5. package/android/build.gradle +1 -1
  6. package/android/src/main/java/com/reactnativehmssdk/{HmsDecoder.kt → HMSDecoder.kt} +38 -34
  7. package/android/src/main/java/com/reactnativehmssdk/{HmsHelper.kt → HMSHelper.kt} +38 -5
  8. package/android/src/main/java/com/reactnativehmssdk/{HmsModule.kt → HMSManager.kt} +51 -41
  9. package/android/src/main/java/com/reactnativehmssdk/{HmsSDK.kt → HMSRNSDK.kt} +171 -158
  10. package/android/src/main/java/com/reactnativehmssdk/{HmssdkViewManager.kt → HMSSDKViewManager.kt} +11 -11
  11. package/android/src/main/java/com/reactnativehmssdk/{HmsView.kt → HMSView.kt} +3 -3
  12. package/android/src/main/java/com/reactnativehmssdk/HmsScreenshareActivity.kt +17 -18
  13. package/android/src/main/java/com/reactnativehmssdk/HmssdkPackage.kt +2 -2
  14. package/ios/{HmsDecoder.swift → HMSDecoder.swift} +26 -25
  15. package/ios/{HmsHelper.swift → HMSHelper.swift} +13 -7
  16. package/ios/{HmsManager.m → HMSManager.m} +2 -1
  17. package/ios/{HmsManager.swift → HMSManager.swift} +46 -38
  18. package/ios/{HmsSDK.swift → HMSRNSDK.swift} +127 -127
  19. package/ios/{HmsView.m → HMSView.m} +1 -1
  20. package/ios/{HmsView.swift → HMSView.swift} +7 -6
  21. package/lib/commonjs/classes/HMSBrowserRecordingState.js.map +1 -1
  22. package/lib/commonjs/classes/HMSEncoder.js +1 -0
  23. package/lib/commonjs/classes/HMSEncoder.js.map +1 -1
  24. package/lib/commonjs/classes/HMSLocalAudioTrack.js +3 -3
  25. package/lib/commonjs/classes/HMSLocalAudioTrack.js.map +1 -1
  26. package/lib/commonjs/classes/HMSLocalVideoTrack.js +3 -3
  27. package/lib/commonjs/classes/HMSLocalVideoTrack.js.map +1 -1
  28. package/lib/commonjs/classes/HMSLogger.js.map +1 -1
  29. package/lib/commonjs/classes/HMSRemoteAudioTrack.js +3 -3
  30. package/lib/commonjs/classes/HMSRemoteAudioTrack.js.map +1 -1
  31. package/lib/commonjs/classes/HMSRemoteVideoTrack.js +3 -3
  32. package/lib/commonjs/classes/HMSRemoteVideoTrack.js.map +1 -1
  33. package/lib/commonjs/classes/HMSRoom.js +3 -0
  34. package/lib/commonjs/classes/HMSRoom.js.map +1 -1
  35. package/lib/commonjs/classes/HMSRoomUpdate.js +1 -3
  36. package/lib/commonjs/classes/HMSRoomUpdate.js.map +1 -1
  37. package/lib/commonjs/classes/HMSRtmpStreamingState.js.map +1 -1
  38. package/lib/commonjs/classes/HMSSDK.js +39 -33
  39. package/lib/commonjs/classes/HMSSDK.js.map +1 -1
  40. package/lib/commonjs/classes/HMSServerRecordingState.js.map +1 -1
  41. package/lib/commonjs/classes/HMSTrackSource.js +15 -0
  42. package/lib/commonjs/classes/HMSTrackSource.js.map +1 -0
  43. package/lib/commonjs/classes/HmsView.js +2 -2
  44. package/lib/commonjs/classes/HmsView.js.map +1 -1
  45. package/lib/commonjs/index.js +14 -0
  46. package/lib/commonjs/index.js.map +1 -1
  47. package/lib/module/classes/HMSBrowserRecordingState.js.map +1 -1
  48. package/lib/module/classes/HMSEncoder.js +1 -0
  49. package/lib/module/classes/HMSEncoder.js.map +1 -1
  50. package/lib/module/classes/HMSLocalAudioTrack.js +3 -3
  51. package/lib/module/classes/HMSLocalAudioTrack.js.map +1 -1
  52. package/lib/module/classes/HMSLocalVideoTrack.js +3 -3
  53. package/lib/module/classes/HMSLocalVideoTrack.js.map +1 -1
  54. package/lib/module/classes/HMSRemoteAudioTrack.js +3 -3
  55. package/lib/module/classes/HMSRemoteAudioTrack.js.map +1 -1
  56. package/lib/module/classes/HMSRemoteVideoTrack.js +3 -3
  57. package/lib/module/classes/HMSRemoteVideoTrack.js.map +1 -1
  58. package/lib/module/classes/HMSRoom.js +3 -0
  59. package/lib/module/classes/HMSRoom.js.map +1 -1
  60. package/lib/module/classes/HMSRoomUpdate.js +1 -3
  61. package/lib/module/classes/HMSRoomUpdate.js.map +1 -1
  62. package/lib/module/classes/HMSRtmpStreamingState.js.map +1 -1
  63. package/lib/module/classes/HMSSDK.js +39 -33
  64. package/lib/module/classes/HMSSDK.js.map +1 -1
  65. package/lib/module/classes/HMSServerRecordingState.js.map +1 -1
  66. package/lib/module/classes/HMSTrackSource.js +8 -0
  67. package/lib/module/classes/HMSTrackSource.js.map +1 -0
  68. package/lib/module/classes/HmsView.js +2 -2
  69. package/lib/module/classes/HmsView.js.map +1 -1
  70. package/lib/module/index.js +1 -0
  71. package/lib/module/index.js.map +1 -1
  72. package/lib/typescript/classes/HMSBrowserRecordingState.d.ts +2 -2
  73. package/lib/typescript/classes/HMSRoom.d.ts +2 -0
  74. package/lib/typescript/classes/HMSRoomUpdate.d.ts +1 -3
  75. package/lib/typescript/classes/HMSRtmpStreamingState.d.ts +2 -2
  76. package/lib/typescript/classes/HMSSDK.d.ts +2 -2
  77. package/lib/typescript/classes/HMSServerRecordingState.d.ts +2 -2
  78. package/lib/typescript/classes/HMSTrackSource.d.ts +5 -0
  79. package/lib/typescript/index.d.ts +1 -0
  80. package/package.json +1 -1
  81. package/react-native-hms.podspec +2 -2
  82. package/src/classes/HMSBrowserRecordingState.ts +2 -2
  83. package/src/classes/HMSEncoder.ts +1 -0
  84. package/src/classes/HMSLocalAudioTrack.ts +3 -3
  85. package/src/classes/HMSLocalVideoTrack.ts +3 -3
  86. package/src/classes/HMSRemoteAudioTrack.ts +3 -3
  87. package/src/classes/HMSRemoteVideoTrack.ts +3 -3
  88. package/src/classes/HMSRoom.ts +3 -0
  89. package/src/classes/HMSRoomUpdate.ts +1 -3
  90. package/src/classes/HMSRtmpStreamingState.ts +2 -2
  91. package/src/classes/HMSSDK.tsx +35 -33
  92. package/src/classes/HMSServerRecordingState.ts +2 -2
  93. package/src/classes/HMSTrackSource.ts +5 -0
  94. package/src/classes/HmsView.tsx +2 -2
  95. package/src/index.ts +1 -0
@@ -16,9 +16,9 @@ const {
16
16
  /**
17
17
  * @ignore
18
18
  */
19
- HmsManager
19
+ HMSManager
20
20
  } = NativeModules;
21
- const HmsEventEmitter = new NativeEventEmitter(HmsManager);
21
+ const HmsEventEmitter = new NativeEventEmitter(HMSManager);
22
22
  let HmsSdk;
23
23
  export class HMSSDK {
24
24
  constructor(id) {
@@ -78,8 +78,14 @@ export class HMSSDK {
78
78
  setLogger(hmsLogger, this.id);
79
79
  });
80
80
 
81
- _defineProperty(this, "destroy", () => {
81
+ _defineProperty(this, "destroy", async () => {
82
+ logger === null || logger === void 0 ? void 0 : logger.verbose('#Function destroy', {
83
+ id: this.id
84
+ });
82
85
  this.removeListeners();
86
+ return await HMSManager.destroy({
87
+ id: this.id
88
+ });
83
89
  });
84
90
 
85
91
  _defineProperty(this, "attachPreviewListener", () => {
@@ -132,7 +138,7 @@ export class HMSSDK {
132
138
  id: this.id
133
139
  });
134
140
  this.addAppStateListener();
135
- await HmsManager.join({ ...config,
141
+ await HMSManager.join({ ...config,
136
142
  id: this.id
137
143
  });
138
144
  });
@@ -142,7 +148,7 @@ export class HMSSDK {
142
148
  config,
143
149
  id: this.id
144
150
  });
145
- HmsManager.preview({ ...config,
151
+ HMSManager.preview({ ...config,
146
152
  id: this.id
147
153
  });
148
154
  });
@@ -154,7 +160,7 @@ export class HMSSDK {
154
160
  });
155
161
 
156
162
  if (Platform.OS === 'ios') {
157
- return await HmsManager.previewForRole({
163
+ return await HMSManager.previewForRole({
158
164
  role: role === null || role === void 0 ? void 0 : role.name,
159
165
  id: this.id
160
166
  });
@@ -192,7 +198,7 @@ export class HMSSDK {
192
198
  const data = {
193
199
  id: this.id
194
200
  };
195
- const op = await HmsManager.leave(data);
201
+ const op = await HMSManager.leave(data);
196
202
  this.muteStatus = undefined;
197
203
  this.localPeer = undefined;
198
204
  this.remotePeers = undefined;
@@ -209,7 +215,7 @@ export class HMSSDK {
209
215
  type: type || null,
210
216
  id: _this.id
211
217
  });
212
- return await HmsManager.sendBroadcastMessage({
218
+ return await HMSManager.sendBroadcastMessage({
213
219
  message,
214
220
  type: type || null,
215
221
  id: _this.id
@@ -224,7 +230,7 @@ export class HMSSDK {
224
230
  id: _this.id,
225
231
  type: type || null
226
232
  });
227
- return await HmsManager.sendGroupMessage({
233
+ return await HMSManager.sendGroupMessage({
228
234
  message,
229
235
  roles: HMSHelper.getRoleNames(roles),
230
236
  id: _this.id,
@@ -240,7 +246,7 @@ export class HMSSDK {
240
246
  id: _this.id,
241
247
  type: type || null
242
248
  });
243
- return await HmsManager.sendDirectMessage({
249
+ return await HMSManager.sendDirectMessage({
244
250
  message,
245
251
  peerId: peer.peerID,
246
252
  id: _this.id,
@@ -253,7 +259,7 @@ export class HMSSDK {
253
259
  metadata,
254
260
  id: this.id
255
261
  });
256
- HmsManager.changeMetadata({
262
+ HMSManager.changeMetadata({
257
263
  metadata,
258
264
  id: this.id
259
265
  });
@@ -263,7 +269,7 @@ export class HMSSDK {
263
269
  logger === null || logger === void 0 ? void 0 : logger.verbose('#Function startRTMPOrRecording', { ...data,
264
270
  id: this.id
265
271
  });
266
- const op = await HmsManager.startRTMPOrRecording({ ...data,
272
+ const op = await HMSManager.startRTMPOrRecording({ ...data,
267
273
  id: this.id
268
274
  });
269
275
  return op;
@@ -271,7 +277,7 @@ export class HMSSDK {
271
277
 
272
278
  _defineProperty(this, "stopRtmpAndRecording", async () => {
273
279
  logger === null || logger === void 0 ? void 0 : logger.verbose('#Function stopRtmpAndRecording', {});
274
- const op = await HmsManager.stopRtmpAndRecording({
280
+ const op = await HMSManager.stopRtmpAndRecording({
275
281
  id: this.id
276
282
  });
277
283
  return op;
@@ -281,14 +287,14 @@ export class HMSSDK {
281
287
  logger === null || logger === void 0 ? void 0 : logger.verbose('#Function startHLSStreaming', { ...data,
282
288
  id: this.id
283
289
  });
284
- return await HmsManager.startHLSStreaming({ ...data,
290
+ return await HMSManager.startHLSStreaming({ ...data,
285
291
  id: this.id
286
292
  });
287
293
  });
288
294
 
289
295
  _defineProperty(this, "stopHLSStreaming", async () => {
290
296
  logger === null || logger === void 0 ? void 0 : logger.verbose('#Function stopHLSStreaming', {});
291
- return await HmsManager.stopHLSStreaming({
297
+ return await HMSManager.stopHLSStreaming({
292
298
  id: this.id
293
299
  });
294
300
  });
@@ -302,7 +308,7 @@ export class HMSSDK {
302
308
  id: _this.id
303
309
  };
304
310
  logger === null || logger === void 0 ? void 0 : logger.verbose('#Function changeRole', data);
305
- return await HmsManager.changeRole(data);
311
+ return await HMSManager.changeRole(data);
306
312
  });
307
313
 
308
314
  _defineProperty(this, "changeTrackState", async (track, mute) => {
@@ -316,7 +322,7 @@ export class HMSSDK {
316
322
  mute,
317
323
  id: this.id
318
324
  };
319
- return await HmsManager.changeTrackState(data);
325
+ return await HMSManager.changeTrackState(data);
320
326
  });
321
327
 
322
328
  _defineProperty(this, "changeTrackStateForRoles", async (mute, type, source, roles) => {
@@ -340,7 +346,7 @@ export class HMSSDK {
340
346
  roles: roleNames,
341
347
  id: this.id
342
348
  };
343
- return await HmsManager.changeTrackStateForRoles(data);
349
+ return await HMSManager.changeTrackStateForRoles(data);
344
350
  });
345
351
 
346
352
  _defineProperty(this, "removePeer", async (peer, reason) => {
@@ -354,7 +360,7 @@ export class HMSSDK {
354
360
  reason,
355
361
  id: this.id
356
362
  };
357
- return await HmsManager.removePeer(data);
363
+ return await HMSManager.removePeer(data);
358
364
  });
359
365
 
360
366
  _defineProperty(this, "endRoom", async function (reason) {
@@ -369,7 +375,7 @@ export class HMSSDK {
369
375
  reason,
370
376
  id: _this.id
371
377
  };
372
- return await HmsManager.endRoom(data);
378
+ return await HMSManager.endRoom(data);
373
379
  });
374
380
 
375
381
  _defineProperty(this, "changeName", async name => {
@@ -381,14 +387,14 @@ export class HMSSDK {
381
387
  name,
382
388
  id: this.id
383
389
  };
384
- return await HmsManager.changeName(data);
390
+ return await HMSManager.changeName(data);
385
391
  });
386
392
 
387
393
  _defineProperty(this, "acceptRoleChange", async () => {
388
394
  logger === null || logger === void 0 ? void 0 : logger.verbose('#Function acceptRoleChange', {
389
395
  id: this.id
390
396
  });
391
- return await HmsManager.acceptRoleChange({
397
+ return await HMSManager.acceptRoleChange({
392
398
  id: this.id
393
399
  });
394
400
  });
@@ -399,7 +405,7 @@ export class HMSSDK {
399
405
  id: this.id
400
406
  });
401
407
  this.muteStatus = mute;
402
- HmsManager.setPlaybackForAllAudio({
408
+ HMSManager.setPlaybackForAllAudio({
403
409
  mute,
404
410
  id: this.id
405
411
  });
@@ -409,7 +415,7 @@ export class HMSSDK {
409
415
  logger === null || logger === void 0 ? void 0 : logger.verbose('#Function remoteMuteAllAudio', {
410
416
  id: this.id
411
417
  });
412
- HmsManager.remoteMuteAllAudio({
418
+ HMSManager.remoteMuteAllAudio({
413
419
  id: this.id
414
420
  });
415
421
  });
@@ -421,7 +427,7 @@ export class HMSSDK {
421
427
  roomID: (_this$room = this.room) === null || _this$room === void 0 ? void 0 : _this$room.id,
422
428
  id: this.id
423
429
  });
424
- const hmsRoom = await HmsManager.getRoom({
430
+ const hmsRoom = await HMSManager.getRoom({
425
431
  id: this.id
426
432
  });
427
433
  const encodedHmsRoom = HMSEncoder.encodeHmsRoom(hmsRoom, this.id);
@@ -434,7 +440,7 @@ export class HMSSDK {
434
440
  volume,
435
441
  id: this.id
436
442
  });
437
- HmsManager.setVolume({
443
+ HMSManager.setVolume({
438
444
  id: this.id,
439
445
  trackId: track.trackId,
440
446
  volume
@@ -445,7 +451,7 @@ export class HMSSDK {
445
451
  logger === null || logger === void 0 ? void 0 : logger.verbose('#Function resetVolume', {
446
452
  id: this.id
447
453
  });
448
- if (Platform.OS === 'android') HmsManager.resetVolume({
454
+ if (Platform.OS === 'android') HMSManager.resetVolume({
449
455
  id: this.id
450
456
  });
451
457
  });
@@ -467,7 +473,7 @@ export class HMSSDK {
467
473
  });
468
474
 
469
475
  if (Platform.OS === 'android') {
470
- return await HmsManager.startScreenshare({
476
+ return await HMSManager.startScreenshare({
471
477
  id: this.id
472
478
  });
473
479
  } else {
@@ -482,7 +488,7 @@ export class HMSSDK {
482
488
  });
483
489
 
484
490
  if (Platform.OS === 'android') {
485
- return await HmsManager.isScreenShared({
491
+ return await HMSManager.isScreenShared({
486
492
  id: this.id
487
493
  });
488
494
  } else {
@@ -497,7 +503,7 @@ export class HMSSDK {
497
503
  });
498
504
 
499
505
  if (Platform.OS === 'android') {
500
- return await HmsManager.stopScreenshare({
506
+ return await HMSManager.stopScreenshare({
501
507
  id: this.id
502
508
  });
503
509
  } else {
@@ -512,7 +518,7 @@ export class HMSSDK {
512
518
  });
513
519
 
514
520
  if (Platform.OS === 'ios') {
515
- HmsManager.enableRTCStats({
521
+ HMSManager.enableRTCStats({
516
522
  id: this.id
517
523
  });
518
524
  } else {
@@ -526,7 +532,7 @@ export class HMSSDK {
526
532
  });
527
533
 
528
534
  if (Platform.OS === 'ios') {
529
- HmsManager.disableRTCStats({
535
+ HMSManager.disableRTCStats({
530
536
  id: this.id
531
537
  });
532
538
  } else {
@@ -1088,7 +1094,7 @@ export class HMSSDK {
1088
1094
 
1089
1095
 
1090
1096
  static async build(params) {
1091
- let id = await HmsManager.build((params === null || params === void 0 ? void 0 : params.trackSettings) || {});
1097
+ let id = await HMSManager.build((params === null || params === void 0 ? void 0 : params.trackSettings) || {});
1092
1098
  HmsSdk = new HMSSDK(id);
1093
1099
  HmsSdk.attachPreviewListener();
1094
1100
  HmsSdk.attachListeners();