@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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@100mslive/react-native-hms",
3
- "version": "0.9.5",
3
+ "version": "0.9.6",
4
4
  "description": "The React Native package for 100ms SDK",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -10,11 +10,11 @@ Pod::Spec.new do |s|
10
10
  s.license = package["license"]
11
11
  s.authors = package["author"]
12
12
 
13
- s.platforms = { :ios => "10.0" }
13
+ s.platforms = { :ios => "12.0" }
14
14
  s.source = { :git => "https://github.com/100mslive/100ms-react-native.git", :tag => "#{s.version}" }
15
15
 
16
16
  s.source_files = "ios/**/*.{h,m,mm,swift}"
17
17
 
18
18
  s.dependency "React-Core"
19
- s.dependency "HMSSDK", "0.2.11"
19
+ s.dependency "HMSSDK", "0.3.1"
20
20
  end
@@ -2,13 +2,13 @@ import type { HMSException } from './HMSException';
2
2
 
3
3
  export class HMSBrowserRecordingState {
4
4
  running: string;
5
- error: HMSException;
5
+ error?: HMSException;
6
6
  startedAt: Date;
7
7
  stoppedAt: Date;
8
8
 
9
9
  constructor(params: {
10
10
  running: string;
11
- error: HMSException;
11
+ error?: HMSException;
12
12
  startedAt: Date;
13
13
  stoppedAt: Date;
14
14
  }) {
@@ -31,6 +31,7 @@ export class HMSEncoder {
31
31
  static encodeHmsRoom(room: HMSRoom, id: string) {
32
32
  const encodedObj = {
33
33
  id: room?.id,
34
+ sessionId: room?.sessionId,
34
35
  metaData: room?.metaData,
35
36
  name: room?.name,
36
37
  peerCount: room?.peerCount,
@@ -8,7 +8,7 @@ const {
8
8
  /**
9
9
  * @ignore
10
10
  */
11
- HmsManager,
11
+ HMSManager,
12
12
  } = NativeModules;
13
13
 
14
14
  export class HMSLocalAudioTrack extends HMSAudioTrack {
@@ -30,7 +30,7 @@ export class HMSLocalAudioTrack extends HMSAudioTrack {
30
30
  type: this.type,
31
31
  isMute,
32
32
  });
33
- HmsManager.setLocalMute({ isMute, id: this.id });
33
+ HMSManager.setLocalMute({ isMute, id: this.id });
34
34
  }
35
35
 
36
36
  getVolume = async () => {
@@ -44,7 +44,7 @@ export class HMSLocalAudioTrack extends HMSAudioTrack {
44
44
  if (Platform.OS === 'ios') {
45
45
  return 'This API not available for IOS';
46
46
  }
47
- const volume = await HmsManager.getVolume({
47
+ const volume = await HMSManager.getVolume({
48
48
  trackId: this.trackId,
49
49
  id: this.id,
50
50
  });
@@ -8,7 +8,7 @@ const {
8
8
  /**
9
9
  * @ignore
10
10
  */
11
- HmsManager,
11
+ HMSManager,
12
12
  } = NativeModules;
13
13
 
14
14
  export class HMSLocalVideoTrack extends HMSVideoTrack {
@@ -30,7 +30,7 @@ export class HMSLocalVideoTrack extends HMSVideoTrack {
30
30
  type: this.type,
31
31
  id: this.id,
32
32
  });
33
- HmsManager.switchCamera({ id: this.id });
33
+ HMSManager.switchCamera({ id: this.id });
34
34
  };
35
35
 
36
36
  /**
@@ -47,7 +47,7 @@ export class HMSLocalVideoTrack extends HMSVideoTrack {
47
47
  type: this.type,
48
48
  id: this.id,
49
49
  });
50
- HmsManager.setLocalVideoMute({ isMute, id: this.id });
50
+ HMSManager.setLocalVideoMute({ isMute, id: this.id });
51
51
  }
52
52
 
53
53
  constructor(params: {
@@ -7,7 +7,7 @@ const {
7
7
  /**
8
8
  * @ignore
9
9
  */
10
- HmsManager,
10
+ HMSManager,
11
11
  } = NativeModules;
12
12
 
13
13
  export class HMSRemoteAudioTrack extends HMSAudioTrack {
@@ -26,7 +26,7 @@ export class HMSRemoteAudioTrack extends HMSAudioTrack {
26
26
  type: this.type,
27
27
  playbackAllowed,
28
28
  });
29
- HmsManager.setPlaybackAllowed({
29
+ HMSManager.setPlaybackAllowed({
30
30
  id: this.id,
31
31
  trackId: this.trackId,
32
32
  playbackAllowed,
@@ -42,7 +42,7 @@ export class HMSRemoteAudioTrack extends HMSAudioTrack {
42
42
  source: this.source,
43
43
  type: this.type,
44
44
  });
45
- const val = await HmsManager.isPlaybackAllowed({
45
+ const val = await HMSManager.isPlaybackAllowed({
46
46
  id: this.id,
47
47
  trackId: this.trackId,
48
48
  });
@@ -7,7 +7,7 @@ const {
7
7
  /**
8
8
  * @ignore
9
9
  */
10
- HmsManager,
10
+ HMSManager,
11
11
  } = NativeModules;
12
12
 
13
13
  export class HMSRemoteVideoTrack extends HMSVideoTrack {
@@ -28,7 +28,7 @@ export class HMSRemoteVideoTrack extends HMSVideoTrack {
28
28
  type: this.type,
29
29
  playbackAllowed,
30
30
  });
31
- HmsManager.setPlaybackAllowed({
31
+ HMSManager.setPlaybackAllowed({
32
32
  id: this.id,
33
33
  trackId: this.trackId,
34
34
  playbackAllowed,
@@ -44,7 +44,7 @@ export class HMSRemoteVideoTrack extends HMSVideoTrack {
44
44
  source: this.source,
45
45
  type: this.type,
46
46
  });
47
- const val = await HmsManager.isPlaybackAllowed({
47
+ const val = await HMSManager.isPlaybackAllowed({
48
48
  id: this.id,
49
49
  trackId: this.trackId,
50
50
  });
@@ -7,6 +7,7 @@ import type { HMSHLSRecordingState } from './HMSHLSRecordingState';
7
7
 
8
8
  export class HMSRoom {
9
9
  id: string;
10
+ sessionId: string;
10
11
  name: string;
11
12
  metaData?: string;
12
13
  peers: HMSPeer[];
@@ -19,6 +20,7 @@ export class HMSRoom {
19
20
 
20
21
  constructor(params: {
21
22
  id: string;
23
+ sessionId: string;
22
24
  name: string;
23
25
  metaData?: string;
24
26
  peers: HMSPeer[];
@@ -30,6 +32,7 @@ export class HMSRoom {
30
32
  peerCount: number;
31
33
  }) {
32
34
  this.id = params.id;
35
+ this.sessionId = params.sessionId;
33
36
  this.name = params.name;
34
37
  this.metaData = params.metaData;
35
38
  this.peers = params.peers;
@@ -1,11 +1,9 @@
1
1
  export enum HMSRoomUpdate {
2
2
  ROOM_MUTED = 'ROOM_MUTED',
3
3
  ROOM_UNMUTED = 'ROOM_UNMUTED',
4
- ROOM_TYPE_CHANGED = 'ROOM_TYPE_CHANGED',
5
- META_DATA_CHANGED = 'META_DATA_CHANGED',
6
4
  SERVER_RECORDING_STATE_UPDATED = 'SERVER_RECORDING_STATE_UPDATED',
7
5
  RTMP_STREAMING_STATE_UPDATED = 'RTMP_STREAMING_STATE_UPDATED',
8
6
  BROWSER_RECORDING_STATE_UPDATED = 'BROWSER_RECORDING_STATE_UPDATED',
9
7
  HLS_STREAMING_STATE_UPDATED = 'HLS_STREAMING_STATE_UPDATED',
10
- ROOM_ID_UPDATED = 'ROOM_ID_UPDATED',
8
+ HLS_RECORDING_STATE_UPDATED = 'HLS_RECORDING_STATE_UPDATED',
11
9
  }
@@ -2,13 +2,13 @@ import type { HMSException } from './HMSException';
2
2
 
3
3
  export class HMSRtmpStreamingState {
4
4
  running: string;
5
- error: HMSException;
5
+ error?: HMSException;
6
6
  startedAt: Date;
7
7
  stoppedAt: Date;
8
8
 
9
9
  constructor(params: {
10
10
  running: string;
11
- error: HMSException;
11
+ error?: HMSException;
12
12
  startedAt: Date;
13
13
  stoppedAt: Date;
14
14
  }) {
@@ -42,10 +42,10 @@ const {
42
42
  /**
43
43
  * @ignore
44
44
  */
45
- HmsManager,
45
+ HMSManager,
46
46
  } = NativeModules;
47
47
 
48
- const HmsEventEmitter = new NativeEventEmitter(HmsManager);
48
+ const HmsEventEmitter = new NativeEventEmitter(HMSManager);
49
49
 
50
50
  let HmsSdk: HMSSDK | undefined;
51
51
 
@@ -90,7 +90,7 @@ export class HMSSDK {
90
90
  * @memberof HMSSDK
91
91
  */
92
92
  static async build(params?: { trackSettings: HMSTrackSettings }) {
93
- let id = await HmsManager.build(params?.trackSettings || {});
93
+ let id = await HMSManager.build(params?.trackSettings || {});
94
94
  HmsSdk = new HMSSDK(id);
95
95
  HmsSdk.attachPreviewListener();
96
96
  HmsSdk.attachListeners();
@@ -120,8 +120,10 @@ export class HMSSDK {
120
120
  *
121
121
  * @memberof HMSSDK
122
122
  */
123
- destroy = () => {
123
+ destroy = async () => {
124
+ logger?.verbose('#Function destroy', { id: this.id });
124
125
  this.removeListeners();
126
+ return await HMSManager.destroy({ id: this.id });
125
127
  };
126
128
 
127
129
  /**
@@ -333,7 +335,7 @@ export class HMSSDK {
333
335
  join = async (config: HMSConfig) => {
334
336
  logger?.verbose('#Function join', { config, id: this.id });
335
337
  this.addAppStateListener();
336
- await HmsManager.join({ ...config, id: this.id });
338
+ await HMSManager.join({ ...config, id: this.id });
337
339
  };
338
340
 
339
341
  /**
@@ -347,7 +349,7 @@ export class HMSSDK {
347
349
  */
348
350
  preview = (config: HMSConfig) => {
349
351
  logger?.verbose('#Function preview', { config, id: this.id });
350
- HmsManager.preview({ ...config, id: this.id });
352
+ HMSManager.preview({ ...config, id: this.id });
351
353
  };
352
354
 
353
355
  /**
@@ -367,7 +369,7 @@ export class HMSSDK {
367
369
  id: this.id,
368
370
  });
369
371
  if (Platform.OS === 'ios') {
370
- return await HmsManager.previewForRole({ role: role?.name, id: this.id });
372
+ return await HMSManager.previewForRole({ role: role?.name, id: this.id });
371
373
  } else {
372
374
  console.log('API currently not available for android');
373
375
  return 'API currently not available for android';
@@ -412,7 +414,7 @@ export class HMSSDK {
412
414
  id: this.id,
413
415
  };
414
416
 
415
- const op = await HmsManager.leave(data);
417
+ const op = await HMSManager.leave(data);
416
418
  this.muteStatus = undefined;
417
419
  this.localPeer = undefined;
418
420
  this.remotePeers = undefined;
@@ -436,7 +438,7 @@ export class HMSSDK {
436
438
  type: type || null,
437
439
  id: this.id,
438
440
  });
439
- return await HmsManager.sendBroadcastMessage({
441
+ return await HMSManager.sendBroadcastMessage({
440
442
  message,
441
443
  type: type || null,
442
444
  id: this.id,
@@ -462,7 +464,7 @@ export class HMSSDK {
462
464
  id: this.id,
463
465
  type: type || null,
464
466
  });
465
- return await HmsManager.sendGroupMessage({
467
+ return await HMSManager.sendGroupMessage({
466
468
  message,
467
469
  roles: HMSHelper.getRoleNames(roles),
468
470
  id: this.id,
@@ -489,7 +491,7 @@ export class HMSSDK {
489
491
  id: this.id,
490
492
  type: type || null,
491
493
  });
492
- return await HmsManager.sendDirectMessage({
494
+ return await HMSManager.sendDirectMessage({
493
495
  message,
494
496
  peerId: peer.peerID,
495
497
  id: this.id,
@@ -511,7 +513,7 @@ export class HMSSDK {
511
513
  */
512
514
  changeMetadata = (metadata: string) => {
513
515
  logger?.verbose('#Function changeMetadata', { metadata, id: this.id });
514
- HmsManager.changeMetadata({ metadata, id: this.id });
516
+ HMSManager.changeMetadata({ metadata, id: this.id });
515
517
  };
516
518
 
517
519
  /**
@@ -529,7 +531,7 @@ export class HMSSDK {
529
531
  id: this.id,
530
532
  });
531
533
 
532
- const op = await HmsManager.startRTMPOrRecording({ ...data, id: this.id });
534
+ const op = await HMSManager.startRTMPOrRecording({ ...data, id: this.id });
533
535
  return op;
534
536
  };
535
537
 
@@ -543,7 +545,7 @@ export class HMSSDK {
543
545
  */
544
546
  stopRtmpAndRecording = async () => {
545
547
  logger?.verbose('#Function stopRtmpAndRecording', {});
546
- const op = await HmsManager.stopRtmpAndRecording({ id: this.id });
548
+ const op = await HMSManager.stopRtmpAndRecording({ id: this.id });
547
549
  return op;
548
550
  };
549
551
 
@@ -561,7 +563,7 @@ export class HMSSDK {
561
563
  ...data,
562
564
  id: this.id,
563
565
  });
564
- return await HmsManager.startHLSStreaming({ ...data, id: this.id });
566
+ return await HMSManager.startHLSStreaming({ ...data, id: this.id });
565
567
  };
566
568
 
567
569
  /**
@@ -574,7 +576,7 @@ export class HMSSDK {
574
576
  */
575
577
  stopHLSStreaming = async () => {
576
578
  logger?.verbose('#Function stopHLSStreaming', {});
577
- return await HmsManager.stopHLSStreaming({ id: this.id });
579
+ return await HMSManager.stopHLSStreaming({ id: this.id });
578
580
  };
579
581
 
580
582
  /**
@@ -599,7 +601,7 @@ export class HMSSDK {
599
601
  id: this.id,
600
602
  };
601
603
  logger?.verbose('#Function changeRole', data);
602
- return await HmsManager.changeRole(data);
604
+ return await HMSManager.changeRole(data);
603
605
  };
604
606
 
605
607
  /**
@@ -623,7 +625,7 @@ export class HMSSDK {
623
625
  id: this.id,
624
626
  };
625
627
 
626
- return await HmsManager.changeTrackState(data);
628
+ return await HMSManager.changeTrackState(data);
627
629
  };
628
630
 
629
631
  /**
@@ -659,7 +661,7 @@ export class HMSSDK {
659
661
  id: this.id,
660
662
  };
661
663
 
662
- return await HmsManager.changeTrackStateForRoles(data);
664
+ return await HMSManager.changeTrackStateForRoles(data);
663
665
  };
664
666
 
665
667
  /**
@@ -682,7 +684,7 @@ export class HMSSDK {
682
684
  id: this.id,
683
685
  };
684
686
 
685
- return await HmsManager.removePeer(data);
687
+ return await HMSManager.removePeer(data);
686
688
  };
687
689
 
688
690
  /**
@@ -702,7 +704,7 @@ export class HMSSDK {
702
704
  id: this.id,
703
705
  };
704
706
 
705
- return await HmsManager.endRoom(data);
707
+ return await HMSManager.endRoom(data);
706
708
  };
707
709
 
708
710
  /**
@@ -719,7 +721,7 @@ export class HMSSDK {
719
721
  id: this.id,
720
722
  };
721
723
 
722
- return await HmsManager.changeName(data);
724
+ return await HMSManager.changeName(data);
723
725
  };
724
726
 
725
727
  /**
@@ -731,7 +733,7 @@ export class HMSSDK {
731
733
  */
732
734
  acceptRoleChange = async () => {
733
735
  logger?.verbose('#Function acceptRoleChange', { id: this.id });
734
- return await HmsManager.acceptRoleChange({ id: this.id });
736
+ return await HMSManager.acceptRoleChange({ id: this.id });
735
737
  };
736
738
 
737
739
  /**
@@ -745,7 +747,7 @@ export class HMSSDK {
745
747
  setPlaybackForAllAudio = (mute: boolean) => {
746
748
  logger?.verbose('#Function setPlaybackForAllAudio', { mute, id: this.id });
747
749
  this.muteStatus = mute;
748
- HmsManager.setPlaybackForAllAudio({ mute, id: this.id });
750
+ HMSManager.setPlaybackForAllAudio({ mute, id: this.id });
749
751
  };
750
752
 
751
753
  /**
@@ -755,7 +757,7 @@ export class HMSSDK {
755
757
  */
756
758
  remoteMuteAllAudio = () => {
757
759
  logger?.verbose('#Function remoteMuteAllAudio', { id: this.id });
758
- HmsManager.remoteMuteAllAudio({ id: this.id });
760
+ HMSManager.remoteMuteAllAudio({ id: this.id });
759
761
  };
760
762
 
761
763
  /**
@@ -772,7 +774,7 @@ export class HMSSDK {
772
774
  roomID: this.room?.id,
773
775
  id: this.id,
774
776
  });
775
- const hmsRoom = await HmsManager.getRoom({ id: this.id });
777
+ const hmsRoom = await HMSManager.getRoom({ id: this.id });
776
778
 
777
779
  const encodedHmsRoom = HMSEncoder.encodeHmsRoom(hmsRoom, this.id);
778
780
  return encodedHmsRoom;
@@ -791,7 +793,7 @@ export class HMSSDK {
791
793
  volume,
792
794
  id: this.id,
793
795
  });
794
- HmsManager.setVolume({
796
+ HMSManager.setVolume({
795
797
  id: this.id,
796
798
  trackId: track.trackId,
797
799
  volume,
@@ -800,7 +802,7 @@ export class HMSSDK {
800
802
 
801
803
  resetVolume = () => {
802
804
  logger?.verbose('#Function resetVolume', { id: this.id });
803
- if (Platform.OS === 'android') HmsManager.resetVolume({ id: this.id });
805
+ if (Platform.OS === 'android') HMSManager.resetVolume({ id: this.id });
804
806
  };
805
807
 
806
808
  /**
@@ -832,7 +834,7 @@ export class HMSSDK {
832
834
  startScreenshare = async () => {
833
835
  logger?.verbose('#Function startScreenshare', { id: this.id });
834
836
  if (Platform.OS === 'android') {
835
- return await HmsManager.startScreenshare({ id: this.id });
837
+ return await HMSManager.startScreenshare({ id: this.id });
836
838
  } else {
837
839
  console.log('API currently not available for iOS');
838
840
  return 'API currently not available for iOS';
@@ -849,7 +851,7 @@ export class HMSSDK {
849
851
  isScreenShared = async () => {
850
852
  logger?.verbose('#Function isScreenShared', { id: this.id });
851
853
  if (Platform.OS === 'android') {
852
- return await HmsManager.isScreenShared({ id: this.id });
854
+ return await HMSManager.isScreenShared({ id: this.id });
853
855
  } else {
854
856
  console.log('API currently not available for iOS');
855
857
  return 'API currently not available for iOS';
@@ -866,7 +868,7 @@ export class HMSSDK {
866
868
  stopScreenshare = async () => {
867
869
  logger?.verbose('#Function stopScreenshare', { id: this.id });
868
870
  if (Platform.OS === 'android') {
869
- return await HmsManager.stopScreenshare({ id: this.id });
871
+ return await HMSManager.stopScreenshare({ id: this.id });
870
872
  } else {
871
873
  console.log('API currently not available for iOS');
872
874
  return 'API currently not available for iOS';
@@ -888,7 +890,7 @@ export class HMSSDK {
888
890
  enableRTCStats = () => {
889
891
  logger?.verbose('#Function enableRTCStats', { id: this.id });
890
892
  if (Platform.OS === 'ios') {
891
- HmsManager.enableRTCStats({ id: this.id });
893
+ HMSManager.enableRTCStats({ id: this.id });
892
894
  } else {
893
895
  console.log('API currently not avaialble for android');
894
896
  }
@@ -905,7 +907,7 @@ export class HMSSDK {
905
907
  disableRTCStats = () => {
906
908
  logger?.verbose('#Function disableRTCStats', { id: this.id });
907
909
  if (Platform.OS === 'ios') {
908
- HmsManager.disableRTCStats({ id: this.id });
910
+ HMSManager.disableRTCStats({ id: this.id });
909
911
  } else {
910
912
  console.log('API currently not avaialble for android');
911
913
  }
@@ -2,12 +2,12 @@ import type { HMSException } from './HMSException';
2
2
 
3
3
  export class HMSServerRecordingState {
4
4
  running: string;
5
- error: HMSException;
5
+ error?: HMSException;
6
6
  startedAt: Date;
7
7
 
8
8
  constructor(params: {
9
9
  running: string;
10
- error: HMSException;
10
+ error?: HMSException;
11
11
  startedAt: Date;
12
12
  }) {
13
13
  this.running = params.running;
@@ -0,0 +1,5 @@
1
+ export enum HMSTrackSource {
2
+ PLUGIN = 'plugin',
3
+ REGULAR = 'regular',
4
+ SCREEN = 'screen',
5
+ }
@@ -21,7 +21,7 @@ interface HmsViewProps {
21
21
  onDataReturned: Function;
22
22
  }
23
23
 
24
- const HmsView = requireNativeComponent<HmsViewProps>('HmsView');
24
+ const HmsView = requireNativeComponent<HmsViewProps>('HMSView');
25
25
  let _nextRequestId = 1;
26
26
  let _requestMap = new Map();
27
27
 
@@ -87,7 +87,7 @@ export const HmsViewComponent = React.forwardRef<any, HmsComponentProps>(
87
87
  let promise = new Promise(function (resolve, reject) {
88
88
  requestMap.set(requestId, { resolve, reject });
89
89
  });
90
- const viewManagerConfig = UIManager.getViewManagerConfig('HmsView');
90
+ const viewManagerConfig = UIManager.getViewManagerConfig('HMSView');
91
91
  UIManager.dispatchViewManagerCommand(
92
92
  findNodeHandle(hmsViewRef.current),
93
93
  viewManagerConfig.Commands.capture,
package/src/index.ts CHANGED
@@ -8,6 +8,7 @@ export * from './classes/HMSVideoCodec';
8
8
  export * from './classes/HMSTrackSettings';
9
9
  export * from './classes/HMSTrack';
10
10
  export * from './classes/HMSTrackType';
11
+ export * from './classes/HMSTrackSource';
11
12
  export * from './classes/HMSSubscribeSettings';
12
13
  export * from './classes/HMSSimulcastSettings';
13
14
  export * from './classes/HMSSimulcastLayerSettings';