@100mslive/react-native-room-kit 1.0.0 → 1.0.2-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (641) hide show
  1. package/README.md +1 -1
  2. package/lib/commonjs/HMSInstanceSetup.js +2 -2
  3. package/lib/commonjs/HMSInstanceSetup.js.map +1 -1
  4. package/lib/commonjs/HMSPrebuilt.js +20 -20
  5. package/lib/commonjs/HMSPrebuilt.js.map +1 -1
  6. package/lib/commonjs/HMSRoomSetup.js +87 -46
  7. package/lib/commonjs/HMSRoomSetup.js.map +1 -1
  8. package/lib/commonjs/Icons/Chevron/index.js +5 -1
  9. package/lib/commonjs/Icons/Chevron/index.js.map +1 -1
  10. package/lib/commonjs/Icons/Hand/assets/hand-off.png +0 -0
  11. package/lib/commonjs/Icons/Hand/assets/hand-off@2x.png +0 -0
  12. package/lib/commonjs/Icons/Hand/assets/hand-off@3x.png +0 -0
  13. package/lib/commonjs/Icons/Hand/index.js +2 -1
  14. package/lib/commonjs/Icons/Hand/index.js.map +1 -1
  15. package/lib/commonjs/Icons/Leave/index.js +5 -1
  16. package/lib/commonjs/Icons/Leave/index.js.map +1 -1
  17. package/lib/commonjs/Icons/Recording/assets/recording-off.png +0 -0
  18. package/lib/commonjs/Icons/Recording/assets/recording-off@2x.png +0 -0
  19. package/lib/commonjs/Icons/Recording/assets/recording-off@3x.png +0 -0
  20. package/lib/commonjs/Icons/Recording/index.js +2 -1
  21. package/lib/commonjs/Icons/Recording/index.js.map +1 -1
  22. package/lib/commonjs/Icons/WelcomeHand/assets/welcome-hand.png +0 -0
  23. package/lib/commonjs/Icons/WelcomeHand/assets/welcome-hand@2x.png +0 -0
  24. package/lib/commonjs/Icons/WelcomeHand/assets/welcome-hand@3x.png +0 -0
  25. package/lib/commonjs/Icons/WelcomeHand/index.js +30 -0
  26. package/lib/commonjs/Icons/WelcomeHand/index.js.map +1 -0
  27. package/lib/commonjs/Icons/index.js +11 -0
  28. package/lib/commonjs/Icons/index.js.map +1 -1
  29. package/lib/commonjs/components/AnimatedFooter.js +2 -2
  30. package/lib/commonjs/components/AnimatedFooter.js.map +1 -1
  31. package/lib/commonjs/components/AnimatedHLSFooter.js +2 -2
  32. package/lib/commonjs/components/AnimatedHLSFooter.js.map +1 -1
  33. package/lib/commonjs/components/AnimatedHeader.js +2 -2
  34. package/lib/commonjs/components/AnimatedHeader.js.map +1 -1
  35. package/lib/commonjs/components/AvatarView.js +2 -2
  36. package/lib/commonjs/components/AvatarView.js.map +1 -1
  37. package/lib/commonjs/components/BackButton.js +2 -2
  38. package/lib/commonjs/components/BackButton.js.map +1 -1
  39. package/lib/commonjs/components/BottomSheet.js +2 -2
  40. package/lib/commonjs/components/BottomSheet.js.map +1 -1
  41. package/lib/commonjs/components/ChangeNameModalContent.js +25 -6
  42. package/lib/commonjs/components/ChangeNameModalContent.js.map +1 -1
  43. package/lib/commonjs/components/Chat/ChatBanner.js +2 -2
  44. package/lib/commonjs/components/Chat/ChatBanner.js.map +1 -1
  45. package/lib/commonjs/components/Chat/ChatFilterBottomSheetOpener.js +3 -4
  46. package/lib/commonjs/components/Chat/ChatFilterBottomSheetOpener.js.map +1 -1
  47. package/lib/commonjs/components/Chat/ChatFilterBottomSheetView.js +3 -4
  48. package/lib/commonjs/components/Chat/ChatFilterBottomSheetView.js.map +1 -1
  49. package/lib/commonjs/components/Chat/ChatFilterItem.js +3 -4
  50. package/lib/commonjs/components/Chat/ChatFilterItem.js.map +1 -1
  51. package/lib/commonjs/components/Chat/ChatFilterView.js +3 -4
  52. package/lib/commonjs/components/Chat/ChatFilterView.js.map +1 -1
  53. package/lib/commonjs/components/Chat/ChatList.js +3 -4
  54. package/lib/commonjs/components/Chat/ChatList.js.map +1 -1
  55. package/lib/commonjs/components/Chat/ChatMessage.js +3 -4
  56. package/lib/commonjs/components/Chat/ChatMessage.js.map +1 -1
  57. package/lib/commonjs/components/Chat/PinnedMessage.js +2 -2
  58. package/lib/commonjs/components/Chat/PinnedMessage.js.map +1 -1
  59. package/lib/commonjs/components/ChatAndParticipants/ChatAndParticipantsBottomSheet.js +2 -2
  60. package/lib/commonjs/components/ChatAndParticipants/ChatAndParticipantsBottomSheet.js.map +1 -1
  61. package/lib/commonjs/components/ChatAndParticipants/ChatAndParticipantsHeader.js +7 -7
  62. package/lib/commonjs/components/ChatAndParticipants/ChatAndParticipantsHeader.js.map +1 -1
  63. package/lib/commonjs/components/ChatAndParticipants/ChatAndParticipantsView.js +3 -4
  64. package/lib/commonjs/components/ChatAndParticipants/ChatAndParticipantsView.js.map +1 -1
  65. package/lib/commonjs/components/ChatAndParticipants/ChatView.js +3 -4
  66. package/lib/commonjs/components/ChatAndParticipants/ChatView.js.map +1 -1
  67. package/lib/commonjs/components/ChatAndParticipants/ParticipantsView.js +15 -14
  68. package/lib/commonjs/components/ChatAndParticipants/ParticipantsView.js.map +1 -1
  69. package/lib/commonjs/components/DisplayView.js +5 -3
  70. package/lib/commonjs/components/DisplayView.js.map +1 -1
  71. package/lib/commonjs/components/EndRoomModal.js +29 -0
  72. package/lib/commonjs/components/EndRoomModal.js.map +1 -0
  73. package/lib/commonjs/components/EndRoomModalContent.js +11 -4
  74. package/lib/commonjs/components/EndRoomModalContent.js.map +1 -1
  75. package/lib/commonjs/components/Footer.js +13 -6
  76. package/lib/commonjs/components/Footer.js.map +1 -1
  77. package/lib/commonjs/components/FullScreenVideoView.js +2 -2
  78. package/lib/commonjs/components/FullScreenVideoView.js.map +1 -1
  79. package/lib/commonjs/components/GridView.js +3 -4
  80. package/lib/commonjs/components/GridView.js.map +1 -1
  81. package/lib/commonjs/components/HLSFooter.js +2 -2
  82. package/lib/commonjs/components/HLSFooter.js.map +1 -1
  83. package/lib/commonjs/components/HLSView.js +2 -2
  84. package/lib/commonjs/components/HLSView.js.map +1 -1
  85. package/lib/commonjs/components/HMSBaseButton.js +2 -2
  86. package/lib/commonjs/components/HMSBaseButton.js.map +1 -1
  87. package/lib/commonjs/components/HMSChat.js +2 -2
  88. package/lib/commonjs/components/HMSChat.js.map +1 -1
  89. package/lib/commonjs/components/HMSDangerButton.js +4 -3
  90. package/lib/commonjs/components/HMSDangerButton.js.map +1 -1
  91. package/lib/commonjs/components/HMSHLSMessage.js +3 -4
  92. package/lib/commonjs/components/HMSHLSMessage.js.map +1 -1
  93. package/lib/commonjs/components/HMSHLSMessageList.js +2 -2
  94. package/lib/commonjs/components/HMSHLSMessageList.js.map +1 -1
  95. package/lib/commonjs/components/HMSHLSNotStarted.js +2 -2
  96. package/lib/commonjs/components/HMSHLSNotStarted.js.map +1 -1
  97. package/lib/commonjs/components/HMSHLSStreamLoading.js +6 -4
  98. package/lib/commonjs/components/HMSHLSStreamLoading.js.map +1 -1
  99. package/lib/commonjs/components/HMSHandRaiseNotification.js +2 -2
  100. package/lib/commonjs/components/HMSHandRaiseNotification.js.map +1 -1
  101. package/lib/commonjs/components/HMSKeyboardAvoidingView.js +7 -23
  102. package/lib/commonjs/components/HMSKeyboardAvoidingView.js.map +1 -1
  103. package/lib/commonjs/components/HMSLiveIndicator.js +5 -6
  104. package/lib/commonjs/components/HMSLiveIndicator.js.map +1 -1
  105. package/lib/commonjs/components/HMSLocalScreenshareNotification.js +4 -4
  106. package/lib/commonjs/components/HMSLocalScreenshareNotification.js.map +1 -1
  107. package/lib/commonjs/components/HMSLocalVideoView.js +2 -2
  108. package/lib/commonjs/components/HMSLocalVideoView.js.map +1 -1
  109. package/lib/commonjs/components/HMSManageAudioOutput.js +2 -2
  110. package/lib/commonjs/components/HMSManageAudioOutput.js.map +1 -1
  111. package/lib/commonjs/components/HMSManageCameraRotation.js +2 -2
  112. package/lib/commonjs/components/HMSManageCameraRotation.js.map +1 -1
  113. package/lib/commonjs/components/HMSManageLeave.js +7 -181
  114. package/lib/commonjs/components/HMSManageLeave.js.map +1 -1
  115. package/lib/commonjs/components/HMSManageLocalAudio.js +2 -2
  116. package/lib/commonjs/components/HMSManageLocalAudio.js.map +1 -1
  117. package/lib/commonjs/components/HMSManageLocalVideo.js +2 -2
  118. package/lib/commonjs/components/HMSManageLocalVideo.js.map +1 -1
  119. package/lib/commonjs/components/HMSManageRaiseHand.js +23 -11
  120. package/lib/commonjs/components/HMSManageRaiseHand.js.map +1 -1
  121. package/lib/commonjs/components/HMSMeetingEnded.js +2 -2
  122. package/lib/commonjs/components/HMSMeetingEnded.js.map +1 -1
  123. package/lib/commonjs/components/HMSNotification.js +6 -5
  124. package/lib/commonjs/components/HMSNotification.js.map +1 -1
  125. package/lib/commonjs/components/HMSNotifications.js +34 -8
  126. package/lib/commonjs/components/HMSNotifications.js.map +1 -1
  127. package/lib/commonjs/components/HMSOverlayChatView.js +9 -3
  128. package/lib/commonjs/components/HMSOverlayChatView.js.map +1 -1
  129. package/lib/commonjs/components/HMSPreviewEditName.js +2 -2
  130. package/lib/commonjs/components/HMSPreviewEditName.js.map +1 -1
  131. package/lib/commonjs/components/HMSPreviewHLSLiveIndicator.js +5 -4
  132. package/lib/commonjs/components/HMSPreviewHLSLiveIndicator.js.map +1 -1
  133. package/lib/commonjs/components/HMSPreviewJoinButton.js +10 -5
  134. package/lib/commonjs/components/HMSPreviewJoinButton.js.map +1 -1
  135. package/lib/commonjs/components/HMSPreviewNetworkQuality.js +2 -2
  136. package/lib/commonjs/components/HMSPreviewNetworkQuality.js.map +1 -1
  137. package/lib/commonjs/components/HMSPreviewPeersList.js +2 -2
  138. package/lib/commonjs/components/HMSPreviewPeersList.js.map +1 -1
  139. package/lib/commonjs/components/HMSPreviewSubtitle.js +2 -2
  140. package/lib/commonjs/components/HMSPreviewSubtitle.js.map +1 -1
  141. package/lib/commonjs/components/HMSPreviewTile.js +3 -3
  142. package/lib/commonjs/components/HMSPreviewTile.js.map +1 -1
  143. package/lib/commonjs/components/HMSPreviewTitle.js +2 -2
  144. package/lib/commonjs/components/HMSPreviewTitle.js.map +1 -1
  145. package/lib/commonjs/components/HMSPrimaryButton.js +2 -2
  146. package/lib/commonjs/components/HMSPrimaryButton.js.map +1 -1
  147. package/lib/commonjs/components/HMSReconnectingNotification.js +33 -0
  148. package/lib/commonjs/components/HMSReconnectingNotification.js.map +1 -0
  149. package/lib/commonjs/components/HMSRecordingIndicator.js +6 -3
  150. package/lib/commonjs/components/HMSRecordingIndicator.js.map +1 -1
  151. package/lib/commonjs/components/HMSRoleChangeDeclinedNotification.js +2 -2
  152. package/lib/commonjs/components/HMSRoleChangeDeclinedNotification.js.map +1 -1
  153. package/lib/commonjs/components/HMSRoomOptions.js +2 -2
  154. package/lib/commonjs/components/HMSRoomOptions.js.map +1 -1
  155. package/lib/commonjs/components/HMSSendMessageInput.js +2 -2
  156. package/lib/commonjs/components/HMSSendMessageInput.js.map +1 -1
  157. package/lib/commonjs/components/HMSTerminalErrorNotification.js +66 -0
  158. package/lib/commonjs/components/HMSTerminalErrorNotification.js.map +1 -0
  159. package/lib/commonjs/components/HMSTextInput.js +5 -5
  160. package/lib/commonjs/components/HMSTextInput.js.map +1 -1
  161. package/lib/commonjs/components/HMSVideoView.js +2 -2
  162. package/lib/commonjs/components/HMSVideoView.js.map +1 -1
  163. package/lib/commonjs/components/Header.js +4 -6
  164. package/lib/commonjs/components/Header.js.map +1 -1
  165. package/lib/commonjs/components/LeaveRoomBottomSheet.js +175 -0
  166. package/lib/commonjs/components/LeaveRoomBottomSheet.js.map +1 -0
  167. package/lib/commonjs/components/LocalPeerRegularVideoView.js +2 -2
  168. package/lib/commonjs/components/LocalPeerRegularVideoView.js.map +1 -1
  169. package/lib/commonjs/components/LocalPeerScreenshareView.js +2 -2
  170. package/lib/commonjs/components/LocalPeerScreenshareView.js.map +1 -1
  171. package/lib/commonjs/components/Meeting.js +6 -2
  172. package/lib/commonjs/components/Meeting.js.map +1 -1
  173. package/lib/commonjs/components/MeetingScreenContent.js +5 -4
  174. package/lib/commonjs/components/MeetingScreenContent.js.map +1 -1
  175. package/lib/commonjs/components/MiniView.js +2 -2
  176. package/lib/commonjs/components/MiniView.js.map +1 -1
  177. package/lib/commonjs/components/Modals.js +2 -2
  178. package/lib/commonjs/components/Modals.js.map +1 -1
  179. package/lib/commonjs/components/OverlayContainer.js +2 -2
  180. package/lib/commonjs/components/OverlayContainer.js.map +1 -1
  181. package/lib/commonjs/components/OverlayedViews.js +3 -4
  182. package/lib/commonjs/components/OverlayedViews.js.map +1 -1
  183. package/lib/commonjs/components/PIPView.js +90 -19
  184. package/lib/commonjs/components/PIPView.js.map +1 -1
  185. package/lib/commonjs/components/PaginationDots.js +3 -4
  186. package/lib/commonjs/components/PaginationDots.js.map +1 -1
  187. package/lib/commonjs/components/Participants/MultiRoleParticipantsList.js +65 -0
  188. package/lib/commonjs/components/Participants/MultiRoleParticipantsList.js.map +1 -0
  189. package/lib/commonjs/components/Participants/ParticipantsAccordian.js +60 -0
  190. package/lib/commonjs/components/Participants/ParticipantsAccordian.js.map +1 -0
  191. package/lib/commonjs/components/Participants/ParticipantsAccordianExpanded.js +25 -0
  192. package/lib/commonjs/components/Participants/ParticipantsAccordianExpanded.js.map +1 -0
  193. package/lib/commonjs/components/Participants/ParticipantsGroupFooter.js +61 -0
  194. package/lib/commonjs/components/Participants/ParticipantsGroupFooter.js.map +1 -0
  195. package/lib/commonjs/components/Participants/ParticipantsGroupHeader.js +31 -31
  196. package/lib/commonjs/components/Participants/ParticipantsGroupHeader.js.map +1 -1
  197. package/lib/commonjs/components/Participants/ParticipantsGroupOptions.js +3 -4
  198. package/lib/commonjs/components/Participants/ParticipantsGroupOptions.js.map +1 -1
  199. package/lib/commonjs/components/Participants/ParticipantsItem.js +12 -21
  200. package/lib/commonjs/components/Participants/ParticipantsItem.js.map +1 -1
  201. package/lib/commonjs/components/Participants/ParticipantsItemOption.js +3 -4
  202. package/lib/commonjs/components/Participants/ParticipantsItemOption.js.map +1 -1
  203. package/lib/commonjs/components/Participants/ParticipantsItemOptions.js +26 -5
  204. package/lib/commonjs/components/Participants/ParticipantsItemOptions.js.map +1 -1
  205. package/lib/commonjs/components/Participants/ParticipantsList.js +157 -22
  206. package/lib/commonjs/components/Participants/ParticipantsList.js.map +1 -1
  207. package/lib/commonjs/components/Participants/ParticipantsListFooter.js +43 -0
  208. package/lib/commonjs/components/Participants/ParticipantsListFooter.js.map +1 -0
  209. package/lib/commonjs/components/Participants/ParticipantsSeachInput.js +4 -4
  210. package/lib/commonjs/components/Participants/ParticipantsSeachInput.js.map +1 -1
  211. package/lib/commonjs/components/Participants/index.js +11 -0
  212. package/lib/commonjs/components/Participants/index.js.map +1 -1
  213. package/lib/commonjs/components/ParticipantsCount.js +3 -4
  214. package/lib/commonjs/components/ParticipantsCount.js.map +1 -1
  215. package/lib/commonjs/components/PeerDisplayView.js +1 -2
  216. package/lib/commonjs/components/PeerDisplayView.js.map +1 -1
  217. package/lib/commonjs/components/PeerMinimizedView.js +3 -4
  218. package/lib/commonjs/components/PeerMinimizedView.js.map +1 -1
  219. package/lib/commonjs/components/PeerRTCStatsContainer.js +3 -4
  220. package/lib/commonjs/components/PeerRTCStatsContainer.js.map +1 -1
  221. package/lib/commonjs/components/PeerRTCStatsView.js +1 -2
  222. package/lib/commonjs/components/PeerRTCStatsView.js.map +1 -1
  223. package/lib/commonjs/components/PeerVideoTile/AvatarView.js +8 -9
  224. package/lib/commonjs/components/PeerVideoTile/AvatarView.js.map +1 -1
  225. package/lib/commonjs/components/PeerVideoTile/HMSFullScreenButton.js +2 -2
  226. package/lib/commonjs/components/PeerVideoTile/HMSFullScreenButton.js.map +1 -1
  227. package/lib/commonjs/components/PeerVideoTile/HMSPinchGesture.js +2 -2
  228. package/lib/commonjs/components/PeerVideoTile/HMSPinchGesture.js.map +1 -1
  229. package/lib/commonjs/components/PeerVideoTile/PeerAudioIndicator.js +15 -8
  230. package/lib/commonjs/components/PeerVideoTile/PeerAudioIndicator.js.map +1 -1
  231. package/lib/commonjs/components/PeerVideoTile/PeerMetadata.js +22 -12
  232. package/lib/commonjs/components/PeerVideoTile/PeerMetadata.js.map +1 -1
  233. package/lib/commonjs/components/PeerVideoTile/PeerNameAndNetwork.js +2 -2
  234. package/lib/commonjs/components/PeerVideoTile/PeerNameAndNetwork.js.map +1 -1
  235. package/lib/commonjs/components/PeerVideoTile/PeerVideoTileView.js +27 -13
  236. package/lib/commonjs/components/PeerVideoTile/PeerVideoTileView.js.map +1 -1
  237. package/lib/commonjs/components/PeerVideoTile/VideoView.js +3 -4
  238. package/lib/commonjs/components/PeerVideoTile/VideoView.js.map +1 -1
  239. package/lib/commonjs/components/PressableIcon.js +2 -2
  240. package/lib/commonjs/components/PressableIcon.js.map +1 -1
  241. package/lib/commonjs/components/Preview.js +5 -1
  242. package/lib/commonjs/components/Preview.js.map +1 -1
  243. package/lib/commonjs/components/PreviewForRoleChangeModal.js +6 -12
  244. package/lib/commonjs/components/PreviewForRoleChangeModal.js.map +1 -1
  245. package/lib/commonjs/components/ReconnectionView.js +3 -4
  246. package/lib/commonjs/components/ReconnectionView.js.map +1 -1
  247. package/lib/commonjs/components/RoomSettingsModalContent.js +53 -20
  248. package/lib/commonjs/components/RoomSettingsModalContent.js.map +1 -1
  249. package/lib/commonjs/components/RoomSettingsModalDebugModeContent.js +1 -1
  250. package/lib/commonjs/components/RoomSettingsModalDebugModeContent.js.map +1 -1
  251. package/lib/commonjs/components/StatusBar.js +2 -2
  252. package/lib/commonjs/components/StatusBar.js.map +1 -1
  253. package/lib/commonjs/components/StopRecordingModalContent.js +6 -3
  254. package/lib/commonjs/components/StopRecordingModalContent.js.map +1 -1
  255. package/lib/commonjs/components/StreamingQualityModalContent.js +2 -2
  256. package/lib/commonjs/components/StreamingQualityModalContent.js.map +1 -1
  257. package/lib/commonjs/components/Tile.js +1 -2
  258. package/lib/commonjs/components/Tile.js.map +1 -1
  259. package/lib/commonjs/components/TilesContainer.js +1 -2
  260. package/lib/commonjs/components/TilesContainer.js.map +1 -1
  261. package/lib/commonjs/components/UnmountAfterDelay.js +3 -4
  262. package/lib/commonjs/components/UnmountAfterDelay.js.map +1 -1
  263. package/lib/commonjs/components/WebrtcView.js +5 -5
  264. package/lib/commonjs/components/WebrtcView.js.map +1 -1
  265. package/lib/commonjs/components/WelcomeInMeeting.js +30 -9
  266. package/lib/commonjs/components/WelcomeInMeeting.js.map +1 -1
  267. package/lib/commonjs/components/styles.js +1 -2
  268. package/lib/commonjs/components/styles.js.map +1 -1
  269. package/lib/commonjs/hooks-sdk.js +46 -1
  270. package/lib/commonjs/hooks-sdk.js.map +1 -1
  271. package/lib/commonjs/hooks-util.js +323 -145
  272. package/lib/commonjs/hooks-util.js.map +1 -1
  273. package/lib/commonjs/index.js +11 -0
  274. package/lib/commonjs/index.js.map +1 -1
  275. package/lib/commonjs/redux/actionTypes.js +12 -6
  276. package/lib/commonjs/redux/actionTypes.js.map +1 -1
  277. package/lib/commonjs/redux/actions/index.js +41 -4
  278. package/lib/commonjs/redux/actions/index.js.map +1 -1
  279. package/lib/commonjs/redux/index.js +1 -2
  280. package/lib/commonjs/redux/index.js.map +1 -1
  281. package/lib/commonjs/redux/reducers/appState.js +20 -5
  282. package/lib/commonjs/redux/reducers/appState.js.map +1 -1
  283. package/lib/commonjs/redux/reducers/chatWindow.js +1 -2
  284. package/lib/commonjs/redux/reducers/chatWindow.js.map +1 -1
  285. package/lib/commonjs/redux/reducers/hmsStates.js +192 -22
  286. package/lib/commonjs/redux/reducers/hmsStates.js.map +1 -1
  287. package/lib/commonjs/redux/reducers/index.js +1 -2
  288. package/lib/commonjs/redux/reducers/index.js.map +1 -1
  289. package/lib/commonjs/redux/reducers/message.js +3 -4
  290. package/lib/commonjs/redux/reducers/message.js.map +1 -1
  291. package/lib/commonjs/redux/reducers/userState.js +8 -5
  292. package/lib/commonjs/redux/reducers/userState.js.map +1 -1
  293. package/lib/commonjs/types.js +11 -3
  294. package/lib/commonjs/types.js.map +1 -1
  295. package/lib/commonjs/utils/dimension.js +2 -4
  296. package/lib/commonjs/utils/dimension.js.map +1 -1
  297. package/lib/commonjs/utils/functions.js.map +1 -1
  298. package/lib/commonjs/utils/theme.js +5 -10
  299. package/lib/commonjs/utils/theme.js.map +1 -1
  300. package/lib/commonjs/utils/types.js +23 -23
  301. package/lib/commonjs/utils/types.js.map +1 -1
  302. package/lib/commonjs/utils.js +1 -8
  303. package/lib/commonjs/utils.js.map +1 -1
  304. package/lib/module/HMSPrebuilt.js +18 -17
  305. package/lib/module/HMSPrebuilt.js.map +1 -1
  306. package/lib/module/HMSRoomSetup.js +81 -40
  307. package/lib/module/HMSRoomSetup.js.map +1 -1
  308. package/lib/module/Icons/Chevron/index.js +5 -1
  309. package/lib/module/Icons/Chevron/index.js.map +1 -1
  310. package/lib/module/Icons/Hand/assets/hand-off.png +0 -0
  311. package/lib/module/Icons/Hand/assets/hand-off@2x.png +0 -0
  312. package/lib/module/Icons/Hand/assets/hand-off@3x.png +0 -0
  313. package/lib/module/Icons/Hand/index.js +2 -1
  314. package/lib/module/Icons/Hand/index.js.map +1 -1
  315. package/lib/module/Icons/Leave/index.js +5 -1
  316. package/lib/module/Icons/Leave/index.js.map +1 -1
  317. package/lib/module/Icons/Recording/assets/recording-off.png +0 -0
  318. package/lib/module/Icons/Recording/assets/recording-off@2x.png +0 -0
  319. package/lib/module/Icons/Recording/assets/recording-off@3x.png +0 -0
  320. package/lib/module/Icons/Recording/index.js +2 -1
  321. package/lib/module/Icons/Recording/index.js.map +1 -1
  322. package/lib/module/Icons/WelcomeHand/assets/welcome-hand.png +0 -0
  323. package/lib/module/Icons/WelcomeHand/assets/welcome-hand@2x.png +0 -0
  324. package/lib/module/Icons/WelcomeHand/assets/welcome-hand@3x.png +0 -0
  325. package/lib/module/Icons/WelcomeHand/index.js +22 -0
  326. package/lib/module/Icons/WelcomeHand/index.js.map +1 -0
  327. package/lib/module/Icons/index.js +1 -0
  328. package/lib/module/Icons/index.js.map +1 -1
  329. package/lib/module/components/ChangeNameModalContent.js +25 -6
  330. package/lib/module/components/ChangeNameModalContent.js.map +1 -1
  331. package/lib/module/components/ChatAndParticipants/ChatAndParticipantsHeader.js +4 -3
  332. package/lib/module/components/ChatAndParticipants/ChatAndParticipantsHeader.js.map +1 -1
  333. package/lib/module/components/ChatAndParticipants/ParticipantsView.js +13 -12
  334. package/lib/module/components/ChatAndParticipants/ParticipantsView.js.map +1 -1
  335. package/lib/module/components/DisplayView.js +3 -1
  336. package/lib/module/components/DisplayView.js.map +1 -1
  337. package/lib/module/components/EndRoomModal.js +20 -0
  338. package/lib/module/components/EndRoomModal.js.map +1 -0
  339. package/lib/module/components/EndRoomModalContent.js +9 -2
  340. package/lib/module/components/EndRoomModalContent.js.map +1 -1
  341. package/lib/module/components/Footer.js +10 -2
  342. package/lib/module/components/Footer.js.map +1 -1
  343. package/lib/module/components/HMSDangerButton.js +2 -1
  344. package/lib/module/components/HMSDangerButton.js.map +1 -1
  345. package/lib/module/components/HMSHLSStreamLoading.js +5 -3
  346. package/lib/module/components/HMSHLSStreamLoading.js.map +1 -1
  347. package/lib/module/components/HMSKeyboardAvoidingView.js +6 -22
  348. package/lib/module/components/HMSKeyboardAvoidingView.js.map +1 -1
  349. package/lib/module/components/HMSLiveIndicator.js +3 -3
  350. package/lib/module/components/HMSLiveIndicator.js.map +1 -1
  351. package/lib/module/components/HMSLocalScreenshareNotification.js +1 -1
  352. package/lib/module/components/HMSManageLeave.js +7 -182
  353. package/lib/module/components/HMSManageLeave.js.map +1 -1
  354. package/lib/module/components/HMSManageRaiseHand.js +22 -10
  355. package/lib/module/components/HMSManageRaiseHand.js.map +1 -1
  356. package/lib/module/components/HMSNotification.js +4 -3
  357. package/lib/module/components/HMSNotification.js.map +1 -1
  358. package/lib/module/components/HMSNotifications.js +28 -2
  359. package/lib/module/components/HMSNotifications.js.map +1 -1
  360. package/lib/module/components/HMSOverlayChatView.js +7 -1
  361. package/lib/module/components/HMSOverlayChatView.js.map +1 -1
  362. package/lib/module/components/HMSPreviewHLSLiveIndicator.js +3 -2
  363. package/lib/module/components/HMSPreviewHLSLiveIndicator.js.map +1 -1
  364. package/lib/module/components/HMSPreviewJoinButton.js +9 -4
  365. package/lib/module/components/HMSPreviewJoinButton.js.map +1 -1
  366. package/lib/module/components/HMSPreviewTile.js +1 -1
  367. package/lib/module/components/HMSPreviewTile.js.map +1 -1
  368. package/lib/module/components/HMSReconnectingNotification.js +24 -0
  369. package/lib/module/components/HMSReconnectingNotification.js.map +1 -0
  370. package/lib/module/components/HMSRecordingIndicator.js +4 -1
  371. package/lib/module/components/HMSRecordingIndicator.js.map +1 -1
  372. package/lib/module/components/HMSTerminalErrorNotification.js +57 -0
  373. package/lib/module/components/HMSTerminalErrorNotification.js.map +1 -0
  374. package/lib/module/components/HMSTextInput.js +3 -3
  375. package/lib/module/components/HMSTextInput.js.map +1 -1
  376. package/lib/module/components/LeaveRoomBottomSheet.js +167 -0
  377. package/lib/module/components/LeaveRoomBottomSheet.js.map +1 -0
  378. package/lib/module/components/Meeting.js +5 -1
  379. package/lib/module/components/Meeting.js.map +1 -1
  380. package/lib/module/components/MeetingScreenContent.js +3 -2
  381. package/lib/module/components/MeetingScreenContent.js.map +1 -1
  382. package/lib/module/components/PIPView.js +87 -14
  383. package/lib/module/components/PIPView.js.map +1 -1
  384. package/lib/module/components/Participants/MultiRoleParticipantsList.js +56 -0
  385. package/lib/module/components/Participants/MultiRoleParticipantsList.js.map +1 -0
  386. package/lib/module/components/Participants/ParticipantsAccordian.js +51 -0
  387. package/lib/module/components/Participants/ParticipantsAccordian.js.map +1 -0
  388. package/lib/module/components/Participants/ParticipantsAccordianExpanded.js +16 -0
  389. package/lib/module/components/Participants/ParticipantsAccordianExpanded.js.map +1 -0
  390. package/lib/module/components/Participants/ParticipantsGroupFooter.js +53 -0
  391. package/lib/module/components/Participants/ParticipantsGroupFooter.js.map +1 -0
  392. package/lib/module/components/Participants/ParticipantsGroupHeader.js +28 -27
  393. package/lib/module/components/Participants/ParticipantsGroupHeader.js.map +1 -1
  394. package/lib/module/components/Participants/ParticipantsGroupOptions.js.map +1 -1
  395. package/lib/module/components/Participants/ParticipantsItem.js +10 -18
  396. package/lib/module/components/Participants/ParticipantsItem.js.map +1 -1
  397. package/lib/module/components/Participants/ParticipantsItemOptions.js +24 -2
  398. package/lib/module/components/Participants/ParticipantsItemOptions.js.map +1 -1
  399. package/lib/module/components/Participants/ParticipantsList.js +156 -21
  400. package/lib/module/components/Participants/ParticipantsList.js.map +1 -1
  401. package/lib/module/components/Participants/ParticipantsListFooter.js +35 -0
  402. package/lib/module/components/Participants/ParticipantsListFooter.js.map +1 -0
  403. package/lib/module/components/Participants/ParticipantsSeachInput.js +2 -2
  404. package/lib/module/components/Participants/ParticipantsSeachInput.js.map +1 -1
  405. package/lib/module/components/Participants/index.js +1 -0
  406. package/lib/module/components/Participants/index.js.map +1 -1
  407. package/lib/module/components/PeerVideoTile/AvatarView.js +5 -5
  408. package/lib/module/components/PeerVideoTile/AvatarView.js.map +1 -1
  409. package/lib/module/components/PeerVideoTile/PeerAudioIndicator.js +14 -7
  410. package/lib/module/components/PeerVideoTile/PeerAudioIndicator.js.map +1 -1
  411. package/lib/module/components/PeerVideoTile/PeerMetadata.js +21 -11
  412. package/lib/module/components/PeerVideoTile/PeerMetadata.js.map +1 -1
  413. package/lib/module/components/PeerVideoTile/PeerVideoTileView.js +23 -7
  414. package/lib/module/components/PeerVideoTile/PeerVideoTileView.js.map +1 -1
  415. package/lib/module/components/Preview.js +6 -2
  416. package/lib/module/components/Preview.js.map +1 -1
  417. package/lib/module/components/PreviewForRoleChangeModal.js +2 -7
  418. package/lib/module/components/PreviewForRoleChangeModal.js.map +1 -1
  419. package/lib/module/components/RoomSettingsModalContent.js +54 -21
  420. package/lib/module/components/RoomSettingsModalContent.js.map +1 -1
  421. package/lib/module/components/RoomSettingsModalDebugModeContent.js +1 -1
  422. package/lib/module/components/RoomSettingsModalDebugModeContent.js.map +1 -1
  423. package/lib/module/components/StopRecordingModalContent.js +4 -1
  424. package/lib/module/components/StopRecordingModalContent.js.map +1 -1
  425. package/lib/module/components/WebrtcView.js +2 -1
  426. package/lib/module/components/WebrtcView.js.map +1 -1
  427. package/lib/module/components/WelcomeInMeeting.js +29 -8
  428. package/lib/module/components/WelcomeInMeeting.js.map +1 -1
  429. package/lib/module/hooks-sdk.js +46 -1
  430. package/lib/module/hooks-sdk.js.map +1 -1
  431. package/lib/module/hooks-util.js +314 -143
  432. package/lib/module/hooks-util.js.map +1 -1
  433. package/lib/module/index.js +1 -0
  434. package/lib/module/index.js.map +1 -1
  435. package/lib/module/redux/actionTypes.js +10 -2
  436. package/lib/module/redux/actionTypes.js.map +1 -1
  437. package/lib/module/redux/actions/index.js +32 -1
  438. package/lib/module/redux/actions/index.js.map +1 -1
  439. package/lib/module/redux/reducers/appState.js +17 -1
  440. package/lib/module/redux/reducers/appState.js.map +1 -1
  441. package/lib/module/redux/reducers/hmsStates.js +191 -20
  442. package/lib/module/redux/reducers/hmsStates.js.map +1 -1
  443. package/lib/module/redux/reducers/userState.js +5 -1
  444. package/lib/module/redux/reducers/userState.js.map +1 -1
  445. package/lib/module/types.js +9 -0
  446. package/lib/module/types.js.map +1 -1
  447. package/lib/module/utils/functions.js.map +1 -1
  448. package/lib/module/utils/types.js +12 -0
  449. package/lib/module/utils/types.js.map +1 -1
  450. package/lib/module/utils.js +0 -6
  451. package/lib/module/utils.js.map +1 -1
  452. package/lib/typescript/HMSPrebuilt.d.ts +2 -16
  453. package/lib/typescript/HMSPrebuilt.d.ts.map +1 -1
  454. package/lib/typescript/HMSRoomSetup.d.ts.map +1 -1
  455. package/lib/typescript/Icons/Chevron/index.d.ts +1 -1
  456. package/lib/typescript/Icons/Chevron/index.d.ts.map +1 -1
  457. package/lib/typescript/Icons/Hand/index.d.ts +1 -0
  458. package/lib/typescript/Icons/Hand/index.d.ts.map +1 -1
  459. package/lib/typescript/Icons/Leave/index.d.ts.map +1 -1
  460. package/lib/typescript/Icons/Recording/index.d.ts +1 -0
  461. package/lib/typescript/Icons/Recording/index.d.ts.map +1 -1
  462. package/lib/typescript/Icons/WelcomeHand/index.d.ts +7 -0
  463. package/lib/typescript/Icons/WelcomeHand/index.d.ts.map +1 -0
  464. package/lib/typescript/Icons/index.d.ts +1 -0
  465. package/lib/typescript/Icons/index.d.ts.map +1 -1
  466. package/lib/typescript/components/ChangeNameModalContent.d.ts.map +1 -1
  467. package/lib/typescript/components/ChatAndParticipants/ChatAndParticipantsHeader.d.ts.map +1 -1
  468. package/lib/typescript/components/ChatAndParticipants/ParticipantsView.d.ts.map +1 -1
  469. package/lib/typescript/components/DisplayView.d.ts.map +1 -1
  470. package/lib/typescript/components/EndRoomModal.d.ts +6 -0
  471. package/lib/typescript/components/EndRoomModal.d.ts.map +1 -0
  472. package/lib/typescript/components/EndRoomModalContent.d.ts.map +1 -1
  473. package/lib/typescript/components/Footer.d.ts +1 -0
  474. package/lib/typescript/components/Footer.d.ts.map +1 -1
  475. package/lib/typescript/components/HMSDangerButton.d.ts.map +1 -1
  476. package/lib/typescript/components/HMSHLSStreamLoading.d.ts.map +1 -1
  477. package/lib/typescript/components/HMSKeyboardAvoidingView.d.ts +1 -0
  478. package/lib/typescript/components/HMSKeyboardAvoidingView.d.ts.map +1 -1
  479. package/lib/typescript/components/HMSManageLeave.d.ts.map +1 -1
  480. package/lib/typescript/components/HMSManageRaiseHand.d.ts.map +1 -1
  481. package/lib/typescript/components/HMSNotification.d.ts +1 -0
  482. package/lib/typescript/components/HMSNotification.d.ts.map +1 -1
  483. package/lib/typescript/components/HMSNotifications.d.ts +1 -0
  484. package/lib/typescript/components/HMSNotifications.d.ts.map +1 -1
  485. package/lib/typescript/components/HMSOverlayChatView.d.ts.map +1 -1
  486. package/lib/typescript/components/HMSPreviewHLSLiveIndicator.d.ts.map +1 -1
  487. package/lib/typescript/components/HMSPreviewJoinButton.d.ts.map +1 -1
  488. package/lib/typescript/components/HMSReconnectingNotification.d.ts +5 -0
  489. package/lib/typescript/components/HMSReconnectingNotification.d.ts.map +1 -0
  490. package/lib/typescript/components/HMSRecordingIndicator.d.ts.map +1 -1
  491. package/lib/typescript/components/HMSTerminalErrorNotification.d.ts +10 -0
  492. package/lib/typescript/components/HMSTerminalErrorNotification.d.ts.map +1 -0
  493. package/lib/typescript/components/LeaveRoomBottomSheet.d.ts +6 -0
  494. package/lib/typescript/components/LeaveRoomBottomSheet.d.ts.map +1 -0
  495. package/lib/typescript/components/Meeting.d.ts.map +1 -1
  496. package/lib/typescript/components/PIPView.d.ts +2 -1
  497. package/lib/typescript/components/PIPView.d.ts.map +1 -1
  498. package/lib/typescript/components/Participants/MultiRoleParticipantsList.d.ts +7 -0
  499. package/lib/typescript/components/Participants/MultiRoleParticipantsList.d.ts.map +1 -0
  500. package/lib/typescript/components/Participants/ParticipantsAccordian.d.ts +11 -0
  501. package/lib/typescript/components/Participants/ParticipantsAccordian.d.ts.map +1 -0
  502. package/lib/typescript/components/Participants/ParticipantsAccordianExpanded.d.ts +9 -0
  503. package/lib/typescript/components/Participants/ParticipantsAccordianExpanded.d.ts.map +1 -0
  504. package/lib/typescript/components/Participants/ParticipantsGroupFooter.d.ts +9 -0
  505. package/lib/typescript/components/Participants/ParticipantsGroupFooter.d.ts.map +1 -0
  506. package/lib/typescript/components/Participants/ParticipantsGroupHeader.d.ts +6 -3
  507. package/lib/typescript/components/Participants/ParticipantsGroupHeader.d.ts.map +1 -1
  508. package/lib/typescript/components/Participants/ParticipantsGroupOptions.d.ts +0 -2
  509. package/lib/typescript/components/Participants/ParticipantsGroupOptions.d.ts.map +1 -1
  510. package/lib/typescript/components/Participants/ParticipantsItem.d.ts +3 -3
  511. package/lib/typescript/components/Participants/ParticipantsItem.d.ts.map +1 -1
  512. package/lib/typescript/components/Participants/ParticipantsItemOptions.d.ts +2 -2
  513. package/lib/typescript/components/Participants/ParticipantsItemOptions.d.ts.map +1 -1
  514. package/lib/typescript/components/Participants/ParticipantsList.d.ts +3 -4
  515. package/lib/typescript/components/Participants/ParticipantsList.d.ts.map +1 -1
  516. package/lib/typescript/components/Participants/ParticipantsListFooter.d.ts +6 -0
  517. package/lib/typescript/components/Participants/ParticipantsListFooter.d.ts.map +1 -0
  518. package/lib/typescript/components/Participants/index.d.ts +1 -0
  519. package/lib/typescript/components/Participants/index.d.ts.map +1 -1
  520. package/lib/typescript/components/PeerVideoTile/PeerAudioIndicator.d.ts.map +1 -1
  521. package/lib/typescript/components/PeerVideoTile/PeerMetadata.d.ts +1 -0
  522. package/lib/typescript/components/PeerVideoTile/PeerMetadata.d.ts.map +1 -1
  523. package/lib/typescript/components/PeerVideoTile/PeerVideoTileView.d.ts.map +1 -1
  524. package/lib/typescript/components/Preview.d.ts.map +1 -1
  525. package/lib/typescript/components/PreviewForRoleChangeModal.d.ts.map +1 -1
  526. package/lib/typescript/components/RoomSettingsModalContent.d.ts.map +1 -1
  527. package/lib/typescript/components/StopRecordingModalContent.d.ts.map +1 -1
  528. package/lib/typescript/components/WebrtcView.d.ts.map +1 -1
  529. package/lib/typescript/components/WelcomeInMeeting.d.ts.map +1 -1
  530. package/lib/typescript/hooks-sdk.d.ts +4 -0
  531. package/lib/typescript/hooks-sdk.d.ts.map +1 -1
  532. package/lib/typescript/hooks-util.d.ts +29 -26
  533. package/lib/typescript/hooks-util.d.ts.map +1 -1
  534. package/lib/typescript/index.d.ts +2 -0
  535. package/lib/typescript/index.d.ts.map +1 -1
  536. package/lib/typescript/redux/actionTypes.d.ts +7 -1
  537. package/lib/typescript/redux/actionTypes.d.ts.map +1 -1
  538. package/lib/typescript/redux/actions/index.d.ts +36 -14
  539. package/lib/typescript/redux/actions/index.d.ts.map +1 -1
  540. package/lib/typescript/redux/index.d.ts +6 -8
  541. package/lib/typescript/redux/index.d.ts.map +1 -1
  542. package/lib/typescript/redux/reducers/appState.d.ts +4 -5
  543. package/lib/typescript/redux/reducers/appState.d.ts.map +1 -1
  544. package/lib/typescript/redux/reducers/hmsStates.d.ts +16 -3
  545. package/lib/typescript/redux/reducers/hmsStates.d.ts.map +1 -1
  546. package/lib/typescript/redux/reducers/index.d.ts +6 -8
  547. package/lib/typescript/redux/reducers/index.d.ts.map +1 -1
  548. package/lib/typescript/redux/reducers/userState.d.ts +2 -2
  549. package/lib/typescript/redux/reducers/userState.d.ts.map +1 -1
  550. package/lib/typescript/types.d.ts +79 -0
  551. package/lib/typescript/types.d.ts.map +1 -1
  552. package/lib/typescript/utils/functions.d.ts +0 -1
  553. package/lib/typescript/utils/functions.d.ts.map +1 -1
  554. package/lib/typescript/utils/types.d.ts +25 -0
  555. package/lib/typescript/utils/types.d.ts.map +1 -1
  556. package/lib/typescript/utils.d.ts +0 -5
  557. package/lib/typescript/utils.d.ts.map +1 -1
  558. package/package.json +3 -4
  559. package/src/HMSPrebuilt.tsx +35 -29
  560. package/src/HMSRoomSetup.tsx +105 -53
  561. package/src/Icons/Chevron/index.tsx +9 -2
  562. package/src/Icons/Hand/assets/hand-off.png +0 -0
  563. package/src/Icons/Hand/assets/hand-off@2x.png +0 -0
  564. package/src/Icons/Hand/assets/hand-off@3x.png +0 -0
  565. package/src/Icons/Hand/index.tsx +13 -3
  566. package/src/Icons/Leave/index.tsx +7 -1
  567. package/src/Icons/Recording/assets/recording-off.png +0 -0
  568. package/src/Icons/Recording/assets/recording-off@2x.png +0 -0
  569. package/src/Icons/Recording/assets/recording-off@3x.png +0 -0
  570. package/src/Icons/Recording/index.tsx +9 -2
  571. package/src/Icons/WelcomeHand/assets/welcome-hand.png +0 -0
  572. package/src/Icons/WelcomeHand/assets/welcome-hand@2x.png +0 -0
  573. package/src/Icons/WelcomeHand/assets/welcome-hand@3x.png +0 -0
  574. package/src/Icons/WelcomeHand/index.tsx +27 -0
  575. package/src/Icons/index.ts +1 -0
  576. package/src/components/ChangeNameModalContent.tsx +28 -9
  577. package/src/components/ChatAndParticipants/ChatAndParticipantsHeader.tsx +6 -3
  578. package/src/components/ChatAndParticipants/ParticipantsView.tsx +21 -13
  579. package/src/components/DisplayView.tsx +6 -0
  580. package/src/components/EndRoomModal.tsx +24 -0
  581. package/src/components/EndRoomModalContent.tsx +9 -2
  582. package/src/components/Footer.tsx +18 -2
  583. package/src/components/HMSDangerButton.tsx +2 -1
  584. package/src/components/HMSHLSStreamLoading.tsx +9 -3
  585. package/src/components/HMSKeyboardAvoidingView.tsx +8 -26
  586. package/src/components/HMSLiveIndicator.tsx +3 -3
  587. package/src/components/HMSLocalScreenshareNotification.tsx +1 -1
  588. package/src/components/HMSManageLeave.tsx +6 -229
  589. package/src/components/HMSManageRaiseHand.tsx +20 -13
  590. package/src/components/HMSNotification.tsx +4 -2
  591. package/src/components/HMSNotifications.tsx +41 -7
  592. package/src/components/HMSOverlayChatView.tsx +6 -1
  593. package/src/components/HMSPreviewHLSLiveIndicator.tsx +3 -2
  594. package/src/components/HMSPreviewJoinButton.tsx +15 -4
  595. package/src/components/HMSPreviewTile.tsx +1 -1
  596. package/src/components/HMSReconnectingNotification.tsx +27 -0
  597. package/src/components/HMSRecordingIndicator.tsx +3 -1
  598. package/src/components/HMSTerminalErrorNotification.tsx +70 -0
  599. package/src/components/HMSTextInput.tsx +3 -3
  600. package/src/components/LeaveRoomBottomSheet.tsx +199 -0
  601. package/src/components/Meeting.tsx +7 -0
  602. package/src/components/MeetingScreenContent.tsx +2 -2
  603. package/src/components/PIPView.tsx +124 -15
  604. package/src/components/Participants/MultiRoleParticipantsList.tsx +70 -0
  605. package/src/components/Participants/ParticipantsAccordian.tsx +70 -0
  606. package/src/components/Participants/ParticipantsAccordianExpanded.tsx +27 -0
  607. package/src/components/Participants/ParticipantsGroupFooter.tsx +65 -0
  608. package/src/components/Participants/ParticipantsGroupHeader.tsx +37 -37
  609. package/src/components/Participants/ParticipantsGroupOptions.tsx +1 -6
  610. package/src/components/Participants/ParticipantsItem.tsx +16 -33
  611. package/src/components/Participants/ParticipantsItemOptions.tsx +28 -6
  612. package/src/components/Participants/ParticipantsList.tsx +197 -34
  613. package/src/components/Participants/ParticipantsListFooter.tsx +45 -0
  614. package/src/components/Participants/ParticipantsSeachInput.tsx +2 -2
  615. package/src/components/Participants/index.ts +1 -0
  616. package/src/components/PeerVideoTile/AvatarView.tsx +5 -5
  617. package/src/components/PeerVideoTile/PeerAudioIndicator.tsx +17 -7
  618. package/src/components/PeerVideoTile/PeerMetadata.tsx +21 -12
  619. package/src/components/PeerVideoTile/PeerVideoTileView.tsx +28 -9
  620. package/src/components/Preview.tsx +23 -9
  621. package/src/components/PreviewForRoleChangeModal.tsx +2 -7
  622. package/src/components/RoomSettingsModalContent.tsx +49 -18
  623. package/src/components/RoomSettingsModalDebugModeContent.tsx +1 -1
  624. package/src/components/StopRecordingModalContent.tsx +3 -1
  625. package/src/components/WebrtcView.tsx +10 -1
  626. package/src/components/WelcomeInMeeting.tsx +33 -5
  627. package/src/hooks-sdk.ts +58 -0
  628. package/src/hooks-util.ts +462 -209
  629. package/src/index.ts +2 -0
  630. package/src/redux/actionTypes.ts +11 -1
  631. package/src/redux/actions/index.ts +36 -8
  632. package/src/redux/reducers/appState.ts +18 -1
  633. package/src/redux/reducers/hmsStates.ts +269 -36
  634. package/src/redux/reducers/userState.ts +7 -3
  635. package/src/types.ts +71 -0
  636. package/src/utils/functions.ts +0 -1
  637. package/src/utils/types.ts +29 -0
  638. package/src/utils.ts +0 -6
  639. package/lib/commonjs/assets/welcome.png +0 -0
  640. package/lib/module/assets/welcome.png +0 -0
  641. package/src/assets/welcome.png +0 -0
package/src/index.ts CHANGED
@@ -1 +1,3 @@
1
1
  export * from './HMSPrebuilt';
2
+ export { OnLeaveReason } from './utils/types';
3
+ export type { OnLeaveHandler, HMSIOSScreenShareConfig } from './utils/types';
@@ -84,6 +84,10 @@ const SET_ACTIVE_CHAT_BOTTOM_SHEET_TAB = 'SET_ACTIVE_CHAT_BOTTOM_SHEET_TAB';
84
84
 
85
85
  const SET_CHAT_FILTER_SHEET_VISIBLE = 'SET_CHAT_FILTER_SHEET_VISIBLE';
86
86
 
87
+ const SET_HANDLE_BACK_BUTTON = 'SET_HANDLE_BACK_BUTTON';
88
+
89
+ const SET_AUTO_ENTER_PIP_MODE = 'SET_AUTO_ENTER_PIP_MODE';
90
+
87
91
  export default {
88
92
  ADD_PINNED_MESSAGE,
89
93
  ADD_MESSAGE,
@@ -123,11 +127,14 @@ export default {
123
127
  REMOVE_NOTIFICATION,
124
128
  SET_ACTIVE_CHAT_BOTTOM_SHEET_TAB,
125
129
  SET_CHAT_FILTER_SHEET_VISIBLE,
130
+ SET_HANDLE_BACK_BUTTON,
131
+ SET_AUTO_ENTER_PIP_MODE,
126
132
  };
127
133
 
128
134
  export enum HmsStateActionTypes {
129
135
  CLEAR_STATES = 'CLEAR_STATES',
130
136
  SET_PREBUILT_DATA = 'SET_PREBUILT_DATA',
137
+ SET_ON_LEAVE_HANDLER = 'SET_ON_LEAVE_HANDLER',
131
138
  SET_ROOM_STATE = 'SET_ROOM_STATE',
132
139
  SET_LOCAL_PEER_STATE = 'SET_LOCAL_PEER_STATE',
133
140
  SET_ROLES_STATE = 'SET_ROLES_STATE',
@@ -141,8 +148,11 @@ export enum HmsStateActionTypes {
141
148
  SET_LAYOUT_CONFIG = 'SET_LAYOUT_CONFIG',
142
149
  SET_ROLE_CHANGE_REQUEST = 'SET_ROLE_CHANGE_REQUEST',
143
150
  ADD_PARTICIPANT = 'ADD_PARTICIPANT',
151
+ ADD_PARTICIPANTS = 'ADD_PARTICIPANTS',
144
152
  REMOVE_PARTICIPANT = 'REMOVE_PARTICIPANT',
145
- ADD_UPDATE_PARTICIPANT = 'ADD_UPDATE_PARTICIPANT',
153
+ REMOVE_PARTICIPANTS = 'REMOVE_PARTICIPANTS',
154
+ UPDATE_PARTICIPANT = 'UPDATE_PARTICIPANT',
155
+ REPLACE_PARTICIPANTS_LIST = 'REPLACE_PARTICIPANTS_LIST',
146
156
  SET_ACTIVE_SPEAKERS = 'SET_ACTIVE_SPEAKERS',
147
157
  SET_RECONNECTING = 'SET_RECONNECTING',
148
158
  }
@@ -18,11 +18,13 @@ import type {
18
18
  ChatBottomSheetTabs,
19
19
  HMSIOSScreenShareConfig,
20
20
  ModalTypes,
21
+ OnLeaveHandler,
21
22
  PeerTrackNode,
22
23
  PipModes,
23
24
  } from '../../utils/types';
24
25
  import actionTypes, { HmsStateActionTypes } from '../actionTypes';
25
26
  import { MeetingState } from '../../types';
27
+ import type { Notification } from '../../types';
26
28
 
27
29
  export const setPrebuiltData = (data: {
28
30
  roomCode: string;
@@ -37,12 +39,16 @@ export const setPrebuiltData = (data: {
37
39
  };
38
40
  ios?: HMSIOSScreenShareConfig;
39
41
  };
40
- onLeave?: () => void;
41
42
  }) => ({
42
43
  type: HmsStateActionTypes.SET_PREBUILT_DATA,
43
44
  payload: data,
44
45
  });
45
46
 
47
+ export const setOnLeaveHandler = (onLeave?: OnLeaveHandler) => ({
48
+ type: HmsStateActionTypes.SET_ON_LEAVE_HANDLER,
49
+ payload: { onLeave },
50
+ });
51
+
46
52
  export const clearStore = () => ({
47
53
  type: HmsStateActionTypes.CLEAR_STATES,
48
54
  });
@@ -306,16 +312,12 @@ export const updateScreenshareTile = (
306
312
  payload: data,
307
313
  });
308
314
 
309
- export const addNotification = (notification: {
310
- id: string;
311
- type: string;
312
- peer: HMSPeer;
313
- }) => ({
315
+ export const addNotification = (notification: Notification) => ({
314
316
  type: actionTypes.ADD_NOTIFICATION,
315
317
  payload: { notification },
316
318
  });
317
319
 
318
- export const removeNotification = (notificationId: string) => ({
320
+ export const removeNotification = (notificationId: Notification['id']) => ({
319
321
  type: actionTypes.REMOVE_NOTIFICATION,
320
322
  payload: { id: notificationId },
321
323
  });
@@ -344,16 +346,32 @@ export const addParticipant = (participant: HMSPeer) => ({
344
346
  participant,
345
347
  });
346
348
 
349
+ export const addParticipants = (participants: HMSPeer[]) => ({
350
+ type: HmsStateActionTypes.ADD_PARTICIPANTS,
351
+ participants,
352
+ });
353
+
347
354
  export const removeParticipant = (participant: HMSPeer) => ({
348
355
  type: HmsStateActionTypes.REMOVE_PARTICIPANT,
349
356
  participant,
350
357
  });
351
358
 
359
+ export const removeParticipants = (participants: HMSPeer[]) => ({
360
+ type: HmsStateActionTypes.REMOVE_PARTICIPANTS,
361
+ participants,
362
+ });
363
+
352
364
  export const addUpdateParticipant = (participant: HMSPeer) => ({
353
- type: HmsStateActionTypes.ADD_UPDATE_PARTICIPANT,
365
+ type: HmsStateActionTypes.UPDATE_PARTICIPANT,
354
366
  participant,
355
367
  });
356
368
 
369
+ export const replaceParticipantsList = (participants: HMSPeer[], roleName: string) => ({
370
+ type: HmsStateActionTypes.REPLACE_PARTICIPANTS_LIST,
371
+ participants,
372
+ roleName,
373
+ });
374
+
357
375
  export const setActiveSpeakers = (activeSpeakers: HMSSpeaker[]) => ({
358
376
  type: HmsStateActionTypes.SET_ACTIVE_SPEAKERS,
359
377
  activeSpeakers,
@@ -363,3 +381,13 @@ export const setReconnecting = (reconnecting: boolean) => ({
363
381
  type: HmsStateActionTypes.SET_RECONNECTING,
364
382
  reconnecting,
365
383
  });
384
+
385
+ export const setHandleBackButton = (handleBackButton?: boolean) => ({
386
+ type: actionTypes.SET_HANDLE_BACK_BUTTON,
387
+ payload: { handleBackButton },
388
+ });
389
+
390
+ export const setAutoEnterPipMode = (autoEnterPipMode?: boolean) => ({
391
+ type: actionTypes.SET_AUTO_ENTER_PIP_MODE,
392
+ payload: { autoEnterPipMode },
393
+ });
@@ -11,6 +11,7 @@ import {
11
11
  HMSRemoteVideoStats,
12
12
  } from '@100mslive/react-native-hms';
13
13
  import { MeetingState } from '../../types';
14
+ import type { Notification } from '../../types';
14
15
 
15
16
  type ActionType = {
16
17
  payload: { [key: string]: any };
@@ -48,9 +49,11 @@ type IntialStateType = {
48
49
  startingOrStoppingRecording: boolean;
49
50
  fullScreenPeerTrackNode: null | PeerTrackNode;
50
51
  screensharePeerTrackNodes: PeerTrackNode[];
51
- notifications: { id: string; type: string; peer: HMSPeer }[];
52
+ notifications: Notification[];
52
53
  activeChatBottomSheetTab: (typeof ChatBottomSheetTabs)[number];
53
54
  chatFilterSheetVisible: boolean;
55
+ handleBackButton: boolean;
56
+ autoEnterPipMode: boolean;
54
57
  };
55
58
 
56
59
  const INITIAL_STATE: IntialStateType = {
@@ -80,6 +83,8 @@ const INITIAL_STATE: IntialStateType = {
80
83
  notifications: [],
81
84
  activeChatBottomSheetTab: ChatBottomSheetTabs[0],
82
85
  chatFilterSheetVisible: false,
86
+ handleBackButton: false,
87
+ autoEnterPipMode: false,
83
88
  };
84
89
 
85
90
  const appReducer = (
@@ -283,6 +288,18 @@ const appReducer = (
283
288
  chatFilterSheetVisible: action.payload.chatFilterSheetVisible,
284
289
  };
285
290
  }
291
+ case ActionTypes.SET_HANDLE_BACK_BUTTON: {
292
+ return {
293
+ ...state,
294
+ handleBackButton: action.payload.handleBackButton ?? INITIAL_STATE.handleBackButton,
295
+ };
296
+ }
297
+ case ActionTypes.SET_AUTO_ENTER_PIP_MODE: {
298
+ return {
299
+ ...state,
300
+ autoEnterPipMode: action.payload.autoEnterPipMode ?? INITIAL_STATE.autoEnterPipMode,
301
+ };
302
+ }
286
303
  case HmsStateActionTypes.CLEAR_STATES:
287
304
  return INITIAL_STATE;
288
305
  default:
@@ -23,8 +23,11 @@ type ActionType =
23
23
  | SetLayoutConfig
24
24
  | SetRoleChangeRequest
25
25
  | AddParticipant
26
+ | AddParticipants
26
27
  | RemoveParticipant
28
+ | RemoveParticipants
27
29
  | AddUpdateParticipant
30
+ | ReplaceParticipantsList
28
31
  | SetActiveSpeakers
29
32
  | SetReconnecting;
30
33
 
@@ -92,16 +95,32 @@ type AddParticipant = {
92
95
  participant: HMSPeer;
93
96
  };
94
97
 
98
+ type AddParticipants = {
99
+ type: HmsStateActionTypes.ADD_PARTICIPANTS;
100
+ participants: HMSPeer[];
101
+ };
102
+
95
103
  type RemoveParticipant = {
96
104
  type: HmsStateActionTypes.REMOVE_PARTICIPANT;
97
105
  participant: HMSPeer;
98
106
  };
99
107
 
108
+ type RemoveParticipants = {
109
+ type: HmsStateActionTypes.REMOVE_PARTICIPANTS;
110
+ participants: HMSPeer[];
111
+ };
112
+
100
113
  type AddUpdateParticipant = {
101
- type: HmsStateActionTypes.ADD_UPDATE_PARTICIPANT;
114
+ type: HmsStateActionTypes.UPDATE_PARTICIPANT;
102
115
  participant: HMSPeer;
103
116
  };
104
117
 
118
+ type ReplaceParticipantsList = {
119
+ type: HmsStateActionTypes.REPLACE_PARTICIPANTS_LIST;
120
+ roleName: string;
121
+ participants: HMSPeer[];
122
+ };
123
+
105
124
  type SetActiveSpeakers = {
106
125
  type: HmsStateActionTypes.SET_ACTIVE_SPEAKERS;
107
126
  activeSpeakers: HMSSpeaker[];
@@ -120,7 +139,7 @@ type IntialStateType = {
120
139
  roomLocallyMuted: boolean;
121
140
  room: HMSRoom | null;
122
141
  localPeer: HMSLocalPeer | null;
123
- participants: (HMSPeer | HMSLocalPeer)[];
142
+ groupedParticipants: Record<string, (HMSPeer | HMSLocalPeer)[]>;
124
143
  activeSpeakers: HMSSpeaker[];
125
144
  roles: HMSRole[];
126
145
  previewPeersList: HMSPeer[];
@@ -136,7 +155,7 @@ const INITIAL_STATE: IntialStateType = {
136
155
  roomLocallyMuted: false,
137
156
  room: null,
138
157
  localPeer: null,
139
- participants: [],
158
+ groupedParticipants: {},
140
159
  activeSpeakers: [],
141
160
  roles: [],
142
161
  previewPeersList: [],
@@ -155,12 +174,70 @@ const hmsStatesReducer = (
155
174
  room: action.room,
156
175
  };
157
176
  case HmsStateActionTypes.SET_LOCAL_PEER_STATE: {
158
- const participantsHasLocalPeer =
159
- action.localPeer !== null
160
- ? state.participants.findIndex(
161
- (participant) => participant.peerID === action.localPeer?.peerID
162
- ) >= 0
163
- : false;
177
+ let updatedGroupedParticipants = state.groupedParticipants;
178
+
179
+ if (action.localPeer !== null) {
180
+ const savedLocalPeer = Object.values(state.groupedParticipants)
181
+ .flat()
182
+ .find(
183
+ (participant) => participant.peerID === action.localPeer?.peerID
184
+ );
185
+
186
+ // update peer or check if role change happened
187
+ if (savedLocalPeer) {
188
+ const previousRoleName = savedLocalPeer.role?.name!;
189
+ const currentRoleName = action.localPeer.role?.name!;
190
+
191
+ const roleChanged = previousRoleName !== currentRoleName;
192
+
193
+ if (roleChanged) {
194
+ const previousList = state.groupedParticipants[previousRoleName];
195
+ const currentList = state.groupedParticipants[currentRoleName];
196
+
197
+ updatedGroupedParticipants = {
198
+ ...state.groupedParticipants,
199
+ // add to new list
200
+ [currentRoleName]: Array.isArray(currentList)
201
+ ? [action.localPeer, ...currentList]
202
+ : [action.localPeer],
203
+ // delete from old list
204
+ [previousRoleName]: Array.isArray(previousList)
205
+ ? previousList.filter(
206
+ (peer) => peer.peerID !== action.localPeer?.peerID
207
+ )
208
+ : [],
209
+ };
210
+ } else {
211
+ const participants = state.groupedParticipants[currentRoleName];
212
+
213
+ updatedGroupedParticipants = {
214
+ ...state.groupedParticipants,
215
+ [currentRoleName]: Array.isArray(participants)
216
+ ? participants.map((participant) =>
217
+ participant.peerID === action.localPeer?.peerID
218
+ ? action.localPeer
219
+ : participant
220
+ )
221
+ : [action.localPeer],
222
+ };
223
+ }
224
+ }
225
+ // add peer
226
+ else {
227
+ const localPeerRoleName = action.localPeer.role?.name;
228
+
229
+ if (localPeerRoleName) {
230
+ const participants = state.groupedParticipants[localPeerRoleName];
231
+
232
+ updatedGroupedParticipants = {
233
+ ...state.groupedParticipants,
234
+ [localPeerRoleName]: Array.isArray(participants)
235
+ ? [action.localPeer, ...participants]
236
+ : [action.localPeer],
237
+ };
238
+ }
239
+ }
240
+ }
164
241
 
165
242
  return {
166
243
  ...state,
@@ -169,21 +246,21 @@ const hmsStatesReducer = (
169
246
  isLocalVideoMuted: action.localPeer?.videoTrack?.isMute(),
170
247
 
171
248
  // Adding or updating local peer in participants list
172
- participants:
173
- action.localPeer !== null
174
- ? participantsHasLocalPeer
175
- ? state.participants.map((participant) =>
176
- participant.peerID === action.localPeer?.peerID
177
- ? action.localPeer
178
- : participant
179
- )
180
- : [action.localPeer, ...state.participants]
181
- : state.participants,
249
+ groupedParticipants: updatedGroupedParticipants,
182
250
  };
183
251
  }
184
252
  case HmsStateActionTypes.ADD_PARTICIPANT: {
253
+ const participantRoleName = action.participant.role?.name;
254
+
255
+ if (!participantRoleName) {
256
+ return state;
257
+ }
258
+
259
+ const participants = state.groupedParticipants[participantRoleName];
260
+
185
261
  if (
186
- state.participants.findIndex(
262
+ Array.isArray(participants) &&
263
+ participants.findIndex(
187
264
  (participant) => participant.peerID === action.participant.peerID
188
265
  ) >= 0
189
266
  ) {
@@ -192,44 +269,200 @@ const hmsStatesReducer = (
192
269
 
193
270
  return {
194
271
  ...state,
195
- participants: [...state.participants, action.participant],
272
+ groupedParticipants: {
273
+ ...state.groupedParticipants,
274
+ [participantRoleName]: Array.isArray(participants)
275
+ ? [...participants, action.participant]
276
+ : [action.participant],
277
+ },
278
+ };
279
+ }
280
+ case HmsStateActionTypes.ADD_PARTICIPANTS: {
281
+ const participantsToAdd = new Map<string, (HMSPeer | HMSLocalPeer)[]>();
282
+
283
+ const participants = Object.values(state.groupedParticipants).flat();
284
+
285
+ action.participants.forEach((peerToAdd) => {
286
+ // check if `peerToAdd` already exists
287
+ const exists =
288
+ participants.findIndex(
289
+ (participant) => participant.peerID === peerToAdd.peerID
290
+ ) >= 0;
291
+
292
+ // if not exists, push to existing list or create new against the role
293
+ if (!exists) {
294
+ const list = participantsToAdd.get(peerToAdd.role?.name!);
295
+
296
+ if (list) {
297
+ list.push(peerToAdd);
298
+ } else {
299
+ participantsToAdd.set(peerToAdd.role?.name!, [peerToAdd]);
300
+ }
301
+ }
302
+ });
303
+
304
+ if (participantsToAdd.size === 0) {
305
+ return state;
306
+ }
307
+
308
+ let updatedGroupedParticipants = { ...state.groupedParticipants };
309
+
310
+ participantsToAdd.forEach((list, roleName) => {
311
+ const oldList = updatedGroupedParticipants[roleName];
312
+ updatedGroupedParticipants[roleName] = Array.isArray(oldList)
313
+ ? [...oldList, ...list]
314
+ : list;
315
+ });
316
+
317
+ return {
318
+ ...state,
319
+ groupedParticipants: updatedGroupedParticipants,
196
320
  };
197
321
  }
198
322
  case HmsStateActionTypes.REMOVE_PARTICIPANT: {
323
+ const participantRoleName = action.participant.role?.name;
324
+
325
+ if (!participantRoleName) {
326
+ return state;
327
+ }
328
+
329
+ const participants = state.groupedParticipants[participantRoleName];
330
+
199
331
  if (
200
- state.participants.findIndex(
332
+ Array.isArray(participants) &&
333
+ participants.findIndex(
201
334
  (participant) => participant.peerID === action.participant.peerID
202
335
  ) >= 0
203
336
  ) {
204
337
  return {
205
338
  ...state,
206
- participants: state.participants.filter(
207
- (participant) => participant.peerID !== action.participant.peerID
208
- ),
339
+ groupedParticipants: {
340
+ ...state.groupedParticipants,
341
+ [participantRoleName]: participants.filter(
342
+ (participant) => participant.peerID !== action.participant.peerID
343
+ ),
344
+ },
209
345
  };
210
346
  }
211
347
 
212
348
  return state;
213
349
  }
214
- case HmsStateActionTypes.ADD_UPDATE_PARTICIPANT: {
215
- if (
216
- state.participants.findIndex(
350
+ case HmsStateActionTypes.REMOVE_PARTICIPANTS: {
351
+ const participantsToRemove = new Map<
352
+ string,
353
+ (HMSPeer | HMSLocalPeer)[]
354
+ >();
355
+
356
+ const participants = Object.values(state.groupedParticipants).flat();
357
+
358
+ action.participants.forEach((peerToAdd) => {
359
+ // check if `peerToAdd` already exists
360
+ const exists =
361
+ participants.findIndex(
362
+ (participant) => participant.peerID === peerToAdd.peerID
363
+ ) >= 0;
364
+
365
+ // if exists, push to existing list or create new against the role
366
+ if (exists) {
367
+ const list = participantsToRemove.get(peerToAdd.role?.name!);
368
+
369
+ if (list) {
370
+ list.push(peerToAdd);
371
+ } else {
372
+ participantsToRemove.set(peerToAdd.role?.name!, [peerToAdd]);
373
+ }
374
+ }
375
+ });
376
+
377
+ if (participantsToRemove.size === 0) {
378
+ return state;
379
+ }
380
+
381
+ let updatedGroupedParticipants = { ...state.groupedParticipants };
382
+
383
+ participantsToRemove.forEach((list, roleName) => {
384
+ const oldList = updatedGroupedParticipants[roleName];
385
+ updatedGroupedParticipants[roleName] = Array.isArray(oldList)
386
+ ? oldList.filter((participant) => {
387
+ const notExists =
388
+ list.findIndex(
389
+ (peerToRemove) => peerToRemove.peerID === participant.peerID
390
+ ) < 0;
391
+
392
+ // if `participant` is not in `removedPeers` list
393
+ // then keep it, otherwise remove it
394
+ return notExists;
395
+ })
396
+ : [];
397
+ });
398
+
399
+ return {
400
+ ...state,
401
+ groupedParticipants: updatedGroupedParticipants,
402
+ };
403
+ }
404
+ case HmsStateActionTypes.UPDATE_PARTICIPANT: {
405
+ const previousParticipant = Object.values(state.groupedParticipants)
406
+ .flat()
407
+ .find(
217
408
  (participant) => participant.peerID === action.participant.peerID
218
- ) >= 0
219
- ) {
409
+ );
410
+
411
+ if (!previousParticipant) {
412
+ return state;
413
+ }
414
+
415
+ const previousRoleName = previousParticipant.role?.name!;
416
+ const currentRoleName = action.participant.role?.name!;
417
+
418
+ // check if role change
419
+ if (previousRoleName !== currentRoleName) {
420
+ const previousRoleList = state.groupedParticipants[previousRoleName];
421
+ const currentRoleList = state.groupedParticipants[currentRoleName];
422
+
220
423
  return {
221
424
  ...state,
222
- participants: state.participants.map((participant) =>
223
- participant.peerID === action.participant.peerID
224
- ? action.participant
225
- : participant
226
- ),
425
+ groupedParticipants: {
426
+ ...state.groupedParticipants,
427
+ // - add to new
428
+ [currentRoleName]: Array.isArray(currentRoleList)
429
+ ? [...currentRoleList, action.participant]
430
+ : [action.participant],
431
+ // - delete from old
432
+ [previousRoleName]: Array.isArray(previousRoleList)
433
+ ? previousRoleList.filter(
434
+ (p) => p.peerID !== action.participant.peerID
435
+ )
436
+ : [],
437
+ },
227
438
  };
228
439
  }
229
440
 
441
+ // update existing
442
+
443
+ const currentList = state.groupedParticipants[currentRoleName];
444
+
445
+ return {
446
+ ...state,
447
+ groupedParticipants: {
448
+ ...state.groupedParticipants,
449
+ [currentRoleName]: Array.isArray(currentList)
450
+ ? currentList.map((p) =>
451
+ p.peerID === action.participant.peerID
452
+ ? action.participant
453
+ : p
454
+ )
455
+ : [action.participant],
456
+ },
457
+ };
458
+ }
459
+ case HmsStateActionTypes.REPLACE_PARTICIPANTS_LIST: {
230
460
  return {
231
461
  ...state,
232
- participants: [...state.participants, action.participant],
462
+ groupedParticipants: {
463
+ ...state.groupedParticipants,
464
+ [action.roleName]: action.participants
465
+ },
233
466
  };
234
467
  }
235
468
  case HmsStateActionTypes.SET_ROLES_STATE:
@@ -5,7 +5,7 @@ import type {
5
5
  } from '@100mslive/react-native-hms';
6
6
  import { getMeetingCode, getMeetingUrl } from '../../utils/functions';
7
7
  import ActionTypes, { HmsStateActionTypes } from '../actionTypes';
8
- import type { HMSIOSScreenShareConfig } from '../../utils/types';
8
+ import type { HMSIOSScreenShareConfig, OnLeaveHandler } from '../../utils/types';
9
9
 
10
10
  type ActionType = {
11
11
  payload: any;
@@ -25,7 +25,7 @@ type IntialStateType = {
25
25
  isHLSFlow: boolean;
26
26
  roles: HMSRole[];
27
27
  iosBuildConfig: HMSIOSScreenShareConfig | null;
28
- onLeave: (() => void) | undefined;
28
+ onLeave: OnLeaveHandler | undefined;
29
29
  };
30
30
 
31
31
  const INITIAL_STATE: IntialStateType = {
@@ -78,9 +78,13 @@ const userReducer = (
78
78
  state.endPoints = action.payload.options.endPoints;
79
79
  state.debugMode = action.payload.options.debugMode ?? false;
80
80
  state.iosBuildConfig = action.payload.options.ios ?? null;
81
- state.onLeave = action.payload.onLeave;
82
81
 
83
82
  return state;
83
+ case HmsStateActionTypes.SET_ON_LEAVE_HANDLER:
84
+ return {
85
+ ...state,
86
+ onLeave: action.payload.onLeave,
87
+ };
84
88
  case HmsStateActionTypes.CLEAR_STATES:
85
89
  return INITIAL_STATE;
86
90
  default:
package/src/types.ts CHANGED
@@ -1,3 +1,6 @@
1
+ import type { HMSException, HMSPeer } from "@100mslive/react-native-hms";
2
+ import type { HMSIOSScreenShareConfig, OnLeaveHandler } from "./utils/types";
3
+
1
4
  export enum MeetingState {
2
5
  NOT_JOINED,
3
6
  IN_PREVIEW,
@@ -5,3 +8,71 @@ export enum MeetingState {
5
8
  MEETING_ENDED,
6
9
  ERROR,
7
10
  }
11
+ export interface HMSPrebuiltProps {
12
+ roomCode: string;
13
+ options?: {
14
+ userName?: string;
15
+ userId?: string;
16
+ endPoints?: {
17
+ init: string;
18
+ token: string;
19
+ layout: string;
20
+ };
21
+ debugMode?: boolean;
22
+ ios?: HMSIOSScreenShareConfig;
23
+ };
24
+ /**
25
+ * onLeave - Optional callback function
26
+ *
27
+ * It will be invoked when user leaves meeting or user is removed from the room
28
+ */
29
+ onLeave?: OnLeaveHandler;
30
+ /**
31
+ * [Android Only] handleBackButton - `Optional<Boolean>` | Default value - `false`
32
+ *
33
+ * When `true`, Leave modal will open on press of back button on android
34
+ * otherwise user will leave meeting immediately without any confirmation modal opening
35
+ *
36
+ * Example usage:
37
+ * ```jsx
38
+ * const isScreenFocused = useIsFocused();
39
+ *
40
+ * ...
41
+ *
42
+ * <HMSPrebuilt
43
+ * {...}
44
+ * handleBackButton={isScreenFocused}
45
+ * />
46
+ * ```
47
+ */
48
+ handleBackButton?: boolean;
49
+ /**
50
+ * [Android Only] autoEnterPipMode - `Optional<Boolean>` | Default value - `false`
51
+ *
52
+ * When `true`, App will go into PIP mode automatically when user tries to leave or minimize app while it is inside room
53
+ *
54
+ * Example usage:
55
+ * ```jsx
56
+ * <HMSPrebuilt
57
+ * {...}
58
+ * autoEnterPipMode={true}
59
+ * />
60
+ * ```
61
+ */
62
+ autoEnterPipMode?: boolean;
63
+ }
64
+
65
+ export enum NotificationTypes {
66
+ ROLE_CHANGE_DECLINED = 'role_change_declined',
67
+ RECONNECTING = 'reconnecting',
68
+ HAND_RAISE = 'hand_raise',
69
+ LOCAL_SCREENSHARE = 'local_screenshare',
70
+ ERROR = 'error',
71
+ TERMINAL_ERROR = 'terminal_error',
72
+ }
73
+
74
+ export type Notification =
75
+ | { id: string; type: NotificationTypes; }
76
+ | { id: string; type: NotificationTypes; message: string; }
77
+ | { id: string; type: NotificationTypes; peer: HMSPeer; }
78
+ | { id: string; type: NotificationTypes; exception: HMSException; }
@@ -52,7 +52,6 @@ export const getInitials = (name?: String): String => {
52
52
  export const parseMetadata = (
53
53
  metadata?: string
54
54
  ): {
55
- isHandRaised?: boolean;
56
55
  isBRBOn?: boolean;
57
56
  prevRole?: string;
58
57
  } => {