@100mslive/react-native-hms 2.0.0-alpha.0 → 2.0.0-alpha.1

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 (960) hide show
  1. package/README.md +21 -15
  2. package/android/build.gradle +95 -48
  3. package/android/src/main/java/com/reactnativehmssdk/HMSAudioshareActivity.kt +8 -10
  4. package/android/src/main/java/com/reactnativehmssdk/HMSDecoder.kt +177 -3
  5. package/android/src/main/java/com/reactnativehmssdk/HMSHLSPlayer.kt +149 -29
  6. package/android/src/main/java/com/reactnativehmssdk/HMSHLSPlayerManagerImpl.kt +185 -0
  7. package/android/src/main/java/com/reactnativehmssdk/HMSHelper.kt +80 -20
  8. package/android/src/main/java/com/reactnativehmssdk/{HMSManager.kt → HMSManagerImpl.kt} +517 -145
  9. package/android/src/main/java/com/reactnativehmssdk/HMSRNSDK.kt +503 -312
  10. package/android/src/main/java/com/reactnativehmssdk/HMSReactNativeEvent.kt +29 -0
  11. package/android/src/main/java/com/reactnativehmssdk/HMSSDKViewManagerImpl.kt +119 -0
  12. package/android/src/main/java/com/reactnativehmssdk/HMSView.kt +64 -12
  13. package/android/src/main/java/com/reactnativehmssdk/HmsScreenshareActivity.kt +9 -9
  14. package/android/src/main/java/com/reactnativehmssdk/HmssdkPackage.kt +44 -8
  15. package/android/src/main/java/com/reactnativehmssdk/Interactivity/HMSInteractivityDecoder.kt +435 -0
  16. package/android/src/main/java/com/reactnativehmssdk/Interactivity/HMSInteractivityHelper.kt +353 -0
  17. package/android/src/main/java/com/reactnativehmssdk/Interactivity/HMSRNInteractivityCenter.kt +245 -0
  18. package/android/src/main/java/com/reactnativehmssdk/PipActionReceiver.kt +13 -3
  19. package/android/src/newarch/java/com/reactnativehmssdk/HMSHLSPlayerManager.kt +128 -0
  20. package/android/src/newarch/java/com/reactnativehmssdk/HMSManager.kt +332 -0
  21. package/android/src/newarch/java/com/reactnativehmssdk/HMSSDKViewManager.kt +102 -0
  22. package/android/src/oldarch/java/com/reactnativehmssdk/HMSHLSPlayerManager.kt +61 -0
  23. package/android/src/oldarch/java/com/reactnativehmssdk/HMSManager.kt +351 -0
  24. package/android/src/oldarch/java/com/reactnativehmssdk/HMSSDKViewManager.kt +87 -0
  25. package/ios/HMSConstants.swift +4 -0
  26. package/ios/HMSDecoder.swift +154 -18
  27. package/ios/HMSHLSPlayerComponentView.mm +325 -0
  28. package/ios/HMSHLSPlayerManager.m +16 -0
  29. package/ios/HMSHLSPlayerManager.swift +236 -70
  30. package/ios/HMSHelper.swift +126 -14
  31. package/ios/HMSInteractivityDecoder.swift +314 -0
  32. package/ios/HMSInteractivityHelper.swift +169 -0
  33. package/ios/HMSManager.m +203 -10
  34. package/ios/HMSManager.mm +365 -0
  35. package/ios/HMSManager.swift +431 -87
  36. package/ios/HMSRNInteractivityCenter.swift +161 -0
  37. package/ios/HMSRNSDK.swift +961 -134
  38. package/ios/HMSView.m +9 -0
  39. package/ios/HMSView.swift +45 -16
  40. package/ios/HMSViewComponentView.mm +229 -0
  41. package/ios/PIPMode/HMSPipModel.swift +18 -0
  42. package/ios/PIPMode/HMSPipView.swift +36 -0
  43. package/ios/PIPMode/HMSSampleBufferSwiftUIView.swift +45 -0
  44. package/lib/commonjs/classes/HMSAudioCodec.js +1 -2
  45. package/lib/commonjs/classes/HMSAudioCodec.js.map +1 -1
  46. package/lib/commonjs/classes/HMSAudioDevice.js +10 -2
  47. package/lib/commonjs/classes/HMSAudioDevice.js.map +1 -1
  48. package/lib/commonjs/classes/HMSAudioFilePlayerNode.js.map +1 -1
  49. package/lib/commonjs/classes/HMSAudioMixerSource.js +3 -3
  50. package/lib/commonjs/classes/HMSAudioMixerSource.js.map +1 -1
  51. package/lib/commonjs/classes/HMSAudioMixingMode.js +12 -2
  52. package/lib/commonjs/classes/HMSAudioMixingMode.js.map +1 -1
  53. package/lib/commonjs/classes/HMSAudioMode.js +1 -2
  54. package/lib/commonjs/classes/HMSAudioMode.js.map +1 -1
  55. package/lib/commonjs/classes/HMSAudioNode.js +3 -3
  56. package/lib/commonjs/classes/HMSAudioNode.js.map +1 -1
  57. package/lib/commonjs/classes/HMSAudioSettings.js +3 -3
  58. package/lib/commonjs/classes/HMSAudioSettings.js.map +1 -1
  59. package/lib/commonjs/classes/HMSAudioTrack.js +9 -0
  60. package/lib/commonjs/classes/HMSAudioTrack.js.map +1 -1
  61. package/lib/commonjs/classes/HMSAudioTrackSettings.js +12 -5
  62. package/lib/commonjs/classes/HMSAudioTrackSettings.js.map +1 -1
  63. package/lib/commonjs/classes/HMSBrowserRecordingState.js +5 -3
  64. package/lib/commonjs/classes/HMSBrowserRecordingState.js.map +1 -1
  65. package/lib/commonjs/classes/HMSCameraControl.js +3 -4
  66. package/lib/commonjs/classes/HMSCameraControl.js.map +1 -1
  67. package/lib/commonjs/classes/HMSCameraFacing.js +10 -2
  68. package/lib/commonjs/classes/HMSCameraFacing.js.map +1 -1
  69. package/lib/commonjs/classes/HMSChangeTrackStateRequest.js +3 -3
  70. package/lib/commonjs/classes/HMSChangeTrackStateRequest.js.map +1 -1
  71. package/lib/commonjs/classes/HMSConfig.js +30 -3
  72. package/lib/commonjs/classes/HMSConfig.js.map +1 -1
  73. package/lib/commonjs/classes/HMSConstants.js +1 -2
  74. package/lib/commonjs/classes/HMSConstants.js.map +1 -1
  75. package/lib/commonjs/classes/HMSEncoder.js +57 -14
  76. package/lib/commonjs/classes/HMSEncoder.js.map +1 -1
  77. package/lib/commonjs/classes/HMSEventEmitter.js +1 -2
  78. package/lib/commonjs/classes/HMSEventEmitter.js.map +1 -1
  79. package/lib/commonjs/classes/HMSException.js +21 -3
  80. package/lib/commonjs/classes/HMSException.js.map +1 -1
  81. package/lib/commonjs/classes/HMSHLSConfig.js +3 -3
  82. package/lib/commonjs/classes/HMSHLSConfig.js.map +1 -1
  83. package/lib/commonjs/classes/HMSHLSMeetingURLVariant.js +3 -3
  84. package/lib/commonjs/classes/HMSHLSMeetingURLVariant.js.map +1 -1
  85. package/lib/commonjs/classes/HMSHLSPlaylistType.js +12 -0
  86. package/lib/commonjs/classes/HMSHLSPlaylistType.js.map +1 -0
  87. package/lib/commonjs/classes/HMSHLSRecordingConfig.js +3 -3
  88. package/lib/commonjs/classes/HMSHLSRecordingConfig.js.map +1 -1
  89. package/lib/commonjs/classes/HMSHLSRecordingState.js +7 -7
  90. package/lib/commonjs/classes/HMSHLSRecordingState.js.map +1 -1
  91. package/lib/commonjs/classes/HMSHLSStreamingState.js +9 -3
  92. package/lib/commonjs/classes/HMSHLSStreamingState.js.map +1 -1
  93. package/lib/commonjs/classes/HMSHLSTimedMetadata.js +2 -0
  94. package/lib/commonjs/classes/HMSHLSTimedMetadata.js.map +1 -0
  95. package/lib/commonjs/classes/HMSHLSVariant.js +5 -3
  96. package/lib/commonjs/classes/HMSHLSVariant.js.map +1 -1
  97. package/lib/commonjs/classes/HMSHelper.js.map +1 -1
  98. package/lib/commonjs/classes/HMSIOSAudioMode.js +16 -2
  99. package/lib/commonjs/classes/HMSIOSAudioMode.js.map +1 -1
  100. package/lib/commonjs/classes/HMSInteractivityCenter.js +174 -0
  101. package/lib/commonjs/classes/HMSInteractivityCenter.js.map +1 -0
  102. package/lib/commonjs/classes/HMSInteractivityEncoder.js +83 -0
  103. package/lib/commonjs/classes/HMSInteractivityEncoder.js.map +1 -0
  104. package/lib/commonjs/classes/HMSLayer.js +1 -2
  105. package/lib/commonjs/classes/HMSLayer.js.map +1 -1
  106. package/lib/commonjs/classes/HMSLocalAudioStats.js +3 -3
  107. package/lib/commonjs/classes/HMSLocalAudioStats.js.map +1 -1
  108. package/lib/commonjs/classes/HMSLocalAudioTrack.js +3 -3
  109. package/lib/commonjs/classes/HMSLocalAudioTrack.js.map +1 -1
  110. package/lib/commonjs/classes/HMSLocalPeer.js +3 -3
  111. package/lib/commonjs/classes/HMSLocalPeer.js.map +1 -1
  112. package/lib/commonjs/classes/HMSLocalVideoStats.js +3 -3
  113. package/lib/commonjs/classes/HMSLocalVideoStats.js.map +1 -1
  114. package/lib/commonjs/classes/HMSLocalVideoTrack.js +3 -3
  115. package/lib/commonjs/classes/HMSLocalVideoTrack.js.map +1 -1
  116. package/lib/commonjs/classes/HMSLogAlarmManager.js +13 -2
  117. package/lib/commonjs/classes/HMSLogAlarmManager.js.map +1 -1
  118. package/lib/commonjs/classes/HMSLogLevel.js +13 -2
  119. package/lib/commonjs/classes/HMSLogLevel.js.map +1 -1
  120. package/lib/commonjs/classes/HMSLogSettings.js +17 -3
  121. package/lib/commonjs/classes/HMSLogSettings.js.map +1 -1
  122. package/lib/commonjs/classes/HMSLogger.js +4 -5
  123. package/lib/commonjs/classes/HMSLogger.js.map +1 -1
  124. package/lib/commonjs/classes/HMSMessage.js +3 -3
  125. package/lib/commonjs/classes/HMSMessage.js.map +1 -1
  126. package/lib/commonjs/classes/HMSMessageRecipient.js +3 -3
  127. package/lib/commonjs/classes/HMSMessageRecipient.js.map +1 -1
  128. package/lib/commonjs/classes/HMSMessageRecipientType.js +1 -2
  129. package/lib/commonjs/classes/HMSMessageRecipientType.js.map +1 -1
  130. package/lib/commonjs/classes/HMSMicNode.js.map +1 -1
  131. package/lib/commonjs/classes/HMSNativeEventEmitter.js +4 -6
  132. package/lib/commonjs/classes/HMSNativeEventEmitter.js.map +1 -1
  133. package/lib/commonjs/classes/HMSNativeEventListener.js +3 -4
  134. package/lib/commonjs/classes/HMSNativeEventListener.js.map +1 -1
  135. package/lib/commonjs/classes/HMSNetworkQuality.js +14 -3
  136. package/lib/commonjs/classes/HMSNetworkQuality.js.map +1 -1
  137. package/lib/commonjs/classes/HMSNoiseCancellationPlugin.js +158 -0
  138. package/lib/commonjs/classes/HMSNoiseCancellationPlugin.js.map +1 -0
  139. package/lib/commonjs/classes/HMSPIPConfig.js +6 -0
  140. package/lib/commonjs/classes/HMSPIPConfig.js.map +1 -0
  141. package/lib/commonjs/classes/HMSPIPListenerActions.js +10 -2
  142. package/lib/commonjs/classes/HMSPIPListenerActions.js.map +1 -1
  143. package/lib/commonjs/classes/HMSPeer.js +186 -5
  144. package/lib/commonjs/classes/HMSPeer.js.map +1 -1
  145. package/lib/commonjs/classes/HMSPeerListIterator.js +25 -7
  146. package/lib/commonjs/classes/HMSPeerListIterator.js.map +1 -1
  147. package/lib/commonjs/classes/HMSPeerListIteratorOptions.js.map +1 -1
  148. package/lib/commonjs/classes/HMSPeerType.js +24 -0
  149. package/lib/commonjs/classes/HMSPeerType.js.map +1 -0
  150. package/lib/commonjs/classes/HMSPeerUpdate.js +2 -4
  151. package/lib/commonjs/classes/HMSPeerUpdate.js.map +1 -1
  152. package/lib/commonjs/classes/HMSPeersCache.js +6 -7
  153. package/lib/commonjs/classes/HMSPeersCache.js.map +1 -1
  154. package/lib/commonjs/classes/HMSPermissions.js +11 -3
  155. package/lib/commonjs/classes/HMSPermissions.js.map +1 -1
  156. package/lib/commonjs/classes/HMSPollsListenerActions.js +11 -0
  157. package/lib/commonjs/classes/HMSPollsListenerActions.js.map +1 -0
  158. package/lib/commonjs/classes/HMSPublishSettings.js +3 -3
  159. package/lib/commonjs/classes/HMSPublishSettings.js.map +1 -1
  160. package/lib/commonjs/classes/HMSQualityLimitationReason.js +1 -2
  161. package/lib/commonjs/classes/HMSQualityLimitationReason.js.map +1 -1
  162. package/lib/commonjs/classes/HMSQualityLimitationReasons.js +3 -3
  163. package/lib/commonjs/classes/HMSQualityLimitationReasons.js.map +1 -1
  164. package/lib/commonjs/classes/HMSRTCStats.js +3 -3
  165. package/lib/commonjs/classes/HMSRTCStats.js.map +1 -1
  166. package/lib/commonjs/classes/HMSRTCStatsReport.js +3 -3
  167. package/lib/commonjs/classes/HMSRTCStatsReport.js.map +1 -1
  168. package/lib/commonjs/classes/HMSRTMPConfig.js +17 -3
  169. package/lib/commonjs/classes/HMSRTMPConfig.js.map +1 -1
  170. package/lib/commonjs/classes/HMSRecordingState.js +17 -0
  171. package/lib/commonjs/classes/HMSRecordingState.js.map +1 -0
  172. package/lib/commonjs/classes/HMSRemoteAudioStats.js +3 -3
  173. package/lib/commonjs/classes/HMSRemoteAudioStats.js.map +1 -1
  174. package/lib/commonjs/classes/HMSRemoteAudioTrack.js +3 -3
  175. package/lib/commonjs/classes/HMSRemoteAudioTrack.js.map +1 -1
  176. package/lib/commonjs/classes/HMSRemotePeer.js +3 -3
  177. package/lib/commonjs/classes/HMSRemotePeer.js.map +1 -1
  178. package/lib/commonjs/classes/HMSRemoteVideoStats.js +3 -3
  179. package/lib/commonjs/classes/HMSRemoteVideoStats.js.map +1 -1
  180. package/lib/commonjs/classes/HMSRemoteVideoTrack.js +3 -3
  181. package/lib/commonjs/classes/HMSRemoteVideoTrack.js.map +1 -1
  182. package/lib/commonjs/classes/HMSRole.js +20 -3
  183. package/lib/commonjs/classes/HMSRole.js.map +1 -1
  184. package/lib/commonjs/classes/HMSRoleChangeRequest.js +3 -3
  185. package/lib/commonjs/classes/HMSRoleChangeRequest.js.map +1 -1
  186. package/lib/commonjs/classes/HMSRoom.js +17 -4
  187. package/lib/commonjs/classes/HMSRoom.js.map +1 -1
  188. package/lib/commonjs/classes/HMSRoomCache.js +13 -7
  189. package/lib/commonjs/classes/HMSRoomCache.js.map +1 -1
  190. package/lib/commonjs/classes/HMSRoomUpdate.js +2 -2
  191. package/lib/commonjs/classes/HMSRoomUpdate.js.map +1 -1
  192. package/lib/commonjs/classes/HMSRtmpStreamingState.js +5 -5
  193. package/lib/commonjs/classes/HMSRtmpStreamingState.js.map +1 -1
  194. package/lib/commonjs/classes/HMSRtmpVideoResolution.js +16 -3
  195. package/lib/commonjs/classes/HMSRtmpVideoResolution.js.map +1 -1
  196. package/lib/commonjs/classes/HMSSDK.js +1313 -327
  197. package/lib/commonjs/classes/HMSSDK.js.map +1 -1
  198. package/lib/commonjs/classes/HMSScreenBroadcastAudioReceiverNode.js.map +1 -1
  199. package/lib/commonjs/classes/HMSServerRecordingState.js +5 -3
  200. package/lib/commonjs/classes/HMSServerRecordingState.js.map +1 -1
  201. package/lib/commonjs/classes/HMSSessionStore.js +20 -23
  202. package/lib/commonjs/classes/HMSSessionStore.js.map +1 -1
  203. package/lib/commonjs/classes/HMSSimulcastLayerDefinition.js +3 -3
  204. package/lib/commonjs/classes/HMSSimulcastLayerDefinition.js.map +1 -1
  205. package/lib/commonjs/classes/HMSSimulcastLayerSettings.js +3 -3
  206. package/lib/commonjs/classes/HMSSimulcastLayerSettings.js.map +1 -1
  207. package/lib/commonjs/classes/HMSSimulcastLayerSettingsPolicy.js +3 -3
  208. package/lib/commonjs/classes/HMSSimulcastLayerSettingsPolicy.js.map +1 -1
  209. package/lib/commonjs/classes/HMSSimulcastSettings.js +3 -3
  210. package/lib/commonjs/classes/HMSSimulcastSettings.js.map +1 -1
  211. package/lib/commonjs/classes/HMSSimulcastSettingsPolicy.js +3 -3
  212. package/lib/commonjs/classes/HMSSimulcastSettingsPolicy.js.map +1 -1
  213. package/lib/commonjs/classes/HMSSpeaker.js +3 -3
  214. package/lib/commonjs/classes/HMSSpeaker.js.map +1 -1
  215. package/lib/commonjs/classes/HMSStreamingState.js +15 -0
  216. package/lib/commonjs/classes/HMSStreamingState.js.map +1 -0
  217. package/lib/commonjs/classes/HMSSubscribeDegradationPolicy.js +3 -3
  218. package/lib/commonjs/classes/HMSSubscribeDegradationPolicy.js.map +1 -1
  219. package/lib/commonjs/classes/HMSSubscribeSettings.js +3 -3
  220. package/lib/commonjs/classes/HMSSubscribeSettings.js.map +1 -1
  221. package/lib/commonjs/classes/HMSTrack.js +16 -3
  222. package/lib/commonjs/classes/HMSTrack.js.map +1 -1
  223. package/lib/commonjs/classes/HMSTrackSettings.js +13 -3
  224. package/lib/commonjs/classes/HMSTrackSettings.js.map +1 -1
  225. package/lib/commonjs/classes/HMSTrackSettingsInitState.js +10 -2
  226. package/lib/commonjs/classes/HMSTrackSettingsInitState.js.map +1 -1
  227. package/lib/commonjs/classes/HMSTrackSource.js +11 -2
  228. package/lib/commonjs/classes/HMSTrackSource.js.map +1 -1
  229. package/lib/commonjs/classes/HMSTrackType.js +8 -2
  230. package/lib/commonjs/classes/HMSTrackType.js.map +1 -1
  231. package/lib/commonjs/classes/HMSTrackUpdate.js +1 -2
  232. package/lib/commonjs/classes/HMSTrackUpdate.js.map +1 -1
  233. package/lib/commonjs/classes/HMSUpdateListenerActions.js +44 -5
  234. package/lib/commonjs/classes/HMSUpdateListenerActions.js.map +1 -1
  235. package/lib/commonjs/classes/HMSVideoCodec.js +1 -2
  236. package/lib/commonjs/classes/HMSVideoCodec.js.map +1 -1
  237. package/lib/commonjs/classes/HMSVideoResolution.js +3 -3
  238. package/lib/commonjs/classes/HMSVideoResolution.js.map +1 -1
  239. package/lib/commonjs/classes/HMSVideoSettings.js +3 -3
  240. package/lib/commonjs/classes/HMSVideoSettings.js.map +1 -1
  241. package/lib/commonjs/classes/HMSVideoTrack.js +20 -3
  242. package/lib/commonjs/classes/HMSVideoTrack.js.map +1 -1
  243. package/lib/commonjs/classes/HMSVideoTrackSettings.js +18 -7
  244. package/lib/commonjs/classes/HMSVideoTrackSettings.js.map +1 -1
  245. package/lib/commonjs/classes/HMSVideoViewMode.js +1 -2
  246. package/lib/commonjs/classes/HMSVideoViewMode.js.map +1 -1
  247. package/lib/commonjs/classes/HmsView.js +77 -28
  248. package/lib/commonjs/classes/HmsView.js.map +1 -1
  249. package/lib/commonjs/classes/polls/DecodedPollLeaderboardResponse.js +6 -0
  250. package/lib/commonjs/classes/polls/DecodedPollLeaderboardResponse.js.map +1 -0
  251. package/lib/commonjs/classes/polls/HMSPoll.js +6 -0
  252. package/lib/commonjs/classes/polls/HMSPoll.js.map +1 -0
  253. package/lib/commonjs/classes/polls/HMSPollCategory.js +12 -0
  254. package/lib/commonjs/classes/polls/HMSPollCategory.js.map +1 -0
  255. package/lib/commonjs/classes/polls/HMSPollCreateParams.js +6 -0
  256. package/lib/commonjs/classes/polls/HMSPollCreateParams.js.map +1 -0
  257. package/lib/commonjs/classes/polls/HMSPollLeaderboardEntry.js +6 -0
  258. package/lib/commonjs/classes/polls/HMSPollLeaderboardEntry.js.map +1 -0
  259. package/lib/commonjs/classes/polls/HMSPollLeaderboardSummary.js +2 -0
  260. package/lib/commonjs/classes/polls/HMSPollLeaderboardSummary.js.map +1 -0
  261. package/lib/commonjs/classes/polls/HMSPollQuestion.js +6 -0
  262. package/lib/commonjs/classes/polls/HMSPollQuestion.js.map +1 -0
  263. package/lib/commonjs/classes/polls/HMSPollQuestionAnswer.js +2 -0
  264. package/lib/commonjs/classes/polls/HMSPollQuestionAnswer.js.map +1 -0
  265. package/lib/commonjs/classes/polls/HMSPollQuestionCreateParams.js +6 -0
  266. package/lib/commonjs/classes/polls/HMSPollQuestionCreateParams.js.map +1 -0
  267. package/lib/commonjs/classes/polls/HMSPollQuestionOption.js +2 -0
  268. package/lib/commonjs/classes/polls/HMSPollQuestionOption.js.map +1 -0
  269. package/lib/commonjs/classes/polls/HMSPollQuestionOptionCreateParams.js +6 -0
  270. package/lib/commonjs/classes/polls/HMSPollQuestionOptionCreateParams.js.map +1 -0
  271. package/lib/commonjs/classes/polls/HMSPollQuestionQuizOptionCreateParams.js +6 -0
  272. package/lib/commonjs/classes/polls/HMSPollQuestionQuizOptionCreateParams.js.map +1 -0
  273. package/lib/commonjs/classes/polls/HMSPollQuestionResponse.js +6 -0
  274. package/lib/commonjs/classes/polls/HMSPollQuestionResponse.js.map +1 -0
  275. package/lib/commonjs/classes/polls/HMSPollQuestionResponseCreateParams.js +6 -0
  276. package/lib/commonjs/classes/polls/HMSPollQuestionResponseCreateParams.js.map +1 -0
  277. package/lib/commonjs/classes/polls/HMSPollQuestionResponseResult.js +2 -0
  278. package/lib/commonjs/classes/polls/HMSPollQuestionResponseResult.js.map +1 -0
  279. package/lib/commonjs/classes/polls/HMSPollQuestionResult.js +2 -0
  280. package/lib/commonjs/classes/polls/HMSPollQuestionResult.js.map +1 -0
  281. package/lib/commonjs/classes/polls/HMSPollQuestionType.js +14 -0
  282. package/lib/commonjs/classes/polls/HMSPollQuestionType.js.map +1 -0
  283. package/lib/commonjs/classes/polls/HMSPollResponsePeerInfo.js +2 -0
  284. package/lib/commonjs/classes/polls/HMSPollResponsePeerInfo.js.map +1 -0
  285. package/lib/commonjs/classes/polls/HMSPollResult.js +6 -0
  286. package/lib/commonjs/classes/polls/HMSPollResult.js.map +1 -0
  287. package/lib/commonjs/classes/polls/HMSPollState.js +13 -0
  288. package/lib/commonjs/classes/polls/HMSPollState.js.map +1 -0
  289. package/lib/commonjs/classes/polls/HMSPollType.js +12 -0
  290. package/lib/commonjs/classes/polls/HMSPollType.js.map +1 -0
  291. package/lib/commonjs/classes/polls/HMSPollUpdateType.js +13 -0
  292. package/lib/commonjs/classes/polls/HMSPollUpdateType.js.map +1 -0
  293. package/lib/commonjs/classes/polls/HMSPollUserTrackingMode.js +13 -0
  294. package/lib/commonjs/classes/polls/HMSPollUserTrackingMode.js.map +1 -0
  295. package/lib/commonjs/classes/polls/PollLeaderboardResponse.js +6 -0
  296. package/lib/commonjs/classes/polls/PollLeaderboardResponse.js.map +1 -0
  297. package/lib/commonjs/classes/transcriptions/HMSTranscript.js +6 -0
  298. package/lib/commonjs/classes/transcriptions/HMSTranscript.js.map +1 -0
  299. package/lib/commonjs/classes/transcriptions/OnTranscriptionError.js +2 -0
  300. package/lib/commonjs/classes/transcriptions/OnTranscriptionError.js.map +1 -0
  301. package/lib/commonjs/classes/transcriptions/TranscriptionState.js +14 -0
  302. package/lib/commonjs/classes/transcriptions/TranscriptionState.js.map +1 -0
  303. package/lib/commonjs/classes/transcriptions/Transcriptions.js +6 -0
  304. package/lib/commonjs/classes/transcriptions/Transcriptions.js.map +1 -0
  305. package/lib/commonjs/classes/transcriptions/TranscriptionsMode.js +12 -0
  306. package/lib/commonjs/classes/transcriptions/TranscriptionsMode.js.map +1 -0
  307. package/lib/commonjs/classes/transcriptions/index.js +61 -0
  308. package/lib/commonjs/classes/transcriptions/index.js.map +1 -0
  309. package/lib/commonjs/classes/whiteboard/HMSWhiteboard.js +6 -0
  310. package/lib/commonjs/classes/whiteboard/HMSWhiteboard.js.map +1 -0
  311. package/lib/commonjs/classes/whiteboard/HMSWhiteboardListenerActions.js +11 -0
  312. package/lib/commonjs/classes/whiteboard/HMSWhiteboardListenerActions.js.map +1 -0
  313. package/lib/commonjs/classes/whiteboard/HMSWhiteboardState.js +12 -0
  314. package/lib/commonjs/classes/whiteboard/HMSWhiteboardState.js.map +1 -0
  315. package/lib/commonjs/classes/whiteboard/HMSWhiteboardUpdateType.js +12 -0
  316. package/lib/commonjs/classes/whiteboard/HMSWhiteboardUpdateType.js.map +1 -0
  317. package/lib/commonjs/classes/whiteboard/index.js +39 -0
  318. package/lib/commonjs/classes/whiteboard/index.js.map +1 -0
  319. package/lib/commonjs/classes/whiteboard/registerCallbacks.js +26 -0
  320. package/lib/commonjs/classes/whiteboard/registerCallbacks.js.map +1 -0
  321. package/lib/commonjs/components/HMSHLSPlayer/HMSHLSPlayer.js +155 -49
  322. package/lib/commonjs/components/HMSHLSPlayer/HMSHLSPlayer.js.map +1 -1
  323. package/lib/commonjs/components/HMSHLSPlayer/RCTHMSHLSPlayer.js +5 -6
  324. package/lib/commonjs/components/HMSHLSPlayer/RCTHMSHLSPlayer.js.map +1 -1
  325. package/lib/commonjs/components/HMSHLSPlayer/hooks.js +26 -16
  326. package/lib/commonjs/components/HMSHLSPlayer/hooks.js.map +1 -1
  327. package/lib/commonjs/components/HMSHLSPlayer/index.js +22 -1
  328. package/lib/commonjs/components/HMSHLSPlayer/index.js.map +1 -1
  329. package/lib/commonjs/hooks/hmsviews.js +17 -0
  330. package/lib/commonjs/hooks/hmsviews.js.map +1 -0
  331. package/lib/commonjs/hooks/polls.js +17 -0
  332. package/lib/commonjs/hooks/polls.js.map +1 -0
  333. package/lib/commonjs/hooks/useHMSPeerUpdates.js +3 -5
  334. package/lib/commonjs/hooks/useHMSPeerUpdates.js.map +1 -1
  335. package/lib/commonjs/index.js +233 -6
  336. package/lib/commonjs/index.js.map +1 -1
  337. package/lib/commonjs/modules/HMSManagerModule.js +10 -0
  338. package/lib/commonjs/modules/HMSManagerModule.js.map +1 -0
  339. package/lib/commonjs/specs/HMSHLSPlayerNativeComponent.js +75 -0
  340. package/lib/commonjs/specs/HMSHLSPlayerNativeComponent.js.map +1 -0
  341. package/lib/commonjs/specs/HMSViewNativeComponent.js +55 -0
  342. package/lib/commonjs/specs/HMSViewNativeComponent.js.map +1 -0
  343. package/lib/commonjs/specs/NativeHMSManager.js +38 -0
  344. package/lib/commonjs/specs/NativeHMSManager.js.map +1 -0
  345. package/lib/commonjs/stores/hls-player-playback-slice.js +10 -0
  346. package/lib/commonjs/stores/hls-player-playback-slice.js.map +1 -1
  347. package/lib/commonjs/stores/hls-player-stats-store.js +28 -17
  348. package/lib/commonjs/stores/hls-player-stats-store.js.map +1 -1
  349. package/lib/commonjs/stores/hms-interactivity-store.js +21 -0
  350. package/lib/commonjs/stores/hms-interactivity-store.js.map +1 -0
  351. package/lib/commonjs/stores/hms-polls-slice.js +19 -0
  352. package/lib/commonjs/stores/hms-polls-slice.js.map +1 -0
  353. package/lib/commonjs/stores/hms-store.js +5 -6
  354. package/lib/commonjs/stores/hms-store.js.map +1 -1
  355. package/lib/commonjs/stores/hmsviews-slice.js +19 -0
  356. package/lib/commonjs/stores/hmsviews-slice.js.map +1 -0
  357. package/lib/commonjs/stores/types.js.map +1 -1
  358. package/lib/commonjs/types.js +4 -7
  359. package/lib/commonjs/types.js.map +1 -1
  360. package/lib/commonjs/utils/emitter/EventEmitter.js +23 -7
  361. package/lib/commonjs/utils/emitter/EventEmitter.js.map +1 -1
  362. package/lib/commonjs/utils/emitter/_EmitterSubscription.js +3 -3
  363. package/lib/commonjs/utils/emitter/_EmitterSubscription.js.map +1 -1
  364. package/lib/commonjs/utils/emitter/_EventSubscription.js +3 -3
  365. package/lib/commonjs/utils/emitter/_EventSubscription.js.map +1 -1
  366. package/lib/commonjs/utils/emitter/_EventSubscriptionVendor.js +3 -4
  367. package/lib/commonjs/utils/emitter/_EventSubscriptionVendor.js.map +1 -1
  368. package/lib/commonjs/utils/index.js.map +1 -1
  369. package/lib/commonjs/utils/keyboard.js +46 -0
  370. package/lib/commonjs/utils/keyboard.js.map +1 -0
  371. package/lib/commonjs/utils/notification.js +13 -0
  372. package/lib/commonjs/utils/notification.js.map +1 -0
  373. package/lib/commonjs/utils/windowController.js +30 -0
  374. package/lib/commonjs/utils/windowController.js.map +1 -0
  375. package/lib/module/classes/HMSAudioCodec.js.map +1 -1
  376. package/lib/module/classes/HMSAudioDevice.js +9 -0
  377. package/lib/module/classes/HMSAudioDevice.js.map +1 -1
  378. package/lib/module/classes/HMSAudioFilePlayerNode.js.map +1 -1
  379. package/lib/module/classes/HMSAudioMixerSource.js +3 -3
  380. package/lib/module/classes/HMSAudioMixerSource.js.map +1 -1
  381. package/lib/module/classes/HMSAudioMixingMode.js +11 -0
  382. package/lib/module/classes/HMSAudioMixingMode.js.map +1 -1
  383. package/lib/module/classes/HMSAudioMode.js.map +1 -1
  384. package/lib/module/classes/HMSAudioNode.js +3 -3
  385. package/lib/module/classes/HMSAudioNode.js.map +1 -1
  386. package/lib/module/classes/HMSAudioSettings.js +3 -3
  387. package/lib/module/classes/HMSAudioSettings.js.map +1 -1
  388. package/lib/module/classes/HMSAudioTrack.js +9 -0
  389. package/lib/module/classes/HMSAudioTrack.js.map +1 -1
  390. package/lib/module/classes/HMSAudioTrackSettings.js +12 -5
  391. package/lib/module/classes/HMSAudioTrackSettings.js.map +1 -1
  392. package/lib/module/classes/HMSBrowserRecordingState.js +5 -3
  393. package/lib/module/classes/HMSBrowserRecordingState.js.map +1 -1
  394. package/lib/module/classes/HMSCameraControl.js +2 -3
  395. package/lib/module/classes/HMSCameraControl.js.map +1 -1
  396. package/lib/module/classes/HMSCameraFacing.js +9 -0
  397. package/lib/module/classes/HMSCameraFacing.js.map +1 -1
  398. package/lib/module/classes/HMSChangeTrackStateRequest.js +3 -3
  399. package/lib/module/classes/HMSChangeTrackStateRequest.js.map +1 -1
  400. package/lib/module/classes/HMSConfig.js +30 -3
  401. package/lib/module/classes/HMSConfig.js.map +1 -1
  402. package/lib/module/classes/HMSConstants.js.map +1 -1
  403. package/lib/module/classes/HMSEncoder.js +56 -13
  404. package/lib/module/classes/HMSEncoder.js.map +1 -1
  405. package/lib/module/classes/HMSEventEmitter.js.map +1 -1
  406. package/lib/module/classes/HMSException.js +21 -3
  407. package/lib/module/classes/HMSException.js.map +1 -1
  408. package/lib/module/classes/HMSHLSConfig.js +3 -3
  409. package/lib/module/classes/HMSHLSConfig.js.map +1 -1
  410. package/lib/module/classes/HMSHLSMeetingURLVariant.js +3 -3
  411. package/lib/module/classes/HMSHLSMeetingURLVariant.js.map +1 -1
  412. package/lib/module/classes/HMSHLSPlaylistType.js +6 -0
  413. package/lib/module/classes/HMSHLSPlaylistType.js.map +1 -0
  414. package/lib/module/classes/HMSHLSRecordingConfig.js +3 -3
  415. package/lib/module/classes/HMSHLSRecordingConfig.js.map +1 -1
  416. package/lib/module/classes/HMSHLSRecordingState.js +7 -7
  417. package/lib/module/classes/HMSHLSRecordingState.js.map +1 -1
  418. package/lib/module/classes/HMSHLSStreamingState.js +9 -3
  419. package/lib/module/classes/HMSHLSStreamingState.js.map +1 -1
  420. package/lib/module/classes/HMSHLSTimedMetadata.js +2 -0
  421. package/lib/module/classes/HMSHLSTimedMetadata.js.map +1 -0
  422. package/lib/module/classes/HMSHLSVariant.js +5 -3
  423. package/lib/module/classes/HMSHLSVariant.js.map +1 -1
  424. package/lib/module/classes/HMSHelper.js.map +1 -1
  425. package/lib/module/classes/HMSIOSAudioMode.js +15 -0
  426. package/lib/module/classes/HMSIOSAudioMode.js.map +1 -1
  427. package/lib/module/classes/HMSInteractivityCenter.js +166 -0
  428. package/lib/module/classes/HMSInteractivityCenter.js.map +1 -0
  429. package/lib/module/classes/HMSInteractivityEncoder.js +76 -0
  430. package/lib/module/classes/HMSInteractivityEncoder.js.map +1 -0
  431. package/lib/module/classes/HMSLayer.js.map +1 -1
  432. package/lib/module/classes/HMSLocalAudioStats.js +3 -3
  433. package/lib/module/classes/HMSLocalAudioStats.js.map +1 -1
  434. package/lib/module/classes/HMSLocalAudioTrack.js +3 -3
  435. package/lib/module/classes/HMSLocalAudioTrack.js.map +1 -1
  436. package/lib/module/classes/HMSLocalPeer.js +3 -3
  437. package/lib/module/classes/HMSLocalPeer.js.map +1 -1
  438. package/lib/module/classes/HMSLocalVideoStats.js +3 -3
  439. package/lib/module/classes/HMSLocalVideoStats.js.map +1 -1
  440. package/lib/module/classes/HMSLocalVideoTrack.js +3 -3
  441. package/lib/module/classes/HMSLocalVideoTrack.js.map +1 -1
  442. package/lib/module/classes/HMSLogAlarmManager.js +12 -0
  443. package/lib/module/classes/HMSLogAlarmManager.js.map +1 -1
  444. package/lib/module/classes/HMSLogLevel.js +12 -0
  445. package/lib/module/classes/HMSLogLevel.js.map +1 -1
  446. package/lib/module/classes/HMSLogSettings.js +17 -3
  447. package/lib/module/classes/HMSLogSettings.js.map +1 -1
  448. package/lib/module/classes/HMSLogger.js +3 -3
  449. package/lib/module/classes/HMSLogger.js.map +1 -1
  450. package/lib/module/classes/HMSMessage.js +3 -3
  451. package/lib/module/classes/HMSMessage.js.map +1 -1
  452. package/lib/module/classes/HMSMessageRecipient.js +3 -3
  453. package/lib/module/classes/HMSMessageRecipient.js.map +1 -1
  454. package/lib/module/classes/HMSMessageRecipientType.js.map +1 -1
  455. package/lib/module/classes/HMSMicNode.js.map +1 -1
  456. package/lib/module/classes/HMSNativeEventEmitter.js +4 -6
  457. package/lib/module/classes/HMSNativeEventEmitter.js.map +1 -1
  458. package/lib/module/classes/HMSNativeEventListener.js +1 -1
  459. package/lib/module/classes/HMSNativeEventListener.js.map +1 -1
  460. package/lib/module/classes/HMSNetworkQuality.js +14 -3
  461. package/lib/module/classes/HMSNetworkQuality.js.map +1 -1
  462. package/lib/module/classes/HMSNoiseCancellationPlugin.js +152 -0
  463. package/lib/module/classes/HMSNoiseCancellationPlugin.js.map +1 -0
  464. package/lib/module/classes/HMSPIPConfig.js +2 -0
  465. package/lib/module/classes/HMSPIPConfig.js.map +1 -0
  466. package/lib/module/classes/HMSPIPListenerActions.js +9 -0
  467. package/lib/module/classes/HMSPIPListenerActions.js.map +1 -1
  468. package/lib/module/classes/HMSPeer.js +187 -5
  469. package/lib/module/classes/HMSPeer.js.map +1 -1
  470. package/lib/module/classes/HMSPeerListIterator.js +24 -6
  471. package/lib/module/classes/HMSPeerListIterator.js.map +1 -1
  472. package/lib/module/classes/HMSPeerListIteratorOptions.js.map +1 -1
  473. package/lib/module/classes/HMSPeerType.js +18 -0
  474. package/lib/module/classes/HMSPeerType.js.map +1 -0
  475. package/lib/module/classes/HMSPeerUpdate.js.map +1 -1
  476. package/lib/module/classes/HMSPeersCache.js +4 -4
  477. package/lib/module/classes/HMSPeersCache.js.map +1 -1
  478. package/lib/module/classes/HMSPermissions.js +11 -3
  479. package/lib/module/classes/HMSPermissions.js.map +1 -1
  480. package/lib/module/classes/HMSPollsListenerActions.js +5 -0
  481. package/lib/module/classes/HMSPollsListenerActions.js.map +1 -0
  482. package/lib/module/classes/HMSPublishSettings.js +3 -3
  483. package/lib/module/classes/HMSPublishSettings.js.map +1 -1
  484. package/lib/module/classes/HMSQualityLimitationReason.js.map +1 -1
  485. package/lib/module/classes/HMSQualityLimitationReasons.js +3 -3
  486. package/lib/module/classes/HMSQualityLimitationReasons.js.map +1 -1
  487. package/lib/module/classes/HMSRTCStats.js +3 -3
  488. package/lib/module/classes/HMSRTCStats.js.map +1 -1
  489. package/lib/module/classes/HMSRTCStatsReport.js +3 -3
  490. package/lib/module/classes/HMSRTCStatsReport.js.map +1 -1
  491. package/lib/module/classes/HMSRTMPConfig.js +17 -3
  492. package/lib/module/classes/HMSRTMPConfig.js.map +1 -1
  493. package/lib/module/classes/HMSRecordingState.js +11 -0
  494. package/lib/module/classes/HMSRecordingState.js.map +1 -0
  495. package/lib/module/classes/HMSRemoteAudioStats.js +3 -3
  496. package/lib/module/classes/HMSRemoteAudioStats.js.map +1 -1
  497. package/lib/module/classes/HMSRemoteAudioTrack.js +3 -3
  498. package/lib/module/classes/HMSRemoteAudioTrack.js.map +1 -1
  499. package/lib/module/classes/HMSRemotePeer.js +3 -3
  500. package/lib/module/classes/HMSRemotePeer.js.map +1 -1
  501. package/lib/module/classes/HMSRemoteVideoStats.js +3 -3
  502. package/lib/module/classes/HMSRemoteVideoStats.js.map +1 -1
  503. package/lib/module/classes/HMSRemoteVideoTrack.js +3 -3
  504. package/lib/module/classes/HMSRemoteVideoTrack.js.map +1 -1
  505. package/lib/module/classes/HMSRole.js +20 -3
  506. package/lib/module/classes/HMSRole.js.map +1 -1
  507. package/lib/module/classes/HMSRoleChangeRequest.js +3 -3
  508. package/lib/module/classes/HMSRoleChangeRequest.js.map +1 -1
  509. package/lib/module/classes/HMSRoom.js +17 -4
  510. package/lib/module/classes/HMSRoom.js.map +1 -1
  511. package/lib/module/classes/HMSRoomCache.js +11 -4
  512. package/lib/module/classes/HMSRoomCache.js.map +1 -1
  513. package/lib/module/classes/HMSRoomUpdate.js +1 -0
  514. package/lib/module/classes/HMSRoomUpdate.js.map +1 -1
  515. package/lib/module/classes/HMSRtmpStreamingState.js +5 -5
  516. package/lib/module/classes/HMSRtmpStreamingState.js.map +1 -1
  517. package/lib/module/classes/HMSRtmpVideoResolution.js +16 -3
  518. package/lib/module/classes/HMSRtmpVideoResolution.js.map +1 -1
  519. package/lib/module/classes/HMSSDK.js +1314 -328
  520. package/lib/module/classes/HMSSDK.js.map +1 -1
  521. package/lib/module/classes/HMSScreenBroadcastAudioReceiverNode.js.map +1 -1
  522. package/lib/module/classes/HMSServerRecordingState.js +5 -3
  523. package/lib/module/classes/HMSServerRecordingState.js.map +1 -1
  524. package/lib/module/classes/HMSSessionStore.js +19 -22
  525. package/lib/module/classes/HMSSessionStore.js.map +1 -1
  526. package/lib/module/classes/HMSSimulcastLayerDefinition.js +3 -3
  527. package/lib/module/classes/HMSSimulcastLayerDefinition.js.map +1 -1
  528. package/lib/module/classes/HMSSimulcastLayerSettings.js +3 -3
  529. package/lib/module/classes/HMSSimulcastLayerSettings.js.map +1 -1
  530. package/lib/module/classes/HMSSimulcastLayerSettingsPolicy.js +3 -3
  531. package/lib/module/classes/HMSSimulcastLayerSettingsPolicy.js.map +1 -1
  532. package/lib/module/classes/HMSSimulcastSettings.js +3 -3
  533. package/lib/module/classes/HMSSimulcastSettings.js.map +1 -1
  534. package/lib/module/classes/HMSSimulcastSettingsPolicy.js +3 -3
  535. package/lib/module/classes/HMSSimulcastSettingsPolicy.js.map +1 -1
  536. package/lib/module/classes/HMSSpeaker.js +3 -3
  537. package/lib/module/classes/HMSSpeaker.js.map +1 -1
  538. package/lib/module/classes/HMSStreamingState.js +9 -0
  539. package/lib/module/classes/HMSStreamingState.js.map +1 -0
  540. package/lib/module/classes/HMSSubscribeDegradationPolicy.js +3 -3
  541. package/lib/module/classes/HMSSubscribeDegradationPolicy.js.map +1 -1
  542. package/lib/module/classes/HMSSubscribeSettings.js +3 -3
  543. package/lib/module/classes/HMSSubscribeSettings.js.map +1 -1
  544. package/lib/module/classes/HMSTrack.js +16 -3
  545. package/lib/module/classes/HMSTrack.js.map +1 -1
  546. package/lib/module/classes/HMSTrackSettings.js +13 -3
  547. package/lib/module/classes/HMSTrackSettings.js.map +1 -1
  548. package/lib/module/classes/HMSTrackSettingsInitState.js +9 -0
  549. package/lib/module/classes/HMSTrackSettingsInitState.js.map +1 -1
  550. package/lib/module/classes/HMSTrackSource.js +10 -0
  551. package/lib/module/classes/HMSTrackSource.js.map +1 -1
  552. package/lib/module/classes/HMSTrackType.js +7 -0
  553. package/lib/module/classes/HMSTrackType.js.map +1 -1
  554. package/lib/module/classes/HMSTrackUpdate.js.map +1 -1
  555. package/lib/module/classes/HMSUpdateListenerActions.js +43 -3
  556. package/lib/module/classes/HMSUpdateListenerActions.js.map +1 -1
  557. package/lib/module/classes/HMSVideoCodec.js.map +1 -1
  558. package/lib/module/classes/HMSVideoResolution.js +3 -3
  559. package/lib/module/classes/HMSVideoResolution.js.map +1 -1
  560. package/lib/module/classes/HMSVideoSettings.js +3 -3
  561. package/lib/module/classes/HMSVideoSettings.js.map +1 -1
  562. package/lib/module/classes/HMSVideoTrack.js +20 -3
  563. package/lib/module/classes/HMSVideoTrack.js.map +1 -1
  564. package/lib/module/classes/HMSVideoTrackSettings.js +18 -7
  565. package/lib/module/classes/HMSVideoTrackSettings.js.map +1 -1
  566. package/lib/module/classes/HMSVideoViewMode.js.map +1 -1
  567. package/lib/module/classes/HmsView.js +77 -25
  568. package/lib/module/classes/HmsView.js.map +1 -1
  569. package/lib/module/classes/polls/DecodedPollLeaderboardResponse.js +2 -0
  570. package/lib/module/classes/polls/DecodedPollLeaderboardResponse.js.map +1 -0
  571. package/lib/module/classes/polls/HMSPoll.js +2 -0
  572. package/lib/module/classes/polls/HMSPoll.js.map +1 -0
  573. package/lib/module/classes/polls/HMSPollCategory.js +6 -0
  574. package/lib/module/classes/polls/HMSPollCategory.js.map +1 -0
  575. package/lib/module/classes/polls/HMSPollCreateParams.js +2 -0
  576. package/lib/module/classes/polls/HMSPollCreateParams.js.map +1 -0
  577. package/lib/module/classes/polls/HMSPollLeaderboardEntry.js +2 -0
  578. package/lib/module/classes/polls/HMSPollLeaderboardEntry.js.map +1 -0
  579. package/lib/module/classes/polls/HMSPollLeaderboardSummary.js +2 -0
  580. package/lib/module/classes/polls/HMSPollLeaderboardSummary.js.map +1 -0
  581. package/lib/module/classes/polls/HMSPollQuestion.js +2 -0
  582. package/lib/module/classes/polls/HMSPollQuestion.js.map +1 -0
  583. package/lib/module/classes/polls/HMSPollQuestionAnswer.js +2 -0
  584. package/lib/module/classes/polls/HMSPollQuestionAnswer.js.map +1 -0
  585. package/lib/module/classes/polls/HMSPollQuestionCreateParams.js +2 -0
  586. package/lib/module/classes/polls/HMSPollQuestionCreateParams.js.map +1 -0
  587. package/lib/module/classes/polls/HMSPollQuestionOption.js +2 -0
  588. package/lib/module/classes/polls/HMSPollQuestionOption.js.map +1 -0
  589. package/lib/module/classes/polls/HMSPollQuestionOptionCreateParams.js +2 -0
  590. package/lib/module/classes/polls/HMSPollQuestionOptionCreateParams.js.map +1 -0
  591. package/lib/module/classes/polls/HMSPollQuestionQuizOptionCreateParams.js +2 -0
  592. package/lib/module/classes/polls/HMSPollQuestionQuizOptionCreateParams.js.map +1 -0
  593. package/lib/module/classes/polls/HMSPollQuestionResponse.js +2 -0
  594. package/lib/module/classes/polls/HMSPollQuestionResponse.js.map +1 -0
  595. package/lib/module/classes/polls/HMSPollQuestionResponseCreateParams.js +2 -0
  596. package/lib/module/classes/polls/HMSPollQuestionResponseCreateParams.js.map +1 -0
  597. package/lib/module/classes/polls/HMSPollQuestionResponseResult.js +2 -0
  598. package/lib/module/classes/polls/HMSPollQuestionResponseResult.js.map +1 -0
  599. package/lib/module/classes/polls/HMSPollQuestionResult.js +2 -0
  600. package/lib/module/classes/polls/HMSPollQuestionResult.js.map +1 -0
  601. package/lib/module/classes/polls/HMSPollQuestionType.js +8 -0
  602. package/lib/module/classes/polls/HMSPollQuestionType.js.map +1 -0
  603. package/lib/module/classes/polls/HMSPollResponsePeerInfo.js +2 -0
  604. package/lib/module/classes/polls/HMSPollResponsePeerInfo.js.map +1 -0
  605. package/lib/module/classes/polls/HMSPollResult.js +2 -0
  606. package/lib/module/classes/polls/HMSPollResult.js.map +1 -0
  607. package/lib/module/classes/polls/HMSPollState.js +7 -0
  608. package/lib/module/classes/polls/HMSPollState.js.map +1 -0
  609. package/lib/module/classes/polls/HMSPollType.js +6 -0
  610. package/lib/module/classes/polls/HMSPollType.js.map +1 -0
  611. package/lib/module/classes/polls/HMSPollUpdateType.js +7 -0
  612. package/lib/module/classes/polls/HMSPollUpdateType.js.map +1 -0
  613. package/lib/module/classes/polls/HMSPollUserTrackingMode.js +7 -0
  614. package/lib/module/classes/polls/HMSPollUserTrackingMode.js.map +1 -0
  615. package/lib/module/classes/polls/PollLeaderboardResponse.js +2 -0
  616. package/lib/module/classes/polls/PollLeaderboardResponse.js.map +1 -0
  617. package/lib/module/classes/transcriptions/HMSTranscript.js +2 -0
  618. package/lib/module/classes/transcriptions/HMSTranscript.js.map +1 -0
  619. package/lib/module/classes/transcriptions/OnTranscriptionError.js +2 -0
  620. package/lib/module/classes/transcriptions/OnTranscriptionError.js.map +1 -0
  621. package/lib/module/classes/transcriptions/TranscriptionState.js +8 -0
  622. package/lib/module/classes/transcriptions/TranscriptionState.js.map +1 -0
  623. package/lib/module/classes/transcriptions/Transcriptions.js +2 -0
  624. package/lib/module/classes/transcriptions/Transcriptions.js.map +1 -0
  625. package/lib/module/classes/transcriptions/TranscriptionsMode.js +6 -0
  626. package/lib/module/classes/transcriptions/TranscriptionsMode.js.map +1 -0
  627. package/lib/module/classes/transcriptions/index.js +6 -0
  628. package/lib/module/classes/transcriptions/index.js.map +1 -0
  629. package/lib/module/classes/whiteboard/HMSWhiteboard.js +2 -0
  630. package/lib/module/classes/whiteboard/HMSWhiteboard.js.map +1 -0
  631. package/lib/module/classes/whiteboard/HMSWhiteboardListenerActions.js +5 -0
  632. package/lib/module/classes/whiteboard/HMSWhiteboardListenerActions.js.map +1 -0
  633. package/lib/module/classes/whiteboard/HMSWhiteboardState.js +6 -0
  634. package/lib/module/classes/whiteboard/HMSWhiteboardState.js.map +1 -0
  635. package/lib/module/classes/whiteboard/HMSWhiteboardUpdateType.js +6 -0
  636. package/lib/module/classes/whiteboard/HMSWhiteboardUpdateType.js.map +1 -0
  637. package/lib/module/classes/whiteboard/index.js +4 -0
  638. package/lib/module/classes/whiteboard/index.js.map +1 -0
  639. package/lib/module/classes/whiteboard/registerCallbacks.js +18 -0
  640. package/lib/module/classes/whiteboard/registerCallbacks.js.map +1 -0
  641. package/lib/module/components/HMSHLSPlayer/HMSHLSPlayer.js +157 -49
  642. package/lib/module/components/HMSHLSPlayer/HMSHLSPlayer.js.map +1 -1
  643. package/lib/module/components/HMSHLSPlayer/RCTHMSHLSPlayer.js +3 -3
  644. package/lib/module/components/HMSHLSPlayer/RCTHMSHLSPlayer.js.map +1 -1
  645. package/lib/module/components/HMSHLSPlayer/hooks.js +16 -4
  646. package/lib/module/components/HMSHLSPlayer/hooks.js.map +1 -1
  647. package/lib/module/components/HMSHLSPlayer/index.js +1 -1
  648. package/lib/module/components/HMSHLSPlayer/index.js.map +1 -1
  649. package/lib/module/hooks/hmsviews.js +12 -0
  650. package/lib/module/hooks/hmsviews.js.map +1 -0
  651. package/lib/module/hooks/polls.js +12 -0
  652. package/lib/module/hooks/polls.js.map +1 -0
  653. package/lib/module/hooks/useHMSPeerUpdates.js +1 -2
  654. package/lib/module/hooks/useHMSPeerUpdates.js.map +1 -1
  655. package/lib/module/index.js +29 -2
  656. package/lib/module/index.js.map +1 -1
  657. package/lib/module/modules/HMSManagerModule.js +3 -0
  658. package/lib/module/modules/HMSManagerModule.js.map +1 -0
  659. package/lib/module/specs/HMSHLSPlayerNativeComponent.js +69 -0
  660. package/lib/module/specs/HMSHLSPlayerNativeComponent.js.map +1 -0
  661. package/lib/module/specs/HMSViewNativeComponent.js +49 -0
  662. package/lib/module/specs/HMSViewNativeComponent.js.map +1 -0
  663. package/lib/module/specs/NativeHMSManager.js +33 -0
  664. package/lib/module/specs/NativeHMSManager.js.map +1 -0
  665. package/lib/module/stores/hls-player-playback-slice.js +10 -0
  666. package/lib/module/stores/hls-player-playback-slice.js.map +1 -1
  667. package/lib/module/stores/hls-player-stats-store.js +27 -15
  668. package/lib/module/stores/hls-player-stats-store.js.map +1 -1
  669. package/lib/module/stores/hms-interactivity-store.js +15 -0
  670. package/lib/module/stores/hms-interactivity-store.js.map +1 -0
  671. package/lib/module/stores/hms-polls-slice.js +12 -0
  672. package/lib/module/stores/hms-polls-slice.js.map +1 -0
  673. package/lib/module/stores/hms-store.js +5 -5
  674. package/lib/module/stores/hms-store.js.map +1 -1
  675. package/lib/module/stores/hmsviews-slice.js +12 -0
  676. package/lib/module/stores/hmsviews-slice.js.map +1 -0
  677. package/lib/module/stores/types.js.map +1 -1
  678. package/lib/module/types.js +3 -1
  679. package/lib/module/types.js.map +1 -1
  680. package/lib/module/utils/emitter/EventEmitter.js +23 -7
  681. package/lib/module/utils/emitter/EventEmitter.js.map +1 -1
  682. package/lib/module/utils/emitter/_EmitterSubscription.js +3 -3
  683. package/lib/module/utils/emitter/_EmitterSubscription.js.map +1 -1
  684. package/lib/module/utils/emitter/_EventSubscription.js +3 -3
  685. package/lib/module/utils/emitter/_EventSubscription.js.map +1 -1
  686. package/lib/module/utils/emitter/_EventSubscriptionVendor.js +3 -4
  687. package/lib/module/utils/emitter/_EventSubscriptionVendor.js.map +1 -1
  688. package/lib/module/utils/index.js.map +1 -1
  689. package/lib/module/utils/keyboard.js +38 -0
  690. package/lib/module/utils/keyboard.js.map +1 -0
  691. package/lib/module/utils/notification.js +5 -0
  692. package/lib/module/utils/notification.js.map +1 -0
  693. package/lib/module/utils/windowController.js +22 -0
  694. package/lib/module/utils/windowController.js.map +1 -0
  695. package/lib/typescript/classes/HMSAudioDevice.d.ts +14 -0
  696. package/lib/typescript/classes/HMSAudioMixingMode.d.ts +11 -0
  697. package/lib/typescript/classes/HMSAudioTrack.d.ts +9 -0
  698. package/lib/typescript/classes/HMSAudioTrackSettings.d.ts +9 -0
  699. package/lib/typescript/classes/HMSBrowserRecordingState.d.ts +3 -0
  700. package/lib/typescript/classes/HMSCameraFacing.d.ts +11 -0
  701. package/lib/typescript/classes/HMSConfig.d.ts +27 -0
  702. package/lib/typescript/classes/HMSEncoder.d.ts +5 -0
  703. package/lib/typescript/classes/HMSException.d.ts +18 -0
  704. package/lib/typescript/classes/HMSHLSPlaylistType.d.ts +4 -0
  705. package/lib/typescript/classes/HMSHLSRecordingState.d.ts +6 -4
  706. package/lib/typescript/classes/HMSHLSStreamingState.d.ts +8 -0
  707. package/lib/typescript/classes/HMSHLSTimedMetadata.d.ts +16 -0
  708. package/lib/typescript/classes/HMSHLSVariant.d.ts +3 -0
  709. package/lib/typescript/classes/HMSIOSAudioMode.d.ts +15 -0
  710. package/lib/typescript/classes/HMSInteractivityCenter.d.ts +62 -0
  711. package/lib/typescript/classes/HMSInteractivityEncoder.d.ts +9 -0
  712. package/lib/typescript/classes/HMSLogAlarmManager.d.ts +12 -0
  713. package/lib/typescript/classes/HMSLogLevel.d.ts +12 -0
  714. package/lib/typescript/classes/HMSLogSettings.d.ts +14 -0
  715. package/lib/typescript/classes/HMSNetworkQuality.d.ts +11 -0
  716. package/lib/typescript/classes/HMSNoiseCancellationPlugin.d.ts +87 -0
  717. package/lib/typescript/classes/HMSPIPConfig.d.ts +47 -0
  718. package/lib/typescript/classes/HMSPIPListenerActions.d.ts +17 -0
  719. package/lib/typescript/classes/HMSPeer.d.ts +144 -1
  720. package/lib/typescript/classes/HMSPeerListIterator.d.ts +3 -1
  721. package/lib/typescript/classes/HMSPeerListIteratorOptions.d.ts +19 -0
  722. package/lib/typescript/classes/HMSPeerType.d.ts +16 -0
  723. package/lib/typescript/classes/HMSPeersCache.d.ts +2 -0
  724. package/lib/typescript/classes/HMSPermissions.d.ts +18 -0
  725. package/lib/typescript/classes/HMSPollsListenerActions.d.ts +3 -0
  726. package/lib/typescript/classes/HMSRTMPConfig.d.ts +14 -0
  727. package/lib/typescript/classes/HMSRecordingState.d.ts +9 -0
  728. package/lib/typescript/classes/HMSRole.d.ts +17 -0
  729. package/lib/typescript/classes/HMSRoom.d.ts +3 -0
  730. package/lib/typescript/classes/HMSRoomUpdate.d.ts +2 -1
  731. package/lib/typescript/classes/HMSRtmpStreamingState.d.ts +3 -2
  732. package/lib/typescript/classes/HMSRtmpVideoResolution.d.ts +13 -0
  733. package/lib/typescript/classes/HMSSDK.d.ts +1123 -249
  734. package/lib/typescript/classes/HMSServerRecordingState.d.ts +3 -0
  735. package/lib/typescript/classes/HMSSessionStore.d.ts +23 -22
  736. package/lib/typescript/classes/HMSStreamingState.d.ts +7 -0
  737. package/lib/typescript/classes/HMSTrack.d.ts +13 -0
  738. package/lib/typescript/classes/HMSTrackSettings.d.ts +10 -0
  739. package/lib/typescript/classes/HMSTrackSettingsInitState.d.ts +11 -0
  740. package/lib/typescript/classes/HMSTrackSource.d.ts +10 -0
  741. package/lib/typescript/classes/HMSTrackType.d.ts +7 -0
  742. package/lib/typescript/classes/HMSUpdateListenerActions.d.ts +290 -3
  743. package/lib/typescript/classes/HMSVideoTrack.d.ts +17 -0
  744. package/lib/typescript/classes/HMSVideoTrackSettings.d.ts +23 -2
  745. package/lib/typescript/classes/HmsView.d.ts +16 -0
  746. package/lib/typescript/classes/polls/DecodedPollLeaderboardResponse.d.ts +37 -0
  747. package/lib/typescript/classes/polls/HMSPoll.d.ts +73 -0
  748. package/lib/typescript/classes/polls/HMSPollCategory.d.ts +10 -0
  749. package/lib/typescript/classes/polls/HMSPollCreateParams.d.ts +6 -0
  750. package/lib/typescript/classes/polls/HMSPollLeaderboardEntry.d.ts +9 -0
  751. package/lib/typescript/classes/polls/HMSPollLeaderboardSummary.d.ts +7 -0
  752. package/lib/typescript/classes/polls/HMSPollQuestion.d.ts +61 -0
  753. package/lib/typescript/classes/polls/HMSPollQuestionAnswer.d.ts +17 -0
  754. package/lib/typescript/classes/polls/HMSPollQuestionCreateParams.d.ts +25 -0
  755. package/lib/typescript/classes/polls/HMSPollQuestionOption.d.ts +21 -0
  756. package/lib/typescript/classes/polls/HMSPollQuestionOptionCreateParams.d.ts +3 -0
  757. package/lib/typescript/classes/polls/HMSPollQuestionQuizOptionCreateParams.d.ts +4 -0
  758. package/lib/typescript/classes/polls/HMSPollQuestionResponse.d.ts +47 -0
  759. package/lib/typescript/classes/polls/HMSPollQuestionResponseCreateParams.d.ts +2 -0
  760. package/lib/typescript/classes/polls/HMSPollQuestionResponseResult.d.ts +17 -0
  761. package/lib/typescript/classes/polls/HMSPollQuestionResult.d.ts +29 -0
  762. package/lib/typescript/classes/polls/HMSPollQuestionType.d.ts +18 -0
  763. package/lib/typescript/classes/polls/HMSPollResponsePeerInfo.d.ts +21 -0
  764. package/lib/typescript/classes/polls/HMSPollResult.d.ts +22 -0
  765. package/lib/typescript/classes/polls/HMSPollState.d.ts +14 -0
  766. package/lib/typescript/classes/polls/HMSPollType.d.ts +4 -0
  767. package/lib/typescript/classes/polls/HMSPollUpdateType.d.ts +5 -0
  768. package/lib/typescript/classes/polls/HMSPollUserTrackingMode.d.ts +14 -0
  769. package/lib/typescript/classes/polls/PollLeaderboardResponse.d.ts +7 -0
  770. package/lib/typescript/classes/transcriptions/HMSTranscript.d.ts +8 -0
  771. package/lib/typescript/classes/transcriptions/OnTranscriptionError.d.ts +4 -0
  772. package/lib/typescript/classes/transcriptions/TranscriptionState.d.ts +6 -0
  773. package/lib/typescript/classes/transcriptions/Transcriptions.d.ts +12 -0
  774. package/lib/typescript/classes/transcriptions/TranscriptionsMode.d.ts +4 -0
  775. package/lib/typescript/classes/transcriptions/index.d.ts +5 -0
  776. package/lib/typescript/classes/whiteboard/HMSWhiteboard.d.ts +10 -0
  777. package/lib/typescript/classes/whiteboard/HMSWhiteboardListenerActions.d.ts +3 -0
  778. package/lib/typescript/classes/whiteboard/HMSWhiteboardState.d.ts +4 -0
  779. package/lib/typescript/classes/whiteboard/HMSWhiteboardUpdateType.d.ts +4 -0
  780. package/lib/typescript/classes/whiteboard/index.d.ts +3 -0
  781. package/lib/typescript/classes/whiteboard/registerCallbacks.d.ts +8 -0
  782. package/lib/typescript/components/HMSHLSPlayer/HMSHLSPlayer.d.ts +6 -0
  783. package/lib/typescript/components/HMSHLSPlayer/RCTHMSHLSPlayer.d.ts +11 -9
  784. package/lib/typescript/components/HMSHLSPlayer/hooks.d.ts +5 -0
  785. package/lib/typescript/components/HMSHLSPlayer/index.d.ts +1 -1
  786. package/lib/typescript/hooks/hmsviews.d.ts +3 -0
  787. package/lib/typescript/hooks/polls.d.ts +3 -0
  788. package/lib/typescript/index.d.ts +29 -2
  789. package/lib/typescript/specs/HMSHLSPlayerNativeComponent.d.ts +115 -0
  790. package/lib/typescript/specs/HMSViewNativeComponent.d.ts +97 -0
  791. package/lib/typescript/specs/NativeHMSManager.d.ts +147 -0
  792. package/lib/typescript/stores/hls-player-stats-store.d.ts +4 -3
  793. package/lib/typescript/stores/hms-interactivity-store.d.ts +9 -0
  794. package/lib/typescript/stores/hms-polls-slice.d.ts +5 -0
  795. package/lib/typescript/stores/hms-store.d.ts +4 -3
  796. package/lib/typescript/stores/hmsviews-slice.d.ts +5 -0
  797. package/lib/typescript/stores/types.d.ts +27 -3
  798. package/lib/typescript/types.d.ts +18 -5
  799. package/lib/typescript/utils/emitter/EventEmitter.d.ts +7 -0
  800. package/lib/typescript/utils/keyboard.d.ts +16 -0
  801. package/lib/typescript/utils/notification.d.ts +5 -0
  802. package/lib/typescript/utils/windowController.d.ts +10 -0
  803. package/package.json +49 -7
  804. package/react-native-hms.podspec +56 -2
  805. package/sdk-versions.json +4 -3
  806. package/src/classes/HMSAudioDevice.ts +18 -0
  807. package/src/classes/HMSAudioMixingMode.ts +11 -0
  808. package/src/classes/HMSAudioTrack.ts +9 -0
  809. package/src/classes/HMSAudioTrackSettings.ts +11 -0
  810. package/src/classes/HMSBrowserRecordingState.ts +4 -0
  811. package/src/classes/HMSCameraControl.ts +1 -1
  812. package/src/classes/HMSCameraFacing.ts +11 -0
  813. package/src/classes/HMSConfig.ts +27 -0
  814. package/src/classes/HMSEncoder.ts +57 -4
  815. package/src/classes/HMSException.ts +18 -0
  816. package/src/classes/HMSHLSPlaylistType.ts +4 -0
  817. package/src/classes/HMSHLSRecordingState.ts +9 -7
  818. package/src/classes/HMSHLSStreamingState.ts +15 -1
  819. package/src/classes/HMSHLSTimedMetadata.ts +16 -0
  820. package/src/classes/HMSHLSVariant.ts +5 -0
  821. package/src/classes/HMSIOSAudioMode.ts +15 -0
  822. package/src/classes/HMSInteractivityCenter.ts +246 -0
  823. package/src/classes/HMSInteractivityEncoder.ts +92 -0
  824. package/src/classes/HMSLogAlarmManager.ts +12 -0
  825. package/src/classes/HMSLogLevel.ts +12 -0
  826. package/src/classes/HMSLogSettings.ts +14 -0
  827. package/src/classes/HMSNativeEventEmitter.ts +1 -7
  828. package/src/classes/HMSNativeEventListener.ts +1 -1
  829. package/src/classes/HMSNetworkQuality.ts +11 -0
  830. package/src/classes/HMSNoiseCancellationPlugin.ts +162 -0
  831. package/src/classes/HMSPIPConfig.ts +54 -0
  832. package/src/classes/HMSPIPListenerActions.ts +18 -0
  833. package/src/classes/HMSPeer.ts +193 -3
  834. package/src/classes/HMSPeerListIterator.ts +29 -7
  835. package/src/classes/HMSPeerListIteratorOptions.ts +21 -0
  836. package/src/classes/HMSPeerType.ts +20 -0
  837. package/src/classes/HMSPeersCache.ts +3 -1
  838. package/src/classes/HMSPermissions.ts +25 -0
  839. package/src/classes/HMSPollsListenerActions.ts +3 -0
  840. package/src/classes/HMSRTMPConfig.ts +14 -0
  841. package/src/classes/HMSRecordingState.ts +9 -0
  842. package/src/classes/HMSRole.ts +17 -0
  843. package/src/classes/HMSRoom.ts +27 -0
  844. package/src/classes/HMSRoomCache.ts +10 -1
  845. package/src/classes/HMSRoomUpdate.ts +1 -0
  846. package/src/classes/HMSRtmpStreamingState.ts +4 -3
  847. package/src/classes/HMSRtmpVideoResolution.ts +13 -0
  848. package/src/classes/HMSSDK.tsx +1379 -345
  849. package/src/classes/HMSServerRecordingState.ts +4 -0
  850. package/src/classes/HMSSessionStore.ts +34 -45
  851. package/src/classes/HMSStreamingState.ts +7 -0
  852. package/src/classes/HMSTrack.ts +13 -0
  853. package/src/classes/HMSTrackSettings.ts +10 -0
  854. package/src/classes/HMSTrackSettingsInitState.ts +11 -0
  855. package/src/classes/HMSTrackSource.ts +10 -0
  856. package/src/classes/HMSTrackType.ts +7 -0
  857. package/src/classes/HMSUpdateListenerActions.ts +313 -3
  858. package/src/classes/HMSVideoTrack.ts +17 -0
  859. package/src/classes/HMSVideoTrackSettings.ts +27 -2
  860. package/src/classes/HmsView.tsx +92 -57
  861. package/src/classes/polls/DecodedPollLeaderboardResponse.ts +43 -0
  862. package/src/classes/polls/HMSPoll.ts +99 -0
  863. package/src/classes/polls/HMSPollCategory.ts +11 -0
  864. package/src/classes/polls/HMSPollCreateParams.ts +19 -0
  865. package/src/classes/polls/HMSPollLeaderboardEntry.ts +10 -0
  866. package/src/classes/polls/HMSPollLeaderboardSummary.ts +7 -0
  867. package/src/classes/polls/HMSPollQuestion.ts +92 -0
  868. package/src/classes/polls/HMSPollQuestionAnswer.ts +29 -0
  869. package/src/classes/polls/HMSPollQuestionCreateParams.ts +36 -0
  870. package/src/classes/polls/HMSPollQuestionOption.ts +24 -0
  871. package/src/classes/polls/HMSPollQuestionOptionCreateParams.ts +8 -0
  872. package/src/classes/polls/HMSPollQuestionQuizOptionCreateParams.ts +6 -0
  873. package/src/classes/polls/HMSPollQuestionResponse.ts +72 -0
  874. package/src/classes/polls/HMSPollQuestionResponseCreateParams.ts +6 -0
  875. package/src/classes/polls/HMSPollQuestionResponseResult.ts +19 -0
  876. package/src/classes/polls/HMSPollQuestionResult.ts +41 -0
  877. package/src/classes/polls/HMSPollQuestionType.ts +21 -0
  878. package/src/classes/polls/HMSPollResponsePeerInfo.ts +24 -0
  879. package/src/classes/polls/HMSPollResult.ts +26 -0
  880. package/src/classes/polls/HMSPollState.ts +16 -0
  881. package/src/classes/polls/HMSPollType.ts +4 -0
  882. package/src/classes/polls/HMSPollUpdateType.ts +5 -0
  883. package/src/classes/polls/HMSPollUserTrackingMode.ts +16 -0
  884. package/src/classes/polls/PollLeaderboardResponse.ts +8 -0
  885. package/src/classes/transcriptions/HMSTranscript.ts +13 -0
  886. package/src/classes/transcriptions/OnTranscriptionError.ts +5 -0
  887. package/src/classes/transcriptions/TranscriptionState.ts +6 -0
  888. package/src/classes/transcriptions/Transcriptions.ts +19 -0
  889. package/src/classes/transcriptions/TranscriptionsMode.ts +4 -0
  890. package/src/classes/transcriptions/index.ts +5 -0
  891. package/src/classes/whiteboard/HMSWhiteboard.tsx +16 -0
  892. package/src/classes/whiteboard/HMSWhiteboardListenerActions.ts +3 -0
  893. package/src/classes/whiteboard/HMSWhiteboardState.tsx +4 -0
  894. package/src/classes/whiteboard/HMSWhiteboardUpdateType.tsx +4 -0
  895. package/src/classes/whiteboard/index.ts +3 -0
  896. package/src/classes/whiteboard/registerCallbacks.ts +34 -0
  897. package/src/components/HMSHLSPlayer/HMSHLSPlayer.tsx +176 -92
  898. package/src/components/HMSHLSPlayer/RCTHMSHLSPlayer.ts +20 -13
  899. package/src/components/HMSHLSPlayer/hooks.ts +22 -4
  900. package/src/components/HMSHLSPlayer/index.ts +3 -0
  901. package/src/hooks/hmsviews.ts +15 -0
  902. package/src/hooks/polls.ts +14 -0
  903. package/src/index.ts +38 -3
  904. package/src/modules/HMSManagerModule.ts +5 -0
  905. package/src/specs/HMSHLSPlayerNativeComponent.ts +203 -0
  906. package/src/specs/HMSViewNativeComponent.ts +119 -0
  907. package/src/specs/NativeHMSManager.ts +307 -0
  908. package/src/stores/hls-player-playback-slice.ts +11 -0
  909. package/src/stores/hls-player-stats-store.ts +28 -18
  910. package/src/stores/hms-interactivity-store.ts +18 -0
  911. package/src/stores/hms-polls-slice.ts +20 -0
  912. package/src/stores/hms-store.ts +2 -0
  913. package/src/stores/hmsviews-slice.ts +20 -0
  914. package/src/stores/types.ts +50 -4
  915. package/src/types.ts +28 -3
  916. package/src/utils/emitter/EventEmitter.ts +26 -0
  917. package/src/utils/keyboard.ts +37 -0
  918. package/src/utils/notification.ts +10 -0
  919. package/src/utils/windowController.ts +23 -0
  920. package/android/.gradle/6.7.1/executionHistory/executionHistory.lock +0 -0
  921. package/android/.gradle/6.7.1/fileChanges/last-build.bin +0 -0
  922. package/android/.gradle/6.7.1/fileHashes/fileHashes.lock +0 -0
  923. package/android/.gradle/6.7.1/gc.properties +0 -0
  924. package/android/.gradle/6.9/executionHistory/executionHistory.bin +0 -0
  925. package/android/.gradle/6.9/executionHistory/executionHistory.lock +0 -0
  926. package/android/.gradle/6.9/fileChanges/last-build.bin +0 -0
  927. package/android/.gradle/6.9/fileHashes/fileHashes.bin +0 -0
  928. package/android/.gradle/6.9/fileHashes/fileHashes.lock +0 -0
  929. package/android/.gradle/6.9/fileHashes/resourceHashesCache.bin +0 -0
  930. package/android/.gradle/6.9/gc.properties +0 -0
  931. package/android/.gradle/6.9/javaCompile/classAnalysis.bin +0 -0
  932. package/android/.gradle/6.9/javaCompile/jarAnalysis.bin +0 -0
  933. package/android/.gradle/6.9/javaCompile/javaCompile.lock +0 -0
  934. package/android/.gradle/6.9/javaCompile/taskHistory.bin +0 -0
  935. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  936. package/android/.gradle/buildOutputCleanup/cache.properties +0 -2
  937. package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
  938. package/android/.gradle/checksums/checksums.lock +0 -0
  939. package/android/.gradle/checksums/md5-checksums.bin +0 -0
  940. package/android/.gradle/checksums/sha1-checksums.bin +0 -0
  941. package/android/.gradle/configuration-cache/gc.properties +0 -0
  942. package/android/.gradle/vcs-1/gc.properties +0 -0
  943. package/android/.idea/compiler.xml +0 -6
  944. package/android/.idea/gradle.xml +0 -18
  945. package/android/.idea/jarRepositories.xml +0 -45
  946. package/android/.idea/misc.xml +0 -10
  947. package/android/.idea/vcs.xml +0 -6
  948. package/android/local.properties +0 -8
  949. package/android/src/main/java/com/reactnativehmssdk/HMSHLSPlayerManager.kt +0 -114
  950. package/android/src/main/java/com/reactnativehmssdk/HMSSDKViewManager.kt +0 -115
  951. package/ios/Hmssdk.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
  952. package/ios/Hmssdk.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  953. package/ios/Hmssdk.xcodeproj/project.xcworkspace/xcuserdata/jatinnagar.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  954. package/ios/Hmssdk.xcodeproj/xcuserdata/jatinnagar.xcuserdatad/xcschemes/xcschememanagement.plist +0 -14
  955. package/lib/commonjs/classes/HMSManagerModule.js +0 -18
  956. package/lib/commonjs/classes/HMSManagerModule.js.map +0 -1
  957. package/lib/module/classes/HMSManagerModule.js +0 -11
  958. package/lib/module/classes/HMSManagerModule.js.map +0 -1
  959. package/src/classes/HMSManagerModule.ts +0 -18
  960. /package/lib/typescript/{classes → modules}/HMSManagerModule.d.ts +0 -0
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import { HMSTrackType } from './HMSTrackType';
3
2
  import { HMSUpdateListenerActions } from './HMSUpdateListenerActions';
3
+ import type { HMSTrackType } from './HMSTrackType';
4
4
  import type { HmsComponentProps } from './HmsView';
5
5
  import type { HMSConfig } from './HMSConfig';
6
6
  import type { HMSLocalPeer } from './HMSLocalPeer';
@@ -18,21 +18,36 @@ import type { HMSAudioMode } from './HMSAudioMode';
18
18
  import type { HMSAudioMixingMode } from './HMSAudioMixingMode';
19
19
  import type { HMSLogSettings } from './HMSLogSettings';
20
20
  import { HMSPIPListenerActions } from './HMSPIPListenerActions';
21
+ import type { HMSPeerListIteratorOptions } from './HMSPeerListIteratorOptions';
22
+ import { HMSPeerListIterator } from './HMSPeerListIterator';
23
+ import type { HMSPIPConfig } from './HMSPIPConfig';
24
+ import { HMSInteractivityCenter } from './HMSInteractivityCenter';
25
+ import type { HMSHLSTimedMetadata } from './HMSHLSTimedMetadata';
26
+ import type { HMSVideoTrack } from './HMSVideoTrack';
27
+ import type { HMSRemoteVideoTrack } from './HMSRemoteVideoTrack';
28
+ import type { HMSRemoteAudioTrack } from './HMSRemoteAudioTrack';
21
29
  type HmsViewProps = Omit<HmsComponentProps, 'id'>;
22
- interface PIPConfig {
23
- autoEnterPipMode?: boolean;
24
- aspectRatio?: [number, number];
25
- endButton?: boolean;
26
- audioButton?: boolean;
27
- videoButton?: boolean;
28
- }
30
+ /**
31
+ * Represents the main SDK class for the 100ms (HMS) video conferencing service in a React Native application.
32
+ * This class provides methods to manage the video conferencing lifecycle including joining a room, leaving a room,
33
+ * managing streams, and handling events.
34
+ *
35
+ * @export
36
+ * @class HMSSDK
37
+ * @example
38
+ * const hmsInstance = await HMSSDK.build();
39
+ * await hmsInstance.join({ authToken: 'your_auth_token', username: 'John Appleseed' });
40
+ * @see https://www.100ms.live/docs/react-native/v2/quickstart/quickstart
41
+ */
29
42
  export declare class HMSSDK {
30
43
  id: string;
31
- private muteStatus;
44
+ private _interactivityCenter;
32
45
  private appStateSubscription?;
33
46
  private onPreviewDelegate?;
34
47
  private onJoinDelegate?;
48
+ private onPermissionsRequestedDelegate?;
35
49
  private onRoomDelegate?;
50
+ private onTranscriptsDelegate?;
36
51
  private onPeerDelegate?;
37
52
  private onPeerListUpdatedDelegate?;
38
53
  private onTrackDelegate?;
@@ -56,71 +71,158 @@ export declare class HMSSDK {
56
71
  private emitterSubscriptions;
57
72
  private constructor();
58
73
  /**
59
- * - Returns an instance of [HMSSDK] {@link HMSSDK}
60
- * - This function must be called to get an instance of HMSSDK class and only then user can interact with its methods.
74
+ * Asynchronously builds and returns an instance of the HMSSDK class.
75
+ *
76
+ * This method initializes the HMSSDK with optional configuration parameters and returns the initialized instance.
77
+ * It is responsible for setting up the SDK with specific settings for track management, app groups, extensions for iOS screen sharing,
78
+ * logging configurations, etc.
79
+ *
61
80
  *
62
- * Regular Usage:
81
+ * @param {Object} params - Optional configuration parameters for initializing the HMSSDK.
82
+ * @param {trackSettings} params.trackSettings is an optional value only required to enable features like iOS Screen/Audio Share, Android Software Echo Cancellation, etc
83
+ * @param {appGroup} params.appGroup is an optional value only required for implementing Screen & Audio Share on iOS. They are not required for Android. DO NOT USE if your app does not implements Screen or Audio Share on iOS.
84
+ * @param {preferredExtension} params.preferredExtension is an optional value only required for implementing Screen & Audio Share on iOS. They are not required for Android. DO NOT USE if your app does not implements Screen or Audio Share on iOS.
85
+ * @param {boolean} params.haltPreviewJoinForPermissionsRequestOnAndroid - Optional flag to halt the preview/join process until permissions are explicitly granted by the user. Android only. This is particularly useful when you might want to request permissions before proceeding with the preview or join operation.
86
+ * @param {HMSLogSettings} params.logSettings - Optional settings for logging.
63
87
  *
88
+ * @returns {Promise<HMSSDK>} A promise that resolves to an instance of HMSSDK.
89
+ * @throws {Error} If the HMSSDK instance cannot be created.
90
+ *
91
+ * @example
92
+ * // Regular usage:
64
93
  * const hmsInstance = await HMSSDK.build();
65
94
  *
66
- * For Advanced Use-Cases:
67
- * @param {trackSettings} trackSettings is an optional value only required to enable features like iOS Screen/Audio Share, Android Software Echo Cancellation, etc
68
- * @param {appGroup} appGroup is an optional value only required for implementing Screen & Audio Share on iOS. They are not required for Android. DO NOT USE if your app does not implements Screen or Audio Share on iOS.
69
- * @param {preferredExtension} preferredExtension is an optional value only required for implementing Screen & Audio Share on iOS. They are not required for Android. DO NOT USE if your app does not implements Screen or Audio Share on iOS.
95
+ * @example
96
+ * // Advanced Usage:
97
+ * const hmsInstance = await HMSSDK.build({
98
+ * trackSettings: {...},
99
+ * appGroup: 'group.example',
100
+ * preferredExtension: 'com.example.extension',
101
+ * logSettings: {...},
102
+ * });
70
103
  *
104
+ * @see https://www.100ms.live/docs/react-native/v2/how-to-guides/install-the-sdk/hmssdk
71
105
  * @static
72
- * @returns
106
+ * @async
107
+ * @function build
73
108
  * @memberof HMSSDK
74
109
  */
75
110
  static build(params?: {
76
111
  trackSettings?: HMSTrackSettings;
112
+ haltPreviewJoinForPermissionsRequestOnAndroid?: boolean;
77
113
  appGroup?: String;
78
114
  preferredExtension?: String;
79
115
  logSettings?: HMSLogSettings;
80
116
  isPrebuilt?: boolean;
81
117
  }): Promise<HMSSDK>;
82
118
  /**
83
- * - Calls removeListeners that in turn breaks all connections with native listeners.
119
+ * Asynchronously destroys the HMSSDK instance.
120
+ *
121
+ * - This method performs a series of cleanup actions before destroying the HMSSDK instance.
122
+ * - It logs the destruction process, clears both the HMS peers and room caches, removes all event listeners to prevent memory leaks, and finally calls the native
123
+ * `destroy` method on the `HMSManager` with the instance's ID.
124
+ * - This is typically used to ensure that all resources are properly released when the HMSSDK instance is no longer needed, such as when a user leaves a room or the application is shutting down.
125
+ *
126
+ * @returns {Promise<void>} A promise that resolves when the destruction process has completed.
127
+ * @throws {Error} If the HMSSDK instance cannot be destroyed.
128
+ *
129
+ * @example
130
+ * await hmsInstance.destroy();
131
+ *
132
+ * @see https://www.100ms.live/docs/react-native/v2/how-to-guides/install-the-sdk/hmssdk
84
133
  *
85
134
  * @memberof HMSSDK
86
135
  */
87
136
  destroy: () => Promise<any>;
88
137
  /**
89
- * - getAuthTokenByRoomCode function is used to get the Auth Token by Room Code
90
- *
91
- * checkout {@link https://www.100ms.live/docs/concepts/v2/concepts/rooms/room-codes/room-codes} for more info
92
- *
138
+ * Asynchronously retrieves an authentication token using the room code, user ID, and endpoint.
139
+ *
140
+ * This method is responsible for fetching an authentication token that is required to join a room in the HMS ecosystem.
141
+ * It makes a call to the HMSManager's `getAuthTokenByRoomCode` method, passing in the necessary parameters.
142
+ * The function logs the attempt and returns the token as a string.
143
+ *
144
+ * @param {string} roomCode - The unique code of the room for which the token is being requested.
145
+ * @param {string} [userId] - Optional. The user ID of the participant requesting the token. This can be used for identifying the user in the backend.
146
+ * @param {string} [endpoint] - Optional. The endpoint URL to which the token request is sent. This can be used to specify a different authentication server if needed.
147
+ * @returns {Promise<string>} A promise that resolves to the authentication token as a string.
148
+ * @throws {Error} If the authentication token cannot be retrieved.
149
+ * @example
150
+ * const authToken = await hmsInstance.getAuthTokenByRoomCode('room-code');
151
+ *
152
+ * @see https://www.100ms.live/docs/react-native/v2/how-to-guides/listen-to-room-updates/get-methods#getauthtokenbyroomcode
153
+ * @async
154
+ * @function getAuthTokenByRoomCode
93
155
  * @memberof HMSSDK
94
156
  */
95
157
  getAuthTokenByRoomCode: (roomCode: string, userId?: string, endpoint?: string) => Promise<string>;
96
158
  /**
97
- * takes an instance of [HMSConfig]{@link HMSConfig} and joins the room.
98
- * after joining the room user will start receiving the events and updates of the room.
159
+ * Asynchronously joins a room with the provided configuration
160
+ *
161
+ * This method is responsible for initiating the process of joining a room in the HMS ecosystem. It performs several key actions:
162
+ * - Logs the attempt to join with the provided configuration and instance ID.
163
+ * - Initializes the peers and room caches for the current session.
164
+ * - Calls the `join` method on the `HMSManager` with the provided configuration and the instance ID.
165
+ *
166
+ * @param {HMSConfig} config - The configuration object required to join a room. This includes credentials, room details, and user information.
167
+ * @returns {Promise<void>} A promise that resolves when the join operation has been successfully initiated.
168
+ * @throws {Error} If the join operation cannot be completed.
99
169
  *
100
- * checkout {@link https://www.100ms.live/docs/react-native/v2/features/join} for more info
170
+ * @example
171
+ * await hmsInstance.join(hmsConfig);
101
172
  *
102
- * @param {HMSConfig} config
173
+ * @see https://www.100ms.live/docs/react-native/v2/how-to-guides/set-up-video-conferencing/join
174
+ * @async
175
+ * @function join
103
176
  * @memberof HMSSDK
104
177
  */
105
178
  join: (config: HMSConfig) => Promise<void>;
106
179
  /**
107
- * - preview function is used to initiate a preview for the localPeer.
108
- * - We can call this function and wait for a response in previewListener, the response will contain previewTracks for local peer.
109
- *
110
- * checkout {@link https://www.100ms.live/docs/react-native/v2/features/preview} for more info
111
- *
112
- * @param {HMSConfig} config
180
+ * Initiates a preview for the local peer.
181
+ *
182
+ * This function triggers the preview process for the local peer, allowing the application to display
183
+ * preview tracks (e.g., video or audio tracks) before joining a room. The response from the previewListener
184
+ * will contain the preview tracks for the local peer, which can be used to render a preview UI.
185
+ *
186
+ * @param {HMSConfig} config - The configuration object required for previewing, including credentials and user details.
187
+ * @example
188
+ * // Example usage of the preview function
189
+ * const previewConfig = {
190
+ * authToken: "your_auth_token",
191
+ * userName: "John Doe",
192
+ * roomCode: "your_room_code"
193
+ * };
194
+ * hmsInstance.preview(previewConfig);
195
+ *
196
+ * @see https://www.100ms.live/docs/react-native/v2/features/preview
197
+ *
198
+ * @async
199
+ * @function preview
113
200
  * @memberof HMSSDK
114
201
  */
115
- preview: (config: HMSConfig) => void;
202
+ preview: (config: HMSConfig) => Promise<void>;
116
203
  /**
117
- * - HmsView is react component that takes trackId and starts showing that track on a tile.
118
- * - The appearance of tile is completely customizable with style prop.
119
- * - Scale type can determine how the incoming video will fit in the canvas check {@link HMSVideoViewMode} for more information.
120
- * - Mirror to flip the video vertically.
121
- * - Auto Simulcast to automatically select the best Streaming Quality of track if feature is enabled in Room.
204
+ * `HmsView` is a React component that renders a video track within a view.
205
+ *
206
+ * It utilizes the `HmsViewComponent` to display the media track specified by the `trackId`.
207
+ * This component is designed to be used with React's `forwardRef` to allow for ref forwarding,
208
+ * enabling direct interaction with the DOM element.
209
+ *
210
+ * Props:
211
+ * - `trackId`: The unique identifier for the track to be displayed.
212
+ * - `style`: Custom styles to apply to the view.
213
+ * - `mirror`: If true, the video will be mirrored; commonly used for local video tracks.
214
+ * - `scaleType`: Determines how the video fits within the bounds of the view (e.g., aspect fill, aspect fit).
215
+ * - `setZOrderMediaOverlay`: When true, the video view will be rendered above the regular view hierarchy.
216
+ * - `autoSimulcast`: Enables automatic simulcast layer switching based on network conditions (if supported).
217
+ *
218
+ * @param {Object} props - The properties passed to the HmsView component.
219
+ * @param {React.Ref} ref - A ref provided by `forwardRef` for accessing the underlying DOM element.
220
+ * @returns {React.Element} A `HmsViewComponent` element configured with the provided props and ref.
221
+ * @memberof HMSSDK
222
+ * @example
223
+ * <HmsView trackId="track-id" style={{ width: 100, height: 100 }} mirror={true} scaleType="aspectFill" />
122
224
  *
123
- * checkout {@link https://www.100ms.live/docs/react-native/v2/features/render-video} for more info
225
+ * @see https://www.100ms.live/docs/react-native/v2/how-to-guides/set-up-video-conferencing/render-video/overview
124
226
  *
125
227
  * @param {HmsViewProps}
126
228
  * @memberof HMSSDK
@@ -128,405 +230,922 @@ export declare class HMSSDK {
128
230
  HmsView: React.ForwardRefExoticComponent<HmsViewProps & React.RefAttributes<any>>;
129
231
  roomLeaveCleanup: () => void;
130
232
  /**
131
- * Calls leave function of native sdk and session of current user is invalidated.
233
+ * Asynchronously leaves the current room and performs cleanup.
234
+ *
235
+ * This method triggers the leave process for the current user, effectively disconnecting them from the room they are in.
236
+ * It logs the leave action with the user's ID, calls the native `leave` method in `HMSManager` with the user's ID,
237
+ * and then performs additional cleanup through `roomLeaveCleanup`. This cleanup includes removing app state subscriptions
238
+ * and clearing cached data related to peers and the room.
239
+ *
240
+ * @returns {Promise<boolean>} A promise that resolves to `true` if the user has successfully left the room, or `false` otherwise.
241
+ * @throws {Error} If the user cannot leave the room.
242
+ * @memberof HMSSDK
243
+ * @example
244
+ * await hmsInstance.leave();
132
245
  *
133
- * checkout {@link https://www.100ms.live/docs/react-native/v2/features/leave} for more info
246
+ * @see https://www.100ms.live/docs/react-native/v2/features/leave
134
247
  *
248
+ * @async
249
+ * @function leave
135
250
  * @memberof HMSSDK
136
251
  */
137
252
  leave: () => Promise<any>;
138
253
  /**
139
- * - This function sends message to all the peers in the room, the get the message in onMessage listener.
254
+ * Sends a broadcast message to all peers in the room.
140
255
  *
141
- * checkout {@link https://www.100ms.live/docs/react-native/v2/features/chat} for more info
256
+ * This asynchronous function sends a message to all peers in the room, which they can receive through the `onMessage` listener.
257
+ * It can be used to send chat messages or custom types of messages like emoji reactions or notifications.
142
258
  *
259
+ * @param {string} message - The message to be sent to all peers.
260
+ * @param {string} [type='chat'] - The type of the message. Default is 'chat'. Custom types can be used for specific purposes.
261
+ * @returns {Promise<{messageId: string | undefined}>} A promise that resolves with the message ID of the sent message, or undefined if the message could not be sent.
262
+ *
263
+ * @example
264
+ * // Sending a chat message to all peers
265
+ * await hmsInstance.sendBroadcastMessage("Hello everyone!", "chat");
266
+ *
267
+ * @example
268
+ * // Sending a custom notification to all peers
269
+ * await hmsInstance.sendBroadcastMessage("Meeting starts in 5 minutes", "notification");
270
+ *
271
+ * @see https://www.100ms.live/docs/react-native/v2/how-to-guides/set-up-video-conferencing/chat
272
+ *
273
+ * @async
274
+ * @function sendBroadcastMessage
143
275
  * @memberof HMSSDK
144
- * @param message the message that is to be sent
145
- * @param type the default type is set to CHAT. You can pass a custom type here for sending events like Emoji Reactions, Notifications, etc
146
276
  */
147
277
  sendBroadcastMessage: (message: string, type?: string) => Promise<{
148
278
  messageId: string | undefined;
149
279
  }>;
150
280
  /**
151
- * - sendGroupMessage sends a message to specific set of roles, whoever has any of those role in room
152
- * will get the message in onMessage listener.
281
+ * Sends a message to a specific set of roles within the room.
282
+ *
283
+ * This method allows for targeted communication by sending a message to peers who have any of the specified roles.
284
+ * The message is received by the peers through the `onMessage` listener. This can be useful for sending announcements,
285
+ * instructions, or other types of messages to a subset of the room based on their roles.
286
+ *
287
+ * @param {string} message - The message to be sent.
288
+ * @param {HMSRole[]} roles - An array of roles to which the message will be sent. Peers with these roles will receive the message.
289
+ * @param {string} [type='chat'] - The type of the message. Defaults to 'chat'. Custom types can be used for specific messaging scenarios.
290
+ * @returns {Promise<{messageId: string | undefined}>} A promise that resolves with an object containing the `messageId` of the sent message. If the message could not be sent, `messageId` will be `undefined`.
153
291
  *
154
- * checkout {@link https://www.100ms.live/docs/react-native/v2/features/chat} for more info
292
+ * @example
293
+ * // Sending a message to all peers with the role of 'moderator'
294
+ * await hmsInstance.sendGroupMessage("Please start the meeting.", [moderator]);
155
295
  *
296
+ * @see https://www.100ms.live/docs/react-native/v2/features/chat
297
+ *
298
+ * @async
299
+ * @function sendGroupMessage
156
300
  * @memberof HMSSDK
157
301
  */
158
302
  sendGroupMessage: (message: string, roles: HMSRole[], type?: string) => Promise<{
159
303
  messageId: string | undefined;
160
304
  }>;
161
305
  /**
162
- * - sendDirectMessage sends a private message to a single peer, only that peer will get the message
163
- * in onMessage Listener.
306
+ * Sends a direct message to a specific peer in the room.
307
+ *
308
+ * This method allows sending a private message to a single peer, ensuring that only the specified recipient can receive and view the message.
309
+ * The message is delivered to the recipient through the `onMessage` listener. This functionality is useful for implementing private chat features
310
+ * within a larger group chat context.
311
+ *
312
+ * @param {string} message - The message text to be sent.
313
+ * @param {HMSPeer} peer - The peer object representing the recipient of the message.
314
+ * @param {string} [type='chat'] - The type of the message being sent. Defaults to 'chat'. This can be customized to differentiate between various message types (e.g., 'private', 'system').
315
+ * @returns {Promise<{messageId: string | undefined}>} A promise that resolves with an object containing the `messageId` of the sent message. If the message could not be sent, `messageId` will be `undefined`.
316
+ * @throws {Error} Throws an error if the message could not be sent.
164
317
  *
165
- * checkout {@link https://www.100ms.live/docs/react-native/v2/features/chat} for more info
318
+ * @example
319
+ * // Sending a private chat message to a specific peer
320
+ * const peer = { peerID: 'peer123', ... };
321
+ * await hmsInstance.sendDirectMessage("Hello, this is a private message.", peer, "chat");
166
322
  *
323
+ * @see https://www.100ms.live/docs/react-native/v2/features/chat
324
+ *
325
+ * @async
326
+ * @function sendDirectMessage
167
327
  * @memberof HMSSDK
168
328
  */
169
329
  sendDirectMessage: (message: string, peer: HMSPeer, type?: string) => Promise<{
170
330
  messageId: string | undefined;
171
331
  }>;
172
332
  /**
173
- * - changeMetadata changes a specific field in localPeer which is [metadata] it is a string that can
174
- * be used for various functionalities like raiseHand, beRightBack and many more that explains the
175
- * current status of the peer.
176
- *
177
- * - it is advised to use a json object in string format to store multiple dataPoints in metadata.
178
- *
179
- * checkout {@link https://www.100ms.live/docs/react-native/v2/advanced-features/change-metadata} for more info
180
- *
181
- * @param {string}
333
+ * Asynchronously changes the metadata for the local peer.
334
+ *
335
+ * This method updates the metadata field of the local peer in the room. The metadata is a versatile field that can be used
336
+ * to store various information such as the peer's current status (e.g., raising hand, be right back, etc.). It is recommended
337
+ * to use a JSON object in string format to store multiple data points within the metadata. This allows for a structured and
338
+ * easily parseable format for metadata management.
339
+ *
340
+ * @param {string} metadata - The new metadata in string format. It is advised to use a JSON string for structured data.
341
+ * @returns {Promise<void>} A promise that resolves when the metadata has been successfully changed.
342
+ * @throws {Error} Throws an error if the metadata change operation fails.
343
+ * @see https://www.100ms.live/docs/react-native/v2/how-to-guides/interact-with-room/peer/change-metadata
344
+ * @example
345
+ * // Changing metadata to indicate the peer is raising their hand
346
+ * const newMetadata = JSON.stringify({ status: 'raiseHand' });
347
+ * await hmsInstance.changeMetadata(newMetadata);
348
+ *
349
+ * @async
350
+ * @function changeMetadata
182
351
  * @memberof HMSSDK
183
352
  */
184
353
  changeMetadata: (metadata: string) => Promise<any>;
185
354
  /**
186
- * - startRTMPOrRecording takes a configuration object {@link HMSRTMPConfig} and stats the RTMP recording
187
- * - this object of {@link HMSRTMPConfig} sets the urls for streaming and weather to set recording on or not
188
- * - we get the response of this function in onRoomUpdate as RTMP_STREAMING_STATE_UPDATED.
189
- *
190
- * checkout {@link https://www.100ms.live/docs/react-native/v2/features/recording} for more info
191
- *
355
+ * Initiates RTMP streaming or recording based on the provided configuration.
356
+ *
357
+ * This method starts RTMP streaming or recording by taking a configuration object of type HMSRTMPConfig.
358
+ * The configuration specifies the URLs for streaming and whether recording should be enabled. The response to this
359
+ * operation can be observed in the `onRoomUpdate` event, specifically when the `RTMP_STREAMING_STATE_UPDATED` action is triggered.
360
+ *
361
+ * @param {HMSRTMPConfig} data - The configuration object for RTMP streaming or recording. It includes streaming URLs and recording settings.
362
+ * @returns {Promise<any>} A promise that resolves with the operation result when the streaming or recording starts successfully.
363
+ * @throws {Error} Throws an error if the operation fails or the configuration is invalid.
364
+ *
365
+ * @see https://www.100ms.live/docs/react-native/v2/how-to-guides/record-and-live-stream/recording
366
+ *
367
+ * @example
368
+ * const rtmpConfig = {
369
+ * meetingURL: "https://meet.example.com/myMeeting",
370
+ * rtmpURLs: ["rtmp://live.twitch.tv/app", "rtmp://a.rtmp.youtube.com/live2"],
371
+ * record: true,
372
+ * resolution: { width: 1280, height: 720 }
373
+ * };
374
+ * await hmsInstance.startRTMPOrRecording(rtmpConfig);
375
+ * @async
376
+ * @function startRTMPOrRecording
192
377
  * @memberof HMSSDK
193
378
  */
194
379
  startRTMPOrRecording: (data: HMSRTMPConfig) => Promise<any>;
195
380
  /**
196
- * - this function stops all the ongoing RTMP streaming and recording.
197
- * - we get the response of this function in onRoomUpdate as RTMP_STREAMING_STATE_UPDATED.
381
+ * Stops all ongoing RTMP streaming and recording.
198
382
  *
199
- * checkout {@link https://www.100ms.live/docs/react-native/v2/features/recording} for more info
383
+ * This function is responsible for halting any active RTMP streaming or recording sessions.
384
+ * It communicates with the native `HMSManager` module to execute the stop operation.
385
+ * The completion or status of this operation can be monitored through the `onRoomUpdate` event, specifically when the `RTMP_STREAMING_STATE_UPDATED` action is triggered, indicating that the streaming or recording has been successfully stopped.
200
386
  *
387
+ * @async
388
+ * @function stopRtmpAndRecording
389
+ * @returns {Promise<any>} A promise that resolves when the RTMP streaming and recording have been successfully stopped.
390
+ * @see https://www.100ms.live/docs/react-native/v2/how-to-guides/record-and-live-stream/recording
201
391
  * @memberof HMSSDK
392
+ * @example
393
+ * await hmsInstance.stopRtmpAndRecording();
202
394
  */
203
395
  stopRtmpAndRecording: () => Promise<any>;
204
396
  /**
205
- * - This function starts HLSStreaming.
206
- * - we get the response of this function in onRoomUpdate as HLS_STREAMING_STATE_UPDATED.
207
- *
208
- * checkout {@link https://www.100ms.live/docs/react-native/v2/features/hls-streaming} for more info
209
- *
210
- * @param {HMSHLSConfig}
397
+ * Initiates HLS (HTTP Live Streaming) based on the provided configuration.
398
+ *
399
+ * This asynchronous function starts HLS streaming, allowing for live video content to be delivered over the internet in a scalable manner.
400
+ * The function takes an optional `HMSHLSConfig` object as a parameter, which includes settings such as the meeting URL, HLS variant parameters, and recording settings.
401
+ * The operation's response can be observed through the `onRoomUpdate` event, specifically when the `HLS_STREAMING_STATE_UPDATED` action is triggered, indicating the streaming state has been updated.
402
+ *
403
+ * @param {HMSHLSConfig} [data] - Optional configuration object for HLS streaming. Defines parameters such as meeting URL, HLS variants, and recording options.
404
+ * @returns {Promise<any>} A promise that resolves when the HLS streaming starts successfully. The promise resolves with the operation result.
405
+ * @throws {Error} Throws an error if the operation fails or if the provided configuration is invalid.
406
+ * @see https://www.100ms.live/docs/react-native/v2/how-to-guides/record-and-live-stream/hls
407
+ * @async
408
+ * @function startHLSStreaming
211
409
  * @memberof HMSSDK
410
+ * @example
411
+ * await hmsInstance.startHLSStreaming();
212
412
  */
213
413
  startHLSStreaming: (data?: HMSHLSConfig) => Promise<any>;
214
414
  /**
215
- * - stopHLSStreaming function stops the ongoing HLSStreams.
216
- * - we get the response of this function in onRoomUpdate as HLS_STREAMING_STATE_UPDATED.
415
+ * Stops the ongoing HLS (HTTP Live Streaming) streams.
217
416
  *
218
- * checkout {@link https://www.100ms.live/docs/react-native/v2/features/hls-streaming} for more info
417
+ * This asynchronous function is responsible for stopping any active HLS streaming sessions.
418
+ * It communicates with the native `HMSManager` module to execute the stop operation.
419
+ * The completion or status of this operation can be observed through the `onRoomUpdate` event, specifically when the `HLS_STREAMING_STATE_UPDATED` action is triggered, indicating that the HLS streaming has been successfully stopped.
219
420
  *
421
+ * @async
422
+ * @function stopHLSStreaming
423
+ * @returns {Promise<void>} A promise that resolves when the HLS streaming has been successfully stopped.
424
+ * @see https://www.100ms.live/docs/react-native/v2/how-to-guides/record-and-live-stream/hls for more details on HLS streaming.
220
425
  * @memberof HMSSDK
426
+ * @example
427
+ * await hmsInstance.stopHLSStreaming();
221
428
  */
222
429
  stopHLSStreaming: () => Promise<any>;
223
430
  /**
224
- * @deprecated This function has been deprecated in favor of #Function changeRoleOfPeer
225
- *
226
- * - This function can be used in a situation when we want to change role hence manipulate their
227
- * access and rights in the current room, it takes the peer {@link HMSPeer} whom role we want to change,
228
- * role {@link HMSRole} which will be the new role for that peer and weather to forcefully change
229
- * the role or ask the to accept the role change request using a boolean force.
230
- *
231
- * - if we change the role forcefully the peer's role will be updated without asking the peer
232
- * otherwise the user will get the roleChangeRequest in roleChangeRequest listener.
233
- * for more information on this checkout {@link onRoleChangeRequestListener}
234
- *
235
- * checkout {@link https://www.100ms.live/docs/react-native/v2/features/change-role} for more info
236
- *
431
+ * Sends timed metadata for HLS (HTTP Live Streaming) playback.
432
+ *
433
+ * This asynchronous function is designed to send metadata that can be synchronized with the HLS video playback.
434
+ * The metadata is sent to all viewers of the HLS stream, allowing for a variety of use cases such as displaying
435
+ * song titles, ads, or other information at specific times during the stream.
436
+ * The metadata should be an array of HMSHLSTimedMetadata objects, each specifying the content and timing for the metadata display.
437
+ *
438
+ * @async
439
+ * @function sendHLSTimedMetadata
440
+ * @param {HMSHLSTimedMetadata[]} metadata - An array of metadata objects to be sent.
441
+ * @returns {Promise<boolean>} A promise that resolves to `true` if the metadata was successfully sent, or `false` otherwise.
442
+ * @example
443
+ * const metadata = [
444
+ * { time: 10, data: "Song: Example Song Title" },
445
+ * { time: 20, data: "Advertisement: Buy Now!" }
446
+ * ];
447
+ * await hmsInstance.sendHLSTimedMetadata(metadata);
448
+ *
449
+ * @see https://www.100ms.live/docs/react-native/v2/how-to-guides/record-and-live-stream/hls-player#how-to-use-hls-timed-metadata-with-100ms-hls-player
450
+ */
451
+ sendHLSTimedMetadata: (metadata: HMSHLSTimedMetadata[]) => Promise<boolean>;
452
+ /**
453
+ * Deprecated. Changes the role of a specified peer within the room.
454
+ *
455
+ * This function is marked as deprecated and should not be used in new implementations. Use `changeRoleOfPeer` instead.
456
+ * It allows for the dynamic adjustment of a peer's permissions and capabilities within the room by changing their role.
457
+ * The role change can be enforced immediately or offered to the peer as a request, depending on the `force` parameter.
458
+ *
459
+ * @deprecated Since version 1.1.0. Use `changeRoleOfPeer` instead.
460
+ * @param {HMSPeer} peer - The peer whose role is to be changed.
461
+ * @param {HMSRole} role - The new role to be assigned to the peer.
462
+ * @param {boolean} [force=false] - If `true`, the role change is applied immediately without the peer's consent. If `false`, the peer receives a role change request.
463
+ * @returns {Promise<void>} A promise that resolves when the role change operation is complete.
464
+ * @throws {Error} Throws an error if the operation fails.
465
+ * @see https://www.100ms.live/docs/react-native/v2/how-to-guides/interact-with-room/peer/change-role
466
+ * @example
467
+ * // Change the role of a peer to 'viewer' forcefully
468
+ * const peer = { peerID: 'peer123', ... };
469
+ * const newRole = { name: 'viewer', ... };
470
+ * await hmsInstance.changeRole(peer, newRole, true);
471
+ * @async
472
+ * @function changeRole
237
473
  * @memberof HMSSDK
238
474
  */
239
475
  changeRole: (peer: HMSPeer, role: HMSRole, force?: boolean) => Promise<any>;
240
476
  /**
241
- * - This function can be used in a situation when we want to change role hence manipulate their
242
- * access and rights in the current room, it takes the peer {@link HMSPeer} whom role we want to change,
243
- * role {@link HMSRole} which will be the new role for that peer and weather to forcefully change
244
- * the role or ask the to accept the role change request using a boolean force.
245
- *
246
- * - if we change the role forcefully the peer's role will be updated without asking the peer
247
- * otherwise the user will get the roleChangeRequest in roleChangeRequest listener.
248
- * for more information on this checkout {@link onRoleChangeRequestListener}
249
- *
250
- * checkout {@link https://www.100ms.live/docs/react-native/v2/features/change-role} for more info
251
- *
477
+ * Asynchronously changes the role of a specified peer within the room.
478
+ *
479
+ * This function is designed to dynamically adjust a peer's permissions and capabilities within the room by changing their role.
480
+ * It can enforce the role change immediately or offer it to the peer as a request, depending on the `force` parameter.
481
+ * If the role change is forced, it is applied immediately without the peer's consent. Otherwise, the peer receives a role change request,
482
+ * which can be accepted or declined. This functionality supports flexible room management and control over participant permissions.
483
+ *
484
+ * @async
485
+ * @function changeRoleOfPeer
486
+ * @param {HMSPeer} peer - The peer whose role is to be changed.
487
+ * @param {HMSRole} role - The new role to be assigned to the peer.
488
+ * @param {boolean} [force=false] - Determines whether the role change should be applied immediately (`true`) or sent as a request (`false`).
489
+ * @returns {Promise<void>} A promise that resolves to `true` if the role change operation is successful, or `false` otherwise.
490
+ * @throws {Error} Throws an error if the operation fails.
491
+ * @see https://www.100ms.live/docs/react-native/v2/features/change-role
492
+ * @example
493
+ * // Change the role of a peer to 'viewer' forcefully
494
+ * const peer = { peerID: 'peer123', ... };
495
+ * const newRole = { name: 'viewer', ... };
496
+ * await hmsInstance.changeRoleOfPeer(peer, newRole, true);
497
+ *
498
+ * @async
499
+ * @function changeRoleOfPeer
252
500
  * @memberof HMSSDK
253
501
  */
254
- changeRoleOfPeer: (peer: HMSPeer, role: HMSRole, force?: boolean) => Promise<any>;
502
+ changeRoleOfPeer: (peer: HMSPeer, role: HMSRole, force?: boolean) => Promise<void>;
255
503
  /**
256
- * - This function can be used in a situation when we want to change role of multiple peers by specifying their roles.
257
- * Hence manipulate their access and rights in the current room.
258
- * It takes the list of roles {@link HMSRole} whom role we want to change
259
- * and role {@link HMSRole} which will be the new role for peers.
260
- *
261
- * - Note that role will be updated without asking the peers.
262
- * Meaning, Peers will not get the roleChangeRequest in roleChangeRequest listener.
263
- *
264
- * checkout {@link https://www.100ms.live/docs/react-native/v2/features/change-role} for more info
504
+ * Asynchronously changes the roles of multiple peers within the room.
505
+ *
506
+ * This function is designed to batch update the roles of peers based on their current roles. It is particularly useful
507
+ * in scenarios where a group of users need to be granted or restricted permissions en masse, such as promoting all viewers
508
+ * to participants or demoting all speakers to viewers. The function updates the roles of all peers that have any of the specified
509
+ * `ofRoles` to the new `toRole` without requiring individual consent, bypassing the `roleChangeRequest` listener on the peer's end.
510
+ *
511
+ * @async
512
+ * @function changeRoleOfPeersWithRoles
513
+ * @param {HMSRole[]} ofRoles - An array of roles to identify the peers whose roles are to be changed.
514
+ * @param {HMSRole} toRole - The new role to be assigned to the identified peers.
515
+ * @returns {Promise<void>} A promise that resolves when the role change operation is complete.
516
+ * @throws {Error} Throws an error if the operation fails.
517
+ * @see https://www.100ms.live/docs/react-native/v2/how-to-guides/interact-with-room/peer/change-role
518
+ * @example
519
+ * // Change the role of all peers with 'viewer' role to 'participant'
520
+ * const viewerRole = { name: 'viewer', ... };
521
+ * const participantRole = { name: 'participant', ... };
522
+ * await hmsInstance.changeRoleOfPeersWithRoles([viewerRole], participantRole);
265
523
  *
266
524
  * @memberof HMSSDK
267
525
  */
268
- changeRoleOfPeersWithRoles: (ofRoles: HMSRole[], toRole: HMSRole) => Promise<any>;
526
+ changeRoleOfPeersWithRoles: (ofRoles: HMSRole[], toRole: HMSRole) => Promise<void>;
269
527
  /**
270
- * - This function can be used to manipulate mute status of any track.
271
- * - Targeted peer affected by this action will get a callback in onChangeTrackStateRequestListener.
528
+ * Asynchronously changes the mute state of a specified track.
529
+ *
530
+ * This function is designed to control the mute state of any track (audio or video) within the room.
531
+ * When invoked, it sends a request to the HMSManager to change the mute state of the specified track.
532
+ * The targeted peer, whose track is being manipulated, will receive a callback on the `onChangeTrackStateRequestListener`,
533
+ * allowing for custom handling or UI updates based on the mute state change.
534
+ *
535
+ * @async
536
+ * @function changeTrackState
537
+ * @param {HMSTrack} track - The track object whose mute state is to be changed.
538
+ * @param {boolean} mute - The desired mute state of the track. `true` to mute the track, `false` to unmute.
539
+ * @returns {Promise<void>} A promise that resolves when the operation to change the track's mute state is complete.
540
+ * @throws {Error} Throws an error if the operation fails or the track cannot be found.
541
+ * @see https://www.100ms.live/docs/react-native/v2/how-to-guides/interact-with-room/track/remote-mute
542
+ * @async
543
+ * @function changeTrackState
544
+ * @memberof HMSSDK
272
545
  *
273
- * * checkout {@link https://www.100ms.live/docs/react-native/v2/features/change-track-state} for more info
546
+ * @example
547
+ * // Mute a specific track
548
+ * const trackToMute = { trackId: 'track123', ... };
549
+ * await hmsInstance.changeTrackState(trackToMute, true);
274
550
  *
275
- * @param {HMSTrack}
276
- * @memberof HMSSDK
551
+ * @example
552
+ * // Unmute a specific track
553
+ * const trackToUnmute = { trackId: 'track456', ... };
554
+ * await hmsInstance.changeTrackState(trackToUnmute, false);
277
555
  */
278
- changeTrackState: (track: HMSTrack, mute: boolean) => Promise<any>;
556
+ changeTrackState: (track: HMSTrack, mute: boolean) => Promise<void>;
279
557
  /**
280
- * - changeTrackStateForRoles is an enhancement on the functionality of {@link changeTrackState}.
281
- * - We can change mute status for all the tracks of peers having a particular role.
282
- * - @param source determines the source of the track ex. video, audio etc.
283
- * - The peers affected by this action will get a callback in onChangeTrackStateRequestListener.
284
- *
558
+ * Asynchronously changes the mute state of tracks for peers with specified roles.
559
+ *
560
+ * This method extends the functionality of `changeTrackState` by allowing the mute state of all tracks (audio, video, etc.)
561
+ * belonging to peers with certain roles to be changed in a single operation. It is particularly useful for managing the audio
562
+ * and video state of groups of users, such as muting all participants except the speaker in a conference call.
563
+ *
564
+ * The peers whose track states are being changed will receive a callback on `onChangeTrackStateRequestListener`, allowing for
565
+ * custom handling or UI updates based on the mute state change.
566
+ *
567
+ * @async
568
+ * @function changeTrackStateForRoles
569
+ * @param {boolean} mute - The desired mute state of the tracks. `true` to mute, `false` to unmute.
570
+ * @param {HMSTrackType} [type] - Optional. The type of the tracks to be muted/unmuted (e.g., audio, video).
571
+ * @param {string} [source] - Optional. The source of the track (e.g., camera, screen).
572
+ * @param {Array<HMSRole>} [roles] - The roles of the peers whose tracks are to be muted/unmuted. If not specified, affects all roles.
573
+ * @returns {Promise<void>} A promise that resolves when the operation to change the track's mute state is complete.
574
+ * @throws {Error} Throws an error if the operation fails.
575
+ * @see https://www.100ms.live/docs/react-native/v2/how-to-guides/interact-with-room/track/change-track-state-roles
285
576
  * @memberof HMSSDK
577
+ *
578
+ * @example
579
+ * // Mute all audio tracks for peers with the role of 'viewer'
580
+ * const viewerRole = { name: 'viewer', ... };
581
+ * await hmsInstance.changeTrackStateForRoles(true, 'audio', undefined, [viewerRole]);
286
582
  */
287
- changeTrackStateForRoles: (mute: boolean, type?: HMSTrackType, source?: string, roles?: Array<HMSRole>) => Promise<any>;
583
+ changeTrackStateForRoles: (mute: boolean, type?: HMSTrackType, source?: string, roles?: Array<HMSRole>) => Promise<void>;
288
584
  /**
289
- * - removePeer can forcefully disconnect a Peer from the room.
290
- * - the user who's removed from this action will get a callback in {@link onRemovedFromRoomListener}.
585
+ * Asynchronously removes a peer from the room.
586
+ *
587
+ * This method forcefully disconnects a specified peer from the room.
588
+ * Upon successful removal, the removed peer will receive a callback through the `onRemovedFromRoomListener`, indicating
589
+ * they have been removed from the room.
590
+ * This can be used for managing room participants, such as removing disruptive users or managing room capacity.
291
591
  *
292
- * checkout {@link https://www.100ms.live/docs/react-native/v2/features/remove-peer} for more info
592
+ * @param {HMSPeer} peer - The peer object representing the participant to be removed.
593
+ * @param {string} reason - A string detailing the reason for the removal. This reason is communicated
594
+ * to the removed peer, providing context for the action.
595
+ * @returns {Promise<void>} A promise that resolves when the peer has been successfully removed.
596
+ * If the operation fails, the promise will reject with an error.
293
597
  *
598
+ * @example
599
+ * // Assuming `peer` is an instance of HMSPeer representing the participant to remove
600
+ * await hmsInstance.removePeer(peer, "Violation of room rules");
601
+ *
602
+ * @see https://www.100ms.live/docs/react-native/v2/how-to-guides/interact-with-room/peer/remove-peer
603
+ *
604
+ * @async
605
+ * @function removePeer
294
606
  * @memberof HMSSDK
295
607
  */
296
- removePeer: (peer: HMSPeer, reason: string) => Promise<any>;
608
+ removePeer: (peer: HMSPeer, reason: string) => Promise<void>;
297
609
  /**
298
- * - endRoom can be used in a situation where we want to disconnect all the peers from current room
299
- * and end the call.
300
- * - everyone in the room will get an update of this action in {@link onRemovedFromRoomListener}.
610
+ * Asynchronously ends the current room session for all participants.
611
+ *
612
+ * This method is used to programmatically end the current room session, effectively disconnecting all participants.
613
+ * It can also optionally lock the room to prevent new participants from joining. This is particularly useful for
614
+ * managing the end of scheduled events or meetings, ensuring that all participants are removed at the same time.
615
+ * Upon successful execution, all participants will receive a notification through the `onRemovedFromRoomListener`
616
+ * indicating that they have been removed from the room.
301
617
  *
302
- * checkout {@link https://www.100ms.live/docs/react-native/v2/features/end-room} for more info
618
+ * @param {string} reason - A descriptive reason for ending the room session. This reason is communicated to all participants.
619
+ * @param {boolean} [lock=false] - Optional. Specifies whether the room should be locked after ending the session. Default is `false`.
620
+ * @returns {Promise<void>} A promise that resolves when the room has been successfully ended and, optionally, locked.
303
621
  *
622
+ * @example
623
+ * // End the room and lock it to prevent rejoining
624
+ * await hmsInstance.endRoom("Meeting concluded", true);
625
+ *
626
+ * @see https://www.100ms.live/docs/react-native/v2/how-to-guides/interact-with-room/room/end-room
627
+ * @async
628
+ * @function endRoom
304
629
  * @memberof HMSSDK
305
630
  */
306
- endRoom: (reason: string, lock?: boolean) => Promise<any>;
631
+ endRoom: (reason: string, lock?: boolean) => Promise<void>;
307
632
  /**
308
- * - This function can be used to change name of localPeer.
633
+ * Asynchronously changes the name of the local peer.
634
+ *
635
+ * This function updates the name of the local peer in the room. It is useful for scenarios where a user's display name needs to be updated during a session, such as when a user decides to change their nickname or when correcting a typo in the user's name. The updated name is reflected across all participants in the room.
309
636
  *
310
- * checkout {@link https://www.100ms.live/docs/react-native/v2/features/change-name} for more info
637
+ * Once the name change is successful, all the peers receive HMSUpdateListenerActions.ON_PEER_UPDATE event with HMSPeerUpdate.NAME_CHANGED as update type. When this event is received, the UI for that peer should be updated.
311
638
  *
639
+ * @param {string} name - The new name to be set for the local peer.
640
+ * @returns {Promise<void>} A promise that resolves when the name change operation has been successfully completed.
641
+ * @throws {Error} Throws an error if the name change operation fails.
642
+ * @see https://www.100ms.live/docs/react-native/v2/how-to-guides/interact-with-room/peer/change-name for more information on changing the peer's name.
643
+ * @async
644
+ * @function changeName
312
645
  * @memberof HMSSDK
646
+ *
647
+ * @example
648
+ * // Change the name of the local peer to 'Alice'
649
+ * await hmsInstance.changeName("Alice");
313
650
  */
314
- changeName: (name: string) => Promise<any>;
651
+ changeName: (name: string) => Promise<void>;
315
652
  /**
316
- * -Preview for a specific Role before changing it.
653
+ * Asynchronously previews the audio and video tracks for a specific role before applying the role change.
317
654
  *
318
- * By previewing before doing a Role Change, users can see their expected Audio & Video tracks which will be visible to other Peers in Room post changing the Role.
655
+ * This method allows users to preview the expected audio and video tracks that will be visible to other peers in the room
656
+ * after changing their role. It is useful for scenarios where a user wants to understand the impact of a role change on their
657
+ * media tracks before making the change. This can help in ensuring that the right media settings are applied for the new role.
319
658
  *
320
- * checkout {@link https://www.100ms.live/docs/react-native/v2/how-to-guides/interact-with-room/peer/change-role} for more info
659
+ * @param {string} role - The role for which the preview is requested. The role should be defined within the room's role configurations.
660
+ * @returns {Promise<any>} A promise that resolves with the preview tracks information. The resolved object contains details about the audio and video tracks that would be available to the user if the role were changed to the specified role.
321
661
  *
322
- * @param {role: string}
662
+ * @example
663
+ * // Preview the tracks for the 'speaker' role
664
+ * const previewTracks = await hmsInstance.previewForRole('speaker');
665
+ * console.log(previewTracks);
666
+ *
667
+ * @async
668
+ * @function previewForRole
323
669
  * @memberof HMSSDK
324
670
  */
325
671
  previewForRole: (role: string) => Promise<(import("./HMSLocalAudioTrack").HMSLocalAudioTrack | import("./HMSLocalVideoTrack").HMSLocalVideoTrack)[]>;
326
672
  /**
327
- * Cancel the Previewing for Role invocation.
328
- *
329
- * If a [previewForRole] call was performed previously then calling this method clears the tracks created anticipating a Change of Role
673
+ * Asynchronously cancels the preview for a role change.
330
674
  *
331
- * checkout {@link https://www.100ms.live/docs/react-native/v2/how-to-guides/interact-with-room/peer/change-role} for more info
675
+ * This method is intended to be used after a `previewForRole` invocation. It cancels the ongoing preview operation,
676
+ * effectively clearing any tracks that were created in anticipation of a role change. This is useful in scenarios where
677
+ * a role change preview was initiated but needs to be aborted before the actual role change occurs, allowing for clean
678
+ * state management and resource cleanup.
332
679
  *
680
+ * @async
681
+ * @function cancelPreview
333
682
  * @memberof HMSSDK
683
+ * @returns {Promise<{data: string}>} A promise that resolves with an object containing a data string.
684
+ *
685
+ * @example
686
+ * // Cancel a previously initiated role change preview
687
+ * await hmsInstance.cancelPreview();
688
+ *
334
689
  */
335
690
  cancelPreview: () => Promise<{
336
- data: string;
691
+ success: boolean;
337
692
  }>;
338
693
  /**
339
- * - Calling this function will accept the most recent roleChange request made by anyone in the room
694
+ * Asynchronously accepts a role change request for the local peer.
695
+ *
696
+ * This method is used when a role change request has been made to the local peer, typically by an admin or moderator of the room.
697
+ * Invoking this method signals acceptance of the new role, and the role change is applied to the local peer. This can affect the peer's
698
+ * permissions and capabilities within the room, such as the ability to send video, audio, or chat messages.
340
699
  *
341
- * checkout {@link https://www.100ms.live/docs/react-native/v2/features/change-role} for more info
700
+ * The successful execution of this method triggers an update across the room, notifying other peers of the role change.
701
+ * It is important to handle this method's response to ensure the local UI reflects the new role's permissions and capabilities.
342
702
  *
703
+ * @async
704
+ * @function acceptRoleChange
343
705
  * @memberof HMSSDK
706
+ * @returns {Promise<void>} A promise that resolves when the role change has been successfully accepted and applied.
707
+ * @throws {Error} Throws an error if the role change acceptance operation fails.
708
+ * @example
709
+ * // Accept a role change request to become a 'moderator'
710
+ * await hmsInstance.acceptRoleChange();
711
+ *
712
+ * @see https://www.100ms.live/docs/react-native/v2/how-to-guides/interact-with-room/peer/change-role
344
713
  */
345
- acceptRoleChange: () => Promise<any>;
714
+ acceptRoleChange: () => Promise<void>;
346
715
  /**
347
- * - setPlaybackForAllAudio is an extension of the abilities of setPlaybackAllowed in
348
- * HMSRemoteAudioTrack. It sets mute status for all peers in the room only for the local peer.
716
+ * Sets the mute status for all remote audio tracks in the room for the local peer.
349
717
  *
350
- * checkout {@link https://www.100ms.live/docs/react-native/v2/features/playback-allowed} for more info
718
+ * This method allows the local user to mute or unmute the playback of all remote audio tracks in the room.
719
+ * It affects only the local peer's audio playback and does not impact other peers. This can be useful in scenarios
720
+ * where a user needs to quickly mute all incoming audio without affecting the audio state for other participants in the room.
351
721
  *
722
+ * @param {boolean} mute - A boolean value indicating whether to mute (`true`) or unmute (`false`) all remote audio tracks for the local peer.
723
+ * @returns {Promise<boolean>} A promise that resolves with a boolean value indicating the success of the operation.
724
+ * @throws {Error} Throws an error if the operation fails.
725
+ * @async
726
+ * @function setPlaybackForAllAudio
352
727
  * @memberof HMSSDK
728
+ * @example
729
+ * // Mute all remote audio tracks for the local peer
730
+ * hmsInstance.setPlaybackForAllAudio(true);
731
+ *
732
+ * @example
733
+ * // Unmute all remote audio tracks for the local peer
734
+ * hmsInstance.setPlaybackForAllAudio(false);
735
+ *
736
+ * @see https://www.100ms.live/docs/react-native/v2/how-to-guides/interact-with-room/track/playback-allowed
353
737
  */
354
- setPlaybackForAllAudio: (mute: boolean) => void;
738
+ setPlaybackForAllAudio: (mute: boolean) => Promise<boolean>;
355
739
  /**
356
- * - This function mutes audio for all peers in the room.
740
+ * Mutes the audio for all peers in the room.
741
+ *
742
+ * This asynchronous function communicates with the native `HMSManager` module to mute the audio tracks of all remote peers in the room.
743
+ * It is particularly useful in scenarios where a moderator needs to quickly mute all participants to prevent background noise or interruptions during a session.
357
744
  *
745
+ * @async
746
+ * @function remoteMuteAllAudio
358
747
  * @memberof HMSSDK
748
+ * @returns {Promise<{success: boolean}>} A promise that resolves with a boolean value indicating the success of the operation.
749
+ * @throws {Error} Throws an error if the operation fails.
750
+ * @example
751
+ * // Mute all remote audio tracks in the room
752
+ * await hmsInstance.remoteMuteAllAudio();
753
+ *
754
+ * @see https://www.100ms.live/docs/react-native/v2/how-to-guides/interact-with-room/track/remote-mute
359
755
  */
360
- remoteMuteAllAudio: () => Promise<any>;
756
+ remoteMuteAllAudio: () => Promise<{
757
+ success: boolean;
758
+ }>;
361
759
  /**
362
- * - getRoom is a wrapper function on an existing native function also known as getRoom the returns
363
- * current room object which is of type {@link HMSRoom}
760
+ * Retrieves the current room's details.
364
761
  *
365
- * checkout {@link https://www.100ms.live/docs/react-native/v2/features/join#get-room} for more info
762
+ * This method acts as a wrapper around the native `getRoom` function, providing an easy way to obtain the current room's state and details,
763
+ * including participants, tracks, and other relevant information. The room object is fetched from the native module and then processed
764
+ * to match the expected format in the React Native layer. This method is useful for getting the room's state at any point in time, such as
765
+ * when needing to display current room information or for debugging purposes.
366
766
  *
767
+ * @async
768
+ * @function getRoom
367
769
  * @memberof HMSSDK
368
- * @return Promise<HMSRoom>
770
+ * @returns {Promise<HMSRoom>} A promise that resolves to the current room object.
771
+ * @example
772
+ * // Fetch the current room details
773
+ * const roomDetails = await hmsInstance.getRoom();
774
+ * console.log(roomDetails);
775
+ *
776
+ * @see https://www.100ms.live/docs/react-native/v2/how-to-guides/listen-to-room-updates/get-methods
369
777
  */
370
778
  getRoom: () => Promise<HMSRoom>;
371
779
  /**
372
- * - getLocalPeer is a wrapper function on an existing native function also known as getLocalPeer the returns
373
- * current local peer object which is of type {@link HMSLocalPeer}
780
+ * Retrieves the current local peer's details.
374
781
  *
782
+ * This asynchronous method wraps around the native `getLocalPeer` function, providing a straightforward way to obtain the current local peer's details,
783
+ * including their ID, name, role, and any tracks they may be publishing. The local peer object is fetched from the native module and then processed
784
+ * to match the expected format in the React Native layer. This method is particularly useful for operations that require information about the local user,
785
+ * such as updating UI elements to reflect the current user's status or for debugging purposes.
786
+ *
787
+ * @async
788
+ * @function getLocalPeer
375
789
  * @memberof HMSSDK
376
- * @return Promise<HMSLocalPeer>
790
+ * @returns {Promise<HMSLocalPeer>} A promise that resolves to the current local peer object.
791
+ * @example
792
+ * // Fetch the current local peer's details
793
+ * const localPeerDetails = await hmsInstance.getLocalPeer();
794
+ * console.log(localPeerDetails);
795
+ *
796
+ * @see https://www.100ms.live/docs/react-native/v2/how-to-guides/listen-to-room-updates/get-methods
377
797
  */
378
798
  getLocalPeer: () => Promise<HMSLocalPeer>;
379
799
  /**
380
- * - getRemotePeers is a wrapper function on an existing native function also known as getRemotePeers the returns
381
- * remote peers array which is of type {@link HMSRemotePeer}
800
+ * Retrieves an array of remote peers currently in the room.
801
+ *
802
+ * This asynchronous method serves as a wrapper around the native `getRemotePeers` function, facilitating the retrieval of remote peers' details.
803
+ * It fetches an array of `HMSRemotePeer` objects, each representing a remote participant in the room. The method processes the fetched data
804
+ * to conform to the expected format in the React Native layer, making it suitable for UI rendering or further processing.
382
805
  *
806
+ * @async
807
+ * @function getRemotePeers
383
808
  * @memberof HMSSDK
384
- * @return Promise<HMSRemotePeer[]>
809
+ * @returns {Promise<HMSRemotePeer[]>} A promise that resolves with an array of `HMSRemotePeer` objects, representing the remote peers in the room.
810
+ * @example
811
+ * // Fetch the list of remote peers in the room
812
+ * const remotePeers = await hmsInstance.getRemotePeers();
813
+ * console.log(remotePeers);
814
+ *
815
+ * @see https://www.100ms.live/docs/react-native/v2/how-to-guides/listen-to-room-updates/get-methods
385
816
  */
386
817
  getRemotePeers: () => Promise<HMSRemotePeer[]>;
387
818
  /**
388
- * - getRoles is a wrapper function on an existing native function also known as getRoles the returns
389
- * array of all present roles which is of type {@link HMSRole}
819
+ * Retrieves a list of all roles currently available in the room.
820
+ *
821
+ * This asynchronous method calls the native `getRoles` function to fetch an array of `HMSRole` objects, representing the roles defined for the room.
822
+ * Each `HMSRole` object includes details such as the role name, permissions, and other role-specific settings. The roles are then processed
823
+ * to match the expected format in the React Native layer. This method is useful for operations that require a comprehensive list of roles,
824
+ * such as displaying role options in a UI dropdown for role assignment or for role-based access control checks.
390
825
  *
826
+ * @async
827
+ * @function getRoles
391
828
  * @memberof HMSSDK
392
- * @return Promise<HMSRole[]>
829
+ * @returns {Promise<HMSRole[]>} A promise that resolves with an array of `HMSRole` objects, representing the available roles in the room.
830
+ *
831
+ * @example
832
+ * // Fetch the list of available roles in the room
833
+ * const roles = await hmsInstance.getRoles();
834
+ * console.log(roles);
393
835
  */
394
836
  getRoles: () => Promise<HMSRole[]>;
395
837
  /**
396
- * - This function sets the volume of any peer in the room
838
+ * Sets the volume for a specific track of any peer in the room.
397
839
  *
398
- * checkout {@link https://www.100ms.live/docs/react-native/v2/advanced-features/set-volume} for more info
840
+ * This function allows the adjustment of the playback volume for any given audio track of a peer within the room.
841
+ * It is particularly useful for controlling the audio levels of individual participants in a conference call or meeting.
842
+ * The volume level is specified as a number. Volume level can vary from 0(min) to 10(max). The default value for volume is 1.0.
399
843
  *
844
+ * @param {HMSTrack} track - The track object whose volume is to be set. This object must include a valid `trackId`.
845
+ * @param {number} volume - The volume level to set for the specified track.
846
+ * @returns {Promise<void>} A promise that resolves when the operation to set the track's volume is complete.
847
+ * @throws {Error} Throws an error if the operation fails or the track cannot be found.
848
+ *
849
+ * @see https://www.100ms.live/docs/react-native/v2/how-to-guides/interact-with-room/track/set-volume
850
+ *
851
+ * @async
400
852
  * @memberof HMSSDK
853
+ *
854
+ * @example
855
+ * // Assuming `track` is an instance of HMSTrack representing the participant's audio track
856
+ * hmsInstance.setVolume(track, 10);
401
857
  */
402
- setVolume: (track: HMSTrack, volume: number) => void;
403
- resetVolume: () => void;
858
+ setVolume: (track: HMSTrack, volume: number) => Promise<void>;
404
859
  /**
405
- * - This is a temporary solution for the situation when mic access is taken from the app and
406
- * user returns to the app with no mic access. It will re-acquire the mic by setting the volume
407
- * from native side
860
+ * Initiates screen sharing in the room.
408
861
  *
862
+ * This asynchronous function triggers the screen sharing feature, allowing the local peer to share their screen with other participants in the room.
863
+ * Upon successful execution, other participants in the room will be able to see the shared screen as part of the video conference.
864
+ *
865
+ * Note: Proper permissions must be granted by the user for screen sharing to work. Ensure to handle permission requests appropriately in your application.
866
+ *
867
+ * @async
868
+ * @function startScreenshare
409
869
  * @memberof HMSSDK
870
+ * @returns {Promise<void>} A promise that resolves when the screen sharing has successfully started.
871
+ * @throws {Error} Throws an error if the operation fails or screen sharing cannot be initiated.
872
+ *
873
+ * @see https://www.100ms.live/docs/react-native/v2/how-to-guides/set-up-video-conferencing/screenshare
874
+ * @example
875
+ * // Start screen sharing
876
+ * await hmsInstance.startScreenshare();
410
877
  */
411
- addAppStateListener: () => void;
878
+ startScreenshare: () => Promise<any>;
412
879
  /**
413
- * - This function is used to start screenshare, currently available only for android
880
+ * Checks if the screen sharing is currently active in the room.
414
881
  *
415
- * checkout {@link https://www.100ms.live/docs/react-native/v2/features/screenshare} for more info
882
+ * This asynchronous method queries the native `HMSManager` module to determine if the screen is currently being shared by the local peer in the room.
883
+ * It returns a promise that resolves to a boolean value, indicating the screen sharing status. `true` signifies that the screen sharing is active,
884
+ * while `false` indicates that it is not. This method can be used to toggle UI elements or to decide whether to start or stop screen sharing based on the current state.
416
885
  *
886
+ * @async
887
+ * @function isScreenShared
417
888
  * @memberof HMSSDK
889
+ * @returns {Promise<boolean>} A promise that resolves to a boolean indicating whether the screen is currently shared.
890
+ * @example
891
+ * // Check if the screen is currently shared
892
+ * const isShared = await hmsInstance.isScreenShared();
893
+ * console.log(isShared ? "Screen is being shared" : "Screen is not being shared");
894
+ *
895
+ * @see https://www.100ms.live/docs/react-native/v2/how-to-guides/set-up-video-conferencing/screenshare
418
896
  */
419
- startScreenshare: () => Promise<any>;
897
+ isScreenShared: () => Promise<boolean>;
420
898
  /**
421
- * - Returns a boolean stating if the screen is currently shared or not
899
+ * Asynchronously stops the screen sharing session.
422
900
  *
423
- * checkout {@link https://www.100ms.live/docs/react-native/v2/features/screenshare} for more info
901
+ * This method communicates with the native `HMSManager` module to stop the ongoing screen sharing session initiated by the local peer.
902
+ * Upon successful execution, the screen sharing session is terminated, and other participants
903
+ * in the room will no longer be able to see the shared screen. This method can be used to programmatically control the end of a screen sharing session,
904
+ * providing flexibility in managing the screen sharing feature within your application.
424
905
  *
906
+ * Note: Ensure that the necessary permissions and conditions for screen sharing are managed appropriately in your application.
907
+ *
908
+ * @async
909
+ * @function stopScreenshare
425
910
  * @memberof HMSSDK
911
+ * @returns {Promise<void>} A promise that resolves when the screen sharing has successfully stopped.
912
+ * @throws {Error} Throws an error if the operation fails or the screen sharing cannot be stopped.
913
+ *
914
+ * @see https://www.100ms.live/docs/react-native/v2/how-to-guides/set-up-video-conferencing/screenshare
915
+ * @example
916
+ * // Stop screen sharing
917
+ * await hmsInstance.stopScreenshare();
426
918
  */
427
- isScreenShared: () => Promise<any>;
919
+ stopScreenshare: () => Promise<any>;
428
920
  /**
429
- * - stops the screenShare, currently available for android only.
921
+ * Enables network quality updates for the local peer.
430
922
  *
431
- * checkout {@link https://www.100ms.live/docs/react-native/v2/features/screenshare} for more info
923
+ * This method activates the network quality monitoring feature, which periodically assesses and reports the network quality of peers in a room.
924
+ * The network quality updates are useful for providing feedback to the user about their current connection status, potentially prompting them to improve their network environment if necessary.
925
+ * Upon enabling, network quality updates are emitted through the appropriate event listeners - `HMSPeerUpdate.NETWORK_QUALITY_UPDATED` allowing the application to react or display the network status dynamically.
432
926
  *
927
+ * @function enableNetworkQualityUpdates
433
928
  * @memberof HMSSDK
929
+ * @example
930
+ * // Enable network quality updates
931
+ * hmsInstance.enableNetworkQualityUpdates();
932
+ *
933
+ * @see https://www.100ms.live/docs/react-native/v2/how-to-guides/measure-network-quality-and-performance/network-quality
434
934
  */
435
- stopScreenshare: () => Promise<any>;
436
935
  enableNetworkQualityUpdates: () => void;
437
- disableNetworkQualityUpdates: () => void;
438
936
  /**
439
- * - This wrapper function is used to start streaming device audio, currently available only for android.
937
+ * Disables network quality updates for the local peer.
440
938
  *
441
- * checkout {@link https://www.100ms.live/docs/react-native/v2/features/audio-share#how-to-stream-device-audio-from-the-app} for more info.
939
+ * This method deactivates the network quality monitoring feature, which stops the periodic assessment and reporting of the network quality of peers in a room.
940
+ * Disabling network quality updates can be useful in scenarios where network quality information is no longer needed, or to reduce the computational overhead associated with monitoring network quality.
941
+ * Once disabled, network quality updates will no longer be emitted through the event listeners, allowing the application to cease reacting to or displaying network status information.
442
942
  *
443
- * @param {HMSAudioMixingMode}
943
+ * @function disableNetworkQualityUpdates
444
944
  * @memberof HMSSDK
945
+ * @example
946
+ * // Disable network quality updates
947
+ * hmsInstance.disableNetworkQualityUpdates();
948
+ *
949
+ * @see https://www.100ms.live/docs/react-native/v2/how-to-guides/measure-network-quality-and-performance/network-quality
950
+ */
951
+ disableNetworkQualityUpdates: () => void;
952
+ /**
953
+ * Starts streaming device audio, available only on Android devices.
954
+ *
955
+ * This method allows the application to share device audio, such as music or system sounds, with other participants in a video conference.
956
+ * It leverages the native HMSManager's `startAudioshare` method to initiate audio sharing. The function takes an `HMSAudioMixingMode` parameter,
957
+ * which specifies the audio mixing mode to be used during the audio share session.
958
+ *
959
+ * Note: This feature is currently supported only on Android. Attempting to use this feature on iOS will result in a console log indicating
960
+ * that the API is not available for iOS.
961
+ *
962
+ * @async
963
+ * @function startAudioshare
964
+ * @param {HMSAudioMixingMode} audioMixingMode - The audio mixing mode to be used for the audio share session.
965
+ * @returns {Promise} A promise that resolves to a success if the audio share is started successfully
966
+ * @throws {Error} Throws an error if the operation fails or the audio share cannot be started.
967
+ *
968
+ * @see https://www.100ms.live/docs/react-native/v2/how-to-guides/set-up-video-conferencing/local-audio-share
969
+ *
970
+ * @example
971
+ * // Start audio sharing with the default mixing mode
972
+ * await hmsInstance.startAudioshare(HMSAudioMixingMode.DEFAULT);
445
973
  */
446
974
  startAudioshare: (audioMixingMode: HMSAudioMixingMode) => Promise<any>;
447
975
  /**
448
- * - This wrapper function returns true if audio is being shared and vice versa, currently available only for android.
976
+ * Checks if audio sharing is currently active.
449
977
  *
450
- * checkout {@link https://www.100ms.live/docs/react-native/v2/features/audio-share#how-to-get-audio-share-status} for more info.
978
+ * This asynchronous method determines whether audio sharing is currently active, with support limited to Android devices.
979
+ * On Android, it queries the native `HMSManager` module to check the audio sharing status and returns a promise that resolves to a boolean value.
451
980
  *
981
+ * @async
982
+ * @function isAudioShared
452
983
  * @memberof HMSSDK
984
+ * @returns {Promise<boolean>} A promise that resolves to a boolean indicating whether audio sharing is currently active.
985
+ * @example
986
+ * // Check if audio is being shared on an Android device
987
+ * const isSharing = await hmsInstance.isAudioShared();
988
+ * console.log(isSharing); // true or false based on the sharing status, or a message for iOS
989
+ *
990
+ * @see https://www.100ms.live/docs/react-native/v2/how-to-guides/set-up-video-conferencing/local-audio-share
453
991
  */
454
- isAudioShared: () => Promise<any>;
992
+ isAudioShared: () => Promise<boolean>;
455
993
  /**
456
- * - This wrapper function is used to stop streaming device audio, currently available only for android.
994
+ * Stops the streaming of device audio, with functionality currently limited to Android devices.
457
995
  *
458
- * checkout {@link https://www.100ms.live/docs/react-native/v2/features/audio-share#how-to-stop-audio-sharing} for more info.
996
+ * This asynchronous method communicates with the native `HMSManager` module to stop the audio sharing session that was previously started.
997
+ * It is primarily used when the application needs to cease sharing device audio, such as music or system sounds, with other participants in a video conference.
998
+ * On Android devices, it successfully terminates the audio share session. On iOS devices, since the feature is not supported, it logs a message indicating the unavailability of the API.
459
999
  *
1000
+ * @async
1001
+ * @function stopAudioshare
460
1002
  * @memberof HMSSDK
1003
+ * @returns {Promise<boolean>} A promise that resolves to a boolean indicating the success of the operation.
1004
+ * @see https://www.100ms.live/docs/react-native/v2/how-to-guides/set-up-video-conferencing/local-audio-share
1005
+ *
1006
+ * @example
1007
+ * // Stop audio sharing
1008
+ * await hmsInstance.stopAudioshare();
461
1009
  */
462
- stopAudioshare: () => Promise<any>;
1010
+ stopAudioshare: () => Promise<boolean>;
463
1011
  /**
464
- * - This wrapper function returns the current audio mixing mode, currently available only for android.
1012
+ * Asynchronously retrieves the current audio mixing mode, with functionality currently limited to Android devices.
465
1013
  *
1014
+ * This method queries the native `HMSManager` module to obtain the current audio mixing mode used in the audio share session.
1015
+ * The audio mixing mode determines how local and remote audio tracks are mixed together during an audio share session.
1016
+ *
1017
+ * Note: This feature is only supported on Android. Attempting to use this feature on iOS will result in a console log indicating
1018
+ * that the API is not available for iOS devices.
1019
+ *
1020
+ * @async
1021
+ * @function getAudioMixingMode
466
1022
  * @memberof HMSSDK
467
- * @return HMSAudioMixingMode
1023
+ * @returns {Promise<string>} A promise that resolves to a string indicating the current audio mixing mode.
1024
+ *
1025
+ * @throws {Error} Throws an error if the operation fails or the audio mixing mode cannot be retrieved.
1026
+ *
1027
+ * @see https://www.100ms.live/docs/react-native/v2/how-to-guides/set-up-video-conferencing/local-audio-share
1028
+ * @example
1029
+ * // Get the current audio mixing mode on an Android device
1030
+ * const mixingMode = await hmsInstance.getAudioMixingMode();
1031
+ * console.log(mixingMode); // Outputs the current audio mixing mode or a message for iOS
468
1032
  */
469
- getAudioMixingMode: () => Promise<any>;
1033
+ getAudioMixingMode: () => Promise<string>;
470
1034
  /**
471
- * - This wrapper function used to change the mode while the user is streaming audio, currently available only for android.
1035
+ * Sets the audio mixing mode for the current session. Android only.
1036
+ *
1037
+ * This asynchronous function is used to change the mode of audio mixing during a session. It is currently
1038
+ * available only for Android. The function logs the action with the instance ID and the specified audio mixing mode,
1039
+ * then calls the native `setAudioMixingMode` method in `HMSManager` with the provided parameters.
1040
+ *
1041
+ * If the platform is not Android, it logs a message indicating that the API is not available for iOS.
472
1042
  *
473
- * checkout {@link https://www.100ms.live/docs/react-native/v2/features/audio-share#how-to-change-mode} for more info
1043
+ * @param {HMSAudioMixingMode} audioMixingMode - The audio mixing mode to be set.
1044
+ * @returns {Promise<boolean>} A promise that resolves to a boolean indicating the success of the operation.
1045
+ * @throws {Error} Throws an error if the operation fails or the audio mixing mode cannot be set.
1046
+ *
1047
+ * @example
1048
+ * await hmsInstance.setAudioMixingMode(HMSAudioMixingMode.TALK_AND_MUSIC);
1049
+ *
1050
+ * @see https://www.100ms.live/docs/react-native/v2/how-to-guides/set-up-video-conferencing/local-audio-share
474
1051
  *
475
- * @param {HMSAudioMixingMode}
476
1052
  * @memberof HMSSDK
477
1053
  */
478
- setAudioMixingMode: (audioMixingMode: HMSAudioMixingMode) => Promise<any>;
1054
+ setAudioMixingMode: (audioMixingMode: HMSAudioMixingMode) => Promise<boolean>;
479
1055
  /**
480
- * - This wrapper function returns the array of audio output devices which is of
481
- * type {@link HMSAudioDevice[]}, currently available only for android.
1056
+ * Retrieves a list of audio output devices. Android only.
1057
+ *
1058
+ * This method asynchronously fetches and returns an array of audio output devices available on the device.
1059
+ * It is designed to work specifically on Android platforms. For iOS, it will reject the promise with a message
1060
+ * indicating that the API is not available. This can be useful for applications that need to display or allow
1061
+ * the user to select from available audio output options, such as speakers, headphones, or Bluetooth devices.
482
1062
  *
483
- * checkout {@link https://www.100ms.live/docs/react-native/v2/features/audio-output-routing#get-list-of-audio-device} for more info
1063
+ * @see https://www.100ms.live/docs/react-native/v2/how-to-guides/configure-your-device/speaker/audio-output-routing
484
1064
  *
485
1065
  * @memberof HMSSDK
486
- * @return HMSAudioDevice[]
1066
+ * @returns {Promise<HMSAudioDevice[]>} A promise that resolves to an array of `HMSAudioDevice` objects on Android. On iOS, the promise is rejected.
1067
+ * @example
1068
+ * // Get the list of audio output devices
1069
+ * const audioDevices = await hmsInstance.getAudioDevicesList();
487
1070
  */
488
- getAudioDevicesList: () => Promise<any>;
1071
+ getAudioDevicesList: () => Promise<HMSAudioDevice[]>;
489
1072
  /**
490
- * - This wrapper function returns the current audio output device which is of
491
- * type {@link HMSAudioDevice}, currently available only for android.
1073
+ * Retrieves the current audio output device type on Android devices.
492
1074
  *
493
- * checkout {@link https://www.100ms.live/docs/react-native/v2/features/audio-output-routing#get-current-focussed-device} for more info
1075
+ * This method is a wrapper function that returns the type of the current audio output device.
1076
+ * The return type is a `HMSAudioDevice`, which is an enumeration representing different types of audio output devices.
1077
+ *
1078
+ * Note: This API is not available for iOS devices. If invoked on iOS, it logs a message indicating the unavailability and rejects the promise.
1079
+ *
1080
+ * @see https://www.100ms.live/docs/react-native/v2/how-to-guides/configure-your-device/speaker/audio-output-routing
494
1081
  *
495
1082
  * @memberof HMSSDK
496
- * @return HMSAudioDevice
1083
+ * @returns {Promise<HMSAudioDevice>} A promise that resolves to the current audio output device type if the platform is Android. If the platform is iOS, the promise is rejected.
1084
+ *
1085
+ * @example
1086
+ * // Get the current audio output device type
1087
+ * const currentAudioOutputDevice = await hmsInstance.getAudioOutputRouteType();
497
1088
  */
498
- getAudioOutputRouteType: () => Promise<any>;
1089
+ getAudioOutputRouteType: () => Promise<HMSAudioDevice>;
499
1090
  /**
500
- * Android Only
501
- * - This wrapper function used to switch output to device other than the default, currently available only for android.
1091
+ * Switches the audio output device to a specified device.
1092
+ * This function is a wrapper around the native module's method to change the audio output route.
1093
+ * It allows for changing the audio output to a device other than the default one, such as a Bluetooth headset or speaker.
502
1094
  *
503
- * checkout {@link https://www.100ms.live/docs/react-native/v2/features/audio-output-routing#switch-audio-focus-to-another-device} for more info
1095
+ * @param {HMSAudioDevice} audioDevice - The audio device to switch the output to. This should be one of the devices available in `HMSAudioDevice`.
1096
+ *
1097
+ * @returns {Promise<void>} A promise that resolves when the audio output device is successfully switched. Rejected if the operation fails.
1098
+ *
1099
+ * @example
1100
+ * // To switch audio output to a Bluetooth device
1101
+ * hmsSDK.switchAudioOutput(HMSAudioDevice.Bluetooth);
504
1102
  *
505
1103
  * @memberof HMSSDK
506
- * @param audioDevice
507
1104
  */
508
- switchAudioOutput: (audioDevice: HMSAudioDevice) => any;
1105
+ switchAudioOutput: (audioDevice: HMSAudioDevice) => Promise<void>;
509
1106
  switchAudioOutputUsingIOSUI: () => any;
510
1107
  /**
511
1108
  * - This wrapper function used to change Audio Mode manually, currently available only for android.
512
1109
  *
513
- * checkout {@link https://www.100ms.live/docs/react-native/v2/features/audio-mode-change} for more info
1110
+ * @see https://www.100ms.live/docs/react-native/v2/how-to-guides/configure-your-device/speaker/audio-mode-change
514
1111
  *
515
1112
  * @param {HMSAudioMode}
516
1113
  * @memberof HMSSDK
517
1114
  */
518
1115
  setAudioMode: (audioMode: HMSAudioMode) => any;
519
1116
  /**
520
- * - This is a wrapper function which adds a listener which is triggered when audio output device is switched, currently available only for android.
1117
+ * Adds a listener for changes in the audio output device.
1118
+ * This function is platform-specific and currently only implemented for Android devices.
1119
+ * When the audio output device changes (e.g., switching from the phone speaker to a Bluetooth headset), the specified callback function is triggered.
1120
+ * This can be useful for applications that need to react to changes in audio routing, such as updating the UI to reflect the current output device.
521
1121
  *
522
- * checkout {@link https://www.100ms.live/docs/react-native/v2/features/audio-output-routing#adding-a-listener} for more info
1122
+ * Note: This API is not available on iOS as of the current implementation. Attempting to use it on iOS will result in a rejected promise with an appropriate error message.
523
1123
  *
524
- * @param {Function}
1124
+ * @param {Function} callback - The function to be called when the audio output device changes. This function does not receive any parameters.
525
1125
  * @memberof HMSSDK
1126
+ * @see https://www.100ms.live/docs/react-native/v2/how-to-guides/configure-your-device/speaker/audio-output-routing
526
1127
  */
527
1128
  setAudioDeviceChangeListener: (callback: Function) => any;
528
- getRemoteVideoTrackFromTrackId: (trackId: string) => Promise<import("./HMSRemoteVideoTrack").HMSRemoteVideoTrack>;
529
- getRemoteAudioTrackFromTrackId: (trackId: string) => Promise<import("./HMSRemoteAudioTrack").HMSRemoteAudioTrack>;
1129
+ /**
1130
+ * Asynchronously retrieves a remote video track by its track ID.
1131
+ *
1132
+ * @param {string} trackId - The unique identifier for the remote video track to be retrieved.
1133
+ * @returns {Promise<HMSRemoteVideoTrack>} A promise that resolves to the encoded remote video track data.
1134
+ */
1135
+ getRemoteVideoTrackFromTrackId: (trackId: string) => Promise<HMSRemoteVideoTrack>;
1136
+ /**
1137
+ * Retrieves a remote audio track by its track ID.
1138
+ *
1139
+ * @param {string} trackId - The unique identifier for the remote audio track to be retrieved.
1140
+ * @returns {Promise<HMSRemoteAudioTrack>} A promise that resolves to the encoded remote audio track data.
1141
+ */
1142
+ getRemoteAudioTrackFromTrackId: (trackId: string) => Promise<HMSRemoteAudioTrack>;
1143
+ /**
1144
+ * Retrieves a peer object based on the provided peer ID.
1145
+ *
1146
+ * @param {string} peerId - The ID of the peer to retrieve.
1147
+ * @returns {HMSPeer | undefined} An encoded HMSPeer object if the peer is found otherwise `undefined`.
1148
+ */
530
1149
  getPeerFromPeerId: (peerId: string) => HMSPeer | undefined;
531
1150
  /**
532
1151
  * - This function is used to raise hand for the local peer
@@ -544,19 +1163,70 @@ export declare class HMSSDK {
544
1163
  */
545
1164
  lowerRemotePeerHand: (peer: HMSPeer) => Promise<any>;
546
1165
  /**
547
- * - This is a prototype event listener that takes action and listens for updates related to that particular action
1166
+ * `getPeerListIterator` method returns an instance of `HMSPeerListIterator` class
1167
+ *
1168
+ * @param options options for configuring iterator
1169
+ * @returns instance of HMSPeerListIterator class
1170
+ *
1171
+ * Example usage:
1172
+ * ```
1173
+ * const peerListIterator = hmsInstance.getPeerListIterator();
1174
+ * ```
1175
+ * OR
1176
+ * ```
1177
+ * const peerListIterator = hmsInstance.getPeerListIterator({
1178
+ * limit: 10,
1179
+ * byRoleName: 'viewer-realtime',
1180
+ * });
1181
+ * ```
1182
+ */
1183
+ getPeerListIterator: (options?: HMSPeerListIteratorOptions) => HMSPeerListIterator;
1184
+ /**
1185
+ * - This function allows the user to set the screen on always.
1186
+ * - This is useful when the user wants to keep the screen on while the app is in the foreground.
1187
+ * @param enabled boolean value to enable or disable the always screen on
1188
+ */
1189
+ setAlwaysScreenOn: (enabled: boolean) => Promise<any>;
1190
+ setPermissionsAcceptedOnAndroid: () => Promise<any>;
1191
+ /**
1192
+ * Registers an event listener for various HMS SDK events.
548
1193
  *
549
- * @param {string} action
550
- * @param {*} callback
1194
+ * This method allows the registration of callbacks for different types of events that can occur within the HMS SDK.
1195
+ * These events include but are not limited to updates about the room, peers, tracks, and errors.
1196
+ * The method dynamically adds listeners based on the specified action and associates them with a callback function
1197
+ * to handle the event. It ensures that only one subscription exists per event type to avoid duplicate listeners.
1198
+ *
1199
+ * @param {HMSUpdateListenerActions | HMSPIPListenerActions} action - The specific action/event to listen for.
1200
+ * @param {Function} callback - The callback function to execute when the event occurs. The specifics of the callback parameters depend on the event type.
551
1201
  * @memberof HMSSDK
1202
+ *
1203
+ * @example
1204
+ * hmsInstance.addEventListener(HMSUpdateListenerActions.ON_JOIN, (event) => {
1205
+ * console.log('Joined the room:', event);
1206
+ * });
1207
+ *
1208
+ * @example
1209
+ * hmsInstance.addEventListener(HMSUpdateListenerActions.ON_PEER_UPDATE, (event) => {
1210
+ * console.log('Peer update:', event);
1211
+ * });
552
1212
  */
553
1213
  addEventListener: (action: HMSUpdateListenerActions | HMSPIPListenerActions, callback: any) => void;
554
1214
  /**
555
- * - This is a prototype event listener that takes action and listens for updates related to that particular action
1215
+ * Removes an event listener for a specified event action.
556
1216
  *
557
- * @param {string} action
558
- * @param {*} callback
1217
+ * This method allows for the deregistration of previously registered callbacks for specific event types within the HMS SDK.
1218
+ * By specifying the action and the callback, it ensures that the event listener associated with that action is removed,
1219
+ * preventing the callback from being executed when the event occurs in the future. This is useful for cleaning up resources
1220
+ * and avoiding potential memory leaks in applications that dynamically add and remove event listeners based on component lifecycle
1221
+ * or user interactions.
1222
+ *
1223
+ * @param {HMSUpdateListenerActions | HMSPIPListenerActions} action - The specific action/event for which the listener is to be removed.
1224
+ * @param {Function} callback - The callback function that was originally registered for the event. This parameter is necessary to ensure
1225
+ * that only the specific callback associated with the action is removed.
559
1226
  * @memberof HMSSDK
1227
+ * @example
1228
+ * // Remove a listener for the ON_JOIN event
1229
+ * hmsInstance.removeEventListener(HMSUpdateListenerActions.ON_JOIN, onJoinCallback);
560
1230
  */
561
1231
  removeEventListener: (action: HMSUpdateListenerActions | HMSPIPListenerActions) => void;
562
1232
  /**
@@ -565,24 +1235,17 @@ export declare class HMSSDK {
565
1235
  * @memberof HMSSDK
566
1236
  */
567
1237
  removeAllListeners: () => void;
568
- /**
569
- * - Below are all the listeners that are connected to native side.
570
- *
571
- * - All of the are connected when build function is called, we can connect them to the app by
572
- * calling {@link addEventListener} with corresponding event type.
573
- *
574
- * - Before passing the data to the eventListener of the app these listeners encode the data in
575
- * ts classes for a proper structuring of the data.
576
- *
577
- * - Even When event listeners of the app are disconnected using {@link removeEventListener} or
578
- * {@link removeAllListeners} or not even connected in first place, these functions still run to
579
- * maintain the current state of the instance of {@link HMSSDK}.
580
- *
581
- */
582
1238
  onPreviewListener: (data: any) => void;
583
1239
  onJoinListener: (data: any) => void;
1240
+ onPermissionsRequestedListener: (data: {
1241
+ id: string;
1242
+ permissions: Array<string>;
1243
+ }) => void;
584
1244
  onRoomListener: (data: any) => void;
1245
+ onTranscriptsListener: (data: any) => void;
585
1246
  onPeerListener: (peerData: any) => void;
1247
+ private sendPeerUpdate;
1248
+ private sendPeerUpdateWhenPeerLeaves;
586
1249
  onPeerListUpdatedListener: (data: any) => void;
587
1250
  onTrackListener: (data: any) => void;
588
1251
  onMessageListener: (data: any) => void;
@@ -603,28 +1266,239 @@ export declare class HMSSDK {
603
1266
  device: string;
604
1267
  audioDevicesList: string[];
605
1268
  }) => void;
1269
+ /**
1270
+ * Listener for the `SessionStoreAvailable` event.
1271
+ *
1272
+ * This listener is triggered when the session store becomes available in the SDK. It is an important event
1273
+ * for developers who need to access or manipulate the session store after it has been initialized and made available.
1274
+ *
1275
+ * @param {Object} data - The event data.
1276
+ * @param {HMSSessionStore} data.sessionStore - The session store object that has been made available.
1277
+ */
606
1278
  onSessionStoreAvailableListener: (data: {
607
1279
  id: string;
608
1280
  }) => void;
1281
+ /**
1282
+ * Listener for the `PIPRoomLeave` event. Android only.
1283
+ *
1284
+ * This listener is triggered when a room is left from the Picture in Picture (PIP) mode, which is currently supported only on Android platforms.
1285
+ * It is an essential event for handling cleanup or UI updates when the user exits the room while in PIP mode.
1286
+ * @param {Object} data - The event data.
1287
+ * @memberof HMSSDK
1288
+ * @example
1289
+ * // Example of handling the `PIPRoomLeave` event
1290
+ * hms.onPIPRoomLeave((data) => {
1291
+ * // Handle PIP room leave event
1292
+ * });
1293
+ *
1294
+ * @see https://www.100ms.live/docs/react-native/v2/how-to-guides/set-up-video-conferencing/render-video/pip-mode
1295
+ */
609
1296
  onPIPRoomLeaveListener: (data: {
610
1297
  id: string;
611
1298
  }) => void;
1299
+ /**
1300
+ * Listener for the `PIPModeChanged` event.
1301
+ * This listener is triggered when the Picture in Picture (PIP) mode is toggled on or off.
1302
+ * It is an important event for handling UI updates or other actions when the user enters or exits PIP mode.
1303
+ * @param {Object} data - The event data.
1304
+ * @param {boolean} data.isInPictureInPictureMode - A boolean value indicating whether the user is currently in PIP mode.
1305
+ * @returns {void} - Returns nothing.
1306
+ * @memberof HMSSDK
1307
+ * @example
1308
+ * // Example of handling the `PIPModeChanged` event
1309
+ * hms.onPIPModeChanged((data) => {
1310
+ * if (data.isInPictureInPictureMode) {
1311
+ * // Handle PIP mode enabled
1312
+ * } else {
1313
+ * // Handle PIP mode disabled
1314
+ * }
1315
+ * });
1316
+ *
1317
+ * @see https://www.100ms.live/docs/react-native/v2/how-to-guides/set-up-video-conferencing/render-video/pip-mode
1318
+ */
612
1319
  onPIPModeChangedListener: (data: {
613
1320
  isInPictureInPictureMode: boolean;
614
1321
  }) => void;
1322
+ /**
1323
+ * - This function is used to check if Picture in Picture mode is supported on the device
1324
+ * @returns {Promise<boolean>} - Returns a boolean value indicating whether Picture in Picture mode is supported on the device.
1325
+ * @memberof HMSSDK
1326
+ * @example
1327
+ * // Example of checking if Picture in Picture mode is supported
1328
+ * const isPipModeSupported = await hms.isPipModeSupported();
1329
+ * if (isPipModeSupported) {
1330
+ * // Picture in Picture mode is supported
1331
+ * } else {
1332
+ * // Picture in Picture mode is not supported
1333
+ * }
1334
+ * @example
1335
+ * // Example of checking if Picture in Picture mode is supported
1336
+ * hms.isPipModeSupported().then((isPipModeSupported) => {
1337
+ * if (isPipModeSupported) {
1338
+ * // Picture in Picture mode is supported
1339
+ * } else {
1340
+ * // Picture in Picture mode is not supported
1341
+ * }
1342
+ * });
1343
+ *
1344
+ * @see https://www.100ms.live/docs/react-native/v2/how-to-guides/set-up-video-conferencing/render-video/pip-mode
1345
+ */
615
1346
  isPipModeSupported(): Promise<undefined | boolean>;
616
- enterPipMode(data?: PIPConfig): Promise<undefined | boolean>;
617
- setPipParams(data?: PIPConfig): Promise<undefined | boolean>;
618
1347
  /**
619
- * - Returns the instance of logger which can be used to manipulate log levels.
620
- * @returns @instance HMSLogger
1348
+ * Asynchronously enters Picture in Picture (PIP) mode with optional configuration.
1349
+ *
1350
+ * This method attempts to enter PIP mode based on the provided configuration.
1351
+ * It returns a promise that resolves to a boolean indicating the success of the operation.
1352
+ * If PIP mode is not supported or fails to activate, the promise may resolve to `undefined` or `false`.
1353
+ *
1354
+ * @param {HMSPIPConfig} [data] - Optional configuration for entering PIP mode. This can include settings such as `autoEnterPipMode` and `aspectRatio`.
1355
+ * @returns {Promise<boolean>} - A promise that resolves to `true` if PIP mode was successfully entered, `false` if unsuccessful or PIP mode is not supported.
1356
+ * @throws {Error} - Throws an error if the operation fails.
1357
+ * @memberof HMSSDK
1358
+ * @example
1359
+ * // Example of entering Picture in Picture mode
1360
+ * hms.enterPipMode().then((success) => {
1361
+ * if (success) {
1362
+ * // Picture in Picture mode entered successfully
1363
+ * } else {
1364
+ * // Picture in Picture mode could not be entered
1365
+ * }
1366
+ * });
1367
+ * @example
1368
+ * // Example of entering Picture in Picture mode with configuration
1369
+ * const success = await hms.enterPipMode({ autoEnterPipMode: true, aspectRatio: [16,9] });
1370
+ * if (success) {
1371
+ * // Picture in Picture mode entered successfully
1372
+ * } else {
1373
+ * // Picture in Picture mode could not be entered
1374
+ * }
1375
+ *
1376
+ * @see https://www.100ms.live/docs/react-native/v2/how-to-guides/set-up-video-conferencing/render-video/pip-mode
1377
+ */
1378
+ enterPipMode(data?: HMSPIPConfig): Promise<boolean>;
1379
+ /**
1380
+ * Asynchronously sets the parameters for Picture in Picture (PIP) mode.
1381
+ *
1382
+ * This method configures the PIP window according to the provided `HMSPIPConfig` settings. It can be used to adjust various aspects of the PIP mode, such as its size, aspect ratio, and more. The method returns a promise that resolves to a boolean indicating the success of the operation. If the PIP mode is not supported or the configuration fails, the promise may resolve to `undefined` or `false`.
1383
+ *
1384
+ * @param {HMSPIPConfig} [data] - Optional configuration for setting PIP mode parameters. This can include settings such as `aspectRatio`, `autoEnterPipMode`, etc.
1385
+ * @returns {Promise<boolean | undefined>} - A promise that resolves to `true` if the PIP parameters were successfully set, `false` if unsuccessful. `undefined` may be returned if PIP mode is not supported.
1386
+ * @throws {Error} - Throws an error if the operation fails.
1387
+ * @memberof HMSSDK
1388
+ * @example
1389
+ * // Example of setting Picture in Picture mode parameters
1390
+ * hms.setPipParams({ aspectRatio: [16, 9], autoEnterPipMode: true }).then((success) => {
1391
+ * if (success) {
1392
+ * // Picture in Picture mode parameters set successfully
1393
+ * } else {
1394
+ * // Picture in Picture mode parameters could not be set
1395
+ * }
1396
+ * });
1397
+ *
1398
+ * @see https://www.100ms.live/docs/react-native/v2/how-to-guides/set-up-video-conferencing/render-video/pip-mode
1399
+ */
1400
+ setPipParams(data?: HMSPIPConfig): Promise<boolean | undefined>;
1401
+ /**
1402
+ * Changes the video track used in Picture in Picture (PIP) mode on iOS devices.
1403
+ *
1404
+ * This function is specifically designed for iOS platforms to switch the video track displayed in PIP mode.
1405
+ * It takes a `HMSVideoTrack` object as an argument, which contains the track ID of the video track to be displayed in PIP mode.
1406
+ * This allows for dynamic changes to the video source in PIP mode, enhancing the flexibility of video presentation in applications that support PIP.
1407
+ *
1408
+ * @param {HMSVideoTrack} track - The video track to be used in PIP mode. Must contain a valid `trackId`.
1409
+ * @returns {Promise} - A promise that resolves when the video track has been successfully changed for PIP mode, or rejects with an error if the operation fails.
1410
+ * @throws {Error} - Throws an error if the operation fails.
1411
+ * @async
1412
+ * @function changeIOSPIPVideoTrack
1413
+ * @see https://www.100ms.live/docs/react-native/v2/how-to-guides/set-up-video-conferencing/render-video/pip-mode
621
1414
  * @memberof HMSSDK
1415
+ * @example
1416
+ * // Example of changing the video track for PIP mode on iOS
1417
+ * hms.changeIOSPIPVideoTrack(videoTrack).then(() => {
1418
+ * console.log('Video track for PIP mode changed successfully');
1419
+ * }).catch(error => {
1420
+ * console.error('Failed to change video track for PIP mode', error);
1421
+ * });
1422
+ *
1423
+ */
1424
+ changeIOSPIPVideoTrack(track: HMSVideoTrack): Promise<any>;
1425
+ /**
1426
+ * - This function is used to automatically switch the video track of the active speaker to the Picture in Picture (PIP) mode window on iOS devices.
1427
+ * - When enabled, the video track of the active speaker will be displayed in the PIP mode window, providing a focused view of the current speaker during a meeting or conference.
1428
+ * @param {boolean} enable - A boolean value indicating whether to enable or disable the automatic switching of the active speaker video track in PIP mode.
1429
+ * @returns {Promise} - A promise that resolves when the operation is successful, or rejects with an error if the operation fails.
1430
+ * @throws {Error} - Throws an error if the operation fails.
1431
+ * @async
1432
+ * @function setActiveSpeakerInIOSPIP
1433
+ * @see https://www.100ms.live/docs/react-native/v2/how-to-guides/set-up-video-conferencing/render-video/pip-mode
1434
+ * @memberof HMSSDK
1435
+ * @example
1436
+ * // Example of enabling the automatic switching of the active speaker video track in PIP mode
1437
+ * hms.setActiveSpeakerInIOSPIP(true).then(() => {
1438
+ * console.log('Active speaker video track enabled in PIP mode');
1439
+ * }).catch(error => {
1440
+ * console.error('Failed to enable active speaker video track in PIP mode', error);
1441
+ * });
1442
+ */
1443
+ setActiveSpeakerInIOSPIP(enable: boolean): Promise<any>;
1444
+ /**
1445
+ * Initiates real-time transcription services.
1446
+ *
1447
+ * This asynchronous function triggers the HMSManager to start real-time transcription services,
1448
+ * capturing and transcribing audio in real time.
1449
+ *
1450
+ * @async
1451
+ * @function startRealTimeTranscription
1452
+ * @memberof HMSSDK
1453
+ * @example
1454
+ * // Example of starting real-time transcription services
1455
+ * await hmsInstance.startRealTimeTranscription();
1456
+ *
1457
+ * @see https://www.100ms.live/docs/react-native/v2/how-to-guides/extend-capabilities/live-captions
1458
+ */
1459
+ startRealTimeTranscription(): Promise<any>;
1460
+ /**
1461
+ * Stops the real-time transcription services.
1462
+ *
1463
+ * This asynchronous function signals the HMSManager to terminate the ongoing real-time transcription services.
1464
+ *
1465
+ * @async
1466
+ * @function stopRealTimeTranscription
1467
+ * @memberof HMSSDK
1468
+ * @example
1469
+ * await hmsInstance.stopRealTimeTranscription();
1470
+ *
1471
+ * @see https://www.100ms.live/docs/react-native/v2/how-to-guides/extend-capabilities/live-captions
1472
+ */
1473
+ stopRealTimeTranscription(): Promise<any>;
1474
+ get interactivityCenter(): HMSInteractivityCenter;
1475
+ /**
1476
+ * Retrieves the current logger instance used by the HMSSDK.
1477
+ *
1478
+ * This static method provides access to the logger instance, allowing for the manipulation of log levels and the retrieval of log information. It is useful for debugging purposes, enabling developers to monitor and adjust the verbosity of logs generated by the HMS SDK.
1479
+ *
1480
+ * @returns {HMSLogger} The current logger instance.
1481
+ * @memberof HMSSDK
1482
+ * @example
1483
+ * const logger = HMSSDK.getLogger();
1484
+ * logger.setLevel('debug'); // Adjusting the log level to debug
622
1485
  */
623
1486
  static getLogger(): HMSLogger | undefined;
624
1487
  /**
625
- * - Updates the logger for this instance of HMSSDK
626
- * @param {HMSLogger} hmsLogger
1488
+ * Updates the logger instance for this HMSSDK instance.
1489
+ *
1490
+ * This method allows for the dynamic updating of the logger instance used by the HMSSDK.
1491
+ * It can be used to change the logger settings or replace the logger entirely at runtime.
1492
+ * This is particularly useful for adjusting log levels or redirecting log output based on application state or user preferences.
1493
+ *
1494
+ * @param {HMSLogger} hmsLogger - The new logger instance to be used. If not provided, the logger will be reset to default.
627
1495
  * @memberof HMSSDK
1496
+ * @example
1497
+ * // Set a custom logger with a specific configuration
1498
+ * const customLogger = new HMSLogger();
1499
+ * customLogger.setLevel('verbose');
1500
+ * hmsInstance.setLogger(customLogger);
1501
+ *
628
1502
  */
629
1503
  setLogger: (hmsLogger?: HMSLogger) => void;
630
1504
  }