@100mslive/react-native-hms 1.2.0 → 1.4.0

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 (279) hide show
  1. package/README.md +61 -7
  2. package/android/src/main/java/com/reactnativehmssdk/HMSDecoder.kt +121 -53
  3. package/android/src/main/java/com/reactnativehmssdk/HMSManager.kt +21 -0
  4. package/android/src/main/java/com/reactnativehmssdk/HMSRNSDK.kt +177 -31
  5. package/ios/HMSDecoder.swift +113 -50
  6. package/ios/HMSManager.m +5 -0
  7. package/ios/HMSManager.swift +22 -1
  8. package/ios/HMSRNSDK.swift +157 -26
  9. package/ios/HMSView.swift +1 -1
  10. package/lib/commonjs/classes/HMSAudioCodec.js +4 -4
  11. package/lib/commonjs/classes/HMSAudioCodec.js.map +1 -1
  12. package/lib/commonjs/classes/HMSAudioDevice.js +4 -4
  13. package/lib/commonjs/classes/HMSAudioDevice.js.map +1 -1
  14. package/lib/commonjs/classes/HMSAudioFilePlayerNode.js.map +1 -1
  15. package/lib/commonjs/classes/HMSAudioMixerSource.js.map +1 -1
  16. package/lib/commonjs/classes/HMSAudioMixingMode.js +4 -4
  17. package/lib/commonjs/classes/HMSAudioMixingMode.js.map +1 -1
  18. package/lib/commonjs/classes/HMSAudioMode.js +4 -4
  19. package/lib/commonjs/classes/HMSAudioMode.js.map +1 -1
  20. package/lib/commonjs/classes/HMSAudioNode.js +2 -1
  21. package/lib/commonjs/classes/HMSAudioNode.js.map +1 -1
  22. package/lib/commonjs/classes/HMSAudioSettings.js.map +1 -1
  23. package/lib/commonjs/classes/HMSAudioTrack.js.map +1 -1
  24. package/lib/commonjs/classes/HMSAudioTrackSettings.js +1 -1
  25. package/lib/commonjs/classes/HMSAudioTrackSettings.js.map +1 -1
  26. package/lib/commonjs/classes/HMSBrowserRecordingState.js.map +1 -1
  27. package/lib/commonjs/classes/HMSCameraFacing.js +4 -4
  28. package/lib/commonjs/classes/HMSCameraFacing.js.map +1 -1
  29. package/lib/commonjs/classes/HMSChangeTrackStateRequest.js.map +1 -1
  30. package/lib/commonjs/classes/HMSConfig.js.map +1 -1
  31. package/lib/commonjs/classes/HMSConstants.js +11 -0
  32. package/lib/commonjs/classes/HMSConstants.js.map +1 -0
  33. package/lib/commonjs/classes/HMSEncoder.js +21 -43
  34. package/lib/commonjs/classes/HMSEncoder.js.map +1 -1
  35. package/lib/commonjs/classes/HMSException.js +3 -4
  36. package/lib/commonjs/classes/HMSException.js.map +1 -1
  37. package/lib/commonjs/classes/HMSHLSConfig.js.map +1 -1
  38. package/lib/commonjs/classes/HMSHLSMeetingURLVariant.js.map +1 -1
  39. package/lib/commonjs/classes/HMSHLSRecordingConfig.js.map +1 -1
  40. package/lib/commonjs/classes/HMSHLSRecordingState.js.map +1 -1
  41. package/lib/commonjs/classes/HMSHLSStreamingState.js.map +1 -1
  42. package/lib/commonjs/classes/HMSHLSVariant.js.map +1 -1
  43. package/lib/commonjs/classes/HMSHelper.js.map +1 -1
  44. package/lib/commonjs/classes/HMSLocalAudioStats.js.map +1 -1
  45. package/lib/commonjs/classes/HMSLocalAudioTrack.js.map +1 -1
  46. package/lib/commonjs/classes/HMSLocalPeer.js +0 -1
  47. package/lib/commonjs/classes/HMSLocalPeer.js.map +1 -1
  48. package/lib/commonjs/classes/HMSLocalVideoStats.js.map +1 -1
  49. package/lib/commonjs/classes/HMSLocalVideoTrack.js +5 -6
  50. package/lib/commonjs/classes/HMSLocalVideoTrack.js.map +1 -1
  51. package/lib/commonjs/classes/HMSLogAlarmManager.js +4 -4
  52. package/lib/commonjs/classes/HMSLogAlarmManager.js.map +1 -1
  53. package/lib/commonjs/classes/HMSLogLevel.js +4 -4
  54. package/lib/commonjs/classes/HMSLogLevel.js.map +1 -1
  55. package/lib/commonjs/classes/HMSLogSettings.js.map +1 -1
  56. package/lib/commonjs/classes/HMSLogger.js +17 -25
  57. package/lib/commonjs/classes/HMSLogger.js.map +1 -1
  58. package/lib/commonjs/classes/HMSMessage.js +1 -2
  59. package/lib/commonjs/classes/HMSMessage.js.map +1 -1
  60. package/lib/commonjs/classes/HMSMessageRecipient.js.map +1 -1
  61. package/lib/commonjs/classes/HMSMessageRecipientType.js +4 -4
  62. package/lib/commonjs/classes/HMSMessageRecipientType.js.map +1 -1
  63. package/lib/commonjs/classes/HMSMessageType.js +4 -4
  64. package/lib/commonjs/classes/HMSMessageType.js.map +1 -1
  65. package/lib/commonjs/classes/HMSMicNode.js.map +1 -1
  66. package/lib/commonjs/classes/HMSNativeEventEmitter.js +0 -5
  67. package/lib/commonjs/classes/HMSNativeEventEmitter.js.map +1 -1
  68. package/lib/commonjs/classes/HMSNetworkQuality.js.map +1 -1
  69. package/lib/commonjs/classes/HMSPIPListenerActions.js +4 -4
  70. package/lib/commonjs/classes/HMSPIPListenerActions.js.map +1 -1
  71. package/lib/commonjs/classes/HMSPeer.js +68 -22
  72. package/lib/commonjs/classes/HMSPeer.js.map +1 -1
  73. package/lib/commonjs/classes/HMSPeerUpdate.js +7 -5
  74. package/lib/commonjs/classes/HMSPeerUpdate.js.map +1 -1
  75. package/lib/commonjs/classes/HMSPeersCache.js +229 -0
  76. package/lib/commonjs/classes/HMSPeersCache.js.map +1 -0
  77. package/lib/commonjs/classes/HMSPermissions.js.map +1 -1
  78. package/lib/commonjs/classes/HMSPublishSettings.js.map +1 -1
  79. package/lib/commonjs/classes/HMSRTCStats.js.map +1 -1
  80. package/lib/commonjs/classes/HMSRTCStatsReport.js.map +1 -1
  81. package/lib/commonjs/classes/HMSRTMPConfig.js.map +1 -1
  82. package/lib/commonjs/classes/HMSRemoteAudioStats.js.map +1 -1
  83. package/lib/commonjs/classes/HMSRemoteAudioTrack.js.map +1 -1
  84. package/lib/commonjs/classes/HMSRemotePeer.js +0 -1
  85. package/lib/commonjs/classes/HMSRemotePeer.js.map +1 -1
  86. package/lib/commonjs/classes/HMSRemoteVideoStats.js.map +1 -1
  87. package/lib/commonjs/classes/HMSRemoteVideoTrack.js +0 -1
  88. package/lib/commonjs/classes/HMSRemoteVideoTrack.js.map +1 -1
  89. package/lib/commonjs/classes/HMSRole.js.map +1 -1
  90. package/lib/commonjs/classes/HMSRoleChangeRequest.js.map +1 -1
  91. package/lib/commonjs/classes/HMSRoom.js +79 -22
  92. package/lib/commonjs/classes/HMSRoom.js.map +1 -1
  93. package/lib/commonjs/classes/HMSRoomCache.js +128 -0
  94. package/lib/commonjs/classes/HMSRoomCache.js.map +1 -0
  95. package/lib/commonjs/classes/HMSRoomUpdate.js +4 -4
  96. package/lib/commonjs/classes/HMSRoomUpdate.js.map +1 -1
  97. package/lib/commonjs/classes/HMSRtmpStreamingState.js.map +1 -1
  98. package/lib/commonjs/classes/HMSRtmpVideoResolution.js.map +1 -1
  99. package/lib/commonjs/classes/HMSSDK.js +501 -33
  100. package/lib/commonjs/classes/HMSSDK.js.map +1 -1
  101. package/lib/commonjs/classes/HMSScreenBroadcastAudioReceiverNode.js.map +1 -1
  102. package/lib/commonjs/classes/HMSServerRecordingState.js.map +1 -1
  103. package/lib/commonjs/classes/HMSSimulcastLayerSettings.js.map +1 -1
  104. package/lib/commonjs/classes/HMSSimulcastSettings.js.map +1 -1
  105. package/lib/commonjs/classes/HMSSpeaker.js.map +1 -1
  106. package/lib/commonjs/classes/HMSSubscribeSettings.js.map +1 -1
  107. package/lib/commonjs/classes/HMSTrack.js.map +1 -1
  108. package/lib/commonjs/classes/HMSTrackSettings.js.map +1 -1
  109. package/lib/commonjs/classes/HMSTrackSettingsInitState.js +4 -4
  110. package/lib/commonjs/classes/HMSTrackSettingsInitState.js.map +1 -1
  111. package/lib/commonjs/classes/HMSTrackSource.js +4 -4
  112. package/lib/commonjs/classes/HMSTrackSource.js.map +1 -1
  113. package/lib/commonjs/classes/HMSTrackType.js +4 -4
  114. package/lib/commonjs/classes/HMSTrackType.js.map +1 -1
  115. package/lib/commonjs/classes/HMSTrackUpdate.js +4 -4
  116. package/lib/commonjs/classes/HMSTrackUpdate.js.map +1 -1
  117. package/lib/commonjs/classes/HMSUpdateListenerActions.js +5 -5
  118. package/lib/commonjs/classes/HMSUpdateListenerActions.js.map +1 -1
  119. package/lib/commonjs/classes/HMSVideoCodec.js +4 -4
  120. package/lib/commonjs/classes/HMSVideoCodec.js.map +1 -1
  121. package/lib/commonjs/classes/HMSVideoResolution.js.map +1 -1
  122. package/lib/commonjs/classes/HMSVideoSettings.js.map +1 -1
  123. package/lib/commonjs/classes/HMSVideoTrack.js.map +1 -1
  124. package/lib/commonjs/classes/HMSVideoTrackSettings.js +1 -1
  125. package/lib/commonjs/classes/HMSVideoTrackSettings.js.map +1 -1
  126. package/lib/commonjs/classes/HMSVideoViewMode.js +4 -4
  127. package/lib/commonjs/classes/HMSVideoViewMode.js.map +1 -1
  128. package/lib/commonjs/classes/HmsView.js +2 -1
  129. package/lib/commonjs/classes/HmsView.js.map +1 -1
  130. package/lib/commonjs/index.js.map +1 -1
  131. package/lib/module/classes/HMSAudioCodec.js +3 -3
  132. package/lib/module/classes/HMSAudioCodec.js.map +1 -1
  133. package/lib/module/classes/HMSAudioDevice.js +3 -3
  134. package/lib/module/classes/HMSAudioDevice.js.map +1 -1
  135. package/lib/module/classes/HMSAudioFilePlayerNode.js.map +1 -1
  136. package/lib/module/classes/HMSAudioMixerSource.js.map +1 -1
  137. package/lib/module/classes/HMSAudioMixingMode.js +3 -3
  138. package/lib/module/classes/HMSAudioMixingMode.js.map +1 -1
  139. package/lib/module/classes/HMSAudioMode.js +3 -3
  140. package/lib/module/classes/HMSAudioMode.js.map +1 -1
  141. package/lib/module/classes/HMSAudioNode.js +2 -1
  142. package/lib/module/classes/HMSAudioNode.js.map +1 -1
  143. package/lib/module/classes/HMSAudioSettings.js.map +1 -1
  144. package/lib/module/classes/HMSAudioTrack.js.map +1 -1
  145. package/lib/module/classes/HMSAudioTrackSettings.js +1 -1
  146. package/lib/module/classes/HMSAudioTrackSettings.js.map +1 -1
  147. package/lib/module/classes/HMSBrowserRecordingState.js.map +1 -1
  148. package/lib/module/classes/HMSCameraFacing.js +3 -3
  149. package/lib/module/classes/HMSCameraFacing.js.map +1 -1
  150. package/lib/module/classes/HMSChangeTrackStateRequest.js.map +1 -1
  151. package/lib/module/classes/HMSConfig.js.map +1 -1
  152. package/lib/module/classes/HMSConstants.js +4 -0
  153. package/lib/module/classes/HMSConstants.js.map +1 -0
  154. package/lib/module/classes/HMSEncoder.js +21 -43
  155. package/lib/module/classes/HMSEncoder.js.map +1 -1
  156. package/lib/module/classes/HMSException.js +3 -4
  157. package/lib/module/classes/HMSException.js.map +1 -1
  158. package/lib/module/classes/HMSHLSConfig.js.map +1 -1
  159. package/lib/module/classes/HMSHLSMeetingURLVariant.js.map +1 -1
  160. package/lib/module/classes/HMSHLSRecordingConfig.js.map +1 -1
  161. package/lib/module/classes/HMSHLSRecordingState.js.map +1 -1
  162. package/lib/module/classes/HMSHLSStreamingState.js.map +1 -1
  163. package/lib/module/classes/HMSHLSVariant.js.map +1 -1
  164. package/lib/module/classes/HMSHelper.js.map +1 -1
  165. package/lib/module/classes/HMSLocalAudioStats.js.map +1 -1
  166. package/lib/module/classes/HMSLocalAudioTrack.js.map +1 -1
  167. package/lib/module/classes/HMSLocalPeer.js +0 -1
  168. package/lib/module/classes/HMSLocalPeer.js.map +1 -1
  169. package/lib/module/classes/HMSLocalVideoStats.js.map +1 -1
  170. package/lib/module/classes/HMSLocalVideoTrack.js +5 -6
  171. package/lib/module/classes/HMSLocalVideoTrack.js.map +1 -1
  172. package/lib/module/classes/HMSLogAlarmManager.js +3 -3
  173. package/lib/module/classes/HMSLogAlarmManager.js.map +1 -1
  174. package/lib/module/classes/HMSLogLevel.js +3 -3
  175. package/lib/module/classes/HMSLogLevel.js.map +1 -1
  176. package/lib/module/classes/HMSLogSettings.js.map +1 -1
  177. package/lib/module/classes/HMSLogger.js +17 -25
  178. package/lib/module/classes/HMSLogger.js.map +1 -1
  179. package/lib/module/classes/HMSMessage.js +1 -2
  180. package/lib/module/classes/HMSMessage.js.map +1 -1
  181. package/lib/module/classes/HMSMessageRecipient.js.map +1 -1
  182. package/lib/module/classes/HMSMessageRecipientType.js +3 -3
  183. package/lib/module/classes/HMSMessageRecipientType.js.map +1 -1
  184. package/lib/module/classes/HMSMessageType.js +3 -3
  185. package/lib/module/classes/HMSMessageType.js.map +1 -1
  186. package/lib/module/classes/HMSMicNode.js.map +1 -1
  187. package/lib/module/classes/HMSNativeEventEmitter.js +1 -6
  188. package/lib/module/classes/HMSNativeEventEmitter.js.map +1 -1
  189. package/lib/module/classes/HMSNetworkQuality.js.map +1 -1
  190. package/lib/module/classes/HMSPIPListenerActions.js +3 -3
  191. package/lib/module/classes/HMSPIPListenerActions.js.map +1 -1
  192. package/lib/module/classes/HMSPeer.js +68 -22
  193. package/lib/module/classes/HMSPeer.js.map +1 -1
  194. package/lib/module/classes/HMSPeerUpdate.js +4 -3
  195. package/lib/module/classes/HMSPeerUpdate.js.map +1 -1
  196. package/lib/module/classes/HMSPeersCache.js +216 -0
  197. package/lib/module/classes/HMSPeersCache.js.map +1 -0
  198. package/lib/module/classes/HMSPermissions.js.map +1 -1
  199. package/lib/module/classes/HMSPublishSettings.js.map +1 -1
  200. package/lib/module/classes/HMSRTCStats.js.map +1 -1
  201. package/lib/module/classes/HMSRTCStatsReport.js.map +1 -1
  202. package/lib/module/classes/HMSRTMPConfig.js.map +1 -1
  203. package/lib/module/classes/HMSRemoteAudioStats.js.map +1 -1
  204. package/lib/module/classes/HMSRemoteAudioTrack.js.map +1 -1
  205. package/lib/module/classes/HMSRemotePeer.js +0 -1
  206. package/lib/module/classes/HMSRemotePeer.js.map +1 -1
  207. package/lib/module/classes/HMSRemoteVideoStats.js.map +1 -1
  208. package/lib/module/classes/HMSRemoteVideoTrack.js +0 -1
  209. package/lib/module/classes/HMSRemoteVideoTrack.js.map +1 -1
  210. package/lib/module/classes/HMSRole.js.map +1 -1
  211. package/lib/module/classes/HMSRoleChangeRequest.js.map +1 -1
  212. package/lib/module/classes/HMSRoom.js +79 -22
  213. package/lib/module/classes/HMSRoom.js.map +1 -1
  214. package/lib/module/classes/HMSRoomCache.js +115 -0
  215. package/lib/module/classes/HMSRoomCache.js.map +1 -0
  216. package/lib/module/classes/HMSRoomUpdate.js +3 -3
  217. package/lib/module/classes/HMSRoomUpdate.js.map +1 -1
  218. package/lib/module/classes/HMSRtmpStreamingState.js.map +1 -1
  219. package/lib/module/classes/HMSRtmpVideoResolution.js.map +1 -1
  220. package/lib/module/classes/HMSSDK.js +501 -33
  221. package/lib/module/classes/HMSSDK.js.map +1 -1
  222. package/lib/module/classes/HMSScreenBroadcastAudioReceiverNode.js.map +1 -1
  223. package/lib/module/classes/HMSServerRecordingState.js.map +1 -1
  224. package/lib/module/classes/HMSSimulcastLayerSettings.js.map +1 -1
  225. package/lib/module/classes/HMSSimulcastSettings.js.map +1 -1
  226. package/lib/module/classes/HMSSpeaker.js.map +1 -1
  227. package/lib/module/classes/HMSSubscribeSettings.js.map +1 -1
  228. package/lib/module/classes/HMSTrack.js.map +1 -1
  229. package/lib/module/classes/HMSTrackSettings.js.map +1 -1
  230. package/lib/module/classes/HMSTrackSettingsInitState.js +3 -3
  231. package/lib/module/classes/HMSTrackSettingsInitState.js.map +1 -1
  232. package/lib/module/classes/HMSTrackSource.js +3 -3
  233. package/lib/module/classes/HMSTrackSource.js.map +1 -1
  234. package/lib/module/classes/HMSTrackType.js +3 -3
  235. package/lib/module/classes/HMSTrackType.js.map +1 -1
  236. package/lib/module/classes/HMSTrackUpdate.js +3 -3
  237. package/lib/module/classes/HMSTrackUpdate.js.map +1 -1
  238. package/lib/module/classes/HMSUpdateListenerActions.js +4 -4
  239. package/lib/module/classes/HMSUpdateListenerActions.js.map +1 -1
  240. package/lib/module/classes/HMSVideoCodec.js +3 -3
  241. package/lib/module/classes/HMSVideoCodec.js.map +1 -1
  242. package/lib/module/classes/HMSVideoResolution.js.map +1 -1
  243. package/lib/module/classes/HMSVideoSettings.js.map +1 -1
  244. package/lib/module/classes/HMSVideoTrack.js.map +1 -1
  245. package/lib/module/classes/HMSVideoTrackSettings.js +1 -1
  246. package/lib/module/classes/HMSVideoTrackSettings.js.map +1 -1
  247. package/lib/module/classes/HMSVideoViewMode.js +3 -3
  248. package/lib/module/classes/HMSVideoViewMode.js.map +1 -1
  249. package/lib/module/classes/HmsView.js +2 -1
  250. package/lib/module/classes/HmsView.js.map +1 -1
  251. package/lib/typescript/classes/HMSConstants.d.ts +3 -0
  252. package/lib/typescript/classes/HMSEncoder.d.ts +7 -6
  253. package/lib/typescript/classes/HMSLocalPeer.d.ts +0 -14
  254. package/lib/typescript/classes/HMSLogger.d.ts +1 -7
  255. package/lib/typescript/classes/HMSPeer.d.ts +12 -18
  256. package/lib/typescript/classes/HMSPeerUpdate.d.ts +1 -0
  257. package/lib/typescript/classes/HMSPeersCache.d.ts +17 -0
  258. package/lib/typescript/classes/HMSRemotePeer.d.ts +0 -14
  259. package/lib/typescript/classes/HMSRoom.d.ts +11 -22
  260. package/lib/typescript/classes/HMSRoomCache.d.ts +16 -0
  261. package/lib/typescript/classes/HMSSDK.d.ts +20 -12
  262. package/lib/typescript/classes/HMSUpdateListenerActions.d.ts +1 -1
  263. package/package.json +2 -2
  264. package/sdk-versions.json +3 -3
  265. package/src/classes/HMSAudioNode.ts +3 -1
  266. package/src/classes/HMSConstants.ts +3 -0
  267. package/src/classes/HMSEncoder.ts +24 -69
  268. package/src/classes/HMSLocalPeer.ts +0 -15
  269. package/src/classes/HMSLogger.ts +20 -19
  270. package/src/classes/HMSNativeEventEmitter.ts +35 -12
  271. package/src/classes/HMSPeer.ts +133 -34
  272. package/src/classes/HMSPeerUpdate.ts +9 -0
  273. package/src/classes/HMSPeersCache.ts +252 -0
  274. package/src/classes/HMSRemotePeer.ts +0 -16
  275. package/src/classes/HMSRoom.ts +141 -37
  276. package/src/classes/HMSRoomCache.ts +157 -0
  277. package/src/classes/HMSSDK.tsx +102 -43
  278. package/src/classes/HMSUpdateListenerActions.ts +1 -1
  279. package/src/classes/HmsView.tsx +2 -1
@@ -19,6 +19,9 @@ var _HmsView = require("./HmsView");
19
19
  var _HMSMessageType = require("./HMSMessageType");
20
20
  var _HMSPIPListenerActions = require("./HMSPIPListenerActions");
21
21
  var _HMSNativeEventEmitter = require("./HMSNativeEventEmitter");
22
+ var _HMSPeersCache = require("./HMSPeersCache");
23
+ var _HMSRoomCache = require("./HMSRoomCache");
24
+ var _HMSPeerUpdate = require("./HMSPeerUpdate");
22
25
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
23
26
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
24
27
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
@@ -59,29 +62,74 @@ class HMSSDK {
59
62
  _defineProperty(this, "onAudioDeviceChangedDelegate", void 0);
60
63
  _defineProperty(this, "onPIPRoomLeaveDelegate", void 0);
61
64
  _defineProperty(this, "emitterSubscriptions", {});
62
- _defineProperty(this, "setLogger", hmsLogger => {
63
- (0, _HMSLogger.setLogger)(this.id, hmsLogger);
64
- });
65
+ /**
66
+ * - Calls removeListeners that in turn breaks all connections with native listeners.
67
+ *
68
+ * @memberof HMSSDK
69
+ */
65
70
  _defineProperty(this, "destroy", async () => {
66
71
  _HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function destroy', {
67
72
  id: this.id
68
73
  });
74
+ (0, _HMSPeersCache.clearHmsPeersCache)();
75
+ (0, _HMSRoomCache.clearHmsRoomCache)();
69
76
  this.removeAllListeners();
70
77
  return await HMSManager.destroy({
71
78
  id: this.id
72
79
  });
73
80
  });
81
+ /**
82
+ * - getAuthTokenByRoomCode function is used to get the Auth Token by Room Code
83
+ *
84
+ * checkout {@link https://www.100ms.live/docs/concepts/v2/concepts/rooms/room-codes/room-codes} for more info
85
+ *
86
+ * @memberof HMSSDK
87
+ */
88
+ _defineProperty(this, "getAuthTokenByRoomCode", async (roomCode, userId, endpoint) => {
89
+ _HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function getAuthTokenByRoomCode', {
90
+ id: this.id,
91
+ roomCode,
92
+ userId,
93
+ endpoint
94
+ });
95
+ return HMSManager.getAuthTokenByRoomCode({
96
+ id: this.id,
97
+ roomCode,
98
+ userId,
99
+ endpoint
100
+ });
101
+ });
102
+ /**
103
+ * takes an instance of [HMSConfig]{@link HMSConfig} and joins the room.
104
+ * after joining the room user will start receiving the events and updates of the room.
105
+ *
106
+ * checkout {@link https://www.100ms.live/docs/react-native/v2/features/join} for more info
107
+ *
108
+ * @param {HMSConfig} config
109
+ * @memberof HMSSDK
110
+ */
74
111
  _defineProperty(this, "join", async config => {
75
112
  _HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function join', {
76
113
  config,
77
114
  id: this.id
78
115
  });
79
116
  this.addAppStateListener();
117
+ (0, _HMSPeersCache.setHmsPeersCache)(new _HMSPeersCache.HMSPeersCache(this.id));
118
+ (0, _HMSRoomCache.setHmsRoomCache)(new _HMSRoomCache.HMSRoomCache(this.id));
80
119
  await HMSManager.join({
81
120
  ...config,
82
121
  id: this.id
83
122
  });
84
123
  });
124
+ /**
125
+ * - preview function is used to initiate a preview for the localPeer.
126
+ * - We can call this function and wait for a response in previewListener, the response will contain previewTracks for local peer.
127
+ *
128
+ * checkout {@link https://www.100ms.live/docs/react-native/v2/features/preview} for more info
129
+ *
130
+ * @param {HMSConfig} config
131
+ * @memberof HMSSDK
132
+ */
85
133
  _defineProperty(this, "preview", config => {
86
134
  _HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function preview', {
87
135
  config,
@@ -92,6 +140,17 @@ class HMSSDK {
92
140
  id: this.id
93
141
  });
94
142
  });
143
+ /**
144
+ * - previewForRole can be used when there is role change request for current localPeer and we want
145
+ * to show the localPeer how the tracks look before publishing them to room.
146
+ *
147
+ * - It requires a role of type [HMSRole]{@link HMSRole} for which we want to preview the tracks.
148
+ *
149
+ * checkout {@link https://www.100ms.live/docs/react-native} for more info
150
+ *
151
+ * @param {HMSRole}
152
+ * @memberof HMSSDK
153
+ */
95
154
  _defineProperty(this, "previewForRole", async role => {
96
155
  _HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function previewForRole', {
97
156
  role,
@@ -107,6 +166,17 @@ class HMSSDK {
107
166
  return 'API currently not available for android';
108
167
  }
109
168
  });
169
+ /**
170
+ * - HmsView is react component that takes trackId and starts showing that track on a tile.
171
+ * - The appearance of tile is completely customizable with style prop.
172
+ * - Scale type can determine how the incoming video will fit in the canvas check {@link HMSVideoViewMode} for more information.
173
+ * - Mirror to flip the video vertically.
174
+ *
175
+ * checkout {@link https://www.100ms.live/docs/react-native/v2/features/render-video} for more info
176
+ *
177
+ * @param {HmsViewProps}
178
+ * @memberof HMSSDK
179
+ */
110
180
  _defineProperty(this, "HmsView", /*#__PURE__*/_react.default.forwardRef((props, ref) => {
111
181
  const {
112
182
  trackId,
@@ -129,8 +199,17 @@ class HMSSDK {
129
199
  var _this$appStateSubscri;
130
200
  this.muteStatus = undefined;
131
201
  this === null || this === void 0 ? void 0 : (_this$appStateSubscri = this.appStateSubscription) === null || _this$appStateSubscri === void 0 ? void 0 : _this$appStateSubscri.remove();
202
+ (0, _HMSPeersCache.clearHmsPeersCache)();
203
+ (0, _HMSRoomCache.clearHmsRoomCache)();
132
204
  _HMSEncoder.HMSEncoder.clearData(); // Clearing cached data in encoder
133
205
  });
206
+ /**
207
+ * Calls leave function of native sdk and session of current user is invalidated.
208
+ *
209
+ * checkout {@link https://www.100ms.live/docs/react-native/v2/features/leave} for more info
210
+ *
211
+ * @memberof HMSSDK
212
+ */
134
213
  _defineProperty(this, "leave", async () => {
135
214
  _HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function leave', {
136
215
  id: this.id
@@ -142,6 +221,14 @@ class HMSSDK {
142
221
  this.roomLeaveCleanup();
143
222
  return op;
144
223
  });
224
+ /**
225
+ * - This function sends message to all the peers in the room, the get the message in onMessage listener.
226
+ *
227
+ * checkout {@link https://www.100ms.live/docs/react-native/v2/features/chat} for more info
228
+ *
229
+ * @param {message: string} and @param {type: string}
230
+ * @memberof HMSSDK
231
+ */
145
232
  _defineProperty(this, "sendBroadcastMessage", async function (message) {
146
233
  let type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _HMSMessageType.HMSMessageType.CHAT;
147
234
  _HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function sendBroadcastMessage', {
@@ -155,6 +242,14 @@ class HMSSDK {
155
242
  id: _this.id
156
243
  });
157
244
  });
245
+ /**
246
+ * - sendGroupMessage sends a message to specific set of roles, whoever has any of those role in room
247
+ * will get the message in onMessage listener.
248
+ *
249
+ * checkout {@link https://www.100ms.live/docs/react-native/v2/features/chat} for more info
250
+ *
251
+ * @memberof HMSSDK
252
+ */
158
253
  _defineProperty(this, "sendGroupMessage", async function (message, roles) {
159
254
  let type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _HMSMessageType.HMSMessageType.CHAT;
160
255
  _HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function sendGroupMessage', {
@@ -170,6 +265,14 @@ class HMSSDK {
170
265
  type: type || null
171
266
  });
172
267
  });
268
+ /**
269
+ * - sendDirectMessage sends a private message to a single peer, only that peer will get the message
270
+ * in onMessage Listener.
271
+ *
272
+ * checkout {@link https://www.100ms.live/docs/react-native/v2/features/chat} for more info
273
+ *
274
+ * @memberof HMSSDK
275
+ */
173
276
  _defineProperty(this, "sendDirectMessage", async function (message, peer) {
174
277
  let type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _HMSMessageType.HMSMessageType.CHAT;
175
278
  _HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function sendDirectMessage', {
@@ -185,6 +288,18 @@ class HMSSDK {
185
288
  type: type || null
186
289
  });
187
290
  });
291
+ /**
292
+ * - changeMetadata changes a specific field in localPeer which is [metadata] it is a string that can
293
+ * be used for various functionalities like raiseHand, beRightBack and many more that explains the
294
+ * current status of the peer.
295
+ *
296
+ * - it is advised to use a json object in string format to store multiple dataPoints in metadata.
297
+ *
298
+ * checkout {@link https://www.100ms.live/docs/react-native/v2/advanced-features/change-metadata} for more info
299
+ *
300
+ * @param {string}
301
+ * @memberof HMSSDK
302
+ */
188
303
  _defineProperty(this, "changeMetadata", async metadata => {
189
304
  _HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function changeMetadata', {
190
305
  metadata,
@@ -195,6 +310,15 @@ class HMSSDK {
195
310
  id: this.id
196
311
  });
197
312
  });
313
+ /**
314
+ * - startRTMPOrRecording takes a configuration object {@link HMSRTMPConfig} and stats the RTMP recording
315
+ * - this object of {@link HMSRTMPConfig} sets the urls for streaming and weather to set recording on or not
316
+ * - we get the response of this function in onRoomUpdate as RTMP_STREAMING_STATE_UPDATED.
317
+ *
318
+ * checkout {@link https://www.100ms.live/docs/react-native/v2/features/recording} for more info
319
+ *
320
+ * @memberof HMSSDK
321
+ */
198
322
  _defineProperty(this, "startRTMPOrRecording", async data => {
199
323
  _HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function startRTMPOrRecording', {
200
324
  ...data,
@@ -206,6 +330,14 @@ class HMSSDK {
206
330
  });
207
331
  return op;
208
332
  });
333
+ /**
334
+ * - this function stops all the ongoing RTMP streaming and recording.
335
+ * - we get the response of this function in onRoomUpdate as RTMP_STREAMING_STATE_UPDATED.
336
+ *
337
+ * checkout {@link https://www.100ms.live/docs/react-native/v2/features/recording} for more info
338
+ *
339
+ * @memberof HMSSDK
340
+ */
209
341
  _defineProperty(this, "stopRtmpAndRecording", async () => {
210
342
  _HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function stopRtmpAndRecording', {});
211
343
  const op = await HMSManager.stopRtmpAndRecording({
@@ -213,6 +345,15 @@ class HMSSDK {
213
345
  });
214
346
  return op;
215
347
  });
348
+ /**
349
+ * - This function starts HLSStreaming.
350
+ * - we get the response of this function in onRoomUpdate as HLS_STREAMING_STATE_UPDATED.
351
+ *
352
+ * checkout {@link https://www.100ms.live/docs/react-native/v2/features/hls-streaming} for more info
353
+ *
354
+ * @param {HMSHLSConfig}
355
+ * @memberof HMSSDK
356
+ */
216
357
  _defineProperty(this, "startHLSStreaming", async data => {
217
358
  _HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function startHLSStreaming', {
218
359
  ...data,
@@ -223,12 +364,36 @@ class HMSSDK {
223
364
  id: this.id
224
365
  });
225
366
  });
367
+ /**
368
+ * - stopHLSStreaming function stops the ongoing HLSStreams.
369
+ * - we get the response of this function in onRoomUpdate as HLS_STREAMING_STATE_UPDATED.
370
+ *
371
+ * checkout {@link https://www.100ms.live/docs/react-native/v2/features/hls-streaming} for more info
372
+ *
373
+ * @memberof HMSSDK
374
+ */
226
375
  _defineProperty(this, "stopHLSStreaming", async () => {
227
376
  _HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function stopHLSStreaming', {});
228
377
  return await HMSManager.stopHLSStreaming({
229
378
  id: this.id
230
379
  });
231
380
  });
381
+ /**
382
+ * @deprecated This function has been deprecated in favor of #Function changeRoleOfPeer
383
+ *
384
+ * - This function can be used in a situation when we want to change role hence manipulate their
385
+ * access and rights in the current room, it takes the peer {@link HMSPeer} whom role we want to change,
386
+ * role {@link HMSRole} which will be the new role for that peer and weather to forcefully change
387
+ * the role or ask the to accept the role change request using a boolean force.
388
+ *
389
+ * - if we change the role forcefully the peer's role will be updated without asking the peer
390
+ * otherwise the user will get the roleChangeRequest in roleChangeRequest listener.
391
+ * for more information on this checkout {@link onRoleChangeRequestListener}
392
+ *
393
+ * checkout {@link https://www.100ms.live/docs/react-native/v2/features/change-role} for more info
394
+ *
395
+ * @memberof HMSSDK
396
+ */
232
397
  _defineProperty(this, "changeRole", async function (peer, role) {
233
398
  let force = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
234
399
  const data = {
@@ -240,6 +405,20 @@ class HMSSDK {
240
405
  _HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function changeRole', data);
241
406
  return await HMSManager.changeRole(data);
242
407
  });
408
+ /**
409
+ * - This function can be used in a situation when we want to change role hence manipulate their
410
+ * access and rights in the current room, it takes the peer {@link HMSPeer} whom role we want to change,
411
+ * role {@link HMSRole} which will be the new role for that peer and weather to forcefully change
412
+ * the role or ask the to accept the role change request using a boolean force.
413
+ *
414
+ * - if we change the role forcefully the peer's role will be updated without asking the peer
415
+ * otherwise the user will get the roleChangeRequest in roleChangeRequest listener.
416
+ * for more information on this checkout {@link onRoleChangeRequestListener}
417
+ *
418
+ * checkout {@link https://www.100ms.live/docs/react-native/v2/features/change-role} for more info
419
+ *
420
+ * @memberof HMSSDK
421
+ */
243
422
  _defineProperty(this, "changeRoleOfPeer", async function (peer, role) {
244
423
  let force = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
245
424
  const data = {
@@ -251,6 +430,19 @@ class HMSSDK {
251
430
  _HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function changeRoleOfPeer', data);
252
431
  return HMSManager.changeRoleOfPeer(data);
253
432
  });
433
+ /**
434
+ * - This function can be used in a situation when we want to change role of multiple peers by specifying their roles.
435
+ * Hence manipulate their access and rights in the current room.
436
+ * It takes the list of roles {@link HMSRole} whom role we want to change
437
+ * and role {@link HMSRole} which will be the new role for peers.
438
+ *
439
+ * - Note that role will be updated without asking the peers.
440
+ * Meaning, Peers will not get the roleChangeRequest in roleChangeRequest listener.
441
+ *
442
+ * checkout {@link https://www.100ms.live/docs/react-native/v2/features/change-role} for more info
443
+ *
444
+ * @memberof HMSSDK
445
+ */
254
446
  _defineProperty(this, "changeRoleOfPeersWithRoles", async (ofRoles, toRole) => {
255
447
  const data = {
256
448
  ofRoles: ofRoles.map(ofRole => ofRole.name).filter(Boolean),
@@ -260,6 +452,15 @@ class HMSSDK {
260
452
  _HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function changeRoleOfPeersWithRoles', data);
261
453
  return HMSManager.changeRoleOfPeersWithRoles(data);
262
454
  });
455
+ /**
456
+ * - This function can be used to manipulate mute status of any track.
457
+ * - Targeted peer affected by this action will get a callback in onChangeTrackStateRequestListener.
458
+ *
459
+ * * checkout {@link https://www.100ms.live/docs/react-native/v2/features/change-track-state} for more info
460
+ *
461
+ * @param {HMSTrack}
462
+ * @memberof HMSSDK
463
+ */
263
464
  _defineProperty(this, "changeTrackState", async (track, mute) => {
264
465
  _HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function changeTrackState', {
265
466
  track,
@@ -273,6 +474,14 @@ class HMSSDK {
273
474
  };
274
475
  return await HMSManager.changeTrackState(data);
275
476
  });
477
+ /**
478
+ * - changeTrackStateForRoles is an enhancement on the functionality of {@link changeTrackState}.
479
+ * - We can change mute status for all the tracks of peers having a particular role.
480
+ * - @param source determines the source of the track ex. video, audio etc.
481
+ * - The peers affected by this action will get a callback in onChangeTrackStateRequestListener.
482
+ *
483
+ * @memberof HMSSDK
484
+ */
276
485
  _defineProperty(this, "changeTrackStateForRoles", async (mute, type, source, roles) => {
277
486
  let roleNames = null;
278
487
  if (roles) {
@@ -294,6 +503,14 @@ class HMSSDK {
294
503
  };
295
504
  return await HMSManager.changeTrackStateForRoles(data);
296
505
  });
506
+ /**
507
+ * - removePeer can forcefully disconnect a Peer from the room.
508
+ * - the user who's removed from this action will get a callback in {@link onRemovedFromRoomListener}.
509
+ *
510
+ * checkout {@link https://www.100ms.live/docs/react-native/v2/features/remove-peer} for more info
511
+ *
512
+ * @memberof HMSSDK
513
+ */
297
514
  _defineProperty(this, "removePeer", async (peer, reason) => {
298
515
  _HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function removePeer', {
299
516
  peerId: peer.peerID,
@@ -307,6 +524,15 @@ class HMSSDK {
307
524
  };
308
525
  return await HMSManager.removePeer(data);
309
526
  });
527
+ /**
528
+ * - endRoom can be used in a situation where we want to disconnect all the peers from current room
529
+ * and end the call.
530
+ * - everyone in the room will get an update of this action in {@link onRemovedFromRoomListener}.
531
+ *
532
+ * checkout {@link https://www.100ms.live/docs/react-native/v2/features/end-room} for more info
533
+ *
534
+ * @memberof HMSSDK
535
+ */
310
536
  _defineProperty(this, "endRoom", async function (reason) {
311
537
  let lock = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
312
538
  _HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function endRoom', {
@@ -321,6 +547,13 @@ class HMSSDK {
321
547
  };
322
548
  return await HMSManager.endRoom(data);
323
549
  });
550
+ /**
551
+ * - This function can be used to change name of localPeer.
552
+ *
553
+ * checkout {@link https://www.100ms.live/docs/react-native/v2/features/change-name} for more info
554
+ *
555
+ * @memberof HMSSDK
556
+ */
324
557
  _defineProperty(this, "changeName", async name => {
325
558
  _HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function changeName', {
326
559
  name,
@@ -332,6 +565,13 @@ class HMSSDK {
332
565
  };
333
566
  return await HMSManager.changeName(data);
334
567
  });
568
+ /**
569
+ * - Calling this function will accept the most recent roleChange request made by anyone in the room
570
+ *
571
+ * checkout {@link https://www.100ms.live/docs/react-native/v2/features/change-role} for more info
572
+ *
573
+ * @memberof HMSSDK
574
+ */
335
575
  _defineProperty(this, "acceptRoleChange", async () => {
336
576
  _HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function acceptRoleChange', {
337
577
  id: this.id
@@ -340,6 +580,14 @@ class HMSSDK {
340
580
  id: this.id
341
581
  });
342
582
  });
583
+ /**
584
+ * - setPlaybackForAllAudio is an extension of the abilities of setPlaybackAllowed in
585
+ * HMSRemoteAudioTrack. It sets mute status for all peers in the room only for the local peer.
586
+ *
587
+ * checkout {@link https://www.100ms.live/docs/react-native/v2/features/playback-allowed} for more info
588
+ *
589
+ * @memberof HMSSDK
590
+ */
343
591
  _defineProperty(this, "setPlaybackForAllAudio", mute => {
344
592
  _HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function setPlaybackForAllAudio', {
345
593
  mute,
@@ -351,6 +599,11 @@ class HMSSDK {
351
599
  id: this.id
352
600
  });
353
601
  });
602
+ /**
603
+ * - This function mutes audio for all peers in the room.
604
+ *
605
+ * @memberof HMSSDK
606
+ */
354
607
  _defineProperty(this, "remoteMuteAllAudio", async () => {
355
608
  _HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function remoteMuteAllAudio', {
356
609
  id: this.id
@@ -359,16 +612,34 @@ class HMSSDK {
359
612
  id: this.id
360
613
  });
361
614
  });
615
+ /**
616
+ * - getRoom is a wrapper function on an existing native function also known as getRoom the returns
617
+ * current room object which is of type {@link HMSRoom}
618
+ *
619
+ * checkout {@link https://www.100ms.live/docs/react-native/v2/features/join#get-room} for more info
620
+ *
621
+ * @memberof HMSSDK
622
+ * @return Promise<HMSRoom>
623
+ */
362
624
  _defineProperty(this, "getRoom", async () => {
625
+ var _getHmsRoomCache;
363
626
  _HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function getRoom', {
364
627
  id: this.id
365
628
  });
366
629
  const hmsRoom = await HMSManager.getRoom({
367
630
  id: this.id
368
631
  });
632
+ (_getHmsRoomCache = (0, _HMSRoomCache.getHmsRoomCache)()) === null || _getHmsRoomCache === void 0 ? void 0 : _getHmsRoomCache.updateRoomCache(hmsRoom);
369
633
  const encodedHmsRoom = _HMSEncoder.HMSEncoder.encodeHmsRoom(hmsRoom, this.id);
370
634
  return encodedHmsRoom;
371
635
  });
636
+ /**
637
+ * - getLocalPeer is a wrapper function on an existing native function also known as getLocalPeer the returns
638
+ * current local peer object which is of type {@link HMSLocalPeer}
639
+ *
640
+ * @memberof HMSSDK
641
+ * @return Promise<HMSLocalPeer>
642
+ */
372
643
  _defineProperty(this, "getLocalPeer", async () => {
373
644
  _HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function getLocalPeer', {
374
645
  id: this.id
@@ -379,6 +650,13 @@ class HMSSDK {
379
650
  const encodedLocalPeer = _HMSEncoder.HMSEncoder.encodeHmsLocalPeer(localPeer, this.id);
380
651
  return encodedLocalPeer;
381
652
  });
653
+ /**
654
+ * - getRemotePeers is a wrapper function on an existing native function also known as getRemotePeers the returns
655
+ * remote peers array which is of type {@link HMSRemotePeer}
656
+ *
657
+ * @memberof HMSSDK
658
+ * @return Promise<HMSRemotePeer[]>
659
+ */
382
660
  _defineProperty(this, "getRemotePeers", async () => {
383
661
  _HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function getRemotePeers', {
384
662
  id: this.id
@@ -389,6 +667,13 @@ class HMSSDK {
389
667
  const encodedRemotePeers = _HMSEncoder.HMSEncoder.encodeHmsRemotePeers(remotePeers, this.id);
390
668
  return encodedRemotePeers;
391
669
  });
670
+ /**
671
+ * - getRoles is a wrapper function on an existing native function also known as getRoles the returns
672
+ * array of all present roles which is of type {@link HMSRole}
673
+ *
674
+ * @memberof HMSSDK
675
+ * @return Promise<HMSRole[]>
676
+ */
392
677
  _defineProperty(this, "getRoles", async () => {
393
678
  _HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function getRoles', {
394
679
  id: this.id
@@ -399,6 +684,13 @@ class HMSSDK {
399
684
  const encodedRoles = _HMSEncoder.HMSEncoder.encodeHmsRoles(roles);
400
685
  return encodedRoles;
401
686
  });
687
+ /**
688
+ * - This function sets the volume of any peer in the room
689
+ *
690
+ * checkout {@link https://www.100ms.live/docs/react-native/v2/advanced-features/set-volume} for more info
691
+ *
692
+ * @memberof HMSSDK
693
+ */
402
694
  _defineProperty(this, "setVolume", (track, volume) => {
403
695
  _HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function setVolume', {
404
696
  track,
@@ -419,6 +711,13 @@ class HMSSDK {
419
711
  id: this.id
420
712
  });
421
713
  });
714
+ /**
715
+ * - This is a temporary solution for the situation when mic access is taken from the app and
716
+ * user returns to the app with no mic access. It will re-acquire the mic by setting the volume
717
+ * from native side
718
+ *
719
+ * @memberof HMSSDK
720
+ */
422
721
  _defineProperty(this, "addAppStateListener", () => {
423
722
  _HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function addAppStateListener', {
424
723
  id: this.id
@@ -429,6 +728,13 @@ class HMSSDK {
429
728
  }
430
729
  });
431
730
  });
731
+ /**
732
+ * - This function is used to start screenshare, currently available only for android
733
+ *
734
+ * checkout {@link https://www.100ms.live/docs/react-native/v2/features/screenshare} for more info
735
+ *
736
+ * @memberof HMSSDK
737
+ */
432
738
  _defineProperty(this, "startScreenshare", async () => {
433
739
  _HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function startScreenshare', {
434
740
  id: this.id
@@ -437,6 +743,13 @@ class HMSSDK {
437
743
  id: this.id
438
744
  });
439
745
  });
746
+ /**
747
+ * - Returns a boolean stating if the screen is currently shared or not
748
+ *
749
+ * checkout {@link https://www.100ms.live/docs/react-native/v2/features/screenshare} for more info
750
+ *
751
+ * @memberof HMSSDK
752
+ */
440
753
  _defineProperty(this, "isScreenShared", async () => {
441
754
  _HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function isScreenShared', {
442
755
  id: this.id
@@ -445,6 +758,13 @@ class HMSSDK {
445
758
  id: this.id
446
759
  });
447
760
  });
761
+ /**
762
+ * - stops the screenShare, currently available for android only.
763
+ *
764
+ * checkout {@link https://www.100ms.live/docs/react-native/v2/features/screenshare} for more info
765
+ *
766
+ * @memberof HMSSDK
767
+ */
448
768
  _defineProperty(this, "stopScreenshare", async () => {
449
769
  _HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function stopScreenshare', {
450
770
  id: this.id
@@ -453,6 +773,18 @@ class HMSSDK {
453
773
  id: this.id
454
774
  });
455
775
  });
776
+ /**
777
+ * - enableRTCStats sets a boolean in native side which in turn allows several events to be passed
778
+ * through the bridge these events are {@link RTCStatsListener}, {@link onRemoteVideoStatsListener},
779
+ * {@link onRemoteAudioStatsListener}, {@link onLocalAudioStatsListener} and {@link onLocalVideoStatsListener}
780
+ *
781
+ * - These listeners get various dataPoints for current peers and their connectivity to the room
782
+ * such as jitter, latency etc.
783
+ *
784
+ * - currently available for iOS only
785
+ *
786
+ * @memberof HMSSDK
787
+ */
456
788
  _defineProperty(this, "enableRTCStats", () => {
457
789
  _HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function enableRTCStats', {
458
790
  id: this.id
@@ -461,6 +793,14 @@ class HMSSDK {
461
793
  id: this.id
462
794
  });
463
795
  });
796
+ /**
797
+ * - disable RTCStats sets the same boolean to false that was set true by enableRTCStats.
798
+ * that activates a check which filters out the events acquired in native listeners and don't
799
+ * let them pass through bridge
800
+ *
801
+ * - currently available for iOS only.
802
+ * @memberof HMSSDK
803
+ */
464
804
  _defineProperty(this, "disableRTCStats", () => {
465
805
  _HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function disableRTCStats', {
466
806
  id: this.id
@@ -485,6 +825,14 @@ class HMSSDK {
485
825
  id: this.id
486
826
  });
487
827
  });
828
+ /**
829
+ * - This wrapper function is used to start streaming device audio, currently available only for android.
830
+ *
831
+ * checkout {@link https://www.100ms.live/docs/react-native/v2/features/audio-share#how-to-stream-device-audio-from-the-app} for more info.
832
+ *
833
+ * @param {HMSAudioMixingMode}
834
+ * @memberof HMSSDK
835
+ */
488
836
  _defineProperty(this, "startAudioshare", async audioMixingMode => {
489
837
  _HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function startAudioshare', {
490
838
  id: this.id,
@@ -500,6 +848,13 @@ class HMSSDK {
500
848
  return 'API currently not available for iOS';
501
849
  }
502
850
  });
851
+ /**
852
+ * - This wrapper function returns true if audio is being shared and vice versa, currently available only for android.
853
+ *
854
+ * checkout {@link https://www.100ms.live/docs/react-native/v2/features/audio-share#how-to-get-audio-share-status} for more info.
855
+ *
856
+ * @memberof HMSSDK
857
+ */
503
858
  _defineProperty(this, "isAudioShared", async () => {
504
859
  _HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function isAudioShared', {
505
860
  id: this.id
@@ -513,6 +868,13 @@ class HMSSDK {
513
868
  return 'API currently not available for iOS';
514
869
  }
515
870
  });
871
+ /**
872
+ * - This wrapper function is used to stop streaming device audio, currently available only for android.
873
+ *
874
+ * checkout {@link https://www.100ms.live/docs/react-native/v2/features/audio-share#how-to-stop-audio-sharing} for more info.
875
+ *
876
+ * @memberof HMSSDK
877
+ */
516
878
  _defineProperty(this, "stopAudioshare", async () => {
517
879
  _HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function stopAudioshare', {
518
880
  id: this.id
@@ -526,6 +888,12 @@ class HMSSDK {
526
888
  return 'API currently not available for iOS';
527
889
  }
528
890
  });
891
+ /**
892
+ * - This wrapper function returns the current audio mixing mode, currently available only for android.
893
+ *
894
+ * @memberof HMSSDK
895
+ * @return HMSAudioMixingMode
896
+ */
529
897
  _defineProperty(this, "getAudioMixingMode", async () => {
530
898
  _HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function getAudioMixingMode', {
531
899
  id: this.id
@@ -539,6 +907,14 @@ class HMSSDK {
539
907
  return 'API currently not available for iOS';
540
908
  }
541
909
  });
910
+ /**
911
+ * - This wrapper function used to change the mode while the user is streaming audio, currently available only for android.
912
+ *
913
+ * checkout {@link https://www.100ms.live/docs/react-native/v2/features/audio-share#how-to-change-mode} for more info
914
+ *
915
+ * @param {HMSAudioMixingMode}
916
+ * @memberof HMSSDK
917
+ */
542
918
  _defineProperty(this, "setAudioMixingMode", async audioMixingMode => {
543
919
  _HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function setAudioMixingMode', {
544
920
  id: this.id,
@@ -554,6 +930,15 @@ class HMSSDK {
554
930
  return 'API currently not available for iOS';
555
931
  }
556
932
  });
933
+ /**
934
+ * - This wrapper function returns the array of audio output devices which is of
935
+ * type {@link HMSAudioDevice[]}, currently available only for android.
936
+ *
937
+ * checkout {@link https://www.100ms.live/docs/react-native/v2/features/audio-output-routing#get-list-of-audio-device} for more info
938
+ *
939
+ * @memberof HMSSDK
940
+ * @return HMSAudioDevice[]
941
+ */
557
942
  _defineProperty(this, "getAudioDevicesList", async () => {
558
943
  _HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function getAudioDevicesList', {
559
944
  id: this.id
@@ -567,6 +952,15 @@ class HMSSDK {
567
952
  return 'API currently not available for iOS';
568
953
  }
569
954
  });
955
+ /**
956
+ * - This wrapper function returns the current audio output device which is of
957
+ * type {@link HMSAudioDevice}, currently available only for android.
958
+ *
959
+ * checkout {@link https://www.100ms.live/docs/react-native/v2/features/audio-output-routing#get-current-focussed-device} for more info
960
+ *
961
+ * @memberof HMSSDK
962
+ * @return HMSAudioDevice
963
+ */
570
964
  _defineProperty(this, "getAudioOutputRouteType", async () => {
571
965
  _HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function getAudioOutputRouteType', {
572
966
  id: this.id
@@ -580,6 +974,14 @@ class HMSSDK {
580
974
  return 'API currently not available for iOS';
581
975
  }
582
976
  });
977
+ /**
978
+ * - This wrapper function used to switch output to device other than the default, currently available only for android.
979
+ *
980
+ * checkout {@link https://www.100ms.live/docs/react-native/v2/features/audio-output-routing#switch-audio-focus-to-another-device} for more info
981
+ *
982
+ * @param {HMSAudioDevice}
983
+ * @memberof HMSSDK
984
+ */
583
985
  _defineProperty(this, "switchAudioOutput", audioDevice => {
584
986
  _HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function switchAudioOutput', {
585
987
  id: this.id,
@@ -595,6 +997,14 @@ class HMSSDK {
595
997
  return 'API currently not available for iOS';
596
998
  }
597
999
  });
1000
+ /**
1001
+ * - This wrapper function used to change Audio Mode manually, currently available only for android.
1002
+ *
1003
+ * checkout {@link https://www.100ms.live/docs/react-native/v2/features/audio-mode-change} for more info
1004
+ *
1005
+ * @param {HMSAudioMode}
1006
+ * @memberof HMSSDK
1007
+ */
598
1008
  _defineProperty(this, "setAudioMode", audioMode => {
599
1009
  _HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function setAudioMode', {
600
1010
  id: this.id,
@@ -610,6 +1020,14 @@ class HMSSDK {
610
1020
  return 'API currently not available for iOS';
611
1021
  }
612
1022
  });
1023
+ /**
1024
+ * - This is a wrapper function which adds a listener which is triggered when audio output device is switched, currently available only for android.
1025
+ *
1026
+ * checkout {@link https://www.100ms.live/docs/react-native/v2/features/audio-output-routing#adding-a-listener} for more info
1027
+ *
1028
+ * @param {Function}
1029
+ * @memberof HMSSDK
1030
+ */
613
1031
  _defineProperty(this, "setAudioDeviceChangeListener", callback => {
614
1032
  _HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function setAudioDeviceChangeListener', {
615
1033
  id: this.id
@@ -642,6 +1060,13 @@ class HMSSDK {
642
1060
  id: this.id
643
1061
  });
644
1062
  });
1063
+ /**
1064
+ * - This is a prototype event listener that takes action and listens for updates related to that particular action
1065
+ *
1066
+ * @param {string} action
1067
+ * @param {*} callback
1068
+ * @memberof HMSSDK
1069
+ */
645
1070
  _defineProperty(this, "addEventListener", (action, callback) => {
646
1071
  _HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function addEventListener', {
647
1072
  action,
@@ -893,6 +1318,13 @@ class HMSSDK {
893
1318
  default:
894
1319
  }
895
1320
  });
1321
+ /**
1322
+ * - This is a prototype event listener that takes action and listens for updates related to that particular action
1323
+ *
1324
+ * @param {string} action
1325
+ * @param {*} callback
1326
+ * @memberof HMSSDK
1327
+ */
896
1328
  _defineProperty(this, "removeEventListener", action => {
897
1329
  _HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function removeEventListener', {
898
1330
  action,
@@ -1144,6 +1576,11 @@ class HMSSDK {
1144
1576
  default:
1145
1577
  }
1146
1578
  });
1579
+ /**
1580
+ * removes all the listeners
1581
+ *
1582
+ * @memberof HMSSDK
1583
+ */
1147
1584
  _defineProperty(this, "removeAllListeners", () => {
1148
1585
  this.onPreviewDelegate = null;
1149
1586
  this.onJoinDelegate = null;
@@ -1171,6 +1608,20 @@ class HMSSDK {
1171
1608
  id: this.id
1172
1609
  });
1173
1610
  });
1611
+ /**
1612
+ * - Below are all the listeners that are connected to native side.
1613
+ *
1614
+ * - All of the are connected when build function is called, we can connect them to the app by
1615
+ * calling {@link addEventListener} with corresponding event type.
1616
+ *
1617
+ * - Before passing the data to the eventListener of the app these listeners encode the data in
1618
+ * ts classes for a proper structuring of the data.
1619
+ *
1620
+ * - Even When event listeners of the app are disconnected using {@link removeEventListener} or
1621
+ * {@link removeAllListeners} or not even connected in first place, these functions still run to
1622
+ * maintain the current state of the instance of {@link HMSSDK}.
1623
+ *
1624
+ */
1174
1625
  _defineProperty(this, "onPreviewListener", data => {
1175
1626
  if (data.id !== this.id) {
1176
1627
  return;
@@ -1203,11 +1654,13 @@ class HMSSDK {
1203
1654
  }
1204
1655
  });
1205
1656
  _defineProperty(this, "onRoomListener", data => {
1657
+ var _getHmsRoomCache2;
1206
1658
  if (data.id !== this.id) {
1207
1659
  return;
1208
1660
  }
1209
1661
  const room = _HMSEncoder.HMSEncoder.encodeHmsRoom(data.room, this.id);
1210
1662
  const type = data.type;
1663
+ (_getHmsRoomCache2 = (0, _HMSRoomCache.getHmsRoomCache)()) === null || _getHmsRoomCache2 === void 0 ? void 0 : _getHmsRoomCache2.updateRoomCache(data.room, data.type);
1211
1664
  if (this.onRoomDelegate) {
1212
1665
  _HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Listener ON_ROOM_LISTENER_CALL', {
1213
1666
  room,
@@ -1219,12 +1672,22 @@ class HMSSDK {
1219
1672
  });
1220
1673
  }
1221
1674
  });
1222
- _defineProperty(this, "onPeerListener", data => {
1223
- if (data.id !== this.id) {
1224
- return;
1675
+ _defineProperty(this, "onPeerListener", peerData => {
1676
+ var _getHmsPeersCache;
1677
+ const data = {
1678
+ peer: peerData,
1679
+ type: null
1680
+ };
1681
+ for (const ordinal of _HMSPeerUpdate.HMSPeerUpdateOrdinals.keys()) {
1682
+ if (ordinal in peerData) {
1683
+ data.peer.peerID = peerData[ordinal];
1684
+ data.type = ordinal;
1685
+ break;
1686
+ }
1225
1687
  }
1226
- const peer = _HMSEncoder.HMSEncoder.encodeHmsPeer(data.peer, this.id);
1227
- const type = data.type;
1688
+ const peer = _HMSEncoder.HMSEncoder.encodeHmsPeer(data.peer);
1689
+ const type = _HMSEncoder.HMSEncoder.encodeHmsPeerUpdate(data.type) || data.type;
1690
+ (_getHmsPeersCache = (0, _HMSPeersCache.getHmsPeersCache)()) === null || _getHmsPeersCache === void 0 ? void 0 : _getHmsPeersCache.updatePeerCache(data.peer.peerID, data.peer, type);
1228
1691
  if (this.onPeerDelegate) {
1229
1692
  _HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Listener ON_PEER_LISTENER_CALL', {
1230
1693
  peer,
@@ -1237,12 +1700,16 @@ class HMSSDK {
1237
1700
  }
1238
1701
  });
1239
1702
  _defineProperty(this, "onTrackListener", data => {
1703
+ var _getHmsPeersCache2;
1240
1704
  if (data.id !== this.id) {
1241
1705
  return;
1242
1706
  }
1243
1707
  const track = _HMSEncoder.HMSEncoder.encodeHmsTrack(data.track, this.id);
1244
- const peer = _HMSEncoder.HMSEncoder.encodeHmsPeer(data.peer, this.id);
1708
+ const peer = _HMSEncoder.HMSEncoder.encodeHmsPeer(data.peer);
1245
1709
  const type = data.type;
1710
+ (_getHmsPeersCache2 = (0, _HMSPeersCache.getHmsPeersCache)()) === null || _getHmsPeersCache2 === void 0 ? void 0 : _getHmsPeersCache2.updatePeerCache(data.peer.peerID, {
1711
+ track
1712
+ }, data.type);
1246
1713
  if (this.muteStatus && (data === null || data === void 0 ? void 0 : data.type) === 'TRACK_ADDED' && track.type === _HMSTrackType.HMSTrackType.AUDIO) {
1247
1714
  this.setPlaybackForAllAudio(this.muteStatus);
1248
1715
  }
@@ -1263,7 +1730,7 @@ class HMSSDK {
1263
1730
  if (data.id !== this.id) {
1264
1731
  return;
1265
1732
  }
1266
- const message = _HMSEncoder.HMSEncoder.encodeHMSMessage(data, this.id);
1733
+ const message = _HMSEncoder.HMSEncoder.encodeHMSMessage(data);
1267
1734
  if (this.onMessageDelegate) {
1268
1735
  _HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Listener ON_MESSAGE_LISTENER_CALL', message);
1269
1736
  this.onMessageDelegate(message);
@@ -1293,7 +1760,7 @@ class HMSSDK {
1293
1760
  return;
1294
1761
  }
1295
1762
  if (this.onRoleChangeRequestDelegate) {
1296
- const encodedRoleChangeRequest = _HMSEncoder.HMSEncoder.encodeHmsRoleChangeRequest(data, this.id);
1763
+ const encodedRoleChangeRequest = _HMSEncoder.HMSEncoder.encodeHmsRoleChangeRequest(data);
1297
1764
  _HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Listener ON_ROLE_CHANGE_LISTENER_CALL', encodedRoleChangeRequest);
1298
1765
  this.onRoleChangeRequestDelegate(encodedRoleChangeRequest);
1299
1766
  }
@@ -1303,7 +1770,7 @@ class HMSSDK {
1303
1770
  return;
1304
1771
  }
1305
1772
  if (this.onChangeTrackStateRequestDelegate) {
1306
- const encodedRoleChangeRequest = _HMSEncoder.HMSEncoder.encodeHmsChangeTrackStateRequest(data, this.id);
1773
+ const encodedRoleChangeRequest = _HMSEncoder.HMSEncoder.encodeHmsChangeTrackStateRequest(data);
1307
1774
  _HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Listener ON_CHANGE_TRACK_STATE_REQUEST_LISTENER_CALL', encodedRoleChangeRequest);
1308
1775
  this.onChangeTrackStateRequestDelegate(encodedRoleChangeRequest);
1309
1776
  }
@@ -1316,7 +1783,7 @@ class HMSSDK {
1316
1783
  if (this.onRemovedFromRoomDelegate) {
1317
1784
  let requestedBy = null;
1318
1785
  if (data.requestedBy) {
1319
- requestedBy = _HMSEncoder.HMSEncoder.encodeHmsPeer(data.requestedBy, this.id);
1786
+ requestedBy = _HMSEncoder.HMSEncoder.encodeHmsPeer(data.requestedBy);
1320
1787
  }
1321
1788
  const reason = data.reason;
1322
1789
  const roomEnded = data.roomEnded;
@@ -1370,7 +1837,7 @@ class HMSSDK {
1370
1837
  return;
1371
1838
  }
1372
1839
  let localAudioStats = new _HMSLocalAudioStats.HMSLocalAudioStats(data.localAudioStats);
1373
- let peer = _HMSEncoder.HMSEncoder.encodeHmsPeer(data.peer, this.id);
1840
+ let peer = _HMSEncoder.HMSEncoder.encodeHmsPeer(data.peer);
1374
1841
  let track = _HMSEncoder.HMSEncoder.encodeHmsLocalAudioTrack(data.track, this.id);
1375
1842
  if (this.onLocalAudioStatsDelegate) {
1376
1843
  _HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Listener onLocalAudioStatsListener_CALL', {
@@ -1392,7 +1859,7 @@ class HMSSDK {
1392
1859
  return;
1393
1860
  }
1394
1861
  let localVideoStats = new _HMSLocalVideoStats.HMSLocalVideoStats(data.localVideoStats);
1395
- let peer = _HMSEncoder.HMSEncoder.encodeHmsPeer(data.peer, this.id);
1862
+ let peer = _HMSEncoder.HMSEncoder.encodeHmsPeer(data.peer);
1396
1863
  let track = _HMSEncoder.HMSEncoder.encodeHmsLocalVideoTrack(data.track, this.id);
1397
1864
  if (this.onLocalVideoStatsDelegate) {
1398
1865
  _HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Listener onLocalVideoStatsListener_CALL', {
@@ -1414,7 +1881,7 @@ class HMSSDK {
1414
1881
  return;
1415
1882
  }
1416
1883
  let remoteAudioStats = new _HMSRemoteAudioStats.HMSRemoteAudioStats(data.remoteAudioStats);
1417
- let peer = _HMSEncoder.HMSEncoder.encodeHmsPeer(data.peer, this.id);
1884
+ let peer = _HMSEncoder.HMSEncoder.encodeHmsPeer(data.peer);
1418
1885
  let track = _HMSEncoder.HMSEncoder.encodeHmsRemoteAudioTrack(data.track, this.id);
1419
1886
  if (this.onRemoteAudioStatsDelegate) {
1420
1887
  _HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Listener onRemoteAudioStatsListener_CALL', {
@@ -1436,7 +1903,7 @@ class HMSSDK {
1436
1903
  return;
1437
1904
  }
1438
1905
  let remoteVideoStats = new _HMSRemoteVideoStats.HMSRemoteVideoStats(data.remoteVideoStats);
1439
- let peer = _HMSEncoder.HMSEncoder.encodeHmsPeer(data.peer, this.id);
1906
+ let peer = _HMSEncoder.HMSEncoder.encodeHmsPeer(data.peer);
1440
1907
  let track = _HMSEncoder.HMSEncoder.encodeHmsRemoteVideoTrack(data.track, this.id);
1441
1908
  if (this.onRemoteVideoStatsDelegate) {
1442
1909
  _HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Listener onRemoteVideoStatsListener_CALL', {
@@ -1476,6 +1943,14 @@ class HMSSDK {
1476
1943
  });
1477
1944
  }
1478
1945
  });
1946
+ /**
1947
+ * - Updates the logger for this instance of HMSSDK
1948
+ * @param {HMSLogger} hmsLogger
1949
+ * @memberof HMSSDK
1950
+ */
1951
+ _defineProperty(this, "setLogger", hmsLogger => {
1952
+ (0, _HMSLogger.setLogger)(this.id, hmsLogger);
1953
+ });
1479
1954
  this.id = id;
1480
1955
  }
1481
1956
 
@@ -1520,22 +1995,6 @@ class HMSSDK {
1520
1995
  HmsSdk = new HMSSDK(id);
1521
1996
  return HmsSdk;
1522
1997
  }
1523
-
1524
- /**
1525
- * - Returns the instance of logger which can be used to manipulate log levels.
1526
- * @returns @instance HMSLogger
1527
- * @memberof HMSSDK
1528
- */
1529
- static getLogger() {
1530
- return (0, _HMSLogger.getLogger)();
1531
- }
1532
-
1533
- /**
1534
- * - Updates the logger for this instance of HMSSDK
1535
- * @param {HMSLogger} hmsLogger
1536
- * @memberof HMSSDK
1537
- */
1538
-
1539
1998
  async isPipModeSupported() {
1540
1999
  return HMSManager.handlePipActions('isPipModeSupported', {
1541
2000
  id: this.id
@@ -1553,6 +2012,15 @@ class HMSSDK {
1553
2012
  id: this.id
1554
2013
  });
1555
2014
  }
2015
+
2016
+ /**
2017
+ * - Returns the instance of logger which can be used to manipulate log levels.
2018
+ * @returns @instance HMSLogger
2019
+ * @memberof HMSSDK
2020
+ */
2021
+ static getLogger() {
2022
+ return (0, _HMSLogger.getLogger)();
2023
+ }
1556
2024
  }
1557
2025
  exports.HMSSDK = HMSSDK;
1558
2026
  //# sourceMappingURL=HMSSDK.js.map