@100mslive/react-native-room-kit 0.2.0 → 1.0.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 (914) hide show
  1. package/README.md +1 -10
  2. package/lib/commonjs/HMSPrebuilt.js +6 -6
  3. package/lib/commonjs/HMSPrebuilt.js.map +1 -1
  4. package/lib/commonjs/HMSRoomSetup.js +27 -30
  5. package/lib/commonjs/HMSRoomSetup.js.map +1 -1
  6. package/lib/commonjs/Icons/AlertTriangle/assets/alert-triangle-filled.png +0 -0
  7. package/lib/commonjs/Icons/AlertTriangle/assets/alert-triangle-filled@2x.png +0 -0
  8. package/lib/commonjs/Icons/AlertTriangle/assets/alert-triangle-filled@3x.png +0 -0
  9. package/lib/commonjs/Icons/AlertTriangle/index.js +2 -1
  10. package/lib/commonjs/Icons/AlertTriangle/index.js.map +1 -1
  11. package/lib/commonjs/Icons/Eye/assets/eye-on-small.png +0 -0
  12. package/lib/commonjs/Icons/Eye/assets/eye-on-small@2x.png +0 -0
  13. package/lib/commonjs/Icons/Eye/assets/eye-on-small@3x.png +0 -0
  14. package/lib/commonjs/Icons/Eye/index.js +35 -0
  15. package/lib/commonjs/Icons/Eye/index.js.map +1 -0
  16. package/lib/commonjs/Icons/Person/assets/person-left.png +0 -0
  17. package/lib/commonjs/Icons/Person/assets/person-left@2x.png +0 -0
  18. package/lib/commonjs/Icons/Person/assets/person-left@3x.png +0 -0
  19. package/lib/commonjs/Icons/Person/assets/person-off.png +0 -0
  20. package/lib/commonjs/Icons/Person/assets/person-off@2x.png +0 -0
  21. package/lib/commonjs/Icons/Person/assets/person-off@3x.png +0 -0
  22. package/lib/commonjs/Icons/Person/assets/person-rectangle.png +0 -0
  23. package/lib/commonjs/Icons/Person/assets/person-rectangle@2x.png +0 -0
  24. package/lib/commonjs/Icons/Person/assets/person-rectangle@3x.png +0 -0
  25. package/lib/commonjs/Icons/Person/index.js +2 -1
  26. package/lib/commonjs/Icons/Person/index.js.map +1 -1
  27. package/lib/commonjs/Icons/Search/assets/search.png +0 -0
  28. package/lib/commonjs/Icons/Search/assets/search@2x.png +0 -0
  29. package/lib/commonjs/Icons/Search/assets/search@3x.png +0 -0
  30. package/lib/commonjs/Icons/Search/index.js +34 -0
  31. package/lib/commonjs/Icons/Search/index.js.map +1 -0
  32. package/lib/commonjs/Icons/index.js +22 -0
  33. package/lib/commonjs/Icons/index.js.map +1 -1
  34. package/lib/commonjs/assets/audio-level-white.json +1271 -0
  35. package/lib/commonjs/assets/empty-chat-illustration/empty-chat.png +0 -0
  36. package/lib/commonjs/assets/empty-chat-illustration/empty-chat@2x.png +0 -0
  37. package/lib/commonjs/assets/empty-chat-illustration/empty-chat@3x.png +0 -0
  38. package/lib/commonjs/assets/welcome.png +0 -0
  39. package/lib/commonjs/components/AnimatedFooter.js +35 -0
  40. package/lib/commonjs/components/AnimatedFooter.js.map +1 -0
  41. package/lib/commonjs/components/AnimatedHLSFooter.js +36 -0
  42. package/lib/commonjs/components/AnimatedHLSFooter.js.map +1 -0
  43. package/lib/commonjs/components/AnimatedHeader.js +44 -0
  44. package/lib/commonjs/components/AnimatedHeader.js.map +1 -0
  45. package/lib/commonjs/components/BottomSheet.js +6 -3
  46. package/lib/commonjs/components/BottomSheet.js.map +1 -1
  47. package/lib/commonjs/components/ChangeNameModalContent.js +0 -12
  48. package/lib/commonjs/components/ChangeNameModalContent.js.map +1 -1
  49. package/lib/commonjs/components/Chat/ChatBanner.js +35 -55
  50. package/lib/commonjs/components/Chat/ChatBanner.js.map +1 -1
  51. package/lib/commonjs/components/Chat/ChatFilterBottomSheetOpener.js +83 -0
  52. package/lib/commonjs/components/Chat/ChatFilterBottomSheetOpener.js.map +1 -0
  53. package/lib/commonjs/components/Chat/ChatFilterBottomSheetView.js +69 -0
  54. package/lib/commonjs/components/Chat/ChatFilterBottomSheetView.js.map +1 -0
  55. package/lib/commonjs/components/Chat/ChatFilterItem.js +71 -0
  56. package/lib/commonjs/components/Chat/ChatFilterItem.js.map +1 -0
  57. package/lib/commonjs/components/Chat/ChatFilterView.js +198 -0
  58. package/lib/commonjs/components/Chat/ChatFilterView.js.map +1 -0
  59. package/lib/commonjs/components/Chat/ChatList.js +6 -6
  60. package/lib/commonjs/components/Chat/ChatList.js.map +1 -1
  61. package/lib/commonjs/components/Chat/ChatMessage.js +35 -135
  62. package/lib/commonjs/components/Chat/ChatMessage.js.map +1 -1
  63. package/lib/commonjs/components/Chat/PinnedMessage.js +39 -43
  64. package/lib/commonjs/components/Chat/PinnedMessage.js.map +1 -1
  65. package/lib/commonjs/components/ChatAndParticipants/ChatAndParticipantsBottomSheet.js +42 -0
  66. package/lib/commonjs/components/ChatAndParticipants/ChatAndParticipantsBottomSheet.js.map +1 -0
  67. package/lib/commonjs/components/ChatAndParticipants/ChatAndParticipantsHeader.js +105 -0
  68. package/lib/commonjs/components/ChatAndParticipants/ChatAndParticipantsHeader.js.map +1 -0
  69. package/lib/commonjs/components/ChatAndParticipants/ChatAndParticipantsView.js +66 -0
  70. package/lib/commonjs/components/ChatAndParticipants/ChatAndParticipantsView.js.map +1 -0
  71. package/lib/commonjs/components/ChatAndParticipants/ChatView.js +37 -0
  72. package/lib/commonjs/components/ChatAndParticipants/ChatView.js.map +1 -0
  73. package/lib/commonjs/components/{Participants/SearchableParticipantsView.js → ChatAndParticipants/ParticipantsView.js} +24 -12
  74. package/lib/commonjs/components/ChatAndParticipants/ParticipantsView.js.map +1 -0
  75. package/lib/commonjs/components/ChatAndParticipants/index.js +17 -0
  76. package/lib/commonjs/components/ChatAndParticipants/index.js.map +1 -0
  77. package/lib/commonjs/components/CompanyLogo.js +4 -3
  78. package/lib/commonjs/components/CompanyLogo.js.map +1 -1
  79. package/lib/commonjs/components/DefaultModal.js +2 -6
  80. package/lib/commonjs/components/DefaultModal.js.map +1 -1
  81. package/lib/commonjs/components/DisplayView.js +6 -19
  82. package/lib/commonjs/components/DisplayView.js.map +1 -1
  83. package/lib/commonjs/components/EndRoomModalContent.js +20 -6
  84. package/lib/commonjs/components/EndRoomModalContent.js.map +1 -1
  85. package/lib/commonjs/components/Footer.js +37 -28
  86. package/lib/commonjs/components/Footer.js.map +1 -1
  87. package/lib/commonjs/components/FullScreenVideoView.js +74 -0
  88. package/lib/commonjs/components/FullScreenVideoView.js.map +1 -0
  89. package/lib/commonjs/components/GridView.js +129 -48
  90. package/lib/commonjs/components/GridView.js.map +1 -1
  91. package/lib/commonjs/components/{ParticipantsModal.js → HLSFooter.js} +19 -27
  92. package/lib/commonjs/components/HLSFooter.js.map +1 -0
  93. package/lib/commonjs/components/HLSView.js +10 -22
  94. package/lib/commonjs/components/HLSView.js.map +1 -1
  95. package/lib/commonjs/components/HMSChat.js +15 -14
  96. package/lib/commonjs/components/HMSChat.js.map +1 -1
  97. package/lib/commonjs/components/HMSHLSMessage.js +67 -0
  98. package/lib/commonjs/components/HMSHLSMessage.js.map +1 -0
  99. package/lib/commonjs/components/HMSHLSMessageList.js +58 -0
  100. package/lib/commonjs/components/HMSHLSMessageList.js.map +1 -0
  101. package/lib/commonjs/components/HMSHLSNotStarted.js +1 -6
  102. package/lib/commonjs/components/HMSHLSNotStarted.js.map +1 -1
  103. package/lib/commonjs/components/HMSHandRaiseNotification.js +84 -0
  104. package/lib/commonjs/components/HMSHandRaiseNotification.js.map +1 -0
  105. package/lib/commonjs/components/HMSKeyboardAvoidingView.js +49 -0
  106. package/lib/commonjs/components/HMSKeyboardAvoidingView.js.map +1 -0
  107. package/lib/commonjs/components/HMSLiveIndicator.js +105 -0
  108. package/lib/commonjs/components/HMSLiveIndicator.js.map +1 -0
  109. package/lib/commonjs/components/HMSLocalScreenshareNotification.js +38 -0
  110. package/lib/commonjs/components/HMSLocalScreenshareNotification.js.map +1 -0
  111. package/lib/commonjs/components/HMSLocalVideoView.js +4 -23
  112. package/lib/commonjs/components/HMSLocalVideoView.js.map +1 -1
  113. package/lib/commonjs/components/HMSManageAudioOutput.js +7 -1
  114. package/lib/commonjs/components/HMSManageAudioOutput.js.map +1 -1
  115. package/lib/commonjs/components/HMSManageLeave.js +33 -11
  116. package/lib/commonjs/components/HMSManageLeave.js.map +1 -1
  117. package/lib/commonjs/components/HMSNotification.js +96 -0
  118. package/lib/commonjs/components/HMSNotification.js.map +1 -0
  119. package/lib/commonjs/components/HMSNotifications.js +114 -0
  120. package/lib/commonjs/components/HMSNotifications.js.map +1 -0
  121. package/lib/commonjs/components/HMSOverlayChatView.js +30 -0
  122. package/lib/commonjs/components/HMSOverlayChatView.js.map +1 -0
  123. package/lib/commonjs/components/HMSPreviewJoinButton.js +1 -2
  124. package/lib/commonjs/components/HMSPreviewJoinButton.js.map +1 -1
  125. package/lib/commonjs/components/HMSPreviewNetworkQuality.js +1 -1
  126. package/lib/commonjs/components/HMSPreviewNetworkQuality.js.map +1 -1
  127. package/lib/commonjs/components/HMSPreviewSubtitle.js +1 -3
  128. package/lib/commonjs/components/HMSPreviewSubtitle.js.map +1 -1
  129. package/lib/commonjs/components/HMSPreviewTitle.js +1 -3
  130. package/lib/commonjs/components/HMSPreviewTitle.js.map +1 -1
  131. package/lib/commonjs/components/HMSRecordingIndicator.js +6 -2
  132. package/lib/commonjs/components/HMSRecordingIndicator.js.map +1 -1
  133. package/lib/commonjs/components/HMSRoleChangeDeclinedNotification.js +30 -0
  134. package/lib/commonjs/components/HMSRoleChangeDeclinedNotification.js.map +1 -0
  135. package/lib/commonjs/components/HMSSendMessageInput.js +57 -0
  136. package/lib/commonjs/components/HMSSendMessageInput.js.map +1 -0
  137. package/lib/commonjs/components/HMSTextInput.js +98 -12
  138. package/lib/commonjs/components/HMSTextInput.js.map +1 -1
  139. package/lib/commonjs/components/HMSVideoView.js +43 -0
  140. package/lib/commonjs/components/HMSVideoView.js.map +1 -0
  141. package/lib/commonjs/components/Header.js +19 -123
  142. package/lib/commonjs/components/Header.js.map +1 -1
  143. package/lib/commonjs/components/LocalPeerScreenshareView.js +1 -7
  144. package/lib/commonjs/components/LocalPeerScreenshareView.js.map +1 -1
  145. package/lib/commonjs/components/Meeting.js +6 -5
  146. package/lib/commonjs/components/Meeting.js.map +1 -1
  147. package/lib/commonjs/components/MeetingScreenContent.js +21 -8
  148. package/lib/commonjs/components/MeetingScreenContent.js.map +1 -1
  149. package/lib/commonjs/components/MenuModal/Menu.js +2 -2
  150. package/lib/commonjs/components/MenuModal/Menu.js.map +1 -1
  151. package/lib/commonjs/components/MiniView.js +8 -3
  152. package/lib/commonjs/components/MiniView.js.map +1 -1
  153. package/lib/commonjs/components/Modals.js +88 -317
  154. package/lib/commonjs/components/Modals.js.map +1 -1
  155. package/lib/commonjs/components/OverlayContainer.js +41 -0
  156. package/lib/commonjs/components/OverlayContainer.js.map +1 -0
  157. package/lib/commonjs/components/OverlayedViews.js +22 -0
  158. package/lib/commonjs/components/OverlayedViews.js.map +1 -0
  159. package/lib/commonjs/components/PaginationDots.js +4 -4
  160. package/lib/commonjs/components/PaginationDots.js.map +1 -1
  161. package/lib/commonjs/components/Participants/ParticipantsGroupHeader.js +131 -0
  162. package/lib/commonjs/components/Participants/ParticipantsGroupHeader.js.map +1 -0
  163. package/lib/commonjs/components/Participants/ParticipantsGroupOptions.js +80 -0
  164. package/lib/commonjs/components/Participants/ParticipantsGroupOptions.js.map +1 -0
  165. package/lib/commonjs/components/Participants/ParticipantsItem.js +132 -0
  166. package/lib/commonjs/components/Participants/ParticipantsItem.js.map +1 -0
  167. package/lib/commonjs/components/Participants/ParticipantsItemOption.js +46 -0
  168. package/lib/commonjs/components/Participants/ParticipantsItemOption.js.map +1 -0
  169. package/lib/commonjs/components/Participants/ParticipantsItemOptions.js +220 -0
  170. package/lib/commonjs/components/Participants/ParticipantsItemOptions.js.map +1 -0
  171. package/lib/commonjs/components/Participants/ParticipantsList.js +40 -224
  172. package/lib/commonjs/components/Participants/ParticipantsList.js.map +1 -1
  173. package/lib/commonjs/components/Participants/ParticipantsSeachInput.js +36 -30
  174. package/lib/commonjs/components/Participants/ParticipantsSeachInput.js.map +1 -1
  175. package/lib/commonjs/components/Participants/index.js +0 -33
  176. package/lib/commonjs/components/Participants/index.js.map +1 -1
  177. package/lib/commonjs/components/PeerMinimizedView.js +1 -1
  178. package/lib/commonjs/components/PeerSettingsModalContent.js +47 -123
  179. package/lib/commonjs/components/PeerSettingsModalContent.js.map +1 -1
  180. package/lib/commonjs/components/PeerVideoTile/AvatarView.js +19 -5
  181. package/lib/commonjs/components/PeerVideoTile/AvatarView.js.map +1 -1
  182. package/lib/commonjs/components/PeerVideoTile/HMSFullScreenButton.js +45 -0
  183. package/lib/commonjs/components/PeerVideoTile/HMSFullScreenButton.js.map +1 -0
  184. package/lib/commonjs/components/PeerVideoTile/HMSPinchGesture.js +202 -0
  185. package/lib/commonjs/components/PeerVideoTile/HMSPinchGesture.js.map +1 -0
  186. package/lib/commonjs/components/PeerVideoTile/{PeerAudioMutedIndicator.js → PeerAudioIndicator.js} +30 -4
  187. package/lib/commonjs/components/PeerVideoTile/PeerAudioIndicator.js.map +1 -0
  188. package/lib/commonjs/components/PeerVideoTile/PeerNameAndNetwork.js +10 -2
  189. package/lib/commonjs/components/PeerVideoTile/PeerNameAndNetwork.js.map +1 -1
  190. package/lib/commonjs/components/PeerVideoTile/PeerVideoTileView.js +38 -17
  191. package/lib/commonjs/components/PeerVideoTile/PeerVideoTileView.js.map +1 -1
  192. package/lib/commonjs/components/PeerVideoTile/VideoView.js +43 -10
  193. package/lib/commonjs/components/PeerVideoTile/VideoView.js.map +1 -1
  194. package/lib/commonjs/components/PressableIcon.js +10 -5
  195. package/lib/commonjs/components/PressableIcon.js.map +1 -1
  196. package/lib/commonjs/components/Preview.js +5 -14
  197. package/lib/commonjs/components/Preview.js.map +1 -1
  198. package/lib/commonjs/components/PreviewForRoleChangeModal.js +332 -0
  199. package/lib/commonjs/components/PreviewForRoleChangeModal.js.map +1 -0
  200. package/lib/commonjs/components/ReconnectionView.js +66 -0
  201. package/lib/commonjs/components/ReconnectionView.js.map +1 -0
  202. package/lib/commonjs/components/RoomSettingsModalContent.js +25 -34
  203. package/lib/commonjs/components/RoomSettingsModalContent.js.map +1 -1
  204. package/lib/commonjs/components/RoomSettingsModalDebugModeContent.js +31 -70
  205. package/lib/commonjs/components/RoomSettingsModalDebugModeContent.js.map +1 -1
  206. package/lib/commonjs/components/StreamingQualityModalContent.js +8 -9
  207. package/lib/commonjs/components/StreamingQualityModalContent.js.map +1 -1
  208. package/lib/commonjs/components/TilesContainer.js +31 -9
  209. package/lib/commonjs/components/TilesContainer.js.map +1 -1
  210. package/lib/commonjs/components/WebrtcView.js +11 -14
  211. package/lib/commonjs/components/WebrtcView.js.map +1 -1
  212. package/lib/commonjs/components/WelcomeInMeeting.js +7 -31
  213. package/lib/commonjs/components/WelcomeInMeeting.js.map +1 -1
  214. package/lib/commonjs/components/index.js +0 -33
  215. package/lib/commonjs/components/index.js.map +1 -1
  216. package/lib/commonjs/hooks-util-selectors.js +43 -9
  217. package/lib/commonjs/hooks-util-selectors.js.map +1 -1
  218. package/lib/commonjs/hooks-util.js +619 -213
  219. package/lib/commonjs/hooks-util.js.map +1 -1
  220. package/lib/commonjs/modules/HMSManager.js +3 -3
  221. package/lib/commonjs/modules/HMSManager.js.map +1 -1
  222. package/lib/commonjs/modules/parser.js +2 -3
  223. package/lib/commonjs/modules/parser.js.map +1 -1
  224. package/lib/commonjs/redux/actionTypes.js +25 -1
  225. package/lib/commonjs/redux/actionTypes.js.map +1 -1
  226. package/lib/commonjs/redux/actions/index.js +90 -1
  227. package/lib/commonjs/redux/actions/index.js.map +1 -1
  228. package/lib/commonjs/redux/reducers/appState.js +77 -2
  229. package/lib/commonjs/redux/reducers/appState.js.map +1 -1
  230. package/lib/commonjs/redux/reducers/chatWindow.js +3 -7
  231. package/lib/commonjs/redux/reducers/chatWindow.js.map +1 -1
  232. package/lib/commonjs/redux/reducers/hmsStates.js +70 -7
  233. package/lib/commonjs/redux/reducers/hmsStates.js.map +1 -1
  234. package/lib/commonjs/utils/functions.js +10 -3
  235. package/lib/commonjs/utils/functions.js.map +1 -1
  236. package/lib/commonjs/utils/theme.js +2 -0
  237. package/lib/commonjs/utils/theme.js.map +1 -1
  238. package/lib/commonjs/utils/types.js +9 -3
  239. package/lib/commonjs/utils/types.js.map +1 -1
  240. package/lib/commonjs/utils.js +8 -1
  241. package/lib/commonjs/utils.js.map +1 -1
  242. package/lib/module/HMSPrebuilt.js +6 -6
  243. package/lib/module/HMSPrebuilt.js.map +1 -1
  244. package/lib/module/HMSRoomSetup.js +29 -32
  245. package/lib/module/HMSRoomSetup.js.map +1 -1
  246. package/lib/module/Icons/AlertTriangle/assets/alert-triangle-filled.png +0 -0
  247. package/lib/module/Icons/AlertTriangle/assets/alert-triangle-filled@2x.png +0 -0
  248. package/lib/module/Icons/AlertTriangle/assets/alert-triangle-filled@3x.png +0 -0
  249. package/lib/module/Icons/AlertTriangle/index.js +2 -1
  250. package/lib/module/Icons/AlertTriangle/index.js.map +1 -1
  251. package/lib/module/Icons/Eye/assets/eye-on-small.png +0 -0
  252. package/lib/module/Icons/Eye/assets/eye-on-small@2x.png +0 -0
  253. package/lib/module/Icons/Eye/assets/eye-on-small@3x.png +0 -0
  254. package/lib/module/Icons/Eye/index.js +27 -0
  255. package/lib/module/Icons/Eye/index.js.map +1 -0
  256. package/lib/module/Icons/Person/assets/person-left.png +0 -0
  257. package/lib/module/Icons/Person/assets/person-left@2x.png +0 -0
  258. package/lib/module/Icons/Person/assets/person-left@3x.png +0 -0
  259. package/lib/module/Icons/Person/assets/person-off.png +0 -0
  260. package/lib/module/Icons/Person/assets/person-off@2x.png +0 -0
  261. package/lib/module/Icons/Person/assets/person-off@3x.png +0 -0
  262. package/lib/module/Icons/Person/assets/person-rectangle.png +0 -0
  263. package/lib/module/Icons/Person/assets/person-rectangle@2x.png +0 -0
  264. package/lib/module/Icons/Person/assets/person-rectangle@3x.png +0 -0
  265. package/lib/module/Icons/Person/index.js +2 -1
  266. package/lib/module/Icons/Person/index.js.map +1 -1
  267. package/lib/module/Icons/Search/assets/search.png +0 -0
  268. package/lib/module/Icons/Search/assets/search@2x.png +0 -0
  269. package/lib/module/Icons/Search/assets/search@3x.png +0 -0
  270. package/lib/module/Icons/Search/index.js +26 -0
  271. package/lib/module/Icons/Search/index.js.map +1 -0
  272. package/lib/module/Icons/index.js +2 -0
  273. package/lib/module/Icons/index.js.map +1 -1
  274. package/lib/module/assets/audio-level-white.json +1271 -0
  275. package/lib/module/assets/empty-chat-illustration/empty-chat.png +0 -0
  276. package/lib/module/assets/empty-chat-illustration/empty-chat@2x.png +0 -0
  277. package/lib/module/assets/empty-chat-illustration/empty-chat@3x.png +0 -0
  278. package/lib/module/assets/welcome.png +0 -0
  279. package/lib/module/components/AnimatedFooter.js +26 -0
  280. package/lib/module/components/AnimatedFooter.js.map +1 -0
  281. package/lib/module/components/AnimatedHLSFooter.js +27 -0
  282. package/lib/module/components/AnimatedHLSFooter.js.map +1 -0
  283. package/lib/module/components/AnimatedHeader.js +35 -0
  284. package/lib/module/components/AnimatedHeader.js.map +1 -0
  285. package/lib/module/components/BottomSheet.js +6 -3
  286. package/lib/module/components/BottomSheet.js.map +1 -1
  287. package/lib/module/components/ChangeNameModalContent.js +2 -14
  288. package/lib/module/components/ChangeNameModalContent.js.map +1 -1
  289. package/lib/module/components/Chat/ChatBanner.js +36 -55
  290. package/lib/module/components/Chat/ChatBanner.js.map +1 -1
  291. package/lib/module/components/Chat/ChatFilterBottomSheetOpener.js +74 -0
  292. package/lib/module/components/Chat/ChatFilterBottomSheetOpener.js.map +1 -0
  293. package/lib/module/components/Chat/ChatFilterBottomSheetView.js +60 -0
  294. package/lib/module/components/Chat/ChatFilterBottomSheetView.js.map +1 -0
  295. package/lib/module/components/Chat/ChatFilterItem.js +62 -0
  296. package/lib/module/components/Chat/ChatFilterItem.js.map +1 -0
  297. package/lib/module/components/Chat/ChatFilterView.js +189 -0
  298. package/lib/module/components/Chat/ChatFilterView.js.map +1 -0
  299. package/lib/module/components/Chat/ChatList.js +6 -6
  300. package/lib/module/components/Chat/ChatList.js.map +1 -1
  301. package/lib/module/components/Chat/ChatMessage.js +36 -135
  302. package/lib/module/components/Chat/ChatMessage.js.map +1 -1
  303. package/lib/module/components/Chat/PinnedMessage.js +40 -43
  304. package/lib/module/components/Chat/PinnedMessage.js.map +1 -1
  305. package/lib/module/components/ChatAndParticipants/ChatAndParticipantsBottomSheet.js +33 -0
  306. package/lib/module/components/ChatAndParticipants/ChatAndParticipantsBottomSheet.js.map +1 -0
  307. package/lib/module/components/ChatAndParticipants/ChatAndParticipantsHeader.js +96 -0
  308. package/lib/module/components/ChatAndParticipants/ChatAndParticipantsHeader.js.map +1 -0
  309. package/lib/module/components/ChatAndParticipants/ChatAndParticipantsView.js +57 -0
  310. package/lib/module/components/ChatAndParticipants/ChatAndParticipantsView.js.map +1 -0
  311. package/lib/module/components/ChatAndParticipants/ChatView.js +28 -0
  312. package/lib/module/components/ChatAndParticipants/ChatView.js.map +1 -0
  313. package/lib/module/components/ChatAndParticipants/ParticipantsView.js +30 -0
  314. package/lib/module/components/ChatAndParticipants/ParticipantsView.js.map +1 -0
  315. package/lib/module/components/ChatAndParticipants/index.js +2 -0
  316. package/lib/module/components/ChatAndParticipants/index.js.map +1 -0
  317. package/lib/module/components/CompanyLogo.js +4 -3
  318. package/lib/module/components/CompanyLogo.js.map +1 -1
  319. package/lib/module/components/DefaultModal.js +2 -6
  320. package/lib/module/components/DefaultModal.js.map +1 -1
  321. package/lib/module/components/DisplayView.js +7 -20
  322. package/lib/module/components/DisplayView.js.map +1 -1
  323. package/lib/module/components/EndRoomModalContent.js +20 -6
  324. package/lib/module/components/EndRoomModalContent.js.map +1 -1
  325. package/lib/module/components/Footer.js +39 -30
  326. package/lib/module/components/Footer.js.map +1 -1
  327. package/lib/module/components/FullScreenVideoView.js +64 -0
  328. package/lib/module/components/FullScreenVideoView.js.map +1 -0
  329. package/lib/module/components/GridView.js +130 -49
  330. package/lib/module/components/GridView.js.map +1 -1
  331. package/lib/module/components/HLSFooter.js +26 -0
  332. package/lib/module/components/HLSFooter.js.map +1 -0
  333. package/lib/module/components/HLSView.js +11 -23
  334. package/lib/module/components/HLSView.js.map +1 -1
  335. package/lib/module/components/HMSChat.js +16 -15
  336. package/lib/module/components/HMSChat.js.map +1 -1
  337. package/lib/module/components/HMSHLSMessage.js +58 -0
  338. package/lib/module/components/HMSHLSMessage.js.map +1 -0
  339. package/lib/module/components/HMSHLSMessageList.js +49 -0
  340. package/lib/module/components/HMSHLSMessageList.js.map +1 -0
  341. package/lib/module/components/HMSHLSNotStarted.js +2 -7
  342. package/lib/module/components/HMSHLSNotStarted.js.map +1 -1
  343. package/lib/module/components/HMSHandRaiseNotification.js +75 -0
  344. package/lib/module/components/HMSHandRaiseNotification.js.map +1 -0
  345. package/lib/module/components/HMSKeyboardAvoidingView.js +40 -0
  346. package/lib/module/components/HMSKeyboardAvoidingView.js.map +1 -0
  347. package/lib/module/components/HMSLiveIndicator.js +96 -0
  348. package/lib/module/components/HMSLiveIndicator.js.map +1 -0
  349. package/lib/module/components/HMSLocalScreenshareNotification.js +29 -0
  350. package/lib/module/components/HMSLocalScreenshareNotification.js.map +1 -0
  351. package/lib/module/components/HMSLocalVideoView.js +4 -23
  352. package/lib/module/components/HMSLocalVideoView.js.map +1 -1
  353. package/lib/module/components/HMSManageAudioOutput.js +8 -2
  354. package/lib/module/components/HMSManageAudioOutput.js.map +1 -1
  355. package/lib/module/components/HMSManageLeave.js +35 -13
  356. package/lib/module/components/HMSManageLeave.js.map +1 -1
  357. package/lib/module/components/HMSNotification.js +87 -0
  358. package/lib/module/components/HMSNotification.js.map +1 -0
  359. package/lib/module/components/HMSNotifications.js +105 -0
  360. package/lib/module/components/HMSNotifications.js.map +1 -0
  361. package/lib/module/components/HMSOverlayChatView.js +20 -0
  362. package/lib/module/components/HMSOverlayChatView.js.map +1 -0
  363. package/lib/module/components/HMSPreviewJoinButton.js +2 -3
  364. package/lib/module/components/HMSPreviewJoinButton.js.map +1 -1
  365. package/lib/module/components/HMSPreviewNetworkQuality.js +1 -1
  366. package/lib/module/components/HMSPreviewNetworkQuality.js.map +1 -1
  367. package/lib/module/components/HMSPreviewSubtitle.js +2 -4
  368. package/lib/module/components/HMSPreviewSubtitle.js.map +1 -1
  369. package/lib/module/components/HMSPreviewTitle.js +2 -4
  370. package/lib/module/components/HMSPreviewTitle.js.map +1 -1
  371. package/lib/module/components/HMSRecordingIndicator.js +6 -2
  372. package/lib/module/components/HMSRecordingIndicator.js.map +1 -1
  373. package/lib/module/components/HMSRoleChangeDeclinedNotification.js +21 -0
  374. package/lib/module/components/HMSRoleChangeDeclinedNotification.js.map +1 -0
  375. package/lib/module/components/HMSSendMessageInput.js +48 -0
  376. package/lib/module/components/HMSSendMessageInput.js.map +1 -0
  377. package/lib/module/components/HMSTextInput.js +99 -13
  378. package/lib/module/components/HMSTextInput.js.map +1 -1
  379. package/lib/module/components/HMSVideoView.js +34 -0
  380. package/lib/module/components/HMSVideoView.js.map +1 -0
  381. package/lib/module/components/Header.js +18 -123
  382. package/lib/module/components/Header.js.map +1 -1
  383. package/lib/module/components/LocalPeerScreenshareView.js +1 -6
  384. package/lib/module/components/LocalPeerScreenshareView.js.map +1 -1
  385. package/lib/module/components/Meeting.js +8 -7
  386. package/lib/module/components/Meeting.js.map +1 -1
  387. package/lib/module/components/MeetingScreenContent.js +23 -10
  388. package/lib/module/components/MeetingScreenContent.js.map +1 -1
  389. package/lib/module/components/MenuModal/Menu.js +2 -2
  390. package/lib/module/components/MenuModal/Menu.js.map +1 -1
  391. package/lib/module/components/MiniView.js +8 -3
  392. package/lib/module/components/MiniView.js.map +1 -1
  393. package/lib/module/components/Modals.js +88 -313
  394. package/lib/module/components/Modals.js.map +1 -1
  395. package/lib/module/components/OverlayContainer.js +32 -0
  396. package/lib/module/components/OverlayContainer.js.map +1 -0
  397. package/lib/module/components/OverlayedViews.js +13 -0
  398. package/lib/module/components/OverlayedViews.js.map +1 -0
  399. package/lib/module/components/PaginationDots.js +4 -4
  400. package/lib/module/components/PaginationDots.js.map +1 -1
  401. package/lib/module/components/Participants/ParticipantsGroupHeader.js +121 -0
  402. package/lib/module/components/Participants/ParticipantsGroupHeader.js.map +1 -0
  403. package/lib/module/components/Participants/ParticipantsGroupOptions.js +71 -0
  404. package/lib/module/components/Participants/ParticipantsGroupOptions.js.map +1 -0
  405. package/lib/module/components/Participants/ParticipantsItem.js +123 -0
  406. package/lib/module/components/Participants/ParticipantsItem.js.map +1 -0
  407. package/lib/module/components/Participants/ParticipantsItemOption.js +37 -0
  408. package/lib/module/components/Participants/ParticipantsItemOption.js.map +1 -0
  409. package/lib/module/components/Participants/ParticipantsItemOptions.js +211 -0
  410. package/lib/module/components/Participants/ParticipantsItemOptions.js.map +1 -0
  411. package/lib/module/components/Participants/ParticipantsList.js +42 -225
  412. package/lib/module/components/Participants/ParticipantsList.js.map +1 -1
  413. package/lib/module/components/Participants/ParticipantsSeachInput.js +37 -30
  414. package/lib/module/components/Participants/ParticipantsSeachInput.js.map +1 -1
  415. package/lib/module/components/Participants/index.js +0 -3
  416. package/lib/module/components/Participants/index.js.map +1 -1
  417. package/lib/module/components/PeerMinimizedView.js +1 -1
  418. package/lib/module/components/PeerSettingsModalContent.js +50 -126
  419. package/lib/module/components/PeerSettingsModalContent.js.map +1 -1
  420. package/lib/module/components/PeerVideoTile/AvatarView.js +19 -5
  421. package/lib/module/components/PeerVideoTile/AvatarView.js.map +1 -1
  422. package/lib/module/components/PeerVideoTile/HMSFullScreenButton.js +36 -0
  423. package/lib/module/components/PeerVideoTile/HMSFullScreenButton.js.map +1 -0
  424. package/lib/module/components/PeerVideoTile/HMSPinchGesture.js +193 -0
  425. package/lib/module/components/PeerVideoTile/HMSPinchGesture.js.map +1 -0
  426. package/lib/module/components/PeerVideoTile/PeerAudioIndicator.js +60 -0
  427. package/lib/module/components/PeerVideoTile/PeerAudioIndicator.js.map +1 -0
  428. package/lib/module/components/PeerVideoTile/PeerNameAndNetwork.js +11 -3
  429. package/lib/module/components/PeerVideoTile/PeerNameAndNetwork.js.map +1 -1
  430. package/lib/module/components/PeerVideoTile/PeerVideoTileView.js +41 -20
  431. package/lib/module/components/PeerVideoTile/PeerVideoTileView.js.map +1 -1
  432. package/lib/module/components/PeerVideoTile/VideoView.js +43 -10
  433. package/lib/module/components/PeerVideoTile/VideoView.js.map +1 -1
  434. package/lib/module/components/PressableIcon.js +11 -6
  435. package/lib/module/components/PressableIcon.js.map +1 -1
  436. package/lib/module/components/Preview.js +6 -13
  437. package/lib/module/components/Preview.js.map +1 -1
  438. package/lib/module/components/PreviewForRoleChangeModal.js +322 -0
  439. package/lib/module/components/PreviewForRoleChangeModal.js.map +1 -0
  440. package/lib/module/components/ReconnectionView.js +56 -0
  441. package/lib/module/components/ReconnectionView.js.map +1 -0
  442. package/lib/module/components/RoomSettingsModalContent.js +27 -36
  443. package/lib/module/components/RoomSettingsModalContent.js.map +1 -1
  444. package/lib/module/components/RoomSettingsModalDebugModeContent.js +31 -70
  445. package/lib/module/components/RoomSettingsModalDebugModeContent.js.map +1 -1
  446. package/lib/module/components/StreamingQualityModalContent.js +8 -8
  447. package/lib/module/components/StreamingQualityModalContent.js.map +1 -1
  448. package/lib/module/components/TilesContainer.js +31 -9
  449. package/lib/module/components/TilesContainer.js.map +1 -1
  450. package/lib/module/components/WebrtcView.js +11 -14
  451. package/lib/module/components/WebrtcView.js.map +1 -1
  452. package/lib/module/components/WelcomeInMeeting.js +8 -32
  453. package/lib/module/components/WelcomeInMeeting.js.map +1 -1
  454. package/lib/module/components/index.js +0 -3
  455. package/lib/module/components/index.js.map +1 -1
  456. package/lib/module/hooks-util-selectors.js +38 -8
  457. package/lib/module/hooks-util-selectors.js.map +1 -1
  458. package/lib/module/hooks-util.js +615 -213
  459. package/lib/module/hooks-util.js.map +1 -1
  460. package/lib/module/modules/HMSManager.js +3 -3
  461. package/lib/module/modules/HMSManager.js.map +1 -1
  462. package/lib/module/modules/parser.js +2 -3
  463. package/lib/module/modules/parser.js.map +1 -1
  464. package/lib/module/redux/actionTypes.js +25 -1
  465. package/lib/module/redux/actionTypes.js.map +1 -1
  466. package/lib/module/redux/actions/index.js +74 -0
  467. package/lib/module/redux/actions/index.js.map +1 -1
  468. package/lib/module/redux/reducers/appState.js +78 -2
  469. package/lib/module/redux/reducers/appState.js.map +1 -1
  470. package/lib/module/redux/reducers/chatWindow.js +3 -7
  471. package/lib/module/redux/reducers/chatWindow.js.map +1 -1
  472. package/lib/module/redux/reducers/hmsStates.js +70 -7
  473. package/lib/module/redux/reducers/hmsStates.js.map +1 -1
  474. package/lib/module/utils/functions.js +8 -2
  475. package/lib/module/utils/functions.js.map +1 -1
  476. package/lib/module/utils/theme.js +2 -0
  477. package/lib/module/utils/theme.js.map +1 -1
  478. package/lib/module/utils/types.js +6 -2
  479. package/lib/module/utils/types.js.map +1 -1
  480. package/lib/module/utils.js +6 -0
  481. package/lib/module/utils.js.map +1 -1
  482. package/lib/typescript/HMSPrebuilt.d.ts +1 -0
  483. package/lib/typescript/HMSPrebuilt.d.ts.map +1 -1
  484. package/lib/typescript/HMSRoomSetup.d.ts.map +1 -1
  485. package/lib/typescript/Icons/AlertTriangle/index.d.ts +1 -0
  486. package/lib/typescript/Icons/AlertTriangle/index.d.ts.map +1 -1
  487. package/lib/typescript/Icons/Eye/index.d.ts +8 -0
  488. package/lib/typescript/Icons/Eye/index.d.ts.map +1 -0
  489. package/lib/typescript/Icons/Person/index.d.ts +1 -0
  490. package/lib/typescript/Icons/Person/index.d.ts.map +1 -1
  491. package/lib/typescript/Icons/Search/index.d.ts +7 -0
  492. package/lib/typescript/Icons/Search/index.d.ts.map +1 -0
  493. package/lib/typescript/Icons/index.d.ts +2 -0
  494. package/lib/typescript/Icons/index.d.ts.map +1 -1
  495. package/lib/typescript/components/AnimatedFooter.d.ts +8 -0
  496. package/lib/typescript/components/AnimatedFooter.d.ts.map +1 -0
  497. package/lib/typescript/components/AnimatedHLSFooter.d.ts +11 -0
  498. package/lib/typescript/components/AnimatedHLSFooter.d.ts.map +1 -0
  499. package/lib/typescript/components/AnimatedHeader.d.ts +7 -0
  500. package/lib/typescript/components/AnimatedHeader.d.ts.map +1 -0
  501. package/lib/typescript/components/BottomSheet.d.ts +4 -1
  502. package/lib/typescript/components/BottomSheet.d.ts.map +1 -1
  503. package/lib/typescript/components/ChangeNameModalContent.d.ts.map +1 -1
  504. package/lib/typescript/components/Chat/ChatBanner.d.ts +1 -1
  505. package/lib/typescript/components/Chat/ChatBanner.d.ts.map +1 -1
  506. package/lib/typescript/components/Chat/ChatFilterBottomSheetOpener.d.ts +6 -0
  507. package/lib/typescript/components/Chat/ChatFilterBottomSheetOpener.d.ts.map +1 -0
  508. package/lib/typescript/components/Chat/ChatFilterBottomSheetView.d.ts +6 -0
  509. package/lib/typescript/components/Chat/ChatFilterBottomSheetView.d.ts.map +1 -0
  510. package/lib/typescript/components/Chat/ChatFilterItem.d.ts +12 -0
  511. package/lib/typescript/components/Chat/ChatFilterItem.d.ts.map +1 -0
  512. package/lib/typescript/components/Chat/ChatFilterView.d.ts +6 -0
  513. package/lib/typescript/components/Chat/ChatFilterView.d.ts.map +1 -0
  514. package/lib/typescript/components/Chat/ChatList.d.ts.map +1 -1
  515. package/lib/typescript/components/Chat/ChatMessage.d.ts +2 -2
  516. package/lib/typescript/components/Chat/ChatMessage.d.ts.map +1 -1
  517. package/lib/typescript/components/Chat/PinnedMessage.d.ts.map +1 -1
  518. package/lib/typescript/components/ChatAndParticipants/ChatAndParticipantsBottomSheet.d.ts +3 -0
  519. package/lib/typescript/components/ChatAndParticipants/ChatAndParticipantsBottomSheet.d.ts.map +1 -0
  520. package/lib/typescript/components/ChatAndParticipants/ChatAndParticipantsHeader.d.ts +7 -0
  521. package/lib/typescript/components/ChatAndParticipants/ChatAndParticipantsHeader.d.ts.map +1 -0
  522. package/lib/typescript/components/ChatAndParticipants/ChatAndParticipantsView.d.ts +3 -0
  523. package/lib/typescript/components/ChatAndParticipants/ChatAndParticipantsView.d.ts.map +1 -0
  524. package/lib/typescript/components/ChatAndParticipants/ChatView.d.ts +6 -0
  525. package/lib/typescript/components/ChatAndParticipants/ChatView.d.ts.map +1 -0
  526. package/lib/typescript/components/ChatAndParticipants/ParticipantsView.d.ts +5 -0
  527. package/lib/typescript/components/ChatAndParticipants/ParticipantsView.d.ts.map +1 -0
  528. package/lib/typescript/components/ChatAndParticipants/index.d.ts +2 -0
  529. package/lib/typescript/components/ChatAndParticipants/index.d.ts.map +1 -0
  530. package/lib/typescript/components/CompanyLogo.d.ts.map +1 -1
  531. package/lib/typescript/components/DefaultModal.d.ts.map +1 -1
  532. package/lib/typescript/components/DisplayView.d.ts.map +1 -1
  533. package/lib/typescript/components/EndRoomModalContent.d.ts.map +1 -1
  534. package/lib/typescript/components/Footer.d.ts +0 -2
  535. package/lib/typescript/components/Footer.d.ts.map +1 -1
  536. package/lib/typescript/components/FullScreenVideoView.d.ts +3 -0
  537. package/lib/typescript/components/FullScreenVideoView.d.ts.map +1 -0
  538. package/lib/typescript/components/GridView.d.ts +12 -1
  539. package/lib/typescript/components/GridView.d.ts.map +1 -1
  540. package/lib/typescript/components/HLSFooter.d.ts +8 -0
  541. package/lib/typescript/components/HLSFooter.d.ts.map +1 -0
  542. package/lib/typescript/components/HLSView.d.ts.map +1 -1
  543. package/lib/typescript/components/HMSBaseButton.d.ts +2 -2
  544. package/lib/typescript/components/HMSBaseButton.d.ts.map +1 -1
  545. package/lib/typescript/components/HMSChat.d.ts.map +1 -1
  546. package/lib/typescript/components/HMSHLSMessage.d.ts +8 -0
  547. package/lib/typescript/components/HMSHLSMessage.d.ts.map +1 -0
  548. package/lib/typescript/components/HMSHLSMessageList.d.ts +3 -0
  549. package/lib/typescript/components/HMSHLSMessageList.d.ts.map +1 -0
  550. package/lib/typescript/components/HMSHLSNotStarted.d.ts.map +1 -1
  551. package/lib/typescript/components/HMSHandRaiseNotification.d.ts +10 -0
  552. package/lib/typescript/components/HMSHandRaiseNotification.d.ts.map +1 -0
  553. package/lib/typescript/components/HMSKeyboardAvoidingView.d.ts +8 -0
  554. package/lib/typescript/components/HMSKeyboardAvoidingView.d.ts.map +1 -0
  555. package/lib/typescript/components/HMSLiveIndicator.d.ts +3 -0
  556. package/lib/typescript/components/HMSLiveIndicator.d.ts.map +1 -0
  557. package/lib/typescript/components/HMSLocalScreenshareNotification.d.ts +5 -0
  558. package/lib/typescript/components/HMSLocalScreenshareNotification.d.ts.map +1 -0
  559. package/lib/typescript/components/HMSLocalVideoView.d.ts.map +1 -1
  560. package/lib/typescript/components/HMSManageAudioOutput.d.ts.map +1 -1
  561. package/lib/typescript/components/HMSManageLeave.d.ts.map +1 -1
  562. package/lib/typescript/components/HMSNotification.d.ts +15 -0
  563. package/lib/typescript/components/HMSNotification.d.ts.map +1 -0
  564. package/lib/typescript/components/HMSNotifications.d.ts +5 -0
  565. package/lib/typescript/components/HMSNotifications.d.ts.map +1 -0
  566. package/lib/typescript/components/HMSOverlayChatView.d.ts +3 -0
  567. package/lib/typescript/components/HMSOverlayChatView.d.ts.map +1 -0
  568. package/lib/typescript/components/HMSPreviewJoinButton.d.ts.map +1 -1
  569. package/lib/typescript/components/HMSPreviewNetworkQuality.d.ts.map +1 -1
  570. package/lib/typescript/components/HMSPreviewSubtitle.d.ts.map +1 -1
  571. package/lib/typescript/components/HMSPreviewTitle.d.ts.map +1 -1
  572. package/lib/typescript/components/HMSRecordingIndicator.d.ts.map +1 -1
  573. package/lib/typescript/components/HMSRoleChangeDeclinedNotification.d.ts +9 -0
  574. package/lib/typescript/components/HMSRoleChangeDeclinedNotification.d.ts.map +1 -0
  575. package/lib/typescript/components/HMSSendMessageInput.d.ts +9 -0
  576. package/lib/typescript/components/HMSSendMessageInput.d.ts.map +1 -0
  577. package/lib/typescript/components/HMSTextInput.d.ts +20 -6
  578. package/lib/typescript/components/HMSTextInput.d.ts.map +1 -1
  579. package/lib/typescript/components/HMSVideoView.d.ts +6 -0
  580. package/lib/typescript/components/HMSVideoView.d.ts.map +1 -0
  581. package/lib/typescript/components/Header.d.ts +3 -2
  582. package/lib/typescript/components/Header.d.ts.map +1 -1
  583. package/lib/typescript/components/LocalPeerScreenshareView.d.ts.map +1 -1
  584. package/lib/typescript/components/Meeting.d.ts.map +1 -1
  585. package/lib/typescript/components/MeetingScreenContent.d.ts.map +1 -1
  586. package/lib/typescript/components/MiniView.d.ts.map +1 -1
  587. package/lib/typescript/components/Modals.d.ts +1 -21
  588. package/lib/typescript/components/Modals.d.ts.map +1 -1
  589. package/lib/typescript/components/OverlayContainer.d.ts +9 -0
  590. package/lib/typescript/components/OverlayContainer.d.ts.map +1 -0
  591. package/lib/typescript/components/OverlayedViews.d.ts +4 -0
  592. package/lib/typescript/components/OverlayedViews.d.ts.map +1 -0
  593. package/lib/typescript/components/PaginationDots.d.ts +3 -0
  594. package/lib/typescript/components/PaginationDots.d.ts.map +1 -1
  595. package/lib/typescript/components/Participants/ParticipantsGroupHeader.d.ts +9 -0
  596. package/lib/typescript/components/Participants/ParticipantsGroupHeader.d.ts.map +1 -0
  597. package/lib/typescript/components/Participants/ParticipantsGroupOptions.d.ts +8 -0
  598. package/lib/typescript/components/Participants/ParticipantsGroupOptions.d.ts.map +1 -0
  599. package/lib/typescript/components/Participants/ParticipantsItem.d.ts +9 -0
  600. package/lib/typescript/components/Participants/ParticipantsItem.d.ts.map +1 -0
  601. package/lib/typescript/components/Participants/ParticipantsItemOption.d.ts +12 -0
  602. package/lib/typescript/components/Participants/ParticipantsItemOption.d.ts.map +1 -0
  603. package/lib/typescript/components/Participants/ParticipantsItemOptions.d.ts +10 -0
  604. package/lib/typescript/components/Participants/ParticipantsItemOptions.d.ts.map +1 -0
  605. package/lib/typescript/components/Participants/ParticipantsList.d.ts +4 -2
  606. package/lib/typescript/components/Participants/ParticipantsList.d.ts.map +1 -1
  607. package/lib/typescript/components/Participants/ParticipantsSeachInput.d.ts.map +1 -1
  608. package/lib/typescript/components/Participants/index.d.ts +0 -3
  609. package/lib/typescript/components/Participants/index.d.ts.map +1 -1
  610. package/lib/typescript/components/PeerSettingsModalContent.d.ts.map +1 -1
  611. package/lib/typescript/components/PeerVideoTile/AvatarView.d.ts +4 -0
  612. package/lib/typescript/components/PeerVideoTile/AvatarView.d.ts.map +1 -1
  613. package/lib/typescript/components/PeerVideoTile/HMSFullScreenButton.d.ts +7 -0
  614. package/lib/typescript/components/PeerVideoTile/HMSFullScreenButton.d.ts.map +1 -0
  615. package/lib/typescript/components/PeerVideoTile/HMSPinchGesture.d.ts +7 -0
  616. package/lib/typescript/components/PeerVideoTile/HMSPinchGesture.d.ts.map +1 -0
  617. package/lib/typescript/components/PeerVideoTile/PeerAudioIndicator.d.ts +8 -0
  618. package/lib/typescript/components/PeerVideoTile/PeerAudioIndicator.d.ts.map +1 -0
  619. package/lib/typescript/components/PeerVideoTile/PeerNameAndNetwork.d.ts.map +1 -1
  620. package/lib/typescript/components/PeerVideoTile/PeerVideoTileView.d.ts +2 -1
  621. package/lib/typescript/components/PeerVideoTile/PeerVideoTileView.d.ts.map +1 -1
  622. package/lib/typescript/components/PeerVideoTile/VideoView.d.ts +1 -0
  623. package/lib/typescript/components/PeerVideoTile/VideoView.d.ts.map +1 -1
  624. package/lib/typescript/components/PressableIcon.d.ts.map +1 -1
  625. package/lib/typescript/components/Preview.d.ts.map +1 -1
  626. package/lib/typescript/components/PreviewForRoleChangeModal.d.ts +3 -0
  627. package/lib/typescript/components/PreviewForRoleChangeModal.d.ts.map +1 -0
  628. package/lib/typescript/components/ReconnectionView.d.ts +4 -0
  629. package/lib/typescript/components/ReconnectionView.d.ts.map +1 -0
  630. package/lib/typescript/components/RoomSettingsModalContent.d.ts.map +1 -1
  631. package/lib/typescript/components/RoomSettingsModalDebugModeContent.d.ts.map +1 -1
  632. package/lib/typescript/components/StreamingQualityModalContent.d.ts.map +1 -1
  633. package/lib/typescript/components/TilesContainer.d.ts.map +1 -1
  634. package/lib/typescript/components/WebrtcView.d.ts.map +1 -1
  635. package/lib/typescript/components/WelcomeInMeeting.d.ts.map +1 -1
  636. package/lib/typescript/components/index.d.ts +0 -3
  637. package/lib/typescript/components/index.d.ts.map +1 -1
  638. package/lib/typescript/hooks-util-selectors.d.ts +7 -2
  639. package/lib/typescript/hooks-util-selectors.d.ts.map +1 -1
  640. package/lib/typescript/hooks-util.d.ts +53 -23
  641. package/lib/typescript/hooks-util.d.ts.map +1 -1
  642. package/lib/typescript/modules/HMSManager.d.ts +1 -1
  643. package/lib/typescript/modules/HMSManager.d.ts.map +1 -1
  644. package/lib/typescript/modules/parser.d.ts +1 -1
  645. package/lib/typescript/modules/parser.d.ts.map +1 -1
  646. package/lib/typescript/redux/actionTypes.d.ts +16 -1
  647. package/lib/typescript/redux/actionTypes.d.ts.map +1 -1
  648. package/lib/typescript/redux/actions/index.d.ts +92 -4
  649. package/lib/typescript/redux/actions/index.d.ts.map +1 -1
  650. package/lib/typescript/redux/index.d.ts +22 -2
  651. package/lib/typescript/redux/index.d.ts.map +1 -1
  652. package/lib/typescript/redux/reducers/appState.d.ts +10 -0
  653. package/lib/typescript/redux/reducers/appState.d.ts.map +1 -1
  654. package/lib/typescript/redux/reducers/chatWindow.d.ts +6 -6
  655. package/lib/typescript/redux/reducers/chatWindow.d.ts.map +1 -1
  656. package/lib/typescript/redux/reducers/hmsStates.d.ts +32 -4
  657. package/lib/typescript/redux/reducers/hmsStates.d.ts.map +1 -1
  658. package/lib/typescript/redux/reducers/index.d.ts +22 -2
  659. package/lib/typescript/redux/reducers/index.d.ts.map +1 -1
  660. package/lib/typescript/redux/reducers/userState.d.ts +1 -0
  661. package/lib/typescript/redux/reducers/userState.d.ts.map +1 -1
  662. package/lib/typescript/utils/functions.d.ts +3 -1
  663. package/lib/typescript/utils/functions.d.ts.map +1 -1
  664. package/lib/typescript/utils/theme.d.ts +1 -1
  665. package/lib/typescript/utils/theme.d.ts.map +1 -1
  666. package/lib/typescript/utils/types.d.ts +6 -2
  667. package/lib/typescript/utils/types.d.ts.map +1 -1
  668. package/lib/typescript/utils.d.ts +5 -0
  669. package/lib/typescript/utils.d.ts.map +1 -1
  670. package/package.json +13 -8
  671. package/src/HMSPrebuilt.tsx +10 -10
  672. package/src/HMSRoomSetup.tsx +50 -28
  673. package/src/Icons/AlertTriangle/assets/alert-triangle-filled.png +0 -0
  674. package/src/Icons/AlertTriangle/assets/alert-triangle-filled@2x.png +0 -0
  675. package/src/Icons/AlertTriangle/assets/alert-triangle-filled@3x.png +0 -0
  676. package/src/Icons/AlertTriangle/index.tsx +9 -2
  677. package/src/Icons/Eye/assets/eye-on-small.png +0 -0
  678. package/src/Icons/Eye/assets/eye-on-small@2x.png +0 -0
  679. package/src/Icons/Eye/assets/eye-on-small@3x.png +0 -0
  680. package/src/Icons/Eye/index.tsx +36 -0
  681. package/src/Icons/Person/assets/person-left.png +0 -0
  682. package/src/Icons/Person/assets/person-left@2x.png +0 -0
  683. package/src/Icons/Person/assets/person-left@3x.png +0 -0
  684. package/src/Icons/Person/assets/person-off.png +0 -0
  685. package/src/Icons/Person/assets/person-off@2x.png +0 -0
  686. package/src/Icons/Person/assets/person-off@3x.png +0 -0
  687. package/src/Icons/Person/assets/person-rectangle.png +0 -0
  688. package/src/Icons/Person/assets/person-rectangle@2x.png +0 -0
  689. package/src/Icons/Person/assets/person-rectangle@3x.png +0 -0
  690. package/src/Icons/Person/index.tsx +13 -2
  691. package/src/Icons/Search/assets/search.png +0 -0
  692. package/src/Icons/Search/assets/search@2x.png +0 -0
  693. package/src/Icons/Search/assets/search@3x.png +0 -0
  694. package/src/Icons/Search/index.tsx +33 -0
  695. package/src/Icons/index.ts +2 -0
  696. package/src/assets/audio-level-white.json +1271 -0
  697. package/src/assets/empty-chat-illustration/empty-chat.png +0 -0
  698. package/src/assets/empty-chat-illustration/empty-chat@2x.png +0 -0
  699. package/src/assets/empty-chat-illustration/empty-chat@3x.png +0 -0
  700. package/src/assets/welcome.png +0 -0
  701. package/src/components/AnimatedFooter.tsx +37 -0
  702. package/src/components/AnimatedHLSFooter.tsx +43 -0
  703. package/src/components/AnimatedHeader.tsx +53 -0
  704. package/src/components/BottomSheet.tsx +8 -4
  705. package/src/components/ChangeNameModalContent.tsx +2 -11
  706. package/src/components/Chat/ChatBanner.tsx +37 -52
  707. package/src/components/Chat/ChatFilterBottomSheetOpener.tsx +88 -0
  708. package/src/components/Chat/ChatFilterBottomSheetView.tsx +81 -0
  709. package/src/components/Chat/ChatFilterItem.tsx +71 -0
  710. package/src/components/Chat/ChatFilterView.tsx +250 -0
  711. package/src/components/Chat/ChatList.tsx +16 -12
  712. package/src/components/Chat/ChatMessage.tsx +48 -197
  713. package/src/components/Chat/PinnedMessage.tsx +45 -45
  714. package/src/components/ChatAndParticipants/ChatAndParticipantsBottomSheet.tsx +38 -0
  715. package/src/components/ChatAndParticipants/ChatAndParticipantsHeader.tsx +140 -0
  716. package/src/components/ChatAndParticipants/ChatAndParticipantsView.tsx +84 -0
  717. package/src/components/ChatAndParticipants/ChatView.tsx +42 -0
  718. package/src/components/ChatAndParticipants/ParticipantsView.tsx +41 -0
  719. package/src/components/ChatAndParticipants/index.ts +1 -0
  720. package/src/components/CompanyLogo.tsx +3 -2
  721. package/src/components/DefaultModal.tsx +4 -6
  722. package/src/components/DisplayView.tsx +10 -26
  723. package/src/components/EndRoomModalContent.tsx +32 -7
  724. package/src/components/Footer.tsx +93 -58
  725. package/src/components/FullScreenVideoView.tsx +77 -0
  726. package/src/components/GridView.tsx +186 -65
  727. package/src/components/HLSFooter.tsx +32 -0
  728. package/src/components/HLSView.tsx +5 -32
  729. package/src/components/HMSBaseButton.tsx +2 -2
  730. package/src/components/HMSChat.tsx +12 -25
  731. package/src/components/HMSHLSMessage.tsx +72 -0
  732. package/src/components/HMSHLSMessageList.tsx +60 -0
  733. package/src/components/HMSHLSNotStarted.tsx +8 -19
  734. package/src/components/HMSHandRaiseNotification.tsx +101 -0
  735. package/src/components/HMSKeyboardAvoidingView.tsx +58 -0
  736. package/src/components/HMSLiveIndicator.tsx +124 -0
  737. package/src/components/HMSLocalScreenshareNotification.tsx +41 -0
  738. package/src/components/HMSLocalVideoView.tsx +4 -31
  739. package/src/components/HMSManageAudioOutput.tsx +14 -2
  740. package/src/components/HMSManageLeave.tsx +46 -19
  741. package/src/components/HMSNotification.tsx +126 -0
  742. package/src/components/HMSNotifications.tsx +154 -0
  743. package/src/components/HMSOverlayChatView.tsx +36 -0
  744. package/src/components/HMSPreviewJoinButton.tsx +6 -3
  745. package/src/components/HMSPreviewNetworkQuality.tsx +3 -1
  746. package/src/components/HMSPreviewSubtitle.tsx +2 -6
  747. package/src/components/HMSPreviewTitle.tsx +2 -6
  748. package/src/components/HMSRecordingIndicator.tsx +13 -2
  749. package/src/components/HMSRoleChangeDeclinedNotification.tsx +25 -0
  750. package/src/components/HMSSendMessageInput.tsx +59 -0
  751. package/src/components/HMSTextInput.tsx +157 -23
  752. package/src/components/HMSVideoView.tsx +43 -0
  753. package/src/components/Header.tsx +25 -133
  754. package/src/components/LocalPeerScreenshareView.tsx +0 -6
  755. package/src/components/Meeting.tsx +15 -8
  756. package/src/components/MeetingScreenContent.tsx +28 -11
  757. package/src/components/MiniView.tsx +10 -4
  758. package/src/components/Modals.tsx +112 -370
  759. package/src/components/OverlayContainer.tsx +31 -0
  760. package/src/components/OverlayedViews.tsx +22 -0
  761. package/src/components/PaginationDots.tsx +9 -8
  762. package/src/components/Participants/ParticipantsGroupHeader.tsx +145 -0
  763. package/src/components/Participants/ParticipantsGroupOptions.tsx +87 -0
  764. package/src/components/Participants/ParticipantsItem.tsx +170 -0
  765. package/src/components/Participants/ParticipantsItemOption.tsx +52 -0
  766. package/src/components/Participants/ParticipantsItemOptions.tsx +262 -0
  767. package/src/components/Participants/ParticipantsList.tsx +68 -278
  768. package/src/components/Participants/ParticipantsSeachInput.tsx +37 -35
  769. package/src/components/Participants/index.ts +0 -3
  770. package/src/components/PeerMinimizedView.tsx +1 -1
  771. package/src/components/PeerSettingsModalContent.tsx +44 -191
  772. package/src/components/PeerVideoTile/AvatarView.tsx +43 -5
  773. package/src/components/PeerVideoTile/HMSFullScreenButton.tsx +56 -0
  774. package/src/components/PeerVideoTile/HMSPinchGesture.tsx +176 -0
  775. package/src/components/PeerVideoTile/PeerAudioIndicator.tsx +78 -0
  776. package/src/components/PeerVideoTile/PeerNameAndNetwork.tsx +15 -2
  777. package/src/components/PeerVideoTile/PeerVideoTileView.tsx +172 -115
  778. package/src/components/PeerVideoTile/VideoView.tsx +59 -9
  779. package/src/components/PressableIcon.tsx +26 -13
  780. package/src/components/Preview.tsx +17 -24
  781. package/src/components/PreviewForRoleChangeModal.tsx +448 -0
  782. package/src/components/ReconnectionView.tsx +73 -0
  783. package/src/components/RoomSettingsModalContent.tsx +32 -30
  784. package/src/components/RoomSettingsModalDebugModeContent.tsx +11 -65
  785. package/src/components/StreamingQualityModalContent.tsx +8 -8
  786. package/src/components/TilesContainer.tsx +54 -24
  787. package/src/components/WebrtcView.tsx +29 -19
  788. package/src/components/WelcomeInMeeting.tsx +5 -34
  789. package/src/components/index.ts +0 -3
  790. package/src/hooks-util-selectors.tsx +69 -6
  791. package/src/hooks-util.ts +852 -270
  792. package/src/modules/HMSManager.ts +3 -3
  793. package/src/modules/parser.ts +3 -4
  794. package/src/redux/actionTypes.ts +33 -0
  795. package/src/redux/actions/index.ts +96 -1
  796. package/src/redux/reducers/appState.ts +83 -1
  797. package/src/redux/reducers/chatWindow.ts +12 -5
  798. package/src/redux/reducers/hmsStates.ts +136 -4
  799. package/src/redux/reducers/userState.ts +1 -1
  800. package/src/utils/functions.ts +9 -0
  801. package/src/utils/theme.ts +3 -1
  802. package/src/utils/types.ts +6 -2
  803. package/src/utils.ts +6 -0
  804. package/lib/commonjs/assets/100ms-logo.png +0 -0
  805. package/lib/commonjs/assets/brb.png +0 -0
  806. package/lib/commonjs/assets/icon.png +0 -0
  807. package/lib/commonjs/assets/illustration.png +0 -0
  808. package/lib/commonjs/assets/network_0.png +0 -0
  809. package/lib/commonjs/assets/network_1.png +0 -0
  810. package/lib/commonjs/assets/network_2.png +0 -0
  811. package/lib/commonjs/assets/network_3.png +0 -0
  812. package/lib/commonjs/assets/network_4.png +0 -0
  813. package/lib/commonjs/assets/user_music.png +0 -0
  814. package/lib/commonjs/components/ChatWindow.js +0 -608
  815. package/lib/commonjs/components/ChatWindow.js.map +0 -1
  816. package/lib/commonjs/components/CustomInput.js +0 -89
  817. package/lib/commonjs/components/CustomInput.js.map +0 -1
  818. package/lib/commonjs/components/DisplayTrack.js +0 -70
  819. package/lib/commonjs/components/DisplayTrack.js.map +0 -1
  820. package/lib/commonjs/components/HMSShareScreen.js +0 -59
  821. package/lib/commonjs/components/HMSShareScreen.js.map +0 -1
  822. package/lib/commonjs/components/HMSShowNetworkQuality.js +0 -56
  823. package/lib/commonjs/components/HMSShowNetworkQuality.js.map +0 -1
  824. package/lib/commonjs/components/LiveButton.js +0 -70
  825. package/lib/commonjs/components/LiveButton.js.map +0 -1
  826. package/lib/commonjs/components/Participants/ParticipantsFilter.js +0 -128
  827. package/lib/commonjs/components/Participants/ParticipantsFilter.js.map +0 -1
  828. package/lib/commonjs/components/Participants/ParticipantsHeader.js +0 -67
  829. package/lib/commonjs/components/Participants/ParticipantsHeader.js.map +0 -1
  830. package/lib/commonjs/components/Participants/SearchableParticipantsView.js.map +0 -1
  831. package/lib/commonjs/components/ParticipantsModal.js.map +0 -1
  832. package/lib/commonjs/components/PeerVideoTile/PeerAudioMutedIndicator.js.map +0 -1
  833. package/lib/commonjs/components/Picker.js +0 -93
  834. package/lib/commonjs/components/Picker.js.map +0 -1
  835. package/lib/module/assets/100ms-logo.png +0 -0
  836. package/lib/module/assets/brb.png +0 -0
  837. package/lib/module/assets/icon.png +0 -0
  838. package/lib/module/assets/illustration.png +0 -0
  839. package/lib/module/assets/network_0.png +0 -0
  840. package/lib/module/assets/network_1.png +0 -0
  841. package/lib/module/assets/network_2.png +0 -0
  842. package/lib/module/assets/network_3.png +0 -0
  843. package/lib/module/assets/network_4.png +0 -0
  844. package/lib/module/assets/user_music.png +0 -0
  845. package/lib/module/components/ChatWindow.js +0 -595
  846. package/lib/module/components/ChatWindow.js.map +0 -1
  847. package/lib/module/components/CustomInput.js +0 -82
  848. package/lib/module/components/CustomInput.js.map +0 -1
  849. package/lib/module/components/DisplayTrack.js +0 -63
  850. package/lib/module/components/DisplayTrack.js.map +0 -1
  851. package/lib/module/components/HMSShareScreen.js +0 -50
  852. package/lib/module/components/HMSShareScreen.js.map +0 -1
  853. package/lib/module/components/HMSShowNetworkQuality.js +0 -47
  854. package/lib/module/components/HMSShowNetworkQuality.js.map +0 -1
  855. package/lib/module/components/LiveButton.js +0 -61
  856. package/lib/module/components/LiveButton.js.map +0 -1
  857. package/lib/module/components/Participants/ParticipantsFilter.js +0 -121
  858. package/lib/module/components/Participants/ParticipantsFilter.js.map +0 -1
  859. package/lib/module/components/Participants/ParticipantsHeader.js +0 -58
  860. package/lib/module/components/Participants/ParticipantsHeader.js.map +0 -1
  861. package/lib/module/components/Participants/SearchableParticipantsView.js +0 -18
  862. package/lib/module/components/Participants/SearchableParticipantsView.js.map +0 -1
  863. package/lib/module/components/ParticipantsModal.js +0 -34
  864. package/lib/module/components/ParticipantsModal.js.map +0 -1
  865. package/lib/module/components/PeerVideoTile/PeerAudioMutedIndicator.js +0 -35
  866. package/lib/module/components/PeerVideoTile/PeerAudioMutedIndicator.js.map +0 -1
  867. package/lib/module/components/Picker.js +0 -83
  868. package/lib/module/components/Picker.js.map +0 -1
  869. package/lib/typescript/components/ChatWindow.d.ts +0 -22
  870. package/lib/typescript/components/ChatWindow.d.ts.map +0 -1
  871. package/lib/typescript/components/CustomInput.d.ts +0 -24
  872. package/lib/typescript/components/CustomInput.d.ts.map +0 -1
  873. package/lib/typescript/components/DisplayTrack.d.ts +0 -9
  874. package/lib/typescript/components/DisplayTrack.d.ts.map +0 -1
  875. package/lib/typescript/components/HMSShareScreen.d.ts +0 -9
  876. package/lib/typescript/components/HMSShareScreen.d.ts.map +0 -1
  877. package/lib/typescript/components/HMSShowNetworkQuality.d.ts +0 -3
  878. package/lib/typescript/components/HMSShowNetworkQuality.d.ts.map +0 -1
  879. package/lib/typescript/components/LiveButton.d.ts +0 -17
  880. package/lib/typescript/components/LiveButton.d.ts.map +0 -1
  881. package/lib/typescript/components/Participants/ParticipantsFilter.d.ts +0 -6
  882. package/lib/typescript/components/Participants/ParticipantsFilter.d.ts.map +0 -1
  883. package/lib/typescript/components/Participants/ParticipantsHeader.d.ts +0 -9
  884. package/lib/typescript/components/Participants/ParticipantsHeader.d.ts.map +0 -1
  885. package/lib/typescript/components/Participants/SearchableParticipantsView.d.ts +0 -3
  886. package/lib/typescript/components/Participants/SearchableParticipantsView.d.ts.map +0 -1
  887. package/lib/typescript/components/ParticipantsModal.d.ts +0 -5
  888. package/lib/typescript/components/ParticipantsModal.d.ts.map +0 -1
  889. package/lib/typescript/components/PeerVideoTile/PeerAudioMutedIndicator.d.ts +0 -6
  890. package/lib/typescript/components/PeerVideoTile/PeerAudioMutedIndicator.d.ts.map +0 -1
  891. package/lib/typescript/components/Picker.d.ts +0 -9
  892. package/lib/typescript/components/Picker.d.ts.map +0 -1
  893. package/src/assets/100ms-logo.png +0 -0
  894. package/src/assets/brb.png +0 -0
  895. package/src/assets/icon.png +0 -0
  896. package/src/assets/illustration.png +0 -0
  897. package/src/assets/network_0.png +0 -0
  898. package/src/assets/network_1.png +0 -0
  899. package/src/assets/network_2.png +0 -0
  900. package/src/assets/network_3.png +0 -0
  901. package/src/assets/network_4.png +0 -0
  902. package/src/assets/user_music.png +0 -0
  903. package/src/components/ChatWindow.tsx +0 -706
  904. package/src/components/CustomInput.tsx +0 -138
  905. package/src/components/DisplayTrack.tsx +0 -92
  906. package/src/components/HMSShareScreen.tsx +0 -71
  907. package/src/components/HMSShowNetworkQuality.tsx +0 -68
  908. package/src/components/LiveButton.tsx +0 -77
  909. package/src/components/Participants/ParticipantsFilter.tsx +0 -144
  910. package/src/components/Participants/ParticipantsHeader.tsx +0 -64
  911. package/src/components/Participants/SearchableParticipantsView.tsx +0 -21
  912. package/src/components/ParticipantsModal.tsx +0 -46
  913. package/src/components/PeerVideoTile/PeerAudioMutedIndicator.tsx +0 -41
  914. package/src/components/Picker.tsx +0 -108
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.useShowLandscapeLayout = exports.useShowChat = exports.useShouldGoLive = exports.useSafeDimensions = exports.usePortraitChatViewVisible = exports.usePIPListener = exports.useModalType = exports.useLeaveMethods = exports.useLandscapeChatViewVisible = exports.useIsHLSViewer = exports.useHMSSessionStoreListeners = exports.useHMSSessionStore = exports.useHMSRoomTypography = exports.useHMSRoomTheme = exports.useHMSRoomStyleSheet = exports.useHMSRoomStyle = exports.useHMSRoomColorPalette = exports.useHMSRoleChangeRequest = exports.useHMSRemovedFromRoomUpdate = exports.useHMSPIPRoomLeave = exports.useHMSNetworkQualityUpdate = exports.useHMSMessages = exports.useHMSListeners = exports.useHMSLayoutConfig = exports.useHMSInstance = exports.useHMSConfig = exports.useHMSChangeTrackStateRequest = exports.useHMSActiveSpeakerUpdates = exports.useFilteredParticipants = exports.useFetchHMSRoles = exports.clearPendingModalTasks = exports.clearConfig = void 0;
6
+ exports.useShowLandscapeLayout = exports.useShowChatAndParticipants = exports.useShouldGoLive = exports.useSendMessage = exports.usePortraitChatViewVisible = exports.usePIPListener = exports.useModalType = exports.useLeaveMethods = exports.useLandscapeChatViewVisible = exports.useIsHLSViewer = exports.useHMSSessionStoreListeners = exports.useHMSSessionStore = exports.useHMSRoomTypography = exports.useHMSRoomTheme = exports.useHMSRoomStyleSheet = exports.useHMSRoomStyle = exports.useHMSRoomColorPalette = exports.useHMSRoleChangeRequest = exports.useHMSRemovedFromRoomUpdate = exports.useHMSReconnection = exports.useHMSPIPRoomLeave = exports.useHMSNetworkQualityUpdate = exports.useHMSMessages = exports.useHMSListeners = exports.useHMSLayoutConfig = exports.useHMSInstance = exports.useHMSConfig = exports.useHMSConferencingScreenConfig = exports.useHMSChatLayoutConfig = exports.useHMSChangeTrackStateRequest = exports.useHMSActiveSpeakerUpdates = exports.useFilteredParticipants = exports.useFetchHMSRoles = exports.isPublishingAllowed = exports.clearPendingModalTasks = exports.clearConfig = void 0;
7
7
  var _reactNativeHms = require("@100mslive/react-native-hms");
8
8
  var _reactNativeSimpleToast = _interopRequireDefault(require("react-native-simple-toast"));
9
9
  var _react = require("react");
@@ -16,10 +16,10 @@ var _types2 = require("./types");
16
16
  var _reactNative = require("react-native");
17
17
  var _native = require("@react-navigation/native");
18
18
  var _dimension = require("./utils/dimension");
19
- var _reactNativeSafeAreaContext = require("react-native-safe-area-context");
20
19
  var _hooksUtilSelectors = require("./hooks-util-selectors");
21
20
  var _HMSManager = require("./modules/HMSManager");
22
21
  var _theme = require("./utils/theme");
22
+ var _utils = require("./utils");
23
23
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
24
24
  const useHMSListeners = setPeerTrackNodes => {
25
25
  const hmsInstance = useHMSInstance();
@@ -34,56 +34,27 @@ const useHMSRoomUpdate = hmsInstance => {
34
34
  const reduxStore = (0, _reactRedux.useStore)();
35
35
  (0, _react.useEffect)(() => {
36
36
  const roomUpdateHandler = data => {
37
- var _room$localPeer$role;
38
37
  const {
39
38
  room,
40
39
  type
41
40
  } = data;
42
41
  dispatch((0, _actions.setHMSRoomState)(room));
43
-
44
- /**
45
- * Handle case when User is joining as HLSViewer,
46
- * before ON_JOIN, if ON_ROOM comes then we can show Meeting screen to user, instead of Loader or Preview
47
- */
48
- if (((_room$localPeer$role = room.localPeer.role) === null || _room$localPeer$role === void 0 || (_room$localPeer$role = _room$localPeer$role.name) === null || _room$localPeer$role === void 0 ? void 0 : _room$localPeer$role.includes('hls-')) ?? false) {
49
- const meetingState = reduxStore.getState().app.meetingState;
50
- (0, _reactRedux.batch)(() => {
51
- dispatch((0, _actions.setHMSLocalPeerState)(room.localPeer));
52
- if (meetingState !== _types2.MeetingState.IN_MEETING) {
53
- dispatch((0, _actions.changeMeetingState)(_types2.MeetingState.IN_MEETING));
54
- }
55
- });
56
- }
57
42
  if (type === _reactNativeHms.HMSRoomUpdate.BROWSER_RECORDING_STATE_UPDATED) {
58
- var _room$browserRecordin, _room$browserRecordin2;
59
43
  const startingOrStoppingRecording = reduxStore.getState().app.startingOrStoppingRecording;
60
44
  if (startingOrStoppingRecording) {
61
45
  dispatch((0, _actions.setStartingOrStoppingRecording)(false));
62
46
  }
63
- let streaming = room === null || room === void 0 || (_room$browserRecordin = room.browserRecordingState) === null || _room$browserRecordin === void 0 ? void 0 : _room$browserRecordin.running;
64
- const startAtDate = room === null || room === void 0 || (_room$browserRecordin2 = room.browserRecordingState) === null || _room$browserRecordin2 === void 0 ? void 0 : _room$browserRecordin2.startedAt;
65
- let startTime = null;
66
- if (startAtDate) {
67
- var _startAtDate$getMinut;
68
- let hours = startAtDate.getHours().toString();
69
- let minutes = (_startAtDate$getMinut = startAtDate.getMinutes()) === null || _startAtDate$getMinut === void 0 ? void 0 : _startAtDate$getMinut.toString();
70
- startTime = hours + ':' + minutes;
71
- }
72
- _reactNativeSimpleToast.default.showWithGravity(`Browser Recording ${streaming ? `Started ${startTime ? 'At ' + startTime : ''}` : 'Stopped'}`, _reactNativeSimpleToast.default.LONG, _reactNativeSimpleToast.default.TOP);
73
47
  } else if (type === _reactNativeHms.HMSRoomUpdate.HLS_STREAMING_STATE_UPDATED) {
74
- var _room$hlsStreamingSta;
75
48
  dispatch((0, _actions.changeStartingHLSStream)(false));
76
- let streaming = room === null || room === void 0 || (_room$hlsStreamingSta = room.hlsStreamingState) === null || _room$hlsStreamingSta === void 0 ? void 0 : _room$hlsStreamingSta.running;
77
- _reactNativeSimpleToast.default.showWithGravity(`HLS Streaming ${streaming ? 'Started' : 'Stopped'}`, _reactNativeSimpleToast.default.LONG, _reactNativeSimpleToast.default.TOP);
78
49
  } else if (type === _reactNativeHms.HMSRoomUpdate.RTMP_STREAMING_STATE_UPDATED) {
79
50
  var _room$rtmpHMSRtmpStre, _room$rtmpHMSRtmpStre2;
80
51
  let streaming = room === null || room === void 0 || (_room$rtmpHMSRtmpStre = room.rtmpHMSRtmpStreamingState) === null || _room$rtmpHMSRtmpStre === void 0 ? void 0 : _room$rtmpHMSRtmpStre.running;
81
52
  const startAtDate = room === null || room === void 0 || (_room$rtmpHMSRtmpStre2 = room.rtmpHMSRtmpStreamingState) === null || _room$rtmpHMSRtmpStre2 === void 0 ? void 0 : _room$rtmpHMSRtmpStre2.startedAt;
82
53
  let startTime = null;
83
54
  if (startAtDate) {
84
- var _startAtDate$getMinut2;
55
+ var _startAtDate$getMinut;
85
56
  let hours = startAtDate.getHours().toString();
86
- let minutes = (_startAtDate$getMinut2 = startAtDate.getMinutes()) === null || _startAtDate$getMinut2 === void 0 ? void 0 : _startAtDate$getMinut2.toString();
57
+ let minutes = (_startAtDate$getMinut = startAtDate.getMinutes()) === null || _startAtDate$getMinut === void 0 ? void 0 : _startAtDate$getMinut.toString();
87
58
  startTime = hours + ':' + minutes;
88
59
  }
89
60
  _reactNativeSimpleToast.default.showWithGravity(`RTMP Streaming ${streaming ? `Started ${startTime ? 'At ' + startTime : ''}` : 'Stopped'}`, _reactNativeSimpleToast.default.LONG, _reactNativeSimpleToast.default.TOP);
@@ -93,9 +64,9 @@ const useHMSRoomUpdate = hmsInstance => {
93
64
  const startAtDate = room === null || room === void 0 || (_room$serverRecording2 = room.serverRecordingState) === null || _room$serverRecording2 === void 0 ? void 0 : _room$serverRecording2.startedAt;
94
65
  let startTime = null;
95
66
  if (startAtDate) {
96
- var _startAtDate$getMinut3;
67
+ var _startAtDate$getMinut2;
97
68
  let hours = startAtDate.getHours().toString();
98
- let minutes = (_startAtDate$getMinut3 = startAtDate.getMinutes()) === null || _startAtDate$getMinut3 === void 0 ? void 0 : _startAtDate$getMinut3.toString();
69
+ let minutes = (_startAtDate$getMinut2 = startAtDate.getMinutes()) === null || _startAtDate$getMinut2 === void 0 ? void 0 : _startAtDate$getMinut2.toString();
99
70
  startTime = hours + ':' + minutes;
100
71
  }
101
72
  _reactNativeSimpleToast.default.showWithGravity(`Server Recording ${streaming ? `Started ${startTime ? 'At ' + startTime : ''}` : 'Stopped'}`, _reactNativeSimpleToast.default.LONG, _reactNativeSimpleToast.default.TOP);
@@ -132,37 +103,85 @@ const useHMSPeersUpdate = (hmsInstance, updateLocalPeer, setPeerTrackNodes) => {
132
103
 
133
104
  // Handle State for Meeting screen
134
105
  if (type === _reactNativeHms.HMSPeerUpdate.PEER_JOINED) {
106
+ dispatch((0, _actions.addParticipant)(peer));
135
107
  return;
136
108
  }
137
109
  if (type === _reactNativeHms.HMSPeerUpdate.PEER_LEFT) {
110
+ dispatch((0, _actions.removeParticipant)(peer));
111
+
112
+ // Handling regular tiles list
138
113
  setPeerTrackNodes(prevPeerTrackNodes => (0, _peerTrackNodeUtils.removePeerTrackNodes)(prevPeerTrackNodes, peer));
114
+ const reduxState = store.getState();
115
+
116
+ // Handling Screenshare tiles list
117
+ const screensharePeerTrackNodes = reduxState.app.screensharePeerTrackNodes;
118
+ const nodeToRemove = screensharePeerTrackNodes.find(node => node.peer.peerID === peer.peerID);
119
+ if (nodeToRemove) {
120
+ dispatch((0, _actions.removeScreenshareTile)(nodeToRemove.id));
121
+ }
122
+
123
+ // Handling Full screen view
124
+ const fullScreenPeerTrackNode = reduxState.app.fullScreenPeerTrackNode;
125
+ if (fullScreenPeerTrackNode !== null && fullScreenPeerTrackNode.peer.peerID === peer.peerID) {
126
+ dispatch((0, _actions.setFullScreenPeerTrackNode)(null));
127
+ }
139
128
  return;
140
129
  }
141
130
  if (peer.isLocal) {
142
- setPeerTrackNodes(prevPeerTrackNodes => {
143
- if ((0, _peerTrackNodeUtils.peerTrackNodeExistForPeer)(prevPeerTrackNodes, peer)) {
144
- return (0, _peerTrackNodeUtils.replacePeerTrackNodes)(prevPeerTrackNodes, peer);
145
- }
146
- return prevPeerTrackNodes;
147
- });
131
+ var _selectVideoTileLayou;
148
132
  const reduxState = store.getState();
133
+ const fullScreenPeerTrackNode = reduxState.app.fullScreenPeerTrackNode;
149
134
  const miniviewPeerTrackNode = reduxState.app.miniviewPeerTrackNode;
150
135
  const localPeerTrackNode = reduxState.app.localPeerTrackNode;
136
+
137
+ // Currently Applied Layout config
138
+ const currentLayoutConfig = (0, _hooksUtilSelectors.selectLayoutConfigForRole)(reduxState.hmsStates.layoutConfig, peer.role || null);
139
+
140
+ // Local Tile Inset layout is enabled
141
+ const enableLocalTileInset = (_selectVideoTileLayou = (0, _hooksUtilSelectors.selectVideoTileLayoutConfig)(currentLayoutConfig)) === null || _selectVideoTileLayou === void 0 || (_selectVideoTileLayou = _selectVideoTileLayou.grid) === null || _selectVideoTileLayou === void 0 ? void 0 : _selectVideoTileLayou.enable_local_tile_inset;
142
+
143
+ // Local Tile Inset layout is disabled
144
+ const localTileInsetDisbaled = !enableLocalTileInset;
145
+
146
+ // Local Tile Inset layout is disabled
147
+ // then update local peer track node available in list of peer track nodes
148
+ if (localTileInsetDisbaled) {
149
+ setPeerTrackNodes(prevPeerTrackNodes => {
150
+ if ((0, _peerTrackNodeUtils.peerTrackNodeExistForPeer)(prevPeerTrackNodes, peer)) {
151
+ return (0, _peerTrackNodeUtils.replacePeerTrackNodes)(prevPeerTrackNodes, peer);
152
+ }
153
+ return prevPeerTrackNodes;
154
+ });
155
+ }
151
156
  (0, _reactRedux.batch)(() => {
152
157
  if (localPeerTrackNode) {
153
158
  dispatch((0, _actions.updateLocalPeerTrackNode)({
154
159
  peer
155
160
  }));
156
- } else {
161
+ } else if (isPublishingAllowed(peer)) {
157
162
  dispatch((0, _actions.setLocalPeerTrackNode)((0, _functions.createPeerTrackNode)(peer, peer.videoTrack)));
158
163
  }
159
-
160
- // only set `localPeerTrackNode` as miniview peer track node when we are already using it.
161
- if (miniviewPeerTrackNode && miniviewPeerTrackNode.peer.peerID === peer.peerID) {
162
- dispatch((0, _actions.updateMiniViewPeerTrackNode)({
164
+ if (fullScreenPeerTrackNode && fullScreenPeerTrackNode.peer.peerID === peer.peerID) {
165
+ dispatch((0, _actions.updateFullScreenPeerTrackNode)({
163
166
  peer
164
167
  }));
165
168
  }
169
+
170
+ // If Local Tile Inset layout is enabled, then update or set it
171
+ if (enableLocalTileInset) {
172
+ var _peer$role;
173
+ if (miniviewPeerTrackNode !== null && miniviewPeerTrackNode.peer.peerID === peer.peerID) {
174
+ dispatch((0, _actions.updateMiniViewPeerTrackNode)({
175
+ peer
176
+ }));
177
+ } else if (miniviewPeerTrackNode === null && (_peer$role = peer.role) !== null && _peer$role !== void 0 && (_peer$role = _peer$role.publishSettings) !== null && _peer$role !== void 0 && _peer$role.allowed && peer.role.publishSettings.allowed.length > 0) {
178
+ dispatch((0, _actions.setMiniViewPeerTrackNode)((0, _functions.createPeerTrackNode)(peer, peer.videoTrack)));
179
+ }
180
+ }
181
+ // If Local Tile Inset layout is disabled, then remove it if it exists
182
+ else if (miniviewPeerTrackNode) {
183
+ dispatch((0, _actions.setMiniViewPeerTrackNode)(null));
184
+ }
166
185
  });
167
186
 
168
187
  // - TODO: update local localPeer state
@@ -171,8 +190,11 @@ const useHMSPeersUpdate = (hmsInstance, updateLocalPeer, setPeerTrackNodes) => {
171
190
  return;
172
191
  }
173
192
  if (type === _reactNativeHms.HMSPeerUpdate.ROLE_CHANGED) {
174
- var _peer$role, _peer$role2, _peer$role3;
175
- if (((_peer$role = peer.role) === null || _peer$role === void 0 || (_peer$role = _peer$role.publishSettings) === null || _peer$role === void 0 ? void 0 : _peer$role.allowed) === undefined || (_peer$role2 = peer.role) !== null && _peer$role2 !== void 0 && (_peer$role2 = _peer$role2.publishSettings) !== null && _peer$role2 !== void 0 && _peer$role2.allowed && ((_peer$role3 = peer.role) === null || _peer$role3 === void 0 || (_peer$role3 = _peer$role3.publishSettings) === null || _peer$role3 === void 0 ? void 0 : _peer$role3.allowed.length) < 1) {
193
+ var _peer$role2, _peer$role3, _peer$role4, _peer$role5, _peer$role6, _peer$role7, _peer$role8, _peer$role9, _peer$role10;
194
+ dispatch((0, _actions.addUpdateParticipant)(peer));
195
+
196
+ // Handling regular tiles list
197
+ if (((_peer$role2 = peer.role) === null || _peer$role2 === void 0 || (_peer$role2 = _peer$role2.publishSettings) === null || _peer$role2 === void 0 ? void 0 : _peer$role2.allowed) === undefined || (_peer$role3 = peer.role) !== null && _peer$role3 !== void 0 && (_peer$role3 = _peer$role3.publishSettings) !== null && _peer$role3 !== void 0 && _peer$role3.allowed && ((_peer$role4 = peer.role) === null || _peer$role4 === void 0 || (_peer$role4 = _peer$role4.publishSettings) === null || _peer$role4 === void 0 ? void 0 : _peer$role4.allowed.length) < 1) {
176
198
  setPeerTrackNodes(prevPeerTrackNodes => {
177
199
  if ((0, _peerTrackNodeUtils.peerTrackNodeExistForPeer)(prevPeerTrackNodes, peer)) {
178
200
  return (0, _peerTrackNodeUtils.removePeerTrackNodes)(prevPeerTrackNodes, peer);
@@ -180,15 +202,84 @@ const useHMSPeersUpdate = (hmsInstance, updateLocalPeer, setPeerTrackNodes) => {
180
202
  return prevPeerTrackNodes;
181
203
  });
182
204
  }
205
+ const reduxState = store.getState();
206
+
207
+ // Handling screenshare tiles list
208
+ if (((_peer$role5 = peer.role) === null || _peer$role5 === void 0 || (_peer$role5 = _peer$role5.publishSettings) === null || _peer$role5 === void 0 ? void 0 : _peer$role5.allowed) === undefined || (_peer$role6 = peer.role) !== null && _peer$role6 !== void 0 && (_peer$role6 = _peer$role6.publishSettings) !== null && _peer$role6 !== void 0 && _peer$role6.allowed && !((_peer$role7 = peer.role) !== null && _peer$role7 !== void 0 && (_peer$role7 = _peer$role7.publishSettings) !== null && _peer$role7 !== void 0 && _peer$role7.allowed.includes('screen'))) {
209
+ const screensharePeerTrackNodes = reduxState.app.screensharePeerTrackNodes;
210
+ const nodeToRemove = screensharePeerTrackNodes.find(node => node.peer.peerID === peer.peerID);
211
+ if (nodeToRemove) {
212
+ dispatch((0, _actions.removeScreenshareTile)(nodeToRemove.id));
213
+ }
214
+ }
215
+
216
+ // Handling full screen view
217
+ if (((_peer$role8 = peer.role) === null || _peer$role8 === void 0 || (_peer$role8 = _peer$role8.publishSettings) === null || _peer$role8 === void 0 ? void 0 : _peer$role8.allowed) === undefined || (_peer$role9 = peer.role) !== null && _peer$role9 !== void 0 && (_peer$role9 = _peer$role9.publishSettings) !== null && _peer$role9 !== void 0 && _peer$role9.allowed && !((_peer$role10 = peer.role) !== null && _peer$role10 !== void 0 && (_peer$role10 = _peer$role10.publishSettings) !== null && _peer$role10 !== void 0 && _peer$role10.allowed.includes('video'))) {
218
+ const fullScreenPeerTrackNode = reduxState.app.fullScreenPeerTrackNode;
219
+ if (fullScreenPeerTrackNode !== null && fullScreenPeerTrackNode.peer.peerID === peer.peerID) {
220
+ dispatch((0, _actions.setFullScreenPeerTrackNode)(null));
221
+ }
222
+ }
183
223
  return;
184
224
  }
185
225
  if (type === _reactNativeHms.HMSPeerUpdate.METADATA_CHANGED || type === _reactNativeHms.HMSPeerUpdate.NAME_CHANGED || type === _reactNativeHms.HMSPeerUpdate.NETWORK_QUALITY_UPDATED) {
226
+ dispatch((0, _actions.addUpdateParticipant)(peer));
227
+ const reduxState = store.getState();
228
+ if (type === _reactNativeHms.HMSPeerUpdate.METADATA_CHANGED) {
229
+ const handRaised = (0, _functions.parseMetadata)(peer.metadata).isHandRaised;
230
+ if (handRaised) {
231
+ var _selectedLayoutConfig, _peer$role11, _reduxState$hmsStates;
232
+ const {
233
+ layoutConfig,
234
+ localPeer
235
+ } = reduxState.hmsStates;
236
+ const selectedLayoutConfig = (0, _hooksUtilSelectors.selectLayoutConfigForRole)(layoutConfig, (localPeer === null || localPeer === void 0 ? void 0 : localPeer.role) || null);
237
+
238
+ // list of roles which should be brought on stage when they raise hand
239
+ const offStageRoles = selectedLayoutConfig === null || selectedLayoutConfig === void 0 || (_selectedLayoutConfig = selectedLayoutConfig.screens) === null || _selectedLayoutConfig === void 0 || (_selectedLayoutConfig = _selectedLayoutConfig.conferencing) === null || _selectedLayoutConfig === void 0 || (_selectedLayoutConfig = _selectedLayoutConfig.default) === null || _selectedLayoutConfig === void 0 || (_selectedLayoutConfig = _selectedLayoutConfig.elements) === null || _selectedLayoutConfig === void 0 || (_selectedLayoutConfig = _selectedLayoutConfig.on_stage_exp) === null || _selectedLayoutConfig === void 0 ? void 0 : _selectedLayoutConfig.off_stage_roles;
240
+
241
+ // checking if the current peer role is included in the above list
242
+ const shouldBringOnStage = offStageRoles && offStageRoles.includes((_peer$role11 = peer.role) === null || _peer$role11 === void 0 ? void 0 : _peer$role11.name);
243
+ const canChangeRole = (_reduxState$hmsStates = reduxState.hmsStates.localPeer) === null || _reduxState$hmsStates === void 0 || (_reduxState$hmsStates = _reduxState$hmsStates.role) === null || _reduxState$hmsStates === void 0 || (_reduxState$hmsStates = _reduxState$hmsStates.permissions) === null || _reduxState$hmsStates === void 0 ? void 0 : _reduxState$hmsStates.changeRole;
244
+ if (shouldBringOnStage && canChangeRole) {
245
+ dispatch((0, _actions.addNotification)({
246
+ id: `${peer.peerID}-${_utils.NotificationTypes.HAND_RAISE}`,
247
+ type: _utils.NotificationTypes.HAND_RAISE,
248
+ peer
249
+ }));
250
+ }
251
+ } else {
252
+ const notifications = reduxState.app.notifications;
253
+ const notificationToRemove = notifications.find(notification => notification.id === `${peer.peerID}-${_utils.NotificationTypes.HAND_RAISE}`);
254
+ if (notificationToRemove) {
255
+ dispatch((0, _actions.removeNotification)(notificationToRemove.id));
256
+ }
257
+ }
258
+ }
186
259
  setPeerTrackNodes(prevPeerTrackNodes => {
187
260
  if ((0, _peerTrackNodeUtils.peerTrackNodeExistForPeer)(prevPeerTrackNodes, peer)) {
188
261
  return (0, _peerTrackNodeUtils.replacePeerTrackNodes)(prevPeerTrackNodes, peer);
189
262
  }
190
263
  return prevPeerTrackNodes;
191
264
  });
265
+
266
+ // Handling screenshare tile views
267
+ const screensharePeerTrackNodes = reduxState.app.screensharePeerTrackNodes;
268
+ const nodeToUpdate = screensharePeerTrackNodes.find(node => node.peer.peerID === peer.peerID);
269
+ if (nodeToUpdate) {
270
+ dispatch((0, _actions.updateScreenshareTile)({
271
+ id: nodeToUpdate.id,
272
+ peer
273
+ }));
274
+ }
275
+
276
+ // Handling fullscreen view
277
+ const fullScreenPeerTrackNode = reduxState.app.fullScreenPeerTrackNode;
278
+ if (fullScreenPeerTrackNode !== null && fullScreenPeerTrackNode.peer.peerID === peer.peerID) {
279
+ dispatch((0, _actions.updateFullScreenPeerTrackNode)({
280
+ peer
281
+ }));
282
+ }
192
283
  return;
193
284
  }
194
285
  };
@@ -198,41 +289,60 @@ const useHMSPeersUpdate = (hmsInstance, updateLocalPeer, setPeerTrackNodes) => {
198
289
  };
199
290
  }, [hmsInstance]);
200
291
  };
292
+ const isPublishingAllowed = peer => {
293
+ var _peer$role12, _peer$role13;
294
+ return (((_peer$role12 = peer.role) === null || _peer$role12 === void 0 || (_peer$role12 = _peer$role12.publishSettings) === null || _peer$role12 === void 0 ? void 0 : _peer$role12.allowed) && ((_peer$role13 = peer.role) === null || _peer$role13 === void 0 || (_peer$role13 = _peer$role13.publishSettings) === null || _peer$role13 === void 0 || (_peer$role13 = _peer$role13.allowed) === null || _peer$role13 === void 0 ? void 0 : _peer$role13.length) > 0) ?? false;
295
+ };
296
+ exports.isPublishingAllowed = isPublishingAllowed;
201
297
  const useHMSTrackUpdate = (hmsInstance, updateLocalPeer, setPeerTrackNodes) => {
202
298
  const dispatch = (0, _reactRedux.useDispatch)();
203
299
  const store = (0, _reactRedux.useStore)();
204
300
  (0, _react.useEffect)(() => {
205
301
  const trackUpdateHandler = _ref2 => {
302
+ var _reduxState$hmsStates2, _selectVideoTileLayou2;
206
303
  let {
207
304
  peer,
208
305
  track,
209
306
  type
210
307
  } = _ref2;
211
308
  const reduxState = store.getState();
309
+ const fullScreenPeerTrackNode = reduxState.app.fullScreenPeerTrackNode;
212
310
  const miniviewPeerTrackNode = reduxState.app.miniviewPeerTrackNode;
213
311
  const localPeerTrackNode = reduxState.app.localPeerTrackNode;
312
+ const currentLayoutConfig = (0, _hooksUtilSelectors.selectLayoutConfigForRole)(reduxState.hmsStates.layoutConfig, ((_reduxState$hmsStates2 = reduxState.hmsStates.localPeer) === null || _reduxState$hmsStates2 === void 0 ? void 0 : _reduxState$hmsStates2.role) ?? null);
313
+ const localTileInsetEnabled = (_selectVideoTileLayou2 = (0, _hooksUtilSelectors.selectVideoTileLayoutConfig)(currentLayoutConfig)) === null || _selectVideoTileLayou2 === void 0 || (_selectVideoTileLayou2 = _selectVideoTileLayou2.grid) === null || _selectVideoTileLayou2 === void 0 ? void 0 : _selectVideoTileLayou2.enable_local_tile_inset;
214
314
  if (type === _reactNativeHms.HMSTrackUpdate.TRACK_ADDED) {
215
315
  const newPeerTrackNode = (0, _functions.createPeerTrackNode)(peer, track);
216
- const willCreateMiniviewPeerTrackNode = !miniviewPeerTrackNode && peer.isLocal && track.source === _reactNativeHms.HMSTrackSource.REGULAR;
217
- setPeerTrackNodes(prevPeerTrackNodes => {
218
- if ((0, _peerTrackNodeUtils.peerTrackNodeExistForPeerAndTrack)(prevPeerTrackNodes, peer, track)) {
219
- if (track.type === _reactNativeHms.HMSTrackType.VIDEO) {
220
- return (0, _peerTrackNodeUtils.replacePeerTrackNodesWithTrack)(prevPeerTrackNodes, peer, track);
221
- }
222
- return (0, _peerTrackNodeUtils.replacePeerTrackNodes)(prevPeerTrackNodes, peer);
316
+ if (track.source === _reactNativeHms.HMSTrackSource.SCREEN) {
317
+ if (!peer.isLocal && track.type === _reactNativeHms.HMSTrackType.VIDEO) {
318
+ dispatch((0, _actions.addScreenshareTile)(newPeerTrackNode));
223
319
  }
224
- if (miniviewPeerTrackNode ? newPeerTrackNode.id !== miniviewPeerTrackNode.id : !willCreateMiniviewPeerTrackNode) {
225
- return [...prevPeerTrackNodes, newPeerTrackNode];
226
- }
227
- return prevPeerTrackNodes;
228
- });
320
+ } else {
321
+ setPeerTrackNodes(prevPeerTrackNodes => {
322
+ if ((0, _peerTrackNodeUtils.peerTrackNodeExistForPeerAndTrack)(prevPeerTrackNodes, peer, track)) {
323
+ if (track.type === _reactNativeHms.HMSTrackType.VIDEO) {
324
+ return (0, _peerTrackNodeUtils.replacePeerTrackNodesWithTrack)(prevPeerTrackNodes, peer, track);
325
+ }
326
+ return (0, _peerTrackNodeUtils.replacePeerTrackNodes)(prevPeerTrackNodes, peer);
327
+ }
328
+ if (peer.isLocal && !localTileInsetEnabled) {
329
+ return [newPeerTrackNode, ...prevPeerTrackNodes];
330
+ }
331
+ if (!peer.isLocal && (miniviewPeerTrackNode ? newPeerTrackNode.id !== miniviewPeerTrackNode.id : true)) {
332
+ return [...prevPeerTrackNodes, newPeerTrackNode];
333
+ }
334
+ return prevPeerTrackNodes;
335
+ });
336
+ }
229
337
 
230
338
  // - TODO: update local localPeer state
231
339
  // - Pass this updated data to Meeting component -> DisplayView component
232
340
  if (peer.isLocal) {
233
341
  if (track.source === _reactNativeHms.HMSTrackSource.REGULAR) {
234
342
  if (!localPeerTrackNode) {
235
- dispatch((0, _actions.setLocalPeerTrackNode)(newPeerTrackNode));
343
+ if (isPublishingAllowed(newPeerTrackNode.peer)) {
344
+ dispatch((0, _actions.setLocalPeerTrackNode)(newPeerTrackNode));
345
+ }
236
346
  } else {
237
347
  dispatch((0, _actions.updateLocalPeerTrackNode)(track.type === _reactNativeHms.HMSTrackType.VIDEO ? {
238
348
  peer,
@@ -241,20 +351,27 @@ const useHMSTrackUpdate = (hmsInstance, updateLocalPeer, setPeerTrackNodes) => {
241
351
  peer
242
352
  }));
243
353
  }
244
-
245
- // only setting `miniviewPeerTrackNode`, when:
246
- // - there is no `miniviewPeerTrackNode`
247
- // - if there is, then it is of regular track
248
- if (!miniviewPeerTrackNode) {
249
- dispatch((0, _actions.setMiniViewPeerTrackNode)(newPeerTrackNode));
250
- } else if (miniviewPeerTrackNode.id === newPeerTrackNode.id) {
251
- dispatch((0, _actions.updateMiniViewPeerTrackNode)(track.type === _reactNativeHms.HMSTrackType.VIDEO ? {
252
- peer,
253
- track
254
- } : {
255
- peer
256
- }));
354
+ if (localTileInsetEnabled) {
355
+ // only setting `miniviewPeerTrackNode`, when:
356
+ // - there is no `miniviewPeerTrackNode`
357
+ // - if there is, then it is of regular track
358
+ if (!miniviewPeerTrackNode) {
359
+ dispatch((0, _actions.setMiniViewPeerTrackNode)(newPeerTrackNode));
360
+ } else if (miniviewPeerTrackNode.id === newPeerTrackNode.id) {
361
+ dispatch((0, _actions.updateMiniViewPeerTrackNode)(track.type === _reactNativeHms.HMSTrackType.VIDEO ? {
362
+ peer,
363
+ track
364
+ } : {
365
+ peer
366
+ }));
367
+ }
257
368
  }
369
+
370
+ // if (track.type === HMSTrackType.AUDIO) {
371
+ // dispatch(setIsLocalAudioMutedState(track.isMute()));
372
+ // } else if (track.type === HMSTrackType.VIDEO) {
373
+ // dispatch(setIsLocalVideoMutedState(track.isMute()));
374
+ // }
258
375
  }
259
376
  // else -> {
260
377
  // should `localPeerTrackNode` be created/updated for non-regular track addition?
@@ -279,9 +396,23 @@ const useHMSTrackUpdate = (hmsInstance, updateLocalPeer, setPeerTrackNodes) => {
279
396
  }
280
397
  if (type === _reactNativeHms.HMSTrackUpdate.TRACK_REMOVED) {
281
398
  var _peer$audioTrack, _peer$videoTrack;
282
- if (track.source !== _reactNativeHms.HMSTrackSource.REGULAR || ((_peer$audioTrack = peer.audioTrack) === null || _peer$audioTrack === void 0 ? void 0 : _peer$audioTrack.trackId) === undefined && ((_peer$videoTrack = peer.videoTrack) === null || _peer$videoTrack === void 0 ? void 0 : _peer$videoTrack.trackId) === undefined) {
399
+ if (track.source === _reactNativeHms.HMSTrackSource.SCREEN) {
400
+ if (!peer.isLocal && track.type === _reactNativeHms.HMSTrackType.VIDEO) {
401
+ const screensharePeerTrackNodes = reduxState.app.screensharePeerTrackNodes;
402
+ const nodeToRemove = screensharePeerTrackNodes.find(node => {
403
+ var _node$track;
404
+ return ((_node$track = node.track) === null || _node$track === void 0 ? void 0 : _node$track.trackId) === track.trackId;
405
+ });
406
+ if (nodeToRemove) {
407
+ dispatch((0, _actions.removeScreenshareTile)(nodeToRemove.id));
408
+ }
409
+ }
410
+ } else if (track.source === _reactNativeHms.HMSTrackSource.PLUGIN || ((_peer$audioTrack = peer.audioTrack) === null || _peer$audioTrack === void 0 ? void 0 : _peer$audioTrack.trackId) === undefined && ((_peer$videoTrack = peer.videoTrack) === null || _peer$videoTrack === void 0 ? void 0 : _peer$videoTrack.trackId) === undefined) {
283
411
  setPeerTrackNodes(prevPeerTrackNodes => (0, _peerTrackNodeUtils.removePeerTrackNodesWithTrack)(prevPeerTrackNodes, peer, track));
284
412
  }
413
+ if (fullScreenPeerTrackNode && fullScreenPeerTrackNode.track && fullScreenPeerTrackNode.track.trackId === track.trackId) {
414
+ dispatch((0, _actions.setFullScreenPeerTrackNode)(null));
415
+ }
285
416
 
286
417
  // - TODO: update local localPeer state
287
418
  // - Pass this updated data to Meeting component -> DisplayView component
@@ -359,46 +490,63 @@ const useHMSTrackUpdate = (hmsInstance, updateLocalPeer, setPeerTrackNodes) => {
359
490
 
360
491
  // - TODO: update local localPeer state
361
492
  // - Pass this updated data to Meeting component -> DisplayView component
493
+ const updatePayload = track.type === _reactNativeHms.HMSTrackType.VIDEO ? {
494
+ peer,
495
+ track
496
+ } : {
497
+ peer
498
+ };
362
499
  if (peer.isLocal) {
363
- const updatePayload = track.type === _reactNativeHms.HMSTrackType.VIDEO ? {
364
- peer,
365
- track
366
- } : {
367
- peer
368
- };
369
500
  dispatch((0, _actions.updateLocalPeerTrackNode)(updatePayload));
370
-
371
- // Take care of miniviewPeerTrackNode
372
- if (miniviewPeerTrackNode && miniviewPeerTrackNode.id === uniqueId) {
373
- dispatch((0, _actions.updateMiniViewPeerTrackNode)(updatePayload));
374
- }
375
501
  updateLocalPeer();
376
- } else {
377
- if (miniviewPeerTrackNode && miniviewPeerTrackNode.id === uniqueId) {
378
- const updatePayload = track.type === _reactNativeHms.HMSTrackType.VIDEO ? {
379
- peer,
380
- track
381
- } : {
382
- peer
383
- };
384
- dispatch((0, _actions.updateMiniViewPeerTrackNode)(updatePayload));
385
- }
502
+ }
503
+ if (miniviewPeerTrackNode && miniviewPeerTrackNode.id === uniqueId) {
504
+ dispatch((0, _actions.updateMiniViewPeerTrackNode)(updatePayload));
505
+ }
506
+ if (fullScreenPeerTrackNode && fullScreenPeerTrackNode.id === uniqueId) {
507
+ dispatch((0, _actions.updateFullScreenPeerTrackNode)(updatePayload));
386
508
  }
387
509
  return;
388
510
  }
389
511
  if (type === _reactNativeHms.HMSTrackUpdate.TRACK_RESTORED || type === _reactNativeHms.HMSTrackUpdate.TRACK_DEGRADED) {
390
- setPeerTrackNodes(prevPeerTrackNodes => {
391
- if ((0, _peerTrackNodeUtils.peerTrackNodeExistForPeerAndTrack)(prevPeerTrackNodes, peer, track)) {
392
- return (0, _peerTrackNodeUtils.degradeOrRestorePeerTrackNodes)(prevPeerTrackNodes, peer, track, type === _reactNativeHms.HMSTrackUpdate.TRACK_DEGRADED);
512
+ // Checking if track source is screenshare
513
+ if (track.source === _reactNativeHms.HMSTrackSource.SCREEN) {
514
+ // Handling screenshare tiles list
515
+ const screensharePeerTrackNodes = reduxState.app.screensharePeerTrackNodes;
516
+ const nodeToUpdate = screensharePeerTrackNodes.find(node => {
517
+ var _node$track2;
518
+ return ((_node$track2 = node.track) === null || _node$track2 === void 0 ? void 0 : _node$track2.trackId) === track.trackId;
519
+ });
520
+ if (nodeToUpdate) {
521
+ dispatch((0, _actions.updateScreenshareTile)({
522
+ id: nodeToUpdate.id,
523
+ isDegraded: type === _reactNativeHms.HMSTrackUpdate.TRACK_DEGRADED
524
+ }));
393
525
  }
394
- return prevPeerTrackNodes;
395
- });
526
+ } else {
527
+ // Handling regular tiles list
528
+ setPeerTrackNodes(prevPeerTrackNodes => {
529
+ if ((0, _peerTrackNodeUtils.peerTrackNodeExistForPeerAndTrack)(prevPeerTrackNodes, peer, track)) {
530
+ return (0, _peerTrackNodeUtils.degradeOrRestorePeerTrackNodes)(prevPeerTrackNodes, peer, track, type === _reactNativeHms.HMSTrackUpdate.TRACK_DEGRADED);
531
+ }
532
+ return prevPeerTrackNodes;
533
+ });
534
+ }
396
535
  const uniqueId = (0, _peerTrackNodeUtils.createPeerTrackNodeUniqueId)(peer, track);
536
+
537
+ // Handling miniview
397
538
  if (miniviewPeerTrackNode && miniviewPeerTrackNode.id === uniqueId) {
398
539
  dispatch((0, _actions.updateMiniViewPeerTrackNode)({
399
540
  isDegraded: type === _reactNativeHms.HMSTrackUpdate.TRACK_DEGRADED
400
541
  }));
401
542
  }
543
+
544
+ // Handling full screen view
545
+ if (fullScreenPeerTrackNode && fullScreenPeerTrackNode.id === uniqueId) {
546
+ dispatch((0, _actions.updateFullScreenPeerTrackNode)({
547
+ isDegraded: type === _reactNativeHms.HMSTrackUpdate.TRACK_DEGRADED
548
+ }));
549
+ }
402
550
  return;
403
551
  }
404
552
  };
@@ -436,7 +584,14 @@ const useHMSInstance = () => {
436
584
  };
437
585
  exports.useHMSInstance = useHMSInstance;
438
586
  const useIsHLSViewer = () => {
439
- return (0, _reactRedux.useSelector)(state => (0, _hooksUtilSelectors.selectIsHLSViewer)(state.hmsStates.localPeer));
587
+ return (0, _reactRedux.useSelector)(state => {
588
+ const {
589
+ layoutConfig,
590
+ localPeer
591
+ } = state.hmsStates;
592
+ const selectedLayoutConfig = (0, _hooksUtilSelectors.selectLayoutConfigForRole)(layoutConfig, (localPeer === null || localPeer === void 0 ? void 0 : localPeer.role) || null);
593
+ return (0, _hooksUtilSelectors.selectIsHLSViewer)(localPeer === null || localPeer === void 0 ? void 0 : localPeer.role, selectedLayoutConfig);
594
+ });
440
595
  };
441
596
  exports.useIsHLSViewer = useIsHLSViewer;
442
597
  const useHMSChangeTrackStateRequest = (callback, deps) => {
@@ -450,7 +605,7 @@ const useHMSChangeTrackStateRequest = (callback, deps) => {
450
605
  requestedBy: request === null || request === void 0 || (_request$requestedBy = request.requestedBy) === null || _request$requestedBy === void 0 ? void 0 : _request$requestedBy.name,
451
606
  suggestedRole: request === null || request === void 0 ? void 0 : request.trackType
452
607
  });
453
- callback === null || callback === void 0 ? void 0 : callback(request);
608
+ callback === null || callback === void 0 || callback(request);
454
609
  } else {
455
610
  var _request$requestedBy2;
456
611
  _reactNativeSimpleToast.default.showWithGravity(`Track Muted: ${request === null || request === void 0 || (_request$requestedBy2 = request.requestedBy) === null || _request$requestedBy2 === void 0 ? void 0 : _request$requestedBy2.name} Muted Your ${request === null || request === void 0 ? void 0 : request.trackType}`, _reactNativeSimpleToast.default.LONG, _reactNativeSimpleToast.default.TOP);
@@ -465,23 +620,23 @@ const useHMSChangeTrackStateRequest = (callback, deps) => {
465
620
  };
466
621
  exports.useHMSChangeTrackStateRequest = useHMSChangeTrackStateRequest;
467
622
  const useHMSRoleChangeRequest = (callback, deps) => {
623
+ const taskRef = (0, _react.useRef)(null);
624
+ const dispatch = (0, _reactRedux.useDispatch)();
468
625
  const hmsInstance = useHMSInstance();
469
- const [roleChangeRequest, setRoleChangeRequest] = (0, _react.useState)(null);
470
626
  (0, _react.useEffect)(() => {
471
- const changeRoleRequestHandler = request => {
472
- var _request$requestedBy3, _request$suggestedRol;
473
- setRoleChangeRequest({
474
- requestedBy: request === null || request === void 0 || (_request$requestedBy3 = request.requestedBy) === null || _request$requestedBy3 === void 0 ? void 0 : _request$requestedBy3.name,
475
- suggestedRole: request === null || request === void 0 || (_request$suggestedRol = request.suggestedRole) === null || _request$suggestedRol === void 0 ? void 0 : _request$suggestedRol.name
627
+ const changeRoleRequestHandler = async request => {
628
+ taskRef.current = _reactNative.InteractionManager.runAfterInteractions(() => {
629
+ dispatch((0, _actions.setRoleChangeRequest)(request));
630
+ callback === null || callback === void 0 || callback(request);
476
631
  });
477
- callback === null || callback === void 0 ? void 0 : callback(request);
478
632
  };
479
633
  hmsInstance.addEventListener(_reactNativeHms.HMSUpdateListenerActions.ON_ROLE_CHANGE_REQUEST, changeRoleRequestHandler);
480
634
  return () => {
635
+ var _taskRef$current;
636
+ (_taskRef$current = taskRef.current) === null || _taskRef$current === void 0 || _taskRef$current.cancel();
481
637
  hmsInstance.removeEventListener(_reactNativeHms.HMSUpdateListenerActions.ON_ROLE_CHANGE_REQUEST);
482
638
  };
483
639
  }, [...(deps || []), hmsInstance]);
484
- return roleChangeRequest;
485
640
  };
486
641
  exports.useHMSRoleChangeRequest = useHMSRoleChangeRequest;
487
642
  const useHMSSessionStoreListeners = gridViewRef => {
@@ -502,7 +657,7 @@ const useHMSSessionStoreListeners = gridViewRef => {
502
657
  spotlightTrackId: id
503
658
  }));
504
659
  // Scroll to start of the list
505
- (_gridViewRef$current = gridViewRef.current) === null || _gridViewRef$current === void 0 || (_gridViewRef$current = _gridViewRef$current.getFlatlistRef().current) === null || _gridViewRef$current === void 0 ? void 0 : _gridViewRef$current.scrollToOffset({
660
+ (_gridViewRef$current = gridViewRef.current) === null || _gridViewRef$current === void 0 || (_gridViewRef$current = _gridViewRef$current.getRegularTilesFlatlistRef().current) === null || _gridViewRef$current === void 0 || _gridViewRef$current.scrollToOffset({
506
661
  animated: true,
507
662
  offset: 0
508
663
  });
@@ -623,23 +778,67 @@ exports.useHMSSessionStore = useHMSSessionStore;
623
778
  const useHMSMessages = () => {
624
779
  const hmsInstance = useHMSInstance();
625
780
  const dispatch = (0, _reactRedux.useDispatch)();
781
+ const canChangeRole = (0, _reactRedux.useSelector)(state => {
782
+ var _state$hmsStates$loca;
783
+ return (_state$hmsStates$loca = state.hmsStates.localPeer) === null || _state$hmsStates$loca === void 0 || (_state$hmsStates$loca = _state$hmsStates$loca.role) === null || _state$hmsStates$loca === void 0 || (_state$hmsStates$loca = _state$hmsStates$loca.permissions) === null || _state$hmsStates$loca === void 0 ? void 0 : _state$hmsStates$loca.changeRole;
784
+ });
785
+ const canShowChat = useHMSConferencingScreenConfig(conferencingScreenConfig => {
786
+ var _conferencingScreenCo;
787
+ return !!(conferencingScreenConfig !== null && conferencingScreenConfig !== void 0 && (_conferencingScreenCo = conferencingScreenConfig.elements) !== null && _conferencingScreenCo !== void 0 && _conferencingScreenCo.chat);
788
+ });
626
789
  (0, _react.useEffect)(() => {
627
790
  const onMessageListener = message => {
628
- dispatch((0, _actions.addMessage)(message));
791
+ if (message.type === _utils.NotificationTypes.ROLE_CHANGE_DECLINED) {
792
+ if (canChangeRole) {
793
+ var _message$sender;
794
+ dispatch((0, _actions.addNotification)({
795
+ id: `${(_message$sender = message.sender) === null || _message$sender === void 0 ? void 0 : _message$sender.peerID}-${_utils.NotificationTypes.ROLE_CHANGE_DECLINED}`,
796
+ type: _utils.NotificationTypes.ROLE_CHANGE_DECLINED,
797
+ peer: message.sender
798
+ }));
799
+ }
800
+ } else if (message.type === 'EMOJI_REACTION') {
801
+ console.log('Ignoring Emoji Reaction Message: ', message);
802
+ } else if (canShowChat) {
803
+ dispatch((0, _actions.addMessage)(message));
804
+ }
629
805
  };
630
806
  hmsInstance.addEventListener(_reactNativeHms.HMSUpdateListenerActions.ON_MESSAGE, onMessageListener);
631
807
  return () => {
632
808
  // TODO: Remove this listener when user leaves, removed or room is ended
633
809
  hmsInstance.removeEventListener(_reactNativeHms.HMSUpdateListenerActions.ON_MESSAGE);
634
810
  };
635
- }, [hmsInstance]);
811
+ }, [canChangeRole, canShowChat, hmsInstance]);
636
812
  };
637
813
  exports.useHMSMessages = useHMSMessages;
814
+ const useHMSReconnection = () => {
815
+ const dispatch = (0, _reactRedux.useDispatch)();
816
+ const hmsInstance = useHMSInstance();
817
+ (0, _react.useEffect)(() => {
818
+ let mounted = true;
819
+ hmsInstance.addEventListener(_reactNativeHms.HMSUpdateListenerActions.RECONNECTING, () => {
820
+ if (mounted) {
821
+ dispatch((0, _actions.setReconnecting)(true));
822
+ }
823
+ });
824
+ hmsInstance.addEventListener(_reactNativeHms.HMSUpdateListenerActions.RECONNECTED, () => {
825
+ if (mounted) {
826
+ dispatch((0, _actions.setReconnecting)(false));
827
+ }
828
+ });
829
+ return () => {
830
+ mounted = false;
831
+ hmsInstance.removeEventListener(_reactNativeHms.HMSUpdateListenerActions.RECONNECTING);
832
+ hmsInstance.removeEventListener(_reactNativeHms.HMSUpdateListenerActions.RECONNECTED);
833
+ };
834
+ }, [hmsInstance]);
835
+ };
836
+ exports.useHMSReconnection = useHMSReconnection;
638
837
  const useHMSPIPRoomLeave = () => {
639
838
  const hmsInstance = useHMSInstance();
640
839
  const {
641
840
  destroy
642
- } = useLeaveMethods();
841
+ } = useLeaveMethods(true);
643
842
  (0, _react.useEffect)(() => {
644
843
  const pipRoomLeaveHandler = () => {
645
844
  destroy();
@@ -655,7 +854,7 @@ const useHMSRemovedFromRoomUpdate = () => {
655
854
  const hmsInstance = useHMSInstance();
656
855
  const {
657
856
  destroy
658
- } = useLeaveMethods();
857
+ } = useLeaveMethods(true);
659
858
  (0, _react.useEffect)(() => {
660
859
  const removedFromRoomHandler = () => {
661
860
  destroy();
@@ -714,6 +913,7 @@ const useHMSNetworkQualityUpdate = () => {
714
913
  exports.useHMSNetworkQualityUpdate = useHMSNetworkQualityUpdate;
715
914
  const useHMSActiveSpeakerUpdates = (setPeerTrackNodes, active) => {
716
915
  const hmsInstance = useHMSInstance();
916
+ const dispatch = (0, _reactRedux.useDispatch)();
717
917
  const reduxStore = (0, _reactRedux.useStore)();
718
918
  const isPortraitOrientation = (0, _dimension.useIsPortraitOrientation)();
719
919
  (0, _react.useEffect)(() => {
@@ -721,6 +921,7 @@ const useHMSActiveSpeakerUpdates = (setPeerTrackNodes, active) => {
721
921
  return;
722
922
  }
723
923
  const handleActiveSpeaker = data => {
924
+ dispatch((0, _actions.setActiveSpeakers)(data));
724
925
  const activePage = reduxStore.getState().app.gridViewActivePage;
725
926
  if (activePage !== 0) {
726
927
  return;
@@ -771,7 +972,7 @@ let modalTaskRef = {
771
972
  const clearPendingModalTasks = () => {
772
973
  if (_reactNative.Platform.OS === 'android') {
773
974
  var _modalTaskRef$current;
774
- (_modalTaskRef$current = modalTaskRef.current) === null || _modalTaskRef$current === void 0 ? void 0 : _modalTaskRef$current.cancel();
975
+ (_modalTaskRef$current = modalTaskRef.current) === null || _modalTaskRef$current === void 0 || _modalTaskRef$current.cancel();
775
976
  } else {
776
977
  clearTimeout(modalTaskRef.current);
777
978
  }
@@ -828,10 +1029,11 @@ exports.useFetchHMSRoles = useFetchHMSRoles;
828
1029
  const useShowLandscapeLayout = () => {
829
1030
  const isLandscapeOrientation = (0, _dimension.useIsLandscapeOrientation)();
830
1031
  const localPeerRoleName = (0, _reactRedux.useSelector)(state => {
831
- var _state$hmsStates$loca;
832
- return (_state$hmsStates$loca = state.hmsStates.localPeer) === null || _state$hmsStates$loca === void 0 || (_state$hmsStates$loca = _state$hmsStates$loca.role) === null || _state$hmsStates$loca === void 0 ? void 0 : _state$hmsStates$loca.name;
1032
+ var _state$hmsStates$loca2;
1033
+ return (_state$hmsStates$loca2 = state.hmsStates.localPeer) === null || _state$hmsStates$loca2 === void 0 || (_state$hmsStates$loca2 = _state$hmsStates$loca2.role) === null || _state$hmsStates$loca2 === void 0 ? void 0 : _state$hmsStates$loca2.name;
833
1034
  });
834
- return isLandscapeOrientation && !!localPeerRoleName && localPeerRoleName.includes('hls-');
1035
+ const isHLSViewer = useIsHLSViewer();
1036
+ return isLandscapeOrientation && !!localPeerRoleName && isHLSViewer;
835
1037
  };
836
1038
  exports.useShowLandscapeLayout = useShowLandscapeLayout;
837
1039
  let hmsConfig = null;
@@ -844,14 +1046,15 @@ const useHMSConfig = () => {
844
1046
  const dispatch = (0, _reactRedux.useDispatch)();
845
1047
  const store = (0, _reactRedux.useStore)();
846
1048
  const getConfig = (0, _react.useCallback)(async () => {
847
- var _storeState$user$endP, _storeState$user$endP2;
1049
+ var _storeState$user$endP, _storeState$user$endP3;
848
1050
  if (hmsConfig) return hmsConfig;
849
1051
  const storeState = store.getState();
850
1052
  const token = await hmsInstance.getAuthTokenByRoomCode(storeState.user.roomCode, storeState.user.userId, (_storeState$user$endP = storeState.user.endPoints) === null || _storeState$user$endP === void 0 ? void 0 : _storeState$user$endP.token);
851
1053
 
852
1054
  // TODO: [REMOVE LATER] added trycatch block so that we can join rooms where we are getting error from Layout API
853
1055
  try {
854
- const roomLayout = await (0, _HMSManager.getRoomLayout)(hmsInstance, token, 'https://api-nonprod.100ms.live');
1056
+ var _storeState$user$endP2;
1057
+ const roomLayout = await (0, _HMSManager.getRoomLayout)(hmsInstance, token, (_storeState$user$endP2 = storeState.user.endPoints) === null || _storeState$user$endP2 === void 0 ? void 0 : _storeState$user$endP2.layout);
855
1058
  dispatch((0, _actions.setLayoutConfig)(roomLayout));
856
1059
  } catch (error) {
857
1060
  console.warn('# getRoomLayout error: ', error);
@@ -860,7 +1063,7 @@ const useHMSConfig = () => {
860
1063
  authToken: token,
861
1064
  username: storeState.user.userName,
862
1065
  captureNetworkQualityInPreview: true,
863
- endpoint: (_storeState$user$endP2 = storeState.user.endPoints) === null || _storeState$user$endP2 === void 0 ? void 0 : _storeState$user$endP2.init
1066
+ endpoint: (_storeState$user$endP3 = storeState.user.endPoints) === null || _storeState$user$endP3 === void 0 ? void 0 : _storeState$user$endP3.init
864
1067
  // metadata: JSON.stringify({isHandRaised: true}), // To join with hand raised
865
1068
  });
866
1069
 
@@ -883,123 +1086,231 @@ const useHMSConfig = () => {
883
1086
  };
884
1087
  };
885
1088
  exports.useHMSConfig = useHMSConfig;
886
- const useSafeDimensions = () => {
887
- const {
888
- height,
889
- width
890
- } = (0, _reactNativeSafeAreaContext.useSafeAreaFrame)();
891
- const safeAreaInsets = (0, _reactNativeSafeAreaContext.useSafeAreaInsets)();
892
- return {
893
- safeWidth: width - safeAreaInsets.left - safeAreaInsets.right,
894
- safeHeight: height - safeAreaInsets.top - safeAreaInsets.bottom
895
- };
896
- };
897
- exports.useSafeDimensions = useSafeDimensions;
898
- const useShowChat = () => {
1089
+ const useShowChatAndParticipants = () => {
899
1090
  const dispatch = (0, _reactRedux.useDispatch)();
900
- const isHLSViewer = useIsHLSViewer();
901
- const showChatView = (0, _reactRedux.useSelector)(state => state.chatWindow.showChatView);
902
- const hlsAspectRatio = (0, _reactRedux.useSelector)(state => state.app.hlsAspectRatio);
903
- const chatVisible = (0, _react.useMemo)(() => {
904
- if (!showChatView) return 'none';
905
- if (isHLSViewer && ['16:9', '4:3'].includes(hlsAspectRatio.id)) return 'inset';
1091
+ const {
1092
+ modalVisibleType,
1093
+ handleModalVisibleType: setModalVisible
1094
+ } = useModalType();
1095
+ const overlayChatLayout = useHMSChatLayoutConfig(chatConfig => chatConfig === null || chatConfig === void 0 ? void 0 : chatConfig.is_overlay);
1096
+ const canShowChat = useHMSConferencingScreenConfig(conferencingScreenConfig => {
1097
+ var _conferencingScreenCo2;
1098
+ return !!(conferencingScreenConfig !== null && conferencingScreenConfig !== void 0 && (_conferencingScreenCo2 = conferencingScreenConfig.elements) !== null && _conferencingScreenCo2 !== void 0 && _conferencingScreenCo2.chat);
1099
+ });
1100
+ const canShowParticipants = useHMSConferencingScreenConfig(conferencingScreenConfig => {
1101
+ var _conferencingScreenCo3;
1102
+ return !!(conferencingScreenConfig !== null && conferencingScreenConfig !== void 0 && (_conferencingScreenCo3 = conferencingScreenConfig.elements) !== null && _conferencingScreenCo3 !== void 0 && _conferencingScreenCo3.participant_list);
1103
+ });
906
1104
 
907
- // TODO: handle case when type modal is selected, but chat modal is not shown because aspect ration modal was just closed
908
- return 'modal';
909
- }, [showChatView, hlsAspectRatio.id, isHLSViewer]);
910
- const isChatVisibleInsetType = chatVisible === 'inset';
911
- const showChat = (0, _react.useCallback)(show => {
912
- if (isChatVisibleInsetType) {
913
- _reactNative.LayoutAnimation.configureNext(_reactNative.LayoutAnimation.Presets.easeInEaseOut);
1105
+ // state for inset chat view
1106
+ const overlayChatVisible = (0, _reactRedux.useSelector)(state => state.chatWindow.showChatView);
1107
+ const modalVisible = modalVisibleType === _types.ModalTypes.CHAT_AND_PARTICIPANTS;
1108
+ const show = (0, _react.useCallback)(view => {
1109
+ // Handle Showing Chat View/Modal
1110
+ if (view === 'chat') {
1111
+ if (!canShowChat) return;
1112
+ if (overlayChatLayout) {
1113
+ dispatch({
1114
+ type: 'SET_SHOW_CHAT_VIEW',
1115
+ showChatView: true
1116
+ });
1117
+ } else {
1118
+ (0, _reactRedux.batch)(() => {
1119
+ dispatch({
1120
+ type: 'SET_SHOW_CHAT_VIEW',
1121
+ showChatView: false
1122
+ });
1123
+ dispatch((0, _actions.setActiveChatBottomSheetTab)('Chat'));
1124
+ });
1125
+ setModalVisible(_types.ModalTypes.CHAT_AND_PARTICIPANTS);
1126
+ }
914
1127
  }
915
- dispatch({
916
- type: 'SET_SHOW_CHAT_VIEW',
917
- showChatView: show
918
- });
919
- }, [isChatVisibleInsetType]);
920
- return [chatVisible, showChat];
1128
+ // Handle Showing Participant
1129
+ else if (canShowParticipants) {
1130
+ dispatch((0, _actions.setActiveChatBottomSheetTab)('Participants'));
1131
+ setModalVisible(_types.ModalTypes.CHAT_AND_PARTICIPANTS);
1132
+ }
1133
+ }, [overlayChatLayout, canShowChat, canShowParticipants, setModalVisible]);
1134
+ const hide = (0, _react.useCallback)(view => {
1135
+ if (view === 'chat_overlay') {
1136
+ dispatch({
1137
+ type: 'SET_SHOW_CHAT_VIEW',
1138
+ showChatView: false
1139
+ });
1140
+ } else {
1141
+ setModalVisible(_types.ModalTypes.DEFAULT);
1142
+ }
1143
+ }, [overlayChatLayout, setModalVisible]);
1144
+ return {
1145
+ overlayChatVisible,
1146
+ modalVisible,
1147
+ overlayChatLayout,
1148
+ canShowChat,
1149
+ canShowParticipants,
1150
+ show,
1151
+ hide
1152
+ };
921
1153
  };
922
- exports.useShowChat = useShowChat;
1154
+ exports.useShowChatAndParticipants = useShowChatAndParticipants;
923
1155
  const usePortraitChatViewVisible = () => {
924
- const [chatVisible] = useShowChat();
1156
+ const {
1157
+ overlayChatVisible
1158
+ } = useShowChatAndParticipants();
925
1159
  const pipModeNotActive = (0, _reactRedux.useSelector)(state => state.app.pipModeStatus !== _types.PipModes.ACTIVE);
926
1160
  const isPortraitOrientation = (0, _dimension.useIsPortraitOrientation)();
927
- return pipModeNotActive && isPortraitOrientation && chatVisible === 'inset';
1161
+ return pipModeNotActive && isPortraitOrientation && overlayChatVisible;
928
1162
  };
929
1163
  exports.usePortraitChatViewVisible = usePortraitChatViewVisible;
930
1164
  const useLandscapeChatViewVisible = () => {
931
- const [chatVisible] = useShowChat();
1165
+ const {
1166
+ overlayChatVisible
1167
+ } = useShowChatAndParticipants();
932
1168
  const pipModeNotActive = (0, _reactRedux.useSelector)(state => state.app.pipModeStatus !== _types.PipModes.ACTIVE);
933
1169
  const isLandscapeOrientation = (0, _dimension.useIsLandscapeOrientation)();
934
- return pipModeNotActive && isLandscapeOrientation && chatVisible === 'inset';
1170
+ return pipModeNotActive && isLandscapeOrientation && overlayChatVisible;
935
1171
  };
936
1172
  exports.useLandscapeChatViewVisible = useLandscapeChatViewVisible;
937
1173
  const useFilteredParticipants = () => {
938
- const hmsInstance = useHMSInstance();
939
- const localPeer = (0, _reactRedux.useSelector)(state => state.hmsStates.localPeer);
940
- const [filter, setFilter] = (0, _react.useState)('everyone');
941
- const [participantsSearchInput, setParticipantsSearchInput] = (0, _react.useState)('');
942
- const [hmsPeers, setHmsPeers] = (0, _react.useState)(localPeer ? [localPeer] : []);
943
- const filteredPeerTrackNodes = (0, _react.useMemo)(() => {
944
- const newFilteredPeerTrackNodes = hmsPeers === null || hmsPeers === void 0 ? void 0 : hmsPeers.filter(peer => {
945
- var _peer$role4;
946
- if (participantsSearchInput.length < 1 || peer.name.includes(participantsSearchInput) || (_peer$role4 = peer.role) !== null && _peer$role4 !== void 0 && (_peer$role4 = _peer$role4.name) !== null && _peer$role4 !== void 0 && _peer$role4.includes(participantsSearchInput)) {
947
- return true;
1174
+ var _sortedRoles$;
1175
+ const roles = (0, _reactRedux.useSelector)(state => state.hmsStates.roles);
1176
+ const onStageRole = useHMSLayoutConfig(layoutConfig => {
1177
+ var _layoutConfig$screens;
1178
+ return (layoutConfig === null || layoutConfig === void 0 || (_layoutConfig$screens = layoutConfig.screens) === null || _layoutConfig$screens === void 0 || (_layoutConfig$screens = _layoutConfig$screens.conferencing) === null || _layoutConfig$screens === void 0 || (_layoutConfig$screens = _layoutConfig$screens.default) === null || _layoutConfig$screens === void 0 || (_layoutConfig$screens = _layoutConfig$screens.elements) === null || _layoutConfig$screens === void 0 || (_layoutConfig$screens = _layoutConfig$screens.on_stage_exp) === null || _layoutConfig$screens === void 0 ? void 0 : _layoutConfig$screens.on_stage_role) || null;
1179
+ });
1180
+ const [searchText, setSearchText] = (0, _react.useState)('');
1181
+ const formattedSearchText = searchText.trim().toLowerCase();
1182
+ const participants = (0, _reactRedux.useSelector)(state => state.hmsStates.participants);
1183
+ const peerGroups = (0, _react.useMemo)(() => {
1184
+ return groupParticipantsAsPerRole(participants, formattedSearchText);
1185
+ }, [formattedSearchText, participants]);
1186
+ const sortedRoles = (0, _react.useMemo)(() => {
1187
+ return roles.filter(role => peerGroups.has(role.name)).sort((a, b) => {
1188
+ var _a$publishSettings, _b$publishSettings;
1189
+ if (onStageRole) {
1190
+ if (a.name === onStageRole && b.name === onStageRole) {
1191
+ return 0;
1192
+ }
1193
+ if (a.name === onStageRole) {
1194
+ return -1;
1195
+ }
1196
+ if (b.name === onStageRole) {
1197
+ return 1;
1198
+ }
948
1199
  }
949
- return false;
1200
+ const canAPublish = (((_a$publishSettings = a.publishSettings) === null || _a$publishSettings === void 0 ? void 0 : _a$publishSettings.allowed) && a.publishSettings.allowed.length > 0) ?? false;
1201
+ const canBPublish = (((_b$publishSettings = b.publishSettings) === null || _b$publishSettings === void 0 ? void 0 : _b$publishSettings.allowed) && b.publishSettings.allowed.length > 0) ?? false;
1202
+ if (canAPublish && canBPublish) {
1203
+ return 0;
1204
+ }
1205
+ if (canAPublish) {
1206
+ return -1;
1207
+ }
1208
+ return 1;
950
1209
  });
951
- if (filter === 'everyone') {
952
- return newFilteredPeerTrackNodes;
953
- }
954
- if (filter === 'raised hand') {
955
- return newFilteredPeerTrackNodes.filter(peer => {
956
- const parsedMetaData = (0, _functions.parseMetadata)(peer.metadata);
957
- return parsedMetaData.isHandRaised === true;
1210
+ }, [peerGroups, onStageRole, roles]);
1211
+ const firstGroupName = peerGroups.has('hand-raised') ? 'hand-raised' : (_sortedRoles$ = sortedRoles[0]) === null || _sortedRoles$ === void 0 ? void 0 : _sortedRoles$.name;
1212
+ const [expandedGroups, setExpandedGroups] = (0, _react.useState)(firstGroupName ? [firstGroupName] : []);
1213
+ const groupedList = (0, _react.useMemo)(() => {
1214
+ let list = [];
1215
+ const handRaisedPeers = peerGroups.get('hand-raised');
1216
+ if (handRaisedPeers) {
1217
+ const expanded = expandedGroups.includes('hand-raised');
1218
+ list.push({
1219
+ type: expanded ? 'EXPANDED_HEADER' : 'COLLAPSED_HEADER',
1220
+ key: 'hand-raised',
1221
+ data: {
1222
+ label: `Hand Raised (${handRaisedPeers.length})`,
1223
+ itemsLength: handRaisedPeers.length
1224
+ }
958
1225
  });
1226
+ if (expanded) {
1227
+ list = list.concat(handRaisedPeers.map((peer, idx, arr) => {
1228
+ const isLast = arr.length - 1 === idx;
1229
+ return {
1230
+ data: peer,
1231
+ key: `${peer.peerID}--${'hand-raised'}`,
1232
+ type: isLast ? 'LAST_ITEM' : 'REGULAR_ITEM'
1233
+ };
1234
+ }));
1235
+ }
959
1236
  }
960
- return newFilteredPeerTrackNodes.filter(peer => {
961
- var _peer$role5;
962
- return ((_peer$role5 = peer.role) === null || _peer$role5 === void 0 ? void 0 : _peer$role5.name) === filter;
963
- });
964
- }, [participantsSearchInput, filter, hmsPeers]);
965
- (0, _react.useEffect)(() => {
966
- let ignore = false;
967
- hmsInstance.getRemotePeers().then(peers => {
968
- if (localPeer) {
969
- _reactNative.InteractionManager.runAfterInteractions(() => {
970
- if (!ignore) {
971
- setHmsPeers([localPeer, ...peers]);
1237
+ sortedRoles.forEach(role => {
1238
+ const peers = peerGroups.get(role.name);
1239
+ if (peers) {
1240
+ const expanded = expandedGroups.includes(role.name);
1241
+ list.push({
1242
+ type: expanded ? 'EXPANDED_HEADER' : 'COLLAPSED_HEADER',
1243
+ key: role.name,
1244
+ data: {
1245
+ label: `${role.name} (${peers.length})`,
1246
+ role: role,
1247
+ itemsLength: peers.length
972
1248
  }
973
1249
  });
1250
+ if (expanded) {
1251
+ list = list.concat(peers.map((peer, idx, arr) => {
1252
+ const isLast = arr.length - 1 === idx;
1253
+ return {
1254
+ data: peer,
1255
+ key: `${peer.peerID}--${role.name}`,
1256
+ type: isLast ? 'LAST_ITEM' : 'REGULAR_ITEM'
1257
+ };
1258
+ }));
1259
+ }
974
1260
  }
975
1261
  });
976
- return () => {
977
- ignore = true;
978
- };
979
- }, [localPeer, hmsInstance]);
1262
+ return list;
1263
+ }, [expandedGroups, peerGroups, sortedRoles]);
980
1264
  return {
981
- allParticipants: hmsPeers,
982
- filteredParticipants: filteredPeerTrackNodes,
983
- selectedFilter: filter,
984
- changeFilter: setFilter,
985
- searchText: participantsSearchInput,
986
- setSearchText: setParticipantsSearchInput
1265
+ data: groupedList,
1266
+ searchText,
1267
+ formattedSearchText,
1268
+ setSearchText,
1269
+ expandedGroups,
1270
+ setExpandedGroups
987
1271
  };
988
1272
  };
989
1273
  exports.useFilteredParticipants = useFilteredParticipants;
1274
+ const groupParticipantsAsPerRole = (participants, searchText) => {
1275
+ const groups = new Map();
1276
+ for (const participant of participants) {
1277
+ const participantRole = participant.role;
1278
+ if (!participantRole) {
1279
+ continue;
1280
+ }
1281
+ if (searchText.length <= 0 || participant.name.toLowerCase().includes(searchText)) {
1282
+ if (!groups.has(participantRole.name)) {
1283
+ groups.set(participantRole.name, []);
1284
+ }
1285
+ const group = groups.get(participantRole.name);
1286
+ if (!group) {
1287
+ continue;
1288
+ }
1289
+ group.push(participant);
1290
+ if ((0, _functions.parseMetadata)(participant.metadata).isHandRaised) {
1291
+ if (!groups.has('hand-raised')) {
1292
+ groups.set('hand-raised', []);
1293
+ }
1294
+ const group = groups.get('hand-raised');
1295
+ if (group) group.push(participant);
1296
+ }
1297
+ }
1298
+ }
1299
+ return groups;
1300
+ };
990
1301
  const useShouldGoLive = () => {
991
1302
  const shouldGoLive = (0, _reactRedux.useSelector)(_hooksUtilSelectors.selectShouldGoLive);
992
1303
  return shouldGoLive;
993
1304
  };
994
1305
  exports.useShouldGoLive = useShouldGoLive;
995
- const useLeaveMethods = () => {
1306
+ const useLeaveMethods = isUnmounted => {
996
1307
  const navigation = (0, _react.useContext)(_native.NavigationContext);
997
1308
  const hmsInstance = useHMSInstance();
998
1309
  const dispatch = (0, _reactRedux.useDispatch)();
999
1310
  const reduxStore = (0, _reactRedux.useStore)();
1000
- const destroy = (0, _react.useCallback)(async () => {
1311
+ const destroy = (0, _react.useCallback)(() => {
1001
1312
  try {
1002
- const s = await hmsInstance.destroy();
1313
+ const s = hmsInstance.destroy();
1003
1314
  console.log('Destroy Success: ', s);
1004
1315
  // TODOS:
1005
1316
  // - If show `Meeting_Ended` is true, show Meeting screen by setting state to MEETING_ENDED
@@ -1025,11 +1336,10 @@ const useLeaveMethods = () => {
1025
1336
  if (typeof onLeave === 'function') {
1026
1337
  onLeave();
1027
1338
  dispatch((0, _actions.clearStore)());
1028
- } else if (navigation && navigation.canGoBack()) {
1339
+ } else if (navigation && navigation.canGoBack() && !isUnmounted) {
1029
1340
  navigation.goBack();
1030
1341
  dispatch((0, _actions.clearStore)());
1031
1342
  } else {
1032
- // TODO: call onLeave Callback if provided
1033
1343
  // Otherwise default action is to show "Meeting Ended" screen
1034
1344
  dispatch((0, _actions.clearStore)()); // TODO: We need different clearStore for MeetingEnded
1035
1345
  dispatch((0, _actions.changeMeetingState)(_types2.MeetingState.MEETING_ENDED));
@@ -1040,7 +1350,13 @@ const useLeaveMethods = () => {
1040
1350
  return Promise.reject(e);
1041
1351
  }
1042
1352
  }, [hmsInstance]);
1043
- const leave = (0, _react.useCallback)(async () => {
1353
+ const leave = (0, _react.useCallback)(async function () {
1354
+ let shouldEndStream = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
1355
+ if (shouldEndStream) {
1356
+ hmsInstance.stopHLSStreaming().catch(error => {
1357
+ console.log('Stop HLS Streaming Error: ', error);
1358
+ });
1359
+ }
1044
1360
  try {
1045
1361
  const d = await hmsInstance.leave();
1046
1362
  console.log('Leave Success: ', d);
@@ -1075,15 +1391,20 @@ const useLeaveMethods = () => {
1075
1391
  goToPreview
1076
1392
  };
1077
1393
  };
1394
+
1395
+ // Returns layout config as it is returned from server
1078
1396
  exports.useLeaveMethods = useLeaveMethods;
1079
- const useHMSLayoutConfig = () => {
1080
- return (0, _reactRedux.useSelector)(state => state.hmsStates.layoutConfig);
1397
+ const useHMSLayoutConfig = (selector, equalityFn) => {
1398
+ return (0, _reactRedux.useSelector)(state => {
1399
+ var _state$hmsStates$loca3;
1400
+ return selector((0, _hooksUtilSelectors.selectLayoutConfigForRole)(state.hmsStates.layoutConfig, ((_state$hmsStates$loca3 = state.hmsStates.localPeer) === null || _state$hmsStates$loca3 === void 0 ? void 0 : _state$hmsStates$loca3.role) || null));
1401
+ }, equalityFn);
1081
1402
  };
1082
1403
  exports.useHMSLayoutConfig = useHMSLayoutConfig;
1083
1404
  const useHMSRoomTheme = selector => {
1084
- return (0, _reactRedux.useSelector)(state => {
1085
- const layoutConfig = state.hmsStates.layoutConfig;
1086
- const roomTheme = layoutConfig === null || layoutConfig === void 0 ? void 0 : layoutConfig.themes.find(theme => theme.default);
1405
+ return useHMSLayoutConfig(layoutConfig => {
1406
+ var _layoutConfig$themes;
1407
+ const roomTheme = layoutConfig === null || layoutConfig === void 0 || (_layoutConfig$themes = layoutConfig.themes) === null || _layoutConfig$themes === void 0 ? void 0 : _layoutConfig$themes.find(theme => theme.default);
1087
1408
  const defaultTheme = roomTheme ? roomTheme.palette ? roomTheme : {
1088
1409
  ...roomTheme,
1089
1410
  palette: _theme.DEFAULT_THEME.palette
@@ -1100,8 +1421,7 @@ const useHMSRoomColorPalette = () => {
1100
1421
  };
1101
1422
  exports.useHMSRoomColorPalette = useHMSRoomColorPalette;
1102
1423
  const useHMSRoomTypography = () => {
1103
- return (0, _reactRedux.useSelector)(state => {
1104
- const layoutConfig = state.hmsStates.layoutConfig;
1424
+ return useHMSLayoutConfig(layoutConfig => {
1105
1425
  const typography = layoutConfig === null || layoutConfig === void 0 ? void 0 : layoutConfig.typography;
1106
1426
  if (!typography) {
1107
1427
  return _theme.DEFAULT_TYPOGRAPHY;
@@ -1112,6 +1432,9 @@ const useHMSRoomTypography = () => {
1112
1432
  ...typography
1113
1433
  };
1114
1434
  }
1435
+
1436
+ // formatting font family name
1437
+ typography.font_family = typography.font_family.replace(/ /g, '');
1115
1438
  return typography;
1116
1439
  }, _reactRedux.shallowEqual);
1117
1440
  };
@@ -1130,4 +1453,87 @@ const useHMSRoomStyle = function (updater) {
1130
1453
  }), deps).default;
1131
1454
  };
1132
1455
  exports.useHMSRoomStyle = useHMSRoomStyle;
1456
+ const useSendMessage = () => {
1457
+ const hmsInstance = useHMSInstance();
1458
+ const dispatch = (0, _reactRedux.useDispatch)();
1459
+ const reduxStore = (0, _reactRedux.useStore)();
1460
+ const message = (0, _reactRedux.useSelector)(state => state.chatWindow.typedMessage);
1461
+ const setMessage = (0, _react.useCallback)(text => {
1462
+ dispatch({
1463
+ type: 'SET_TYPED_MESSAGE',
1464
+ typedMessage: text
1465
+ });
1466
+ }, []);
1467
+ const sendMessage = (0, _react.useCallback)(async () => {
1468
+ const chatWindowState = reduxStore.getState().chatWindow;
1469
+ const message = chatWindowState.typedMessage;
1470
+ const sendingTo = chatWindowState.sendTo;
1471
+ if (message.length <= 0) return;
1472
+ const hmsMessageRecipient = new _reactNativeHms.HMSMessageRecipient({
1473
+ recipientType: 'publishSettings' in sendingTo ? _reactNativeHms.HMSMessageRecipientType.ROLES : 'peerID' in sendingTo ? _reactNativeHms.HMSMessageRecipientType.PEER : _reactNativeHms.HMSMessageRecipientType.BROADCAST,
1474
+ recipientPeer: 'peerID' in sendingTo ? sendingTo : undefined,
1475
+ recipientRoles: 'publishSettings' in sendingTo ? [sendingTo] : undefined
1476
+ });
1477
+
1478
+ // Saving reference of `message` state to local variable
1479
+ // to use the typed message after clearing state
1480
+ const messageText = message;
1481
+ dispatch({
1482
+ type: 'SET_TYPED_MESSAGE',
1483
+ typedMessage: ''
1484
+ });
1485
+ const handleMessageID = _ref5 => {
1486
+ let {
1487
+ messageId
1488
+ } = _ref5;
1489
+ const localPeer = reduxStore.getState().hmsStates.localPeer;
1490
+ if (messageId) {
1491
+ _reactNative.Keyboard.dismiss();
1492
+ const localMessage = new _reactNativeHms.HMSMessage({
1493
+ messageId: messageId,
1494
+ message: messageText,
1495
+ type: 'chat',
1496
+ time: new Date(),
1497
+ sender: localPeer || undefined,
1498
+ recipient: hmsMessageRecipient
1499
+ });
1500
+ dispatch((0, _actions.addMessage)(localMessage));
1501
+ }
1502
+ };
1503
+ try {
1504
+ let result;
1505
+ if ('publishSettings' in sendingTo) {
1506
+ result = await hmsInstance.sendGroupMessage(messageText, [sendingTo]);
1507
+ } else if ('peerID' in sendingTo) {
1508
+ result = await hmsInstance.sendDirectMessage(messageText, sendingTo);
1509
+ } else {
1510
+ result = await hmsInstance.sendBroadcastMessage(messageText);
1511
+ }
1512
+ handleMessageID(result);
1513
+ return Promise.resolve(result);
1514
+ } catch (error) {
1515
+ return Promise.reject(error);
1516
+ }
1517
+ }, []);
1518
+ return {
1519
+ message,
1520
+ setMessage,
1521
+ sendMessage
1522
+ };
1523
+ };
1524
+ exports.useSendMessage = useSendMessage;
1525
+ const useHMSChatLayoutConfig = (selector, equalityFn) => {
1526
+ return useHMSLayoutConfig(layoutConfig => {
1527
+ const chatConfig = (0, _hooksUtilSelectors.selectChatLayoutConfig)(layoutConfig);
1528
+ return selector(chatConfig);
1529
+ }, equalityFn);
1530
+ };
1531
+ exports.useHMSChatLayoutConfig = useHMSChatLayoutConfig;
1532
+ const useHMSConferencingScreenConfig = (selector, equalityFn) => {
1533
+ return useHMSLayoutConfig(layoutConfig => {
1534
+ const conferencingScreenConfig = (0, _hooksUtilSelectors.selectConferencingScreenConfig)(layoutConfig);
1535
+ return selector(conferencingScreenConfig);
1536
+ }, equalityFn);
1537
+ };
1538
+ exports.useHMSConferencingScreenConfig = useHMSConferencingScreenConfig;
1133
1539
  //# sourceMappingURL=hooks-util.js.map