@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
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
3
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
1
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
2
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
3
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
4
4
  export class HMSMessageRecipient {
5
5
  constructor(params) {
6
6
  _defineProperty(this, "recipientType", void 0);
@@ -1 +1 @@
1
- {"version":3,"names":["HMSMessageRecipient","constructor","params","_defineProperty","recipientType","recipientPeer","recipientRoles"],"sources":["HMSMessageRecipient.ts"],"sourcesContent":["import type { HMSMessageRecipientType } from './HMSMessageRecipientType';\nimport type { HMSPeer } from './HMSPeer';\nimport type { HMSRole } from './HMSRole';\n\nexport class HMSMessageRecipient {\n public recipientType: HMSMessageRecipientType;\n public recipientPeer?: HMSPeer;\n public recipientRoles: HMSRole[];\n\n constructor(params: {\n recipientType: HMSMessageRecipientType;\n recipientPeer?: HMSPeer;\n recipientRoles?: HMSRole[];\n }) {\n this.recipientType = params.recipientType;\n this.recipientPeer = params.recipientPeer;\n this.recipientRoles = params.recipientRoles || [];\n }\n}\n"],"mappings":";;;AAIA,OAAO,MAAMA,mBAAmB,CAAC;EAK/BC,WAAWA,CAACC,MAIX,EAAE;IAAAC,eAAA;IAAAA,eAAA;IAAAA,eAAA;IACD,IAAI,CAACC,aAAa,GAAGF,MAAM,CAACE,aAAa;IACzC,IAAI,CAACC,aAAa,GAAGH,MAAM,CAACG,aAAa;IACzC,IAAI,CAACC,cAAc,GAAGJ,MAAM,CAACI,cAAc,IAAI,EAAE;EACnD;AACF"}
1
+ {"version":3,"names":["HMSMessageRecipient","constructor","params","_defineProperty","recipientType","recipientPeer","recipientRoles"],"sources":["HMSMessageRecipient.ts"],"sourcesContent":["import type { HMSMessageRecipientType } from './HMSMessageRecipientType';\nimport type { HMSPeer } from './HMSPeer';\nimport type { HMSRole } from './HMSRole';\n\nexport class HMSMessageRecipient {\n public recipientType: HMSMessageRecipientType;\n public recipientPeer?: HMSPeer;\n public recipientRoles: HMSRole[];\n\n constructor(params: {\n recipientType: HMSMessageRecipientType;\n recipientPeer?: HMSPeer;\n recipientRoles?: HMSRole[];\n }) {\n this.recipientType = params.recipientType;\n this.recipientPeer = params.recipientPeer;\n this.recipientRoles = params.recipientRoles || [];\n }\n}\n"],"mappings":";;;AAIA,OAAO,MAAMA,mBAAmB,CAAC;EAK/BC,WAAWA,CAACC,MAIX,EAAE;IAAAC,eAAA;IAAAA,eAAA;IAAAA,eAAA;IACD,IAAI,CAACC,aAAa,GAAGF,MAAM,CAACE,aAAa;IACzC,IAAI,CAACC,aAAa,GAAGH,MAAM,CAACG,aAAa;IACzC,IAAI,CAACC,cAAc,GAAGJ,MAAM,CAACI,cAAc,IAAI,EAAE;EACnD;AACF","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["HMSMessageRecipientType"],"sources":["HMSMessageRecipientType.ts"],"sourcesContent":["export enum HMSMessageRecipientType {\n BROADCAST = 'BROADCAST',\n PEER = 'PEER',\n ROLES = 'ROLES',\n}\n"],"mappings":"AAAA,WAAYA,uBAAuB,0BAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAA,OAAvBA,uBAAuB;AAAA"}
1
+ {"version":3,"names":["HMSMessageRecipientType"],"sources":["HMSMessageRecipientType.ts"],"sourcesContent":["export enum HMSMessageRecipientType {\n BROADCAST = 'BROADCAST',\n PEER = 'PEER',\n ROLES = 'ROLES',\n}\n"],"mappings":"AAAA,WAAYA,uBAAuB,0BAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAA,OAAvBA,uBAAuB;AAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["NativeModules","HMSAudioNode","HMSManager","HMSMicNode","constructor","setVolume","volume","setAudioShareVolume","id","sdkId","audioNode","name"],"sources":["HMSMicNode.ts"],"sourcesContent":["import { NativeModules } from 'react-native';\nimport { HMSAudioNode } from './HMSAudioNode';\n\nconst {\n /**\n * @ignore\n */\n HMSManager,\n} = NativeModules;\n\nexport class HMSMicNode extends HMSAudioNode {\n constructor() {\n super('mic_node');\n }\n\n setVolume(volume: number) {\n return HMSManager.setAudioShareVolume({\n id: this.sdkId,\n audioNode: this.name,\n volume,\n });\n }\n}\n"],"mappings":"AAAA,SAASA,aAAa,QAAQ,cAAc;AAC5C,SAASC,YAAY,QAAQ,gBAAgB;AAE7C,MAAM;EACJ;AACF;AACA;EACEC;AACF,CAAC,GAAGF,aAAa;AAEjB,OAAO,MAAMG,UAAU,SAASF,YAAY,CAAC;EAC3CG,WAAWA,CAAA,EAAG;IACZ,KAAK,CAAC,UAAU,CAAC;EACnB;EAEAC,SAASA,CAACC,MAAc,EAAE;IACxB,OAAOJ,UAAU,CAACK,mBAAmB,CAAC;MACpCC,EAAE,EAAE,IAAI,CAACC,KAAK;MACdC,SAAS,EAAE,IAAI,CAACC,IAAI;MACpBL;IACF,CAAC,CAAC;EACJ;AACF"}
1
+ {"version":3,"names":["NativeModules","HMSAudioNode","HMSManager","HMSMicNode","constructor","setVolume","volume","setAudioShareVolume","id","sdkId","audioNode","name"],"sources":["HMSMicNode.ts"],"sourcesContent":["import { NativeModules } from 'react-native';\nimport { HMSAudioNode } from './HMSAudioNode';\n\nconst {\n /**\n * @ignore\n */\n HMSManager,\n} = NativeModules;\n\nexport class HMSMicNode extends HMSAudioNode {\n constructor() {\n super('mic_node');\n }\n\n setVolume(volume: number) {\n return HMSManager.setAudioShareVolume({\n id: this.sdkId,\n audioNode: this.name,\n volume,\n });\n }\n}\n"],"mappings":"AAAA,SAASA,aAAa,QAAQ,cAAc;AAC5C,SAASC,YAAY,QAAQ,gBAAgB;AAE7C,MAAM;EACJ;AACF;AACA;EACEC;AACF,CAAC,GAAGF,aAAa;AAEjB,OAAO,MAAMG,UAAU,SAASF,YAAY,CAAC;EAC3CG,WAAWA,CAAA,EAAG;IACZ,KAAK,CAAC,UAAU,CAAC;EACnB;EAEAC,SAASA,CAACC,MAAc,EAAE;IACxB,OAAOJ,UAAU,CAACK,mBAAmB,CAAC;MACpCC,EAAE,EAAE,IAAI,CAACC,KAAK;MACdC,SAAS,EAAE,IAAI,CAACC,IAAI;MACpBL;IACF,CAAC,CAAC;EACJ;AACF","ignoreList":[]}
@@ -1,6 +1,6 @@
1
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
3
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
1
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
2
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
3
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
4
4
  import { NativeEventEmitter } from 'react-native';
5
5
  import { logger } from './HMSLogger';
6
6
  export class HMSNativeEventEmitter {
@@ -46,11 +46,9 @@ export class HMSNativeEventEmitter {
46
46
  let subscription = this._nativeEventEmitter.addListener(eventType, listener);
47
47
  return {
48
48
  remove: () => {
49
- if (subscription && Object.getOwnPropertyNames(subscription).includes('remove') && typeof subscription.remove === 'function') {
49
+ if (subscription) {
50
50
  subscription.remove();
51
51
  subscription = null;
52
- } else {
53
- this._nativeEventEmitter.removeListener(eventType, listener);
54
52
  }
55
53
 
56
54
  // disable `eventType` on `HMSSDK`, if all listeners has been removed
@@ -1 +1 @@
1
- {"version":3,"names":["NativeEventEmitter","logger","HMSNativeEventEmitter","constructor","nativeModule","_defineProperty","_nativeModule","_nativeEventEmitter","listenerCount","eventType","listeners","count","length","verbose","addListener","id","listener","enableHMSEventType","subscription","remove","Object","getOwnPropertyNames","includes","removeListener","disableHMSEventType","removeAllListeners","enableEvent","disableEvent"],"sources":["HMSNativeEventEmitter.ts"],"sourcesContent":["import { NativeEventEmitter } from 'react-native';\nimport type { EventSubscription } from 'react-native';\nimport { logger } from './HMSLogger';\n\nexport type HMSEventSubscription = {\n remove(): void;\n};\n\nexport class HMSNativeEventEmitter {\n private _nativeEventEmitter: NativeEventEmitter;\n private _nativeModule: any;\n\n constructor(nativeModule: any) {\n this._nativeModule = nativeModule;\n this._nativeEventEmitter = new NativeEventEmitter(nativeModule);\n }\n\n listenerCount(eventType: string): number {\n // For RN version < v0.64, listenerCount method is not available\n // @ts-ignore - typescript is giving error because we are running it with RN types version >= 0.64\n if (typeof this._nativeEventEmitter.listeners === 'function') {\n // @ts-ignore - typescript is giving error because we are running it with RN types version >= 0.64\n const count = this._nativeEventEmitter.listeners(eventType).length;\n\n logger?.verbose('#Function HMSNativeEventEmitter.listenerCount', {\n eventType,\n count,\n });\n return count;\n }\n\n // For RN version >= v0.64\n const count = this._nativeEventEmitter.listenerCount(eventType);\n\n logger?.verbose('#Function HMSNativeEventEmitter.listenerCount', {\n eventType,\n count,\n });\n return count;\n }\n\n addListener(\n id: string,\n eventType: string,\n listener: (...args: any[]) => any\n ): HMSEventSubscription {\n logger?.verbose('#Function HMSNativeEventEmitter.addListener', {\n id,\n eventType,\n listener,\n });\n\n // enable `eventType` on `HMSSDK`, if no listeners were added before\n // if some listeners were added before, then `eventType` on `HMSSDK` should already be enabled\n if (this.listenerCount(eventType) <= 0) {\n this.enableHMSEventType(id, eventType);\n }\n\n let subscription: EventSubscription | null =\n this._nativeEventEmitter.addListener(eventType, listener);\n\n return {\n remove: () => {\n if (\n subscription &&\n Object.getOwnPropertyNames(subscription).includes('remove') &&\n typeof subscription.remove === 'function'\n ) {\n subscription.remove();\n subscription = null;\n } else {\n this._nativeEventEmitter.removeListener(eventType, listener);\n }\n\n // disable `eventType` on `HMSSDK`, if all listeners has been removed\n if (this.listenerCount(eventType) <= 0) {\n this.disableHMSEventType(id, eventType);\n }\n },\n };\n }\n\n removeAllListeners(id: string, eventType: string) {\n logger?.verbose('#Function HMSNativeEventEmitter.removeAllListeners', {\n id,\n eventType,\n });\n\n // disable `eventType` on `HMSSDK`\n this.disableHMSEventType(id, eventType);\n\n return this._nativeEventEmitter.removeAllListeners(eventType);\n }\n\n private enableHMSEventType(id: string, eventType: string) {\n logger?.verbose('#Function HMSNativeEventEmitter.enableHMSEventType', {\n id,\n eventType,\n });\n this._nativeModule.enableEvent({ id, eventType });\n }\n\n private disableHMSEventType(id: string, eventType: string) {\n logger?.verbose('#Function HMSNativeEventEmitter.disableHMSEventType', {\n id,\n eventType,\n });\n this._nativeModule.disableEvent({ id, eventType });\n }\n}\n"],"mappings":"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"}
1
+ {"version":3,"names":["NativeEventEmitter","logger","HMSNativeEventEmitter","constructor","nativeModule","_defineProperty","_nativeModule","_nativeEventEmitter","listenerCount","eventType","listeners","count","length","verbose","addListener","id","listener","enableHMSEventType","subscription","remove","disableHMSEventType","removeAllListeners","enableEvent","disableEvent"],"sources":["HMSNativeEventEmitter.ts"],"sourcesContent":["import { NativeEventEmitter } from 'react-native';\nimport type { EventSubscription } from 'react-native';\nimport { logger } from './HMSLogger';\n\nexport type HMSEventSubscription = {\n remove(): void;\n};\n\nexport class HMSNativeEventEmitter {\n private _nativeEventEmitter: NativeEventEmitter;\n private _nativeModule: any;\n\n constructor(nativeModule: any) {\n this._nativeModule = nativeModule;\n this._nativeEventEmitter = new NativeEventEmitter(nativeModule);\n }\n\n listenerCount(eventType: string): number {\n // For RN version < v0.64, listenerCount method is not available\n // @ts-ignore - typescript is giving error because we are running it with RN types version >= 0.64\n if (typeof this._nativeEventEmitter.listeners === 'function') {\n // @ts-ignore - typescript is giving error because we are running it with RN types version >= 0.64\n const count = this._nativeEventEmitter.listeners(eventType).length;\n\n logger?.verbose('#Function HMSNativeEventEmitter.listenerCount', {\n eventType,\n count,\n });\n return count;\n }\n\n // For RN version >= v0.64\n const count = this._nativeEventEmitter.listenerCount(eventType);\n\n logger?.verbose('#Function HMSNativeEventEmitter.listenerCount', {\n eventType,\n count,\n });\n return count;\n }\n\n addListener(\n id: string,\n eventType: string,\n listener: (...args: any[]) => any\n ): HMSEventSubscription {\n logger?.verbose('#Function HMSNativeEventEmitter.addListener', {\n id,\n eventType,\n listener,\n });\n\n // enable `eventType` on `HMSSDK`, if no listeners were added before\n // if some listeners were added before, then `eventType` on `HMSSDK` should already be enabled\n if (this.listenerCount(eventType) <= 0) {\n this.enableHMSEventType(id, eventType);\n }\n\n let subscription: EventSubscription | null =\n this._nativeEventEmitter.addListener(eventType, listener);\n\n return {\n remove: () => {\n if (subscription) {\n subscription.remove();\n subscription = null;\n }\n\n // disable `eventType` on `HMSSDK`, if all listeners has been removed\n if (this.listenerCount(eventType) <= 0) {\n this.disableHMSEventType(id, eventType);\n }\n },\n };\n }\n\n removeAllListeners(id: string, eventType: string) {\n logger?.verbose('#Function HMSNativeEventEmitter.removeAllListeners', {\n id,\n eventType,\n });\n\n // disable `eventType` on `HMSSDK`\n this.disableHMSEventType(id, eventType);\n\n return this._nativeEventEmitter.removeAllListeners(eventType);\n }\n\n private enableHMSEventType(id: string, eventType: string) {\n logger?.verbose('#Function HMSNativeEventEmitter.enableHMSEventType', {\n id,\n eventType,\n });\n this._nativeModule.enableEvent({ id, eventType });\n }\n\n private disableHMSEventType(id: string, eventType: string) {\n logger?.verbose('#Function HMSNativeEventEmitter.disableHMSEventType', {\n id,\n eventType,\n });\n this._nativeModule.disableEvent({ id, eventType });\n }\n}\n"],"mappings":"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","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- import HMSManager from './HMSManagerModule';
1
+ import HMSManager from '../modules/HMSManagerModule';
2
2
  import { HMSNativeEventEmitter } from './HMSNativeEventEmitter';
3
3
  const HMSNativeEventListener = new HMSNativeEventEmitter(HMSManager);
4
4
  export default HMSNativeEventListener;
@@ -1 +1 @@
1
- {"version":3,"names":["HMSManager","HMSNativeEventEmitter","HMSNativeEventListener"],"sources":["HMSNativeEventListener.ts"],"sourcesContent":["import HMSManager from './HMSManagerModule';\nimport { HMSNativeEventEmitter } from './HMSNativeEventEmitter';\n\nexport type { HMSEventSubscription as HMSNativeEventSubscription } from './HMSNativeEventEmitter';\n\nconst HMSNativeEventListener = new HMSNativeEventEmitter(HMSManager);\n\nexport default HMSNativeEventListener;\n"],"mappings":"AAAA,OAAOA,UAAU,MAAM,oBAAoB;AAC3C,SAASC,qBAAqB,QAAQ,yBAAyB;AAI/D,MAAMC,sBAAsB,GAAG,IAAID,qBAAqB,CAACD,UAAU,CAAC;AAEpE,eAAeE,sBAAsB"}
1
+ {"version":3,"names":["HMSManager","HMSNativeEventEmitter","HMSNativeEventListener"],"sources":["HMSNativeEventListener.ts"],"sourcesContent":["import HMSManager from '../modules/HMSManagerModule';\nimport { HMSNativeEventEmitter } from './HMSNativeEventEmitter';\n\nexport type { HMSEventSubscription as HMSNativeEventSubscription } from './HMSNativeEventEmitter';\n\nconst HMSNativeEventListener = new HMSNativeEventEmitter(HMSManager);\n\nexport default HMSNativeEventListener;\n"],"mappings":"AAAA,OAAOA,UAAU,MAAM,6BAA6B;AACpD,SAASC,qBAAqB,QAAQ,yBAAyB;AAI/D,MAAMC,sBAAsB,GAAG,IAAID,qBAAqB,CAACD,UAAU,CAAC;AAEpE,eAAeE,sBAAsB","ignoreList":[]}
@@ -1,6 +1,17 @@
1
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
3
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
1
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
2
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
3
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
4
+ /**
5
+ * Represents the network quality of a connection in the HMS (100ms) system.
6
+ *
7
+ * This class encapsulates the network quality information, specifically focusing on the downlink quality of the connection.
8
+ * The downlink quality is represented as a numerical value, providing a quantifiable measure of the receiving end's network performance.
9
+ *
10
+ * @param {Object} params - The constructor parameters.
11
+ * @param {number} params.downlinkQuality - The downlink quality of the network connection.
12
+ *
13
+ * @see https://www.100ms.live/docs/react-native/v2/how-to-guides/measure-network-quality-and-performance/network-quality
14
+ */
4
15
  export class HMSNetworkQuality {
5
16
  constructor(params) {
6
17
  _defineProperty(this, "downlinkQuality", void 0);
@@ -1 +1 @@
1
- {"version":3,"names":["HMSNetworkQuality","constructor","params","_defineProperty","downlinkQuality"],"sources":["HMSNetworkQuality.ts"],"sourcesContent":["export class HMSNetworkQuality {\n downlinkQuality: number;\n\n constructor(params: { downlinkQuality: number }) {\n this.downlinkQuality = params.downlinkQuality;\n }\n}\n"],"mappings":";;;AAAA,OAAO,MAAMA,iBAAiB,CAAC;EAG7BC,WAAWA,CAACC,MAAmC,EAAE;IAAAC,eAAA;IAC/C,IAAI,CAACC,eAAe,GAAGF,MAAM,CAACE,eAAe;EAC/C;AACF"}
1
+ {"version":3,"names":["HMSNetworkQuality","constructor","params","_defineProperty","downlinkQuality"],"sources":["HMSNetworkQuality.ts"],"sourcesContent":["/**\n * Represents the network quality of a connection in the HMS (100ms) system.\n *\n * This class encapsulates the network quality information, specifically focusing on the downlink quality of the connection.\n * The downlink quality is represented as a numerical value, providing a quantifiable measure of the receiving end's network performance.\n *\n * @param {Object} params - The constructor parameters.\n * @param {number} params.downlinkQuality - The downlink quality of the network connection.\n *\n * @see https://www.100ms.live/docs/react-native/v2/how-to-guides/measure-network-quality-and-performance/network-quality\n */\nexport class HMSNetworkQuality {\n downlinkQuality: number;\n\n constructor(params: { downlinkQuality: number }) {\n this.downlinkQuality = params.downlinkQuality;\n }\n}\n"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,iBAAiB,CAAC;EAG7BC,WAAWA,CAACC,MAAmC,EAAE;IAAAC,eAAA;IAC/C,IAAI,CAACC,eAAe,GAAGF,MAAM,CAACE,eAAe;EAC/C;AACF","ignoreList":[]}
@@ -0,0 +1,152 @@
1
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
2
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
3
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
4
+ import HMSManagerModule from '../modules/HMSManagerModule';
5
+ import { HMSConstants } from './HMSConstants';
6
+ import { logger } from './HMSLogger';
7
+
8
+ /**
9
+ * Represents the HMS Noise Cancellation Plugin.
10
+ * This class encapsulates the functionality for managing noise cancellation within a room, including enabling, disabling, and checking the availability and current state of noise cancellation.
11
+ *
12
+ * @property {HMSNoiseCancellationModels} modelName - Specifies the model of noise cancellation to be used.
13
+ * This property determines the algorithm and intensity of noise cancellation, allowing for customization
14
+ * based on the requirements of the room or application.
15
+ *
16
+ * @property {HMSNoiseCancellationInitialState} initialState - Defines the initial state of noise cancellation
17
+ * when the plugin is instantiated. This can be either enabled or disabled, providing control over the
18
+ * noise cancellation feature's activation upon initialization.
19
+ *
20
+ * @see https://www.100ms.live/docs/react-native/v2/how-to-guides/extend-capabilities/noise-cancellation
21
+ */
22
+ export class HMSNoiseCancellationPlugin {
23
+ /**
24
+ * Constructs a new HMSNoiseCancellationPlugin instance with optional configuration settings.
25
+ * This constructor allows for the initialization of the plugin with specific noise cancellation
26
+ * model and initial state settings, providing flexibility in how noise cancellation is applied
27
+ * within the application.
28
+ *
29
+ * @param {Object} [config] - Optional configuration object for the plugin.
30
+ * @param {HMSNoiseCancellationModels} [config.modelName] - Specifies the noise cancellation model to be used.
31
+ * This determines the algorithm and intensity of noise cancellation. If not provided, a default
32
+ * model is used.
33
+ * @param {HMSNoiseCancellationInitialState} [config.initialState] - Sets the initial state of noise cancellation
34
+ * (enabled or disabled) when the plugin is instantiated. Defaults to disabled if not specified.
35
+ */
36
+ constructor(config) {
37
+ /**
38
+ * The `modelName` property specifies the model of noise cancellation to be used within the HMS Noise Cancellation Plugin.
39
+ * This property determines the algorithm and intensity of noise cancellation, allowing for customization
40
+ * based on the specific requirements of the room or application. It is of type `HMSNoiseCancellationModels`,
41
+ * an enum that defines the available noise cancellation models.
42
+ */
43
+ _defineProperty(this, "modelName", void 0);
44
+ /**
45
+ * Defines the initial state of noise cancellation when the plugin is instantiated.
46
+ * This property can be set to either `HMSNoiseCancellationInitialState.Enabled`
47
+ * or `HMSNoiseCancellationInitialState.Disabled`, determining whether noise cancellation should be active
48
+ * immediately upon the plugin's instantiation. This allows for control over the feature's initial activation state,
49
+ * catering to scenarios where noise cancellation needs to be either immediately available or manually activated later.
50
+ */
51
+ _defineProperty(this, "initialState", void 0);
52
+ const data = {
53
+ modelName: HMSNoiseCancellationModels.SmallFullBand,
54
+ initialState: HMSNoiseCancellationInitialState.Disabled,
55
+ ...config
56
+ };
57
+ this.modelName = data.modelName;
58
+ this.initialState = data.initialState;
59
+ }
60
+
61
+ /**
62
+ * To make noise cancellation work your room needs to have noise cancellation feature enabled.
63
+ *
64
+ * Gets whether noise cancellation is available for your room.
65
+ * @returns {boolean} True if noise cancellation is available, false otherwise.
66
+ *
67
+ * Note: You can call this API to check the state of noise cancellation only after successfully joining the room.
68
+ */
69
+ async isNoiseCancellationAvailable() {
70
+ const data = {
71
+ id: HMSConstants.DEFAULT_SDK_ID
72
+ };
73
+ logger === null || logger === void 0 || logger.verbose('#Function HMSNoiseCancellationPlugin#isNoiseCancellationAvailable', data);
74
+ try {
75
+ return await HMSManagerModule.isNoiseCancellationPluginAvailable(data);
76
+ } catch (e) {
77
+ logger === null || logger === void 0 || logger.error('#Error in #Function HMSNoiseCancellationPlugin#isNoiseCancellationAvailable ', e);
78
+ return Promise.reject(e);
79
+ }
80
+ }
81
+
82
+ /**
83
+ * Enables noise cancellation.
84
+ * @returns {Promise<boolean>} A promise that resolves to true if noise cancellation is enabled, otherwise, rejected promise is returned
85
+ */
86
+ async enable() {
87
+ const data = {
88
+ id: HMSConstants.DEFAULT_SDK_ID
89
+ };
90
+ logger === null || logger === void 0 || logger.verbose('#Function HMSNoiseCancellationPlugin#enable', data);
91
+ try {
92
+ return await HMSManagerModule.enableNoiseCancellationPlugin(data);
93
+ } catch (e) {
94
+ logger === null || logger === void 0 || logger.error('#Error in #Function HMSNoiseCancellationPlugin#enable ', e);
95
+ return Promise.reject(e);
96
+ }
97
+ }
98
+
99
+ /**
100
+ * Disables noise cancellation.
101
+ * @returns {Promise<boolean>} A promise that resolves to true if noise cancellation is disabled, otherwise, rejected promise is returned
102
+ */
103
+ async disable() {
104
+ const data = {
105
+ id: HMSConstants.DEFAULT_SDK_ID
106
+ };
107
+ logger === null || logger === void 0 || logger.verbose('#Function HMSNoiseCancellationPlugin#disable', data);
108
+ try {
109
+ return await HMSManagerModule.disableNoiseCancellationPlugin(data);
110
+ } catch (e) {
111
+ logger === null || logger === void 0 || logger.error('#Error in #Function HMSNoiseCancellationPlugin#disable ', e);
112
+ return Promise.reject(e);
113
+ }
114
+ }
115
+
116
+ /**
117
+ * Checks if noise cancellation is enabled.
118
+ * @returns {boolean} true if noise cancellation is enabled, false otherwise.
119
+ */
120
+ async isEnabled() {
121
+ const data = {
122
+ id: HMSConstants.DEFAULT_SDK_ID
123
+ };
124
+ logger === null || logger === void 0 || logger.verbose('#Function HMSNoiseCancellationPlugin#isEnabled', data);
125
+ try {
126
+ return await HMSManagerModule.isNoiseCancellationPluginEnabled(data);
127
+ } catch (e) {
128
+ logger === null || logger === void 0 || logger.error('#Error in #Function HMSNoiseCancellationPlugin#isEnabled ', e);
129
+ return Promise.reject(e);
130
+ }
131
+ }
132
+ }
133
+
134
+ /**
135
+ * Enum for HMS Noise Cancellation Models.
136
+ * @enum {String}
137
+ */
138
+ export let HMSNoiseCancellationModels = /*#__PURE__*/function (HMSNoiseCancellationModels) {
139
+ HMSNoiseCancellationModels["SmallFullBand"] = "SMALL_FULL_BAND";
140
+ return HMSNoiseCancellationModels;
141
+ }({});
142
+
143
+ /**
144
+ * Enum for HMS Noise Cancellation Initial State.
145
+ * @enum {String}
146
+ */
147
+ export let HMSNoiseCancellationInitialState = /*#__PURE__*/function (HMSNoiseCancellationInitialState) {
148
+ HMSNoiseCancellationInitialState["Enabled"] = "ENABLED";
149
+ HMSNoiseCancellationInitialState["Disabled"] = "DISABLED";
150
+ return HMSNoiseCancellationInitialState;
151
+ }({});
152
+ //# sourceMappingURL=HMSNoiseCancellationPlugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["HMSManagerModule","HMSConstants","logger","HMSNoiseCancellationPlugin","constructor","config","_defineProperty","data","modelName","HMSNoiseCancellationModels","SmallFullBand","initialState","HMSNoiseCancellationInitialState","Disabled","isNoiseCancellationAvailable","id","DEFAULT_SDK_ID","verbose","isNoiseCancellationPluginAvailable","e","error","Promise","reject","enable","enableNoiseCancellationPlugin","disable","disableNoiseCancellationPlugin","isEnabled","isNoiseCancellationPluginEnabled"],"sources":["HMSNoiseCancellationPlugin.ts"],"sourcesContent":["import HMSManagerModule from '../modules/HMSManagerModule';\nimport { HMSConstants } from './HMSConstants';\nimport { logger } from './HMSLogger';\n\n/**\n * Represents the HMS Noise Cancellation Plugin.\n * This class encapsulates the functionality for managing noise cancellation within a room, including enabling, disabling, and checking the availability and current state of noise cancellation.\n *\n * @property {HMSNoiseCancellationModels} modelName - Specifies the model of noise cancellation to be used.\n * This property determines the algorithm and intensity of noise cancellation, allowing for customization\n * based on the requirements of the room or application.\n *\n * @property {HMSNoiseCancellationInitialState} initialState - Defines the initial state of noise cancellation\n * when the plugin is instantiated. This can be either enabled or disabled, providing control over the\n * noise cancellation feature's activation upon initialization.\n *\n * @see https://www.100ms.live/docs/react-native/v2/how-to-guides/extend-capabilities/noise-cancellation\n */\nexport class HMSNoiseCancellationPlugin {\n /**\n * The `modelName` property specifies the model of noise cancellation to be used within the HMS Noise Cancellation Plugin.\n * This property determines the algorithm and intensity of noise cancellation, allowing for customization\n * based on the specific requirements of the room or application. It is of type `HMSNoiseCancellationModels`,\n * an enum that defines the available noise cancellation models.\n */\n modelName: HMSNoiseCancellationModels;\n\n /**\n * Defines the initial state of noise cancellation when the plugin is instantiated.\n * This property can be set to either `HMSNoiseCancellationInitialState.Enabled`\n * or `HMSNoiseCancellationInitialState.Disabled`, determining whether noise cancellation should be active\n * immediately upon the plugin's instantiation. This allows for control over the feature's initial activation state,\n * catering to scenarios where noise cancellation needs to be either immediately available or manually activated later.\n */\n initialState: HMSNoiseCancellationInitialState;\n\n /**\n * Constructs a new HMSNoiseCancellationPlugin instance with optional configuration settings.\n * This constructor allows for the initialization of the plugin with specific noise cancellation\n * model and initial state settings, providing flexibility in how noise cancellation is applied\n * within the application.\n *\n * @param {Object} [config] - Optional configuration object for the plugin.\n * @param {HMSNoiseCancellationModels} [config.modelName] - Specifies the noise cancellation model to be used.\n * This determines the algorithm and intensity of noise cancellation. If not provided, a default\n * model is used.\n * @param {HMSNoiseCancellationInitialState} [config.initialState] - Sets the initial state of noise cancellation\n * (enabled or disabled) when the plugin is instantiated. Defaults to disabled if not specified.\n */\n constructor(config?: {\n modelName: HMSNoiseCancellationModels;\n initialState: HMSNoiseCancellationInitialState;\n }) {\n const data = {\n modelName: HMSNoiseCancellationModels.SmallFullBand,\n initialState: HMSNoiseCancellationInitialState.Disabled,\n ...config,\n };\n this.modelName = data.modelName;\n this.initialState = data.initialState;\n }\n\n /**\n * To make noise cancellation work your room needs to have noise cancellation feature enabled.\n *\n * Gets whether noise cancellation is available for your room.\n * @returns {boolean} True if noise cancellation is available, false otherwise.\n *\n * Note: You can call this API to check the state of noise cancellation only after successfully joining the room.\n */\n async isNoiseCancellationAvailable(): Promise<boolean> {\n const data = { id: HMSConstants.DEFAULT_SDK_ID };\n logger?.verbose(\n '#Function HMSNoiseCancellationPlugin#isNoiseCancellationAvailable',\n data\n );\n\n try {\n return await HMSManagerModule.isNoiseCancellationPluginAvailable(data);\n } catch (e) {\n logger?.error(\n '#Error in #Function HMSNoiseCancellationPlugin#isNoiseCancellationAvailable ',\n e\n );\n return Promise.reject(e);\n }\n }\n\n /**\n * Enables noise cancellation.\n * @returns {Promise<boolean>} A promise that resolves to true if noise cancellation is enabled, otherwise, rejected promise is returned\n */\n async enable(): Promise<boolean> {\n const data = { id: HMSConstants.DEFAULT_SDK_ID };\n logger?.verbose('#Function HMSNoiseCancellationPlugin#enable', data);\n\n try {\n return await HMSManagerModule.enableNoiseCancellationPlugin(data);\n } catch (e) {\n logger?.error(\n '#Error in #Function HMSNoiseCancellationPlugin#enable ',\n e\n );\n return Promise.reject(e);\n }\n }\n\n /**\n * Disables noise cancellation.\n * @returns {Promise<boolean>} A promise that resolves to true if noise cancellation is disabled, otherwise, rejected promise is returned\n */\n async disable(): Promise<boolean> {\n const data = { id: HMSConstants.DEFAULT_SDK_ID };\n logger?.verbose('#Function HMSNoiseCancellationPlugin#disable', data);\n\n try {\n return await HMSManagerModule.disableNoiseCancellationPlugin(data);\n } catch (e) {\n logger?.error(\n '#Error in #Function HMSNoiseCancellationPlugin#disable ',\n e\n );\n return Promise.reject(e);\n }\n }\n\n /**\n * Checks if noise cancellation is enabled.\n * @returns {boolean} true if noise cancellation is enabled, false otherwise.\n */\n async isEnabled(): Promise<boolean> {\n const data = { id: HMSConstants.DEFAULT_SDK_ID };\n logger?.verbose('#Function HMSNoiseCancellationPlugin#isEnabled', data);\n\n try {\n return await HMSManagerModule.isNoiseCancellationPluginEnabled(data);\n } catch (e) {\n logger?.error(\n '#Error in #Function HMSNoiseCancellationPlugin#isEnabled ',\n e\n );\n return Promise.reject(e);\n }\n }\n}\n\n/**\n * Enum for HMS Noise Cancellation Models.\n * @enum {String}\n */\nexport enum HMSNoiseCancellationModels {\n SmallFullBand = 'SMALL_FULL_BAND',\n}\n\n/**\n * Enum for HMS Noise Cancellation Initial State.\n * @enum {String}\n */\nexport enum HMSNoiseCancellationInitialState {\n Enabled = 'ENABLED',\n Disabled = 'DISABLED',\n}\n"],"mappings":";;;AAAA,OAAOA,gBAAgB,MAAM,6BAA6B;AAC1D,SAASC,YAAY,QAAQ,gBAAgB;AAC7C,SAASC,MAAM,QAAQ,aAAa;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,0BAA0B,CAAC;EAkBtC;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACEC,WAAWA,CAACC,MAGX,EAAE;IAjCH;AACF;AACA;AACA;AACA;AACA;IALEC,eAAA;IAQA;AACF;AACA;AACA;AACA;AACA;AACA;IANEA,eAAA;IA0BE,MAAMC,IAAI,GAAG;MACXC,SAAS,EAAEC,0BAA0B,CAACC,aAAa;MACnDC,YAAY,EAAEC,gCAAgC,CAACC,QAAQ;MACvD,GAAGR;IACL,CAAC;IACD,IAAI,CAACG,SAAS,GAAGD,IAAI,CAACC,SAAS;IAC/B,IAAI,CAACG,YAAY,GAAGJ,IAAI,CAACI,YAAY;EACvC;;EAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACE,MAAMG,4BAA4BA,CAAA,EAAqB;IACrD,MAAMP,IAAI,GAAG;MAAEQ,EAAE,EAAEd,YAAY,CAACe;IAAe,CAAC;IAChDd,MAAM,aAANA,MAAM,eAANA,MAAM,CAAEe,OAAO,CACb,mEAAmE,EACnEV,IACF,CAAC;IAED,IAAI;MACF,OAAO,MAAMP,gBAAgB,CAACkB,kCAAkC,CAACX,IAAI,CAAC;IACxE,CAAC,CAAC,OAAOY,CAAC,EAAE;MACVjB,MAAM,aAANA,MAAM,eAANA,MAAM,CAAEkB,KAAK,CACX,8EAA8E,EAC9ED,CACF,CAAC;MACD,OAAOE,OAAO,CAACC,MAAM,CAACH,CAAC,CAAC;IAC1B;EACF;;EAEA;AACF;AACA;AACA;EACE,MAAMI,MAAMA,CAAA,EAAqB;IAC/B,MAAMhB,IAAI,GAAG;MAAEQ,EAAE,EAAEd,YAAY,CAACe;IAAe,CAAC;IAChDd,MAAM,aAANA,MAAM,eAANA,MAAM,CAAEe,OAAO,CAAC,6CAA6C,EAAEV,IAAI,CAAC;IAEpE,IAAI;MACF,OAAO,MAAMP,gBAAgB,CAACwB,6BAA6B,CAACjB,IAAI,CAAC;IACnE,CAAC,CAAC,OAAOY,CAAC,EAAE;MACVjB,MAAM,aAANA,MAAM,eAANA,MAAM,CAAEkB,KAAK,CACX,wDAAwD,EACxDD,CACF,CAAC;MACD,OAAOE,OAAO,CAACC,MAAM,CAACH,CAAC,CAAC;IAC1B;EACF;;EAEA;AACF;AACA;AACA;EACE,MAAMM,OAAOA,CAAA,EAAqB;IAChC,MAAMlB,IAAI,GAAG;MAAEQ,EAAE,EAAEd,YAAY,CAACe;IAAe,CAAC;IAChDd,MAAM,aAANA,MAAM,eAANA,MAAM,CAAEe,OAAO,CAAC,8CAA8C,EAAEV,IAAI,CAAC;IAErE,IAAI;MACF,OAAO,MAAMP,gBAAgB,CAAC0B,8BAA8B,CAACnB,IAAI,CAAC;IACpE,CAAC,CAAC,OAAOY,CAAC,EAAE;MACVjB,MAAM,aAANA,MAAM,eAANA,MAAM,CAAEkB,KAAK,CACX,yDAAyD,EACzDD,CACF,CAAC;MACD,OAAOE,OAAO,CAACC,MAAM,CAACH,CAAC,CAAC;IAC1B;EACF;;EAEA;AACF;AACA;AACA;EACE,MAAMQ,SAASA,CAAA,EAAqB;IAClC,MAAMpB,IAAI,GAAG;MAAEQ,EAAE,EAAEd,YAAY,CAACe;IAAe,CAAC;IAChDd,MAAM,aAANA,MAAM,eAANA,MAAM,CAAEe,OAAO,CAAC,gDAAgD,EAAEV,IAAI,CAAC;IAEvE,IAAI;MACF,OAAO,MAAMP,gBAAgB,CAAC4B,gCAAgC,CAACrB,IAAI,CAAC;IACtE,CAAC,CAAC,OAAOY,CAAC,EAAE;MACVjB,MAAM,aAANA,MAAM,eAANA,MAAM,CAAEkB,KAAK,CACX,2DAA2D,EAC3DD,CACF,CAAC;MACD,OAAOE,OAAO,CAACC,MAAM,CAACH,CAAC,CAAC;IAC1B;EACF;AACF;;AAEA;AACA;AACA;AACA;AACA,WAAYV,0BAA0B,0BAA1BA,0BAA0B;EAA1BA,0BAA0B;EAAA,OAA1BA,0BAA0B;AAAA;;AAItC;AACA;AACA;AACA;AACA,WAAYG,gCAAgC,0BAAhCA,gCAAgC;EAAhCA,gCAAgC;EAAhCA,gCAAgC;EAAA,OAAhCA,gCAAgC;AAAA","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=HMSPIPConfig.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["HMSPIPConfig.ts"],"sourcesContent":["import type { HMSVideoViewMode } from './HMSVideoViewMode';\n\n/**\n * Configuration options for Picture-in-Picture (PIP) mode in a React Native application using HMS.\n *\n * This interface defines the settings available for customizing the PIP window that can appear when the app enters background mode.\n * It includes options for automatically entering PIP mode, adjusting the aspect ratio and scale type of the PIP window, and toggling\n * the visibility of various control buttons specific to Android or iOS platforms.\n *\n * @interface HMSPIPConfig\n * @property {boolean} [autoEnterPipMode] - Determines whether the app should automatically enter PIP mode when it goes into the background.\n * @property {[number, number]} [aspectRatio] - Sets the aspect ratio of the PIP window. Defaults are platform-specific: [16, 9] for Android and [9, 16] for iOS.\n * @property {HMSVideoViewMode} [scaleType] - Defines the scaling behavior of the video within the PIP window. Options are `ASPECT_FILL` (default), `ASPECT_FIT`, and `ASPECT_BALANCED`. Applies only to iOS.\n * @property {boolean} [useActiveSpeaker] - Whether the PIP window should automatically show the active speaker. Default is true. Applies only to iOS.\n * @property {boolean} [endButton] - Controls the visibility of the end call button within the PIP window. Default is true. Applies only to Android.\n * @property {boolean} [audioButton] - Controls the visibility of the audio mute/unmute button within the PIP window. Default is true. Applies only to Android.\n * @property {boolean} [videoButton] - Controls the visibility of the video mute/unmute button within the PIP window. Default is true. Applies only to Android.\n */\nexport interface HMSPIPConfig {\n /**\n * Whether to automatically enter PIP mode when app enters background.\n */\n autoEnterPipMode?: boolean;\n\n /**\n * The aspect ratio of the PIP window. Default is [16, 9] on Android & [9, 16] on iOS. Other values can be [3, 4], [1, 1], [4, 3], [16, 9].\n */\n aspectRatio?: [number, number];\n\n /**\n * The scale type of the PIP window. Default is ASPECT_FILL. Other values can be ASPECT_FIT, ASPECT_BALANCED. iOS Only.\n */\n scaleType?: HMSVideoViewMode;\n\n /**\n * Whether to show the Active Speaker in the PIP window. Default is true. iOS only.\n */\n useActiveSpeaker?: boolean;\n\n /**\n * Whether to show the end button in the PIP window. Default is true. Android only.\n */\n endButton?: boolean;\n\n /**\n * Whether to show the audio mute/unmute button in the PIP window. Default is true. Android only.\n */\n audioButton?: boolean;\n\n /**\n * Whether to show the video mute/unmute button in the PIP window. Default is true. Android only.\n */\n videoButton?: boolean;\n}\n"],"mappings":"","ignoreList":[]}
@@ -1,3 +1,12 @@
1
+ /**
2
+ * Enum for HMS Picture-in-Picture (PIP) Listener Actions.
3
+ *
4
+ * This enum defines the types of actions/events related to the Picture-in-Picture (PIP) mode that can be listened to
5
+ * within the HMS SDK. These actions allow the application to respond to changes in PIP mode or when the room is left
6
+ * while in PIP mode.
7
+ *
8
+ * @enum {string}
9
+ */
1
10
  export let HMSPIPListenerActions = /*#__PURE__*/function (HMSPIPListenerActions) {
2
11
  HMSPIPListenerActions["ON_PIP_MODE_CHANGED"] = "ON_PIP_MODE_CHANGED";
3
12
  HMSPIPListenerActions["ON_PIP_ROOM_LEAVE"] = "ON_PIP_ROOM_LEAVE";
@@ -1 +1 @@
1
- {"version":3,"names":["HMSPIPListenerActions"],"sources":["HMSPIPListenerActions.ts"],"sourcesContent":["export enum HMSPIPListenerActions {\n ON_PIP_MODE_CHANGED = 'ON_PIP_MODE_CHANGED',\n ON_PIP_ROOM_LEAVE = 'ON_PIP_ROOM_LEAVE',\n}\n"],"mappings":"AAAA,WAAYA,qBAAqB,0BAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAAA,OAArBA,qBAAqB;AAAA"}
1
+ {"version":3,"names":["HMSPIPListenerActions"],"sources":["HMSPIPListenerActions.ts"],"sourcesContent":["/**\n * Enum for HMS Picture-in-Picture (PIP) Listener Actions.\n *\n * This enum defines the types of actions/events related to the Picture-in-Picture (PIP) mode that can be listened to\n * within the HMS SDK. These actions allow the application to respond to changes in PIP mode or when the room is left\n * while in PIP mode.\n *\n * @enum {string}\n */\nexport enum HMSPIPListenerActions {\n /**\n * Action triggered when the Picture-in-Picture mode changes.\n * This can be used to handle UI changes or other logic when entering or exiting PIP mode.\n */\n ON_PIP_MODE_CHANGED = 'ON_PIP_MODE_CHANGED',\n\n /**\n * Action triggered when the room is left while in Picture-in-Picture mode. Android only.\n * This can be used to clean up resources or update the UI accordingly.\n */\n ON_PIP_ROOM_LEAVE = 'ON_PIP_ROOM_LEAVE',\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAYA,qBAAqB,0BAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAAA,OAArBA,qBAAqB;AAAA","ignoreList":[]}
@@ -1,9 +1,33 @@
1
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
3
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
1
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
2
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
3
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
4
4
  import { getHmsPeersCache, getPeerPropertyFromNative } from './HMSPeersCache';
5
5
  import { HMSConstants } from './HMSConstants';
6
+ import { HMSPeerType } from './HMSPeerType';
7
+
8
+ /**
9
+ * Represents a peer in the HMS ecosystem.
10
+ *
11
+ * This class encapsulates the properties and state of a peer within a session, including their ID, name, role, and various status flags.
12
+ *
13
+ * @export
14
+ * @class HMSPeer
15
+ * @property {string} peerID - The unique identifier for the peer.
16
+ * @property {string | undefined} _name - The name of the peer. Private access.
17
+ * @property {boolean | undefined} _isLocal - Flag indicating whether the peer is the local user. Private access.
18
+ * @property {string | undefined} _customerUserID - An optional custom user ID set by the application. Private access.
19
+ * @property {string | undefined} _metadata - Optional metadata associated with the peer. Private access.
20
+ * @property {HMSRole | undefined} _role - The role assigned to the peer within the session. Private access.
21
+ * @property {boolean} _isHandRaised - Flag indicating whether the peer has raised their hand. Defaults to false. Private access.
22
+ * @property {HMSPeerType} _type - The type of the peer, e.g., regular, screen share. Defaults to `HMSPeerType.REGULAR`. Private access.
23
+ */
6
24
  export class HMSPeer {
25
+ _updateName(value) {
26
+ // If `_isLocal` is outdated, update it
27
+ if (this._name !== value) {
28
+ this._name = value;
29
+ }
30
+ }
7
31
  _updateIsLocal(value) {
8
32
  // If `_isLocal` is outdated, update it
9
33
  if (this._isLocal !== value) {
@@ -34,17 +58,56 @@ export class HMSPeer {
34
58
  this._role = value;
35
59
  }
36
60
  }
61
+ _updateType(value) {
62
+ // If `_type` is outdated, update it
63
+ if (this._type !== value) {
64
+ this._type = value;
65
+ }
66
+ }
37
67
  constructor(params) {
38
68
  _defineProperty(this, "peerID", void 0);
39
- _defineProperty(this, "name", void 0);
69
+ _defineProperty(this, "_name", void 0);
40
70
  _defineProperty(this, "_isLocal", void 0);
41
71
  _defineProperty(this, "_customerUserID", void 0);
42
72
  _defineProperty(this, "_metadata", void 0);
43
73
  _defineProperty(this, "_role", void 0);
44
74
  _defineProperty(this, "_isHandRaised", false);
75
+ _defineProperty(this, "_type", HMSPeerType.REGULAR);
45
76
  this.peerID = params.peerID;
46
- this.name = params.name;
77
+ this._name = params.name;
47
78
  }
79
+
80
+ /**
81
+ * Gets the name of the peer.
82
+ *
83
+ * This getter method retrieves the name of the peer. If the name has already been set locally, it returns that value.
84
+ * Otherwise, it attempts to retrieve the name from the HMS peers cache. If the cache does not contain the name,
85
+ * it falls back to fetching the name directly from the native layer using the peer's ID.
86
+ * Once a value is retrieved, it updates the local `_name` property to ensure consistency.
87
+ *
88
+ * @returns {string | undefined} The name of the peer if available, otherwise `undefined`.
89
+ */
90
+ get name() {
91
+ if (this._name) {
92
+ return this._name;
93
+ }
94
+ const hmsPeersCache = getHmsPeersCache();
95
+ const value = hmsPeersCache ? hmsPeersCache.getProperty(this.peerID, 'name') : getPeerPropertyFromNative(HMSConstants.DEFAULT_SDK_ID, this.peerID, 'name');
96
+ if (typeof value === 'string') {
97
+ this._updateName(value);
98
+ }
99
+ return value ?? this._name;
100
+ }
101
+
102
+ /**
103
+ * Determines if the peer is the local user.
104
+ *
105
+ * This getter method checks if the peer is the local user by first attempting to retrieve the 'isLocal' property value from the HMS peers cache.
106
+ * If the value is not found in the cache, it falls back to fetching the property directly from the native layer using the peer's ID.
107
+ * Once a value is retrieved, it updates the local `_isLocal` property to ensure the value is current.
108
+ *
109
+ * @returns {boolean | undefined} True if the peer is the local user, false otherwise. Returns `undefined` if the information is not available.
110
+ */
48
111
  get isLocal() {
49
112
  const hmsPeersCache = getHmsPeersCache();
50
113
  const value = hmsPeersCache ? hmsPeersCache.getProperty(this.peerID, 'isLocal') : getPeerPropertyFromNative(HMSConstants.DEFAULT_SDK_ID, this.peerID, 'isLocal');
@@ -53,6 +116,19 @@ export class HMSPeer {
53
116
  }
54
117
  return value ?? this._isLocal;
55
118
  }
119
+
120
+ /**
121
+ * Checks if the peer has raised their hand.
122
+ *
123
+ * This getter method determines whether the peer has their hand raised in the session. It first attempts to retrieve the 'isHandRaised' property value
124
+ * from the HMS peers cache. If the value is not found in the cache, it falls back to fetching the property directly from the native layer using the peer's ID.
125
+ * Once a value is retrieved, it updates the local `_isHandRaised` property to ensure the value is current and consistent.
126
+ *
127
+ * @returns {boolean} True if the peer has their hand raised, false otherwise. Defaults to false if the information is not available.
128
+ *
129
+ * @see https://www.100ms.live/docs/react-native/v2/how-to-guides/interact-with-room/peer/large-room
130
+ *
131
+ */
56
132
  get isHandRaised() {
57
133
  const hmsPeersCache = getHmsPeersCache();
58
134
  const value = hmsPeersCache ? hmsPeersCache.getProperty(this.peerID, 'isHandRaised') : getPeerPropertyFromNative(HMSConstants.DEFAULT_SDK_ID, this.peerID, 'isHandRaised');
@@ -61,6 +137,19 @@ export class HMSPeer {
61
137
  }
62
138
  return value ?? this._isHandRaised;
63
139
  }
140
+
141
+ /**
142
+ * Retrieves the network quality of the peer.
143
+ *
144
+ * This getter method attempts to obtain the network quality of the peer, which is an indicator of the current network conditions affecting the peer's connection.
145
+ * It first tries to get this information from the HMS peers cache. If the information is not available in the cache,
146
+ * it falls back to fetching the network quality directly from the native layer using the peer's ID.
147
+ * The network quality is represented by the `HMSNetworkQuality` type, which may include values such as 'good', 'poor', etc., depending on the implementation.
148
+ *
149
+ * @returns {HMSNetworkQuality | undefined} The network quality of the peer if available, otherwise `undefined`.
150
+ *
151
+ * @see https://www.100ms.live/docs/react-native/v2/how-to-guides/measure-network-quality-and-performance/network-quality
152
+ */
64
153
  get networkQuality() {
65
154
  const hmsPeersCache = getHmsPeersCache();
66
155
  if (hmsPeersCache) {
@@ -68,6 +157,17 @@ export class HMSPeer {
68
157
  }
69
158
  return getPeerPropertyFromNative(HMSConstants.DEFAULT_SDK_ID, this.peerID, 'networkQuality');
70
159
  }
160
+
161
+ /**
162
+ * Retrieves the custom user ID of the peer.
163
+ *
164
+ * This getter method attempts to obtain the custom user ID of the peer, which is an optional identifier that can be set by the application.
165
+ * It first tries to get this information from the HMS peers cache. If the information is not available in the cache,
166
+ * it falls back to fetching the custom user ID directly from the native layer using the peer's ID.
167
+ * Once a value is retrieved, it updates the local `_customerUserID` property to ensure the value is current and consistent.
168
+ *
169
+ * @returns {string | undefined} The custom user ID of the peer if available, otherwise `undefined`.
170
+ */
71
171
  get customerUserID() {
72
172
  const hmsPeersCache = getHmsPeersCache();
73
173
  const value = hmsPeersCache ? hmsPeersCache.getProperty(this.peerID, 'customerUserID') : getPeerPropertyFromNative(HMSConstants.DEFAULT_SDK_ID, this.peerID, 'customerUserID');
@@ -76,6 +176,19 @@ export class HMSPeer {
76
176
  }
77
177
  return value ?? this._customerUserID;
78
178
  }
179
+
180
+ /**
181
+ * Retrieves the metadata associated with the peer.
182
+ *
183
+ * This getter method attempts to obtain the metadata of the peer, which can include any additional information set by the application.
184
+ * It first tries to get this information from the HMS peers cache. If the information is not available in the cache,
185
+ * it falls back to fetching the metadata directly from the native layer using the peer's ID.
186
+ * Once a value is retrieved, it updates the local `_metadata` property to ensure the value is current and consistent.
187
+ *
188
+ * @returns {string | undefined} The metadata of the peer if available, otherwise `undefined`.
189
+ *
190
+ * @see https://www.100ms.live/docs/react-native/v2/how-to-guides/interact-with-room/peer/change-metadata
191
+ */
79
192
  get metadata() {
80
193
  const hmsPeersCache = getHmsPeersCache();
81
194
  const value = hmsPeersCache ? hmsPeersCache.getProperty(this.peerID, 'metadata') : getPeerPropertyFromNative(HMSConstants.DEFAULT_SDK_ID, this.peerID, 'metadata');
@@ -84,6 +197,19 @@ export class HMSPeer {
84
197
  }
85
198
  return value ?? this._metadata;
86
199
  }
200
+
201
+ /**
202
+ * Retrieves the role of the peer.
203
+ *
204
+ * This getter method attempts to obtain the role assigned to the peer within the session. The role can define permissions and capabilities
205
+ * within the session context. It first tries to get this information from the HMS peers cache. If the role information is not available in the cache,
206
+ * it falls back to fetching the role directly from the native layer using the peer's ID. Once a value is retrieved, it updates the local `_role`
207
+ * property to ensure the value is current and consistent.
208
+ *
209
+ * @returns {HMSRole | undefined} The role of the peer if available, otherwise `undefined`.
210
+ *
211
+ * @see https://www.100ms.live/docs/get-started/v2/get-started/concepts/templates-and-roles
212
+ */
87
213
  get role() {
88
214
  const hmsPeersCache = getHmsPeersCache();
89
215
  const value = hmsPeersCache ? hmsPeersCache.getProperty(this.peerID, 'role') : getPeerPropertyFromNative(HMSConstants.DEFAULT_SDK_ID, this.peerID, 'role');
@@ -92,6 +218,16 @@ export class HMSPeer {
92
218
  }
93
219
  return value ?? this._role;
94
220
  }
221
+
222
+ /**
223
+ * Retrieves the audio track associated with the peer.
224
+ *
225
+ * This getter method attempts to obtain the audio track of the peer. It first tries to get this information from the HMS peers cache.
226
+ * If the audio track information is not available in the cache, it falls back to fetching the audio track directly from the native layer using the peer's ID.
227
+ * This allows for real-time access to the peer's audio track, which can be used for various audio-related functionalities within the application.
228
+ *
229
+ * @returns {HMSAudioTrack | undefined} The audio track of the peer if available, otherwise `undefined`.
230
+ */
95
231
  get audioTrack() {
96
232
  const hmsPeersCache = getHmsPeersCache();
97
233
  if (hmsPeersCache) {
@@ -99,6 +235,17 @@ export class HMSPeer {
99
235
  }
100
236
  return getPeerPropertyFromNative(HMSConstants.DEFAULT_SDK_ID, this.peerID, 'audioTrack');
101
237
  }
238
+
239
+ /**
240
+ * Retrieves the video track associated with the peer.
241
+ *
242
+ * This getter method attempts to obtain the video track of the peer. It first tries to get this information from the HMS peers cache.
243
+ * If the video track information is not available in the cache, it falls back to fetching the video track directly from the native layer using the peer's ID.
244
+ * This allows for real-time access to the peer's video track, which can be used for various video-related functionalities within the application.
245
+ *
246
+ * @returns {HMSVideoTrack | undefined} The video track of the peer if available, otherwise `undefined`.
247
+ * @see https://www.100ms.live/docs/react-native/v2/how-to-guides/set-up-video-conferencing/render-video/overview
248
+ */
102
249
  get videoTrack() {
103
250
  const hmsPeersCache = getHmsPeersCache();
104
251
  if (hmsPeersCache) {
@@ -106,6 +253,19 @@ export class HMSPeer {
106
253
  }
107
254
  return getPeerPropertyFromNative(HMSConstants.DEFAULT_SDK_ID, this.peerID, 'videoTrack');
108
255
  }
256
+
257
+ /**
258
+ * Retrieves the auxiliary tracks associated with the peer.
259
+ *
260
+ * This getter method attempts to obtain the auxiliary tracks of the peer, which can include tracks like screen shares or additional media streams.
261
+ * It first tries to get this information from the HMS peers cache. If the auxiliary track information is not available in the cache,
262
+ * it falls back to fetching the auxiliary tracks directly from the native layer using the peer's ID.
263
+ * This allows for real-time access to the peer's auxiliary tracks, which can be used for various functionalities within the application,
264
+ * such as displaying a screen share or additional video feeds.
265
+ *
266
+ * @returns {HMSTrack[] | undefined} The auxiliary tracks of the peer if available, otherwise `undefined`.
267
+ * @see https://www.100ms.live/docs/react-native/v2/how-to-guides/set-up-video-conferencing/screenshare
268
+ */
109
269
  get auxiliaryTracks() {
110
270
  const hmsPeersCache = getHmsPeersCache();
111
271
  if (hmsPeersCache) {
@@ -113,5 +273,27 @@ export class HMSPeer {
113
273
  }
114
274
  return getPeerPropertyFromNative(HMSConstants.DEFAULT_SDK_ID, this.peerID, 'auxiliaryTracks');
115
275
  }
276
+
277
+ /**
278
+ * Retrieves the type of the peer.
279
+ *
280
+ * This getter method attempts to obtain the type of the peer, which can indicate whether the peer is a regular participant,
281
+ * a screen share, or another type defined within the `HMSPeerType` enum. It first tries to get this information from the HMS peers cache.
282
+ * If the type information is not available in the cache, it falls back to fetching the type directly from the native layer using the peer's ID.
283
+ * This ensures that the application has real-time access to the peer's type, which can be crucial for handling different peer types differently,
284
+ * such as displaying a screen share in a distinct manner. Once a value is retrieved, it updates the local `_type` property to ensure the value is current.
285
+ *
286
+ * @returns {HMSPeerType} The type of the peer, defaulting to the value stored in `_type` if the information is not available.
287
+ *
288
+ * @see https://www.100ms.live/docs/server-side/v2/how-to-guides/Session%20Initiation%20Protocol%20(SIP)/SIP-Interconnect
289
+ */
290
+ get type() {
291
+ const hmsPeersCache = getHmsPeersCache();
292
+ const value = hmsPeersCache ? hmsPeersCache.getProperty(this.peerID, 'type') : getPeerPropertyFromNative(HMSConstants.DEFAULT_SDK_ID, this.peerID, 'type');
293
+ if (value) {
294
+ this._updateType(value);
295
+ }
296
+ return value ?? this._type;
297
+ }
116
298
  }
117
299
  //# sourceMappingURL=HMSPeer.js.map