@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
@@ -37,9 +37,9 @@ const {
37
37
  /**
38
38
  * @ignore
39
39
  */
40
- HmsManager
40
+ HMSManager
41
41
  } = _reactNative.NativeModules;
42
- const HmsEventEmitter = new _reactNative.NativeEventEmitter(HmsManager);
42
+ const HmsEventEmitter = new _reactNative.NativeEventEmitter(HMSManager);
43
43
  let HmsSdk;
44
44
 
45
45
  class HMSSDK {
@@ -100,8 +100,14 @@ class HMSSDK {
100
100
  (0, _HMSLogger.setLogger)(hmsLogger, this.id);
101
101
  });
102
102
 
103
- _defineProperty(this, "destroy", () => {
103
+ _defineProperty(this, "destroy", async () => {
104
+ _HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function destroy', {
105
+ id: this.id
106
+ });
104
107
  this.removeListeners();
108
+ return await HMSManager.destroy({
109
+ id: this.id
110
+ });
105
111
  });
106
112
 
107
113
  _defineProperty(this, "attachPreviewListener", () => {
@@ -154,7 +160,7 @@ class HMSSDK {
154
160
  id: this.id
155
161
  });
156
162
  this.addAppStateListener();
157
- await HmsManager.join({ ...config,
163
+ await HMSManager.join({ ...config,
158
164
  id: this.id
159
165
  });
160
166
  });
@@ -164,7 +170,7 @@ class HMSSDK {
164
170
  config,
165
171
  id: this.id
166
172
  });
167
- HmsManager.preview({ ...config,
173
+ HMSManager.preview({ ...config,
168
174
  id: this.id
169
175
  });
170
176
  });
@@ -176,7 +182,7 @@ class HMSSDK {
176
182
  });
177
183
 
178
184
  if (_reactNative.Platform.OS === 'ios') {
179
- return await HmsManager.previewForRole({
185
+ return await HMSManager.previewForRole({
180
186
  role: role === null || role === void 0 ? void 0 : role.name,
181
187
  id: this.id
182
188
  });
@@ -214,7 +220,7 @@ class HMSSDK {
214
220
  const data = {
215
221
  id: this.id
216
222
  };
217
- const op = await HmsManager.leave(data);
223
+ const op = await HMSManager.leave(data);
218
224
  this.muteStatus = undefined;
219
225
  this.localPeer = undefined;
220
226
  this.remotePeers = undefined;
@@ -231,7 +237,7 @@ class HMSSDK {
231
237
  type: type || null,
232
238
  id: _this.id
233
239
  });
234
- return await HmsManager.sendBroadcastMessage({
240
+ return await HMSManager.sendBroadcastMessage({
235
241
  message,
236
242
  type: type || null,
237
243
  id: _this.id
@@ -246,7 +252,7 @@ class HMSSDK {
246
252
  id: _this.id,
247
253
  type: type || null
248
254
  });
249
- return await HmsManager.sendGroupMessage({
255
+ return await HMSManager.sendGroupMessage({
250
256
  message,
251
257
  roles: _HMSHelper.HMSHelper.getRoleNames(roles),
252
258
  id: _this.id,
@@ -262,7 +268,7 @@ class HMSSDK {
262
268
  id: _this.id,
263
269
  type: type || null
264
270
  });
265
- return await HmsManager.sendDirectMessage({
271
+ return await HMSManager.sendDirectMessage({
266
272
  message,
267
273
  peerId: peer.peerID,
268
274
  id: _this.id,
@@ -275,7 +281,7 @@ class HMSSDK {
275
281
  metadata,
276
282
  id: this.id
277
283
  });
278
- HmsManager.changeMetadata({
284
+ HMSManager.changeMetadata({
279
285
  metadata,
280
286
  id: this.id
281
287
  });
@@ -285,7 +291,7 @@ class HMSSDK {
285
291
  _HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function startRTMPOrRecording', { ...data,
286
292
  id: this.id
287
293
  });
288
- const op = await HmsManager.startRTMPOrRecording({ ...data,
294
+ const op = await HMSManager.startRTMPOrRecording({ ...data,
289
295
  id: this.id
290
296
  });
291
297
  return op;
@@ -293,7 +299,7 @@ class HMSSDK {
293
299
 
294
300
  _defineProperty(this, "stopRtmpAndRecording", async () => {
295
301
  _HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function stopRtmpAndRecording', {});
296
- const op = await HmsManager.stopRtmpAndRecording({
302
+ const op = await HMSManager.stopRtmpAndRecording({
297
303
  id: this.id
298
304
  });
299
305
  return op;
@@ -303,14 +309,14 @@ class HMSSDK {
303
309
  _HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function startHLSStreaming', { ...data,
304
310
  id: this.id
305
311
  });
306
- return await HmsManager.startHLSStreaming({ ...data,
312
+ return await HMSManager.startHLSStreaming({ ...data,
307
313
  id: this.id
308
314
  });
309
315
  });
310
316
 
311
317
  _defineProperty(this, "stopHLSStreaming", async () => {
312
318
  _HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function stopHLSStreaming', {});
313
- return await HmsManager.stopHLSStreaming({
319
+ return await HMSManager.stopHLSStreaming({
314
320
  id: this.id
315
321
  });
316
322
  });
@@ -324,7 +330,7 @@ class HMSSDK {
324
330
  id: _this.id
325
331
  };
326
332
  _HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function changeRole', data);
327
- return await HmsManager.changeRole(data);
333
+ return await HMSManager.changeRole(data);
328
334
  });
329
335
 
330
336
  _defineProperty(this, "changeTrackState", async (track, mute) => {
@@ -338,7 +344,7 @@ class HMSSDK {
338
344
  mute,
339
345
  id: this.id
340
346
  };
341
- return await HmsManager.changeTrackState(data);
347
+ return await HMSManager.changeTrackState(data);
342
348
  });
343
349
 
344
350
  _defineProperty(this, "changeTrackStateForRoles", async (mute, type, source, roles) => {
@@ -362,7 +368,7 @@ class HMSSDK {
362
368
  roles: roleNames,
363
369
  id: this.id
364
370
  };
365
- return await HmsManager.changeTrackStateForRoles(data);
371
+ return await HMSManager.changeTrackStateForRoles(data);
366
372
  });
367
373
 
368
374
  _defineProperty(this, "removePeer", async (peer, reason) => {
@@ -376,7 +382,7 @@ class HMSSDK {
376
382
  reason,
377
383
  id: this.id
378
384
  };
379
- return await HmsManager.removePeer(data);
385
+ return await HMSManager.removePeer(data);
380
386
  });
381
387
 
382
388
  _defineProperty(this, "endRoom", async function (reason) {
@@ -391,7 +397,7 @@ class HMSSDK {
391
397
  reason,
392
398
  id: _this.id
393
399
  };
394
- return await HmsManager.endRoom(data);
400
+ return await HMSManager.endRoom(data);
395
401
  });
396
402
 
397
403
  _defineProperty(this, "changeName", async name => {
@@ -403,14 +409,14 @@ class HMSSDK {
403
409
  name,
404
410
  id: this.id
405
411
  };
406
- return await HmsManager.changeName(data);
412
+ return await HMSManager.changeName(data);
407
413
  });
408
414
 
409
415
  _defineProperty(this, "acceptRoleChange", async () => {
410
416
  _HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function acceptRoleChange', {
411
417
  id: this.id
412
418
  });
413
- return await HmsManager.acceptRoleChange({
419
+ return await HMSManager.acceptRoleChange({
414
420
  id: this.id
415
421
  });
416
422
  });
@@ -421,7 +427,7 @@ class HMSSDK {
421
427
  id: this.id
422
428
  });
423
429
  this.muteStatus = mute;
424
- HmsManager.setPlaybackForAllAudio({
430
+ HMSManager.setPlaybackForAllAudio({
425
431
  mute,
426
432
  id: this.id
427
433
  });
@@ -431,7 +437,7 @@ class HMSSDK {
431
437
  _HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function remoteMuteAllAudio', {
432
438
  id: this.id
433
439
  });
434
- HmsManager.remoteMuteAllAudio({
440
+ HMSManager.remoteMuteAllAudio({
435
441
  id: this.id
436
442
  });
437
443
  });
@@ -443,7 +449,7 @@ class HMSSDK {
443
449
  roomID: (_this$room = this.room) === null || _this$room === void 0 ? void 0 : _this$room.id,
444
450
  id: this.id
445
451
  });
446
- const hmsRoom = await HmsManager.getRoom({
452
+ const hmsRoom = await HMSManager.getRoom({
447
453
  id: this.id
448
454
  });
449
455
 
@@ -458,7 +464,7 @@ class HMSSDK {
458
464
  volume,
459
465
  id: this.id
460
466
  });
461
- HmsManager.setVolume({
467
+ HMSManager.setVolume({
462
468
  id: this.id,
463
469
  trackId: track.trackId,
464
470
  volume
@@ -469,7 +475,7 @@ class HMSSDK {
469
475
  _HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function resetVolume', {
470
476
  id: this.id
471
477
  });
472
- if (_reactNative.Platform.OS === 'android') HmsManager.resetVolume({
478
+ if (_reactNative.Platform.OS === 'android') HMSManager.resetVolume({
473
479
  id: this.id
474
480
  });
475
481
  });
@@ -491,7 +497,7 @@ class HMSSDK {
491
497
  });
492
498
 
493
499
  if (_reactNative.Platform.OS === 'android') {
494
- return await HmsManager.startScreenshare({
500
+ return await HMSManager.startScreenshare({
495
501
  id: this.id
496
502
  });
497
503
  } else {
@@ -506,7 +512,7 @@ class HMSSDK {
506
512
  });
507
513
 
508
514
  if (_reactNative.Platform.OS === 'android') {
509
- return await HmsManager.isScreenShared({
515
+ return await HMSManager.isScreenShared({
510
516
  id: this.id
511
517
  });
512
518
  } else {
@@ -521,7 +527,7 @@ class HMSSDK {
521
527
  });
522
528
 
523
529
  if (_reactNative.Platform.OS === 'android') {
524
- return await HmsManager.stopScreenshare({
530
+ return await HMSManager.stopScreenshare({
525
531
  id: this.id
526
532
  });
527
533
  } else {
@@ -536,7 +542,7 @@ class HMSSDK {
536
542
  });
537
543
 
538
544
  if (_reactNative.Platform.OS === 'ios') {
539
- HmsManager.enableRTCStats({
545
+ HMSManager.enableRTCStats({
540
546
  id: this.id
541
547
  });
542
548
  } else {
@@ -550,7 +556,7 @@ class HMSSDK {
550
556
  });
551
557
 
552
558
  if (_reactNative.Platform.OS === 'ios') {
553
- HmsManager.disableRTCStats({
559
+ HMSManager.disableRTCStats({
554
560
  id: this.id
555
561
  });
556
562
  } else {
@@ -1145,7 +1151,7 @@ class HMSSDK {
1145
1151
 
1146
1152
 
1147
1153
  static async build(params) {
1148
- let id = await HmsManager.build((params === null || params === void 0 ? void 0 : params.trackSettings) || {});
1154
+ let id = await HMSManager.build((params === null || params === void 0 ? void 0 : params.trackSettings) || {});
1149
1155
  HmsSdk = new HMSSDK(id);
1150
1156
  HmsSdk.attachPreviewListener();
1151
1157
  HmsSdk.attachListeners();