@100mslive/react-native-room-kit 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1111) hide show
  1. package/LICENSE +20 -0
  2. package/README.md +25 -0
  3. package/lib/commonjs/HMSContainer.js +20 -0
  4. package/lib/commonjs/HMSContainer.js.map +1 -0
  5. package/lib/commonjs/HMSInstanceSetup.js +160 -0
  6. package/lib/commonjs/HMSInstanceSetup.js.map +1 -0
  7. package/lib/commonjs/HMSPrebuilt.js +32 -0
  8. package/lib/commonjs/HMSPrebuilt.js.map +1 -0
  9. package/lib/commonjs/HMSRoomSetup.js +216 -0
  10. package/lib/commonjs/HMSRoomSetup.js.map +1 -0
  11. package/lib/commonjs/Icons/100ms/assets/hms-logo.png +0 -0
  12. package/lib/commonjs/Icons/100ms/assets/hms-logo@2x.png +0 -0
  13. package/lib/commonjs/Icons/100ms/assets/hms-logo@3x.png +0 -0
  14. package/lib/commonjs/Icons/100ms/index.js +30 -0
  15. package/lib/commonjs/Icons/100ms/index.js.map +1 -0
  16. package/lib/commonjs/Icons/Alert/assets/alert.png +0 -0
  17. package/lib/commonjs/Icons/Alert/assets/alert@2x.png +0 -0
  18. package/lib/commonjs/Icons/Alert/assets/alert@3x.png +0 -0
  19. package/lib/commonjs/Icons/Alert/index.js +30 -0
  20. package/lib/commonjs/Icons/Alert/index.js.map +1 -0
  21. package/lib/commonjs/Icons/Camera/assets/camera-muted.png +0 -0
  22. package/lib/commonjs/Icons/Camera/assets/camera-muted@2x.png +0 -0
  23. package/lib/commonjs/Icons/Camera/assets/camera-muted@3x.png +0 -0
  24. package/lib/commonjs/Icons/Camera/assets/camera-unmuted.png +0 -0
  25. package/lib/commonjs/Icons/Camera/assets/camera-unmuted@2x.png +0 -0
  26. package/lib/commonjs/Icons/Camera/assets/camera-unmuted@3x.png +0 -0
  27. package/lib/commonjs/Icons/Camera/index.js +31 -0
  28. package/lib/commonjs/Icons/Camera/index.js.map +1 -0
  29. package/lib/commonjs/Icons/Chat/assets/chat.png +0 -0
  30. package/lib/commonjs/Icons/Chat/assets/chat@2x.png +0 -0
  31. package/lib/commonjs/Icons/Chat/assets/chat@3x.png +0 -0
  32. package/lib/commonjs/Icons/Chat/index.js +30 -0
  33. package/lib/commonjs/Icons/Chat/index.js.map +1 -0
  34. package/lib/commonjs/Icons/Chevron/assets/chevron-down.png +0 -0
  35. package/lib/commonjs/Icons/Chevron/assets/chevron-down@2x.png +0 -0
  36. package/lib/commonjs/Icons/Chevron/assets/chevron-down@3x.png +0 -0
  37. package/lib/commonjs/Icons/Chevron/assets/chevron-left.png +0 -0
  38. package/lib/commonjs/Icons/Chevron/assets/chevron-left@2x.png +0 -0
  39. package/lib/commonjs/Icons/Chevron/assets/chevron-left@3x.png +0 -0
  40. package/lib/commonjs/Icons/Chevron/index.js +31 -0
  41. package/lib/commonjs/Icons/Chevron/index.js.map +1 -0
  42. package/lib/commonjs/Icons/Clock/assets/clock.png +0 -0
  43. package/lib/commonjs/Icons/Clock/assets/clock@2x.png +0 -0
  44. package/lib/commonjs/Icons/Clock/assets/clock@3x.png +0 -0
  45. package/lib/commonjs/Icons/Clock/index.js +30 -0
  46. package/lib/commonjs/Icons/Clock/index.js.map +1 -0
  47. package/lib/commonjs/Icons/Close/assets/close.png +0 -0
  48. package/lib/commonjs/Icons/Close/assets/close@2x.png +0 -0
  49. package/lib/commonjs/Icons/Close/assets/close@3x.png +0 -0
  50. package/lib/commonjs/Icons/Close/index.js +30 -0
  51. package/lib/commonjs/Icons/Close/index.js.map +1 -0
  52. package/lib/commonjs/Icons/End/assets/end.png +0 -0
  53. package/lib/commonjs/Icons/End/assets/end@2x.png +0 -0
  54. package/lib/commonjs/Icons/End/assets/end@3x.png +0 -0
  55. package/lib/commonjs/Icons/End/index.js +30 -0
  56. package/lib/commonjs/Icons/End/index.js.map +1 -0
  57. package/lib/commonjs/Icons/Hand/assets/hand.png +0 -0
  58. package/lib/commonjs/Icons/Hand/assets/hand@2x.png +0 -0
  59. package/lib/commonjs/Icons/Hand/assets/hand@3x.png +0 -0
  60. package/lib/commonjs/Icons/Hand/index.js +32 -0
  61. package/lib/commonjs/Icons/Hand/index.js.map +1 -0
  62. package/lib/commonjs/Icons/Leave/assets/leave.png +0 -0
  63. package/lib/commonjs/Icons/Leave/assets/leave@2x.png +0 -0
  64. package/lib/commonjs/Icons/Leave/assets/leave@3x.png +0 -0
  65. package/lib/commonjs/Icons/Leave/index.js +30 -0
  66. package/lib/commonjs/Icons/Leave/index.js.map +1 -0
  67. package/lib/commonjs/Icons/Mic/assets/mic-muted.png +0 -0
  68. package/lib/commonjs/Icons/Mic/assets/mic-muted@2x.png +0 -0
  69. package/lib/commonjs/Icons/Mic/assets/mic-muted@3x.png +0 -0
  70. package/lib/commonjs/Icons/Mic/assets/mic-unmuted.png +0 -0
  71. package/lib/commonjs/Icons/Mic/assets/mic-unmuted@2x.png +0 -0
  72. package/lib/commonjs/Icons/Mic/assets/mic-unmuted@3x.png +0 -0
  73. package/lib/commonjs/Icons/Mic/index.js +31 -0
  74. package/lib/commonjs/Icons/Mic/index.js.map +1 -0
  75. package/lib/commonjs/Icons/NetworkQuality/assets/network_0.png +0 -0
  76. package/lib/commonjs/Icons/NetworkQuality/assets/network_0@2x.png +0 -0
  77. package/lib/commonjs/Icons/NetworkQuality/assets/network_0@3x.png +0 -0
  78. package/lib/commonjs/Icons/NetworkQuality/assets/network_1.png +0 -0
  79. package/lib/commonjs/Icons/NetworkQuality/assets/network_1@2x.png +0 -0
  80. package/lib/commonjs/Icons/NetworkQuality/assets/network_1@3x.png +0 -0
  81. package/lib/commonjs/Icons/NetworkQuality/assets/network_2.png +0 -0
  82. package/lib/commonjs/Icons/NetworkQuality/assets/network_2@2x.png +0 -0
  83. package/lib/commonjs/Icons/NetworkQuality/assets/network_2@3x.png +0 -0
  84. package/lib/commonjs/Icons/NetworkQuality/assets/network_3.png +0 -0
  85. package/lib/commonjs/Icons/NetworkQuality/assets/network_3@2x.png +0 -0
  86. package/lib/commonjs/Icons/NetworkQuality/assets/network_3@3x.png +0 -0
  87. package/lib/commonjs/Icons/NetworkQuality/assets/network_4.png +0 -0
  88. package/lib/commonjs/Icons/NetworkQuality/assets/network_4@2x.png +0 -0
  89. package/lib/commonjs/Icons/NetworkQuality/assets/network_4@3x.png +0 -0
  90. package/lib/commonjs/Icons/NetworkQuality/assets/network_5.png +0 -0
  91. package/lib/commonjs/Icons/NetworkQuality/assets/network_5@2x.png +0 -0
  92. package/lib/commonjs/Icons/NetworkQuality/assets/network_5@3x.png +0 -0
  93. package/lib/commonjs/Icons/NetworkQuality/index.js +31 -0
  94. package/lib/commonjs/Icons/NetworkQuality/index.js.map +1 -0
  95. package/lib/commonjs/Icons/Participants/assets/participants.png +0 -0
  96. package/lib/commonjs/Icons/Participants/assets/participants@2x.png +0 -0
  97. package/lib/commonjs/Icons/Participants/assets/participants@3x.png +0 -0
  98. package/lib/commonjs/Icons/Participants/index.js +30 -0
  99. package/lib/commonjs/Icons/Participants/index.js.map +1 -0
  100. package/lib/commonjs/Icons/RotateCamera/assets/rotate-camera.png +0 -0
  101. package/lib/commonjs/Icons/RotateCamera/assets/rotate-camera@2x.png +0 -0
  102. package/lib/commonjs/Icons/RotateCamera/assets/rotate-camera@3x.png +0 -0
  103. package/lib/commonjs/Icons/RotateCamera/index.js +30 -0
  104. package/lib/commonjs/Icons/RotateCamera/index.js.map +1 -0
  105. package/lib/commonjs/Icons/ScreenShare/assets/screen-share.png +0 -0
  106. package/lib/commonjs/Icons/ScreenShare/assets/screen-share@2x.png +0 -0
  107. package/lib/commonjs/Icons/ScreenShare/assets/screen-share@3x.png +0 -0
  108. package/lib/commonjs/Icons/ScreenShare/index.js +30 -0
  109. package/lib/commonjs/Icons/ScreenShare/index.js.map +1 -0
  110. package/lib/commonjs/Icons/Send/assets/send.png +0 -0
  111. package/lib/commonjs/Icons/Send/assets/send@2x.png +0 -0
  112. package/lib/commonjs/Icons/Send/assets/send@3x.png +0 -0
  113. package/lib/commonjs/Icons/Send/index.js +30 -0
  114. package/lib/commonjs/Icons/Send/index.js.map +1 -0
  115. package/lib/commonjs/Icons/Settings/assets/settings.png +0 -0
  116. package/lib/commonjs/Icons/Settings/assets/settings@2x.png +0 -0
  117. package/lib/commonjs/Icons/Settings/assets/settings@3x.png +0 -0
  118. package/lib/commonjs/Icons/Settings/index.js +30 -0
  119. package/lib/commonjs/Icons/Settings/index.js.map +1 -0
  120. package/lib/commonjs/Icons/Speaker/assets/speaker-muted.png +0 -0
  121. package/lib/commonjs/Icons/Speaker/assets/speaker-muted@2x.png +0 -0
  122. package/lib/commonjs/Icons/Speaker/assets/speaker-muted@3x.png +0 -0
  123. package/lib/commonjs/Icons/Speaker/assets/speaker.png +0 -0
  124. package/lib/commonjs/Icons/Speaker/assets/speaker@2x.png +0 -0
  125. package/lib/commonjs/Icons/Speaker/assets/speaker@3x.png +0 -0
  126. package/lib/commonjs/Icons/Speaker/index.js +31 -0
  127. package/lib/commonjs/Icons/Speaker/index.js.map +1 -0
  128. package/lib/commonjs/Icons/ThreeDots/assets/three-dots-vertical.png +0 -0
  129. package/lib/commonjs/Icons/ThreeDots/assets/three-dots-vertical@2x.png +0 -0
  130. package/lib/commonjs/Icons/ThreeDots/assets/three-dots-vertical@3x.png +0 -0
  131. package/lib/commonjs/Icons/ThreeDots/index.js +31 -0
  132. package/lib/commonjs/Icons/ThreeDots/index.js.map +1 -0
  133. package/lib/commonjs/Icons/index.js +215 -0
  134. package/lib/commonjs/Icons/index.js.map +1 -0
  135. package/lib/commonjs/assets/100ms-logo.png +0 -0
  136. package/lib/commonjs/assets/brb.png +0 -0
  137. package/lib/commonjs/assets/icon.png +0 -0
  138. package/lib/commonjs/assets/illustration.png +0 -0
  139. package/lib/commonjs/assets/network_0.png +0 -0
  140. package/lib/commonjs/assets/network_1.png +0 -0
  141. package/lib/commonjs/assets/network_2.png +0 -0
  142. package/lib/commonjs/assets/network_3.png +0 -0
  143. package/lib/commonjs/assets/network_4.png +0 -0
  144. package/lib/commonjs/assets/user_music.png +0 -0
  145. package/lib/commonjs/components/AvatarView.js +48 -0
  146. package/lib/commonjs/components/AvatarView.js.map +1 -0
  147. package/lib/commonjs/components/BackButton.js +42 -0
  148. package/lib/commonjs/components/BackButton.js.map +1 -0
  149. package/lib/commonjs/components/Chat/ChatBanner.js +77 -0
  150. package/lib/commonjs/components/Chat/ChatBanner.js.map +1 -0
  151. package/lib/commonjs/components/Chat/ChatList.js +51 -0
  152. package/lib/commonjs/components/Chat/ChatList.js.map +1 -0
  153. package/lib/commonjs/components/Chat/ChatMessage.js +175 -0
  154. package/lib/commonjs/components/Chat/ChatMessage.js.map +1 -0
  155. package/lib/commonjs/components/Chat/PinnedMessage.js +85 -0
  156. package/lib/commonjs/components/Chat/PinnedMessage.js.map +1 -0
  157. package/lib/commonjs/components/Chat/index.js +50 -0
  158. package/lib/commonjs/components/Chat/index.js.map +1 -0
  159. package/lib/commonjs/components/ChatWindow.js +608 -0
  160. package/lib/commonjs/components/ChatWindow.js.map +1 -0
  161. package/lib/commonjs/components/CustomButton.js +53 -0
  162. package/lib/commonjs/components/CustomButton.js.map +1 -0
  163. package/lib/commonjs/components/CustomHLSPlayerControls.js +81 -0
  164. package/lib/commonjs/components/CustomHLSPlayerControls.js.map +1 -0
  165. package/lib/commonjs/components/CustomInput.js +90 -0
  166. package/lib/commonjs/components/CustomInput.js.map +1 -0
  167. package/lib/commonjs/components/DefaultModal.js +104 -0
  168. package/lib/commonjs/components/DefaultModal.js.map +1 -0
  169. package/lib/commonjs/components/DisplayTrack.js +70 -0
  170. package/lib/commonjs/components/DisplayTrack.js.map +1 -0
  171. package/lib/commonjs/components/DisplayView.js +213 -0
  172. package/lib/commonjs/components/DisplayView.js.map +1 -0
  173. package/lib/commonjs/components/Footer.js +86 -0
  174. package/lib/commonjs/components/Footer.js.map +1 -0
  175. package/lib/commonjs/components/FullScreenIndicator.js +25 -0
  176. package/lib/commonjs/components/FullScreenIndicator.js.map +1 -0
  177. package/lib/commonjs/components/GridView.js +98 -0
  178. package/lib/commonjs/components/GridView.js.map +1 -0
  179. package/lib/commonjs/components/HLSPlayerEmoticons.js +48 -0
  180. package/lib/commonjs/components/HLSPlayerEmoticons.js.map +1 -0
  181. package/lib/commonjs/components/HLSPlayerStatsView.js +64 -0
  182. package/lib/commonjs/components/HLSPlayerStatsView.js.map +1 -0
  183. package/lib/commonjs/components/HLSView.js +141 -0
  184. package/lib/commonjs/components/HLSView.js.map +1 -0
  185. package/lib/commonjs/components/HMSChat.js +31 -0
  186. package/lib/commonjs/components/HMSChat.js.map +1 -0
  187. package/lib/commonjs/components/HMSHLSNotStarted.js +59 -0
  188. package/lib/commonjs/components/HMSHLSNotStarted.js.map +1 -0
  189. package/lib/commonjs/components/HMSManageCameraRotation.js +42 -0
  190. package/lib/commonjs/components/HMSManageCameraRotation.js.map +1 -0
  191. package/lib/commonjs/components/HMSManageLeave.js +286 -0
  192. package/lib/commonjs/components/HMSManageLeave.js.map +1 -0
  193. package/lib/commonjs/components/HMSManageLocalAudio.js +46 -0
  194. package/lib/commonjs/components/HMSManageLocalAudio.js.map +1 -0
  195. package/lib/commonjs/components/HMSManageLocalVideo.js +46 -0
  196. package/lib/commonjs/components/HMSManageLocalVideo.js.map +1 -0
  197. package/lib/commonjs/components/HMSManageRaiseHand.js +48 -0
  198. package/lib/commonjs/components/HMSManageRaiseHand.js.map +1 -0
  199. package/lib/commonjs/components/HMSPreviewDeviceSettings.js +305 -0
  200. package/lib/commonjs/components/HMSPreviewDeviceSettings.js.map +1 -0
  201. package/lib/commonjs/components/HMSPreviewEditName.js +63 -0
  202. package/lib/commonjs/components/HMSPreviewEditName.js.map +1 -0
  203. package/lib/commonjs/components/HMSPreviewJoinButton.js +56 -0
  204. package/lib/commonjs/components/HMSPreviewJoinButton.js.map +1 -0
  205. package/lib/commonjs/components/HMSPreviewPeersList.js +89 -0
  206. package/lib/commonjs/components/HMSPreviewPeersList.js.map +1 -0
  207. package/lib/commonjs/components/HMSPreviewSubtitle.js +32 -0
  208. package/lib/commonjs/components/HMSPreviewSubtitle.js.map +1 -0
  209. package/lib/commonjs/components/HMSPreviewTile.js +138 -0
  210. package/lib/commonjs/components/HMSPreviewTile.js.map +1 -0
  211. package/lib/commonjs/components/HMSPreviewTitle.js +32 -0
  212. package/lib/commonjs/components/HMSPreviewTitle.js.map +1 -0
  213. package/lib/commonjs/components/HMSRoomOptions.js +105 -0
  214. package/lib/commonjs/components/HMSRoomOptions.js.map +1 -0
  215. package/lib/commonjs/components/HMSShareScreen.js +59 -0
  216. package/lib/commonjs/components/HMSShareScreen.js.map +1 -0
  217. package/lib/commonjs/components/HMSShowNetworkQuality.js +57 -0
  218. package/lib/commonjs/components/HMSShowNetworkQuality.js.map +1 -0
  219. package/lib/commonjs/components/Header.js +177 -0
  220. package/lib/commonjs/components/Header.js.map +1 -0
  221. package/lib/commonjs/components/LiveButton.js +70 -0
  222. package/lib/commonjs/components/LiveButton.js.map +1 -0
  223. package/lib/commonjs/components/Meeting.js +64 -0
  224. package/lib/commonjs/components/Meeting.js.map +1 -0
  225. package/lib/commonjs/components/MeetingScreenContent.js +98 -0
  226. package/lib/commonjs/components/MeetingScreenContent.js.map +1 -0
  227. package/lib/commonjs/components/MenuModal/Menu.js +250 -0
  228. package/lib/commonjs/components/MenuModal/Menu.js.map +1 -0
  229. package/lib/commonjs/components/MenuModal/MenuDivider.js +27 -0
  230. package/lib/commonjs/components/MenuModal/MenuDivider.js.map +1 -0
  231. package/lib/commonjs/components/MenuModal/MenuItem.js +60 -0
  232. package/lib/commonjs/components/MenuModal/MenuItem.js.map +1 -0
  233. package/lib/commonjs/components/MenuModal/index.js +27 -0
  234. package/lib/commonjs/components/MenuModal/index.js.map +1 -0
  235. package/lib/commonjs/components/Modals.js +1640 -0
  236. package/lib/commonjs/components/Modals.js.map +1 -0
  237. package/lib/commonjs/components/PIPView.js +33 -0
  238. package/lib/commonjs/components/PIPView.js.map +1 -0
  239. package/lib/commonjs/components/Participants/ParticipantsFilter.js +128 -0
  240. package/lib/commonjs/components/Participants/ParticipantsFilter.js.map +1 -0
  241. package/lib/commonjs/components/Participants/ParticipantsHeader.js +67 -0
  242. package/lib/commonjs/components/Participants/ParticipantsHeader.js.map +1 -0
  243. package/lib/commonjs/components/Participants/ParticipantsList.js +274 -0
  244. package/lib/commonjs/components/Participants/ParticipantsList.js.map +1 -0
  245. package/lib/commonjs/components/Participants/ParticipantsSeachInput.js +55 -0
  246. package/lib/commonjs/components/Participants/ParticipantsSeachInput.js.map +1 -0
  247. package/lib/commonjs/components/Participants/SearchableParticipantsView.js +27 -0
  248. package/lib/commonjs/components/Participants/SearchableParticipantsView.js.map +1 -0
  249. package/lib/commonjs/components/Participants/index.js +61 -0
  250. package/lib/commonjs/components/Participants/index.js.map +1 -0
  251. package/lib/commonjs/components/ParticipantsModal.js +43 -0
  252. package/lib/commonjs/components/ParticipantsModal.js.map +1 -0
  253. package/lib/commonjs/components/PeerDisplayView.js +79 -0
  254. package/lib/commonjs/components/PeerDisplayView.js.map +1 -0
  255. package/lib/commonjs/components/PeerRTCStatsContainer.js +70 -0
  256. package/lib/commonjs/components/PeerRTCStatsContainer.js.map +1 -0
  257. package/lib/commonjs/components/PeerRTCStatsView.js +54 -0
  258. package/lib/commonjs/components/PeerRTCStatsView.js.map +1 -0
  259. package/lib/commonjs/components/PeerSettingsModalContent.js +241 -0
  260. package/lib/commonjs/components/PeerSettingsModalContent.js.map +1 -0
  261. package/lib/commonjs/components/Picker.js +93 -0
  262. package/lib/commonjs/components/Picker.js.map +1 -0
  263. package/lib/commonjs/components/PressableIcon.js +46 -0
  264. package/lib/commonjs/components/PressableIcon.js.map +1 -0
  265. package/lib/commonjs/components/Preview.js +86 -0
  266. package/lib/commonjs/components/Preview.js.map +1 -0
  267. package/lib/commonjs/components/RoomSettingsModalContent.js +515 -0
  268. package/lib/commonjs/components/RoomSettingsModalContent.js.map +1 -0
  269. package/lib/commonjs/components/StatusBar.js +26 -0
  270. package/lib/commonjs/components/StatusBar.js.map +1 -0
  271. package/lib/commonjs/components/StreamingQualityModalContent.js +215 -0
  272. package/lib/commonjs/components/StreamingQualityModalContent.js.map +1 -0
  273. package/lib/commonjs/components/SwitchRow.js +49 -0
  274. package/lib/commonjs/components/SwitchRow.js.map +1 -0
  275. package/lib/commonjs/components/Tile.js +111 -0
  276. package/lib/commonjs/components/Tile.js.map +1 -0
  277. package/lib/commonjs/components/TilesContainer.js +38 -0
  278. package/lib/commonjs/components/TilesContainer.js.map +1 -0
  279. package/lib/commonjs/components/ZoomableView.js +84 -0
  280. package/lib/commonjs/components/ZoomableView.js.map +1 -0
  281. package/lib/commonjs/components/index.js +94 -0
  282. package/lib/commonjs/components/index.js.map +1 -0
  283. package/lib/commonjs/components/styles.js +965 -0
  284. package/lib/commonjs/components/styles.js.map +1 -0
  285. package/lib/commonjs/hooks/useHmsInstance.js +175 -0
  286. package/lib/commonjs/hooks/useHmsInstance.js.map +1 -0
  287. package/lib/commonjs/hooks-sdk-selectors.js +17 -0
  288. package/lib/commonjs/hooks-sdk-selectors.js.map +1 -0
  289. package/lib/commonjs/hooks-sdk.js +126 -0
  290. package/lib/commonjs/hooks-sdk.js.map +1 -0
  291. package/lib/commonjs/hooks-util-selectors.js +12 -0
  292. package/lib/commonjs/hooks-util-selectors.js.map +1 -0
  293. package/lib/commonjs/hooks-util.js +792 -0
  294. package/lib/commonjs/hooks-util.js.map +1 -0
  295. package/lib/commonjs/index.js +17 -0
  296. package/lib/commonjs/index.js.map +1 -0
  297. package/lib/commonjs/peerTrackNodeUtils.js +65 -0
  298. package/lib/commonjs/peerTrackNodeUtils.js.map +1 -0
  299. package/lib/commonjs/redux/actionTypes.js +75 -0
  300. package/lib/commonjs/redux/actionTypes.js.map +1 -0
  301. package/lib/commonjs/redux/actions/index.js +182 -0
  302. package/lib/commonjs/redux/actions/index.js.map +1 -0
  303. package/lib/commonjs/redux/index.js +12 -0
  304. package/lib/commonjs/redux/index.js.map +1 -0
  305. package/lib/commonjs/redux/reducers/appState.js +131 -0
  306. package/lib/commonjs/redux/reducers/appState.js.map +1 -0
  307. package/lib/commonjs/redux/reducers/chatWindow.js +45 -0
  308. package/lib/commonjs/redux/reducers/chatWindow.js.map +1 -0
  309. package/lib/commonjs/redux/reducers/hmsStates.js +67 -0
  310. package/lib/commonjs/redux/reducers/hmsStates.js.map +1 -0
  311. package/lib/commonjs/redux/reducers/index.js +22 -0
  312. package/lib/commonjs/redux/reducers/index.js.map +1 -0
  313. package/lib/commonjs/redux/reducers/message.js +43 -0
  314. package/lib/commonjs/redux/reducers/message.js.map +1 -0
  315. package/lib/commonjs/redux/reducers/userState.js +67 -0
  316. package/lib/commonjs/redux/reducers/userState.js.map +1 -0
  317. package/lib/commonjs/types.js +16 -0
  318. package/lib/commonjs/types.js.map +1 -0
  319. package/lib/commonjs/utils/dimension.js +64 -0
  320. package/lib/commonjs/utils/dimension.js.map +1 -0
  321. package/lib/commonjs/utils/functions.js +368 -0
  322. package/lib/commonjs/utils/functions.js.map +1 -0
  323. package/lib/commonjs/utils/getRoomLinkDetails.js +23 -0
  324. package/lib/commonjs/utils/getRoomLinkDetails.js.map +1 -0
  325. package/lib/commonjs/utils/hooks.js +46 -0
  326. package/lib/commonjs/utils/hooks.js.map +1 -0
  327. package/lib/commonjs/utils/theme.js +144 -0
  328. package/lib/commonjs/utils/theme.js.map +1 -0
  329. package/lib/commonjs/utils/types.js +104 -0
  330. package/lib/commonjs/utils/types.js.map +1 -0
  331. package/lib/commonjs/utils.js +30 -0
  332. package/lib/commonjs/utils.js.map +1 -0
  333. package/lib/module/HMSContainer.js +12 -0
  334. package/lib/module/HMSContainer.js.map +1 -0
  335. package/lib/module/HMSInstanceSetup.js +151 -0
  336. package/lib/module/HMSInstanceSetup.js.map +1 -0
  337. package/lib/module/HMSPrebuilt.js +22 -0
  338. package/lib/module/HMSPrebuilt.js.map +1 -0
  339. package/lib/module/HMSRoomSetup.js +206 -0
  340. package/lib/module/HMSRoomSetup.js.map +1 -0
  341. package/lib/module/Icons/100ms/assets/hms-logo.png +0 -0
  342. package/lib/module/Icons/100ms/assets/hms-logo@2x.png +0 -0
  343. package/lib/module/Icons/100ms/assets/hms-logo@3x.png +0 -0
  344. package/lib/module/Icons/100ms/index.js +22 -0
  345. package/lib/module/Icons/100ms/index.js.map +1 -0
  346. package/lib/module/Icons/Alert/assets/alert.png +0 -0
  347. package/lib/module/Icons/Alert/assets/alert@2x.png +0 -0
  348. package/lib/module/Icons/Alert/assets/alert@3x.png +0 -0
  349. package/lib/module/Icons/Alert/index.js +22 -0
  350. package/lib/module/Icons/Alert/index.js.map +1 -0
  351. package/lib/module/Icons/Camera/assets/camera-muted.png +0 -0
  352. package/lib/module/Icons/Camera/assets/camera-muted@2x.png +0 -0
  353. package/lib/module/Icons/Camera/assets/camera-muted@3x.png +0 -0
  354. package/lib/module/Icons/Camera/assets/camera-unmuted.png +0 -0
  355. package/lib/module/Icons/Camera/assets/camera-unmuted@2x.png +0 -0
  356. package/lib/module/Icons/Camera/assets/camera-unmuted@3x.png +0 -0
  357. package/lib/module/Icons/Camera/index.js +23 -0
  358. package/lib/module/Icons/Camera/index.js.map +1 -0
  359. package/lib/module/Icons/Chat/assets/chat.png +0 -0
  360. package/lib/module/Icons/Chat/assets/chat@2x.png +0 -0
  361. package/lib/module/Icons/Chat/assets/chat@3x.png +0 -0
  362. package/lib/module/Icons/Chat/index.js +22 -0
  363. package/lib/module/Icons/Chat/index.js.map +1 -0
  364. package/lib/module/Icons/Chevron/assets/chevron-down.png +0 -0
  365. package/lib/module/Icons/Chevron/assets/chevron-down@2x.png +0 -0
  366. package/lib/module/Icons/Chevron/assets/chevron-down@3x.png +0 -0
  367. package/lib/module/Icons/Chevron/assets/chevron-left.png +0 -0
  368. package/lib/module/Icons/Chevron/assets/chevron-left@2x.png +0 -0
  369. package/lib/module/Icons/Chevron/assets/chevron-left@3x.png +0 -0
  370. package/lib/module/Icons/Chevron/index.js +23 -0
  371. package/lib/module/Icons/Chevron/index.js.map +1 -0
  372. package/lib/module/Icons/Clock/assets/clock.png +0 -0
  373. package/lib/module/Icons/Clock/assets/clock@2x.png +0 -0
  374. package/lib/module/Icons/Clock/assets/clock@3x.png +0 -0
  375. package/lib/module/Icons/Clock/index.js +22 -0
  376. package/lib/module/Icons/Clock/index.js.map +1 -0
  377. package/lib/module/Icons/Close/assets/close.png +0 -0
  378. package/lib/module/Icons/Close/assets/close@2x.png +0 -0
  379. package/lib/module/Icons/Close/assets/close@3x.png +0 -0
  380. package/lib/module/Icons/Close/index.js +22 -0
  381. package/lib/module/Icons/Close/index.js.map +1 -0
  382. package/lib/module/Icons/End/assets/end.png +0 -0
  383. package/lib/module/Icons/End/assets/end@2x.png +0 -0
  384. package/lib/module/Icons/End/assets/end@3x.png +0 -0
  385. package/lib/module/Icons/End/index.js +22 -0
  386. package/lib/module/Icons/End/index.js.map +1 -0
  387. package/lib/module/Icons/Hand/assets/hand.png +0 -0
  388. package/lib/module/Icons/Hand/assets/hand@2x.png +0 -0
  389. package/lib/module/Icons/Hand/assets/hand@3x.png +0 -0
  390. package/lib/module/Icons/Hand/index.js +24 -0
  391. package/lib/module/Icons/Hand/index.js.map +1 -0
  392. package/lib/module/Icons/Leave/assets/leave.png +0 -0
  393. package/lib/module/Icons/Leave/assets/leave@2x.png +0 -0
  394. package/lib/module/Icons/Leave/assets/leave@3x.png +0 -0
  395. package/lib/module/Icons/Leave/index.js +22 -0
  396. package/lib/module/Icons/Leave/index.js.map +1 -0
  397. package/lib/module/Icons/Mic/assets/mic-muted.png +0 -0
  398. package/lib/module/Icons/Mic/assets/mic-muted@2x.png +0 -0
  399. package/lib/module/Icons/Mic/assets/mic-muted@3x.png +0 -0
  400. package/lib/module/Icons/Mic/assets/mic-unmuted.png +0 -0
  401. package/lib/module/Icons/Mic/assets/mic-unmuted@2x.png +0 -0
  402. package/lib/module/Icons/Mic/assets/mic-unmuted@3x.png +0 -0
  403. package/lib/module/Icons/Mic/index.js +23 -0
  404. package/lib/module/Icons/Mic/index.js.map +1 -0
  405. package/lib/module/Icons/NetworkQuality/assets/network_0.png +0 -0
  406. package/lib/module/Icons/NetworkQuality/assets/network_0@2x.png +0 -0
  407. package/lib/module/Icons/NetworkQuality/assets/network_0@3x.png +0 -0
  408. package/lib/module/Icons/NetworkQuality/assets/network_1.png +0 -0
  409. package/lib/module/Icons/NetworkQuality/assets/network_1@2x.png +0 -0
  410. package/lib/module/Icons/NetworkQuality/assets/network_1@3x.png +0 -0
  411. package/lib/module/Icons/NetworkQuality/assets/network_2.png +0 -0
  412. package/lib/module/Icons/NetworkQuality/assets/network_2@2x.png +0 -0
  413. package/lib/module/Icons/NetworkQuality/assets/network_2@3x.png +0 -0
  414. package/lib/module/Icons/NetworkQuality/assets/network_3.png +0 -0
  415. package/lib/module/Icons/NetworkQuality/assets/network_3@2x.png +0 -0
  416. package/lib/module/Icons/NetworkQuality/assets/network_3@3x.png +0 -0
  417. package/lib/module/Icons/NetworkQuality/assets/network_4.png +0 -0
  418. package/lib/module/Icons/NetworkQuality/assets/network_4@2x.png +0 -0
  419. package/lib/module/Icons/NetworkQuality/assets/network_4@3x.png +0 -0
  420. package/lib/module/Icons/NetworkQuality/assets/network_5.png +0 -0
  421. package/lib/module/Icons/NetworkQuality/assets/network_5@2x.png +0 -0
  422. package/lib/module/Icons/NetworkQuality/assets/network_5@3x.png +0 -0
  423. package/lib/module/Icons/NetworkQuality/index.js +23 -0
  424. package/lib/module/Icons/NetworkQuality/index.js.map +1 -0
  425. package/lib/module/Icons/Participants/assets/participants.png +0 -0
  426. package/lib/module/Icons/Participants/assets/participants@2x.png +0 -0
  427. package/lib/module/Icons/Participants/assets/participants@3x.png +0 -0
  428. package/lib/module/Icons/Participants/index.js +22 -0
  429. package/lib/module/Icons/Participants/index.js.map +1 -0
  430. package/lib/module/Icons/RotateCamera/assets/rotate-camera.png +0 -0
  431. package/lib/module/Icons/RotateCamera/assets/rotate-camera@2x.png +0 -0
  432. package/lib/module/Icons/RotateCamera/assets/rotate-camera@3x.png +0 -0
  433. package/lib/module/Icons/RotateCamera/index.js +22 -0
  434. package/lib/module/Icons/RotateCamera/index.js.map +1 -0
  435. package/lib/module/Icons/ScreenShare/assets/screen-share.png +0 -0
  436. package/lib/module/Icons/ScreenShare/assets/screen-share@2x.png +0 -0
  437. package/lib/module/Icons/ScreenShare/assets/screen-share@3x.png +0 -0
  438. package/lib/module/Icons/ScreenShare/index.js +22 -0
  439. package/lib/module/Icons/ScreenShare/index.js.map +1 -0
  440. package/lib/module/Icons/Send/assets/send.png +0 -0
  441. package/lib/module/Icons/Send/assets/send@2x.png +0 -0
  442. package/lib/module/Icons/Send/assets/send@3x.png +0 -0
  443. package/lib/module/Icons/Send/index.js +22 -0
  444. package/lib/module/Icons/Send/index.js.map +1 -0
  445. package/lib/module/Icons/Settings/assets/settings.png +0 -0
  446. package/lib/module/Icons/Settings/assets/settings@2x.png +0 -0
  447. package/lib/module/Icons/Settings/assets/settings@3x.png +0 -0
  448. package/lib/module/Icons/Settings/index.js +22 -0
  449. package/lib/module/Icons/Settings/index.js.map +1 -0
  450. package/lib/module/Icons/Speaker/assets/speaker-muted.png +0 -0
  451. package/lib/module/Icons/Speaker/assets/speaker-muted@2x.png +0 -0
  452. package/lib/module/Icons/Speaker/assets/speaker-muted@3x.png +0 -0
  453. package/lib/module/Icons/Speaker/assets/speaker.png +0 -0
  454. package/lib/module/Icons/Speaker/assets/speaker@2x.png +0 -0
  455. package/lib/module/Icons/Speaker/assets/speaker@3x.png +0 -0
  456. package/lib/module/Icons/Speaker/index.js +23 -0
  457. package/lib/module/Icons/Speaker/index.js.map +1 -0
  458. package/lib/module/Icons/ThreeDots/assets/three-dots-vertical.png +0 -0
  459. package/lib/module/Icons/ThreeDots/assets/three-dots-vertical@2x.png +0 -0
  460. package/lib/module/Icons/ThreeDots/assets/three-dots-vertical@3x.png +0 -0
  461. package/lib/module/Icons/ThreeDots/index.js +23 -0
  462. package/lib/module/Icons/ThreeDots/index.js.map +1 -0
  463. package/lib/module/Icons/index.js +20 -0
  464. package/lib/module/Icons/index.js.map +1 -0
  465. package/lib/module/assets/100ms-logo.png +0 -0
  466. package/lib/module/assets/brb.png +0 -0
  467. package/lib/module/assets/icon.png +0 -0
  468. package/lib/module/assets/illustration.png +0 -0
  469. package/lib/module/assets/network_0.png +0 -0
  470. package/lib/module/assets/network_1.png +0 -0
  471. package/lib/module/assets/network_2.png +0 -0
  472. package/lib/module/assets/network_3.png +0 -0
  473. package/lib/module/assets/network_4.png +0 -0
  474. package/lib/module/assets/user_music.png +0 -0
  475. package/lib/module/components/AvatarView.js +39 -0
  476. package/lib/module/components/AvatarView.js.map +1 -0
  477. package/lib/module/components/BackButton.js +33 -0
  478. package/lib/module/components/BackButton.js.map +1 -0
  479. package/lib/module/components/Chat/ChatBanner.js +67 -0
  480. package/lib/module/components/Chat/ChatBanner.js.map +1 -0
  481. package/lib/module/components/Chat/ChatList.js +44 -0
  482. package/lib/module/components/Chat/ChatList.js.map +1 -0
  483. package/lib/module/components/Chat/ChatMessage.js +165 -0
  484. package/lib/module/components/Chat/ChatMessage.js.map +1 -0
  485. package/lib/module/components/Chat/PinnedMessage.js +75 -0
  486. package/lib/module/components/Chat/PinnedMessage.js.map +1 -0
  487. package/lib/module/components/Chat/index.js +5 -0
  488. package/lib/module/components/Chat/index.js.map +1 -0
  489. package/lib/module/components/ChatWindow.js +595 -0
  490. package/lib/module/components/ChatWindow.js.map +1 -0
  491. package/lib/module/components/CustomButton.js +46 -0
  492. package/lib/module/components/CustomButton.js.map +1 -0
  493. package/lib/module/components/CustomHLSPlayerControls.js +73 -0
  494. package/lib/module/components/CustomHLSPlayerControls.js.map +1 -0
  495. package/lib/module/components/CustomInput.js +83 -0
  496. package/lib/module/components/CustomInput.js.map +1 -0
  497. package/lib/module/components/DefaultModal.js +96 -0
  498. package/lib/module/components/DefaultModal.js.map +1 -0
  499. package/lib/module/components/DisplayTrack.js +63 -0
  500. package/lib/module/components/DisplayTrack.js.map +1 -0
  501. package/lib/module/components/DisplayView.js +203 -0
  502. package/lib/module/components/DisplayView.js.map +1 -0
  503. package/lib/module/components/Footer.js +76 -0
  504. package/lib/module/components/Footer.js.map +1 -0
  505. package/lib/module/components/FullScreenIndicator.js +17 -0
  506. package/lib/module/components/FullScreenIndicator.js.map +1 -0
  507. package/lib/module/components/GridView.js +90 -0
  508. package/lib/module/components/GridView.js.map +1 -0
  509. package/lib/module/components/HLSPlayerEmoticons.js +40 -0
  510. package/lib/module/components/HLSPlayerEmoticons.js.map +1 -0
  511. package/lib/module/components/HLSPlayerStatsView.js +56 -0
  512. package/lib/module/components/HLSPlayerStatsView.js.map +1 -0
  513. package/lib/module/components/HLSView.js +132 -0
  514. package/lib/module/components/HLSView.js.map +1 -0
  515. package/lib/module/components/HMSChat.js +22 -0
  516. package/lib/module/components/HMSChat.js.map +1 -0
  517. package/lib/module/components/HMSHLSNotStarted.js +50 -0
  518. package/lib/module/components/HMSHLSNotStarted.js.map +1 -0
  519. package/lib/module/components/HMSManageCameraRotation.js +33 -0
  520. package/lib/module/components/HMSManageCameraRotation.js.map +1 -0
  521. package/lib/module/components/HMSManageLeave.js +276 -0
  522. package/lib/module/components/HMSManageLeave.js.map +1 -0
  523. package/lib/module/components/HMSManageLocalAudio.js +37 -0
  524. package/lib/module/components/HMSManageLocalAudio.js.map +1 -0
  525. package/lib/module/components/HMSManageLocalVideo.js +37 -0
  526. package/lib/module/components/HMSManageLocalVideo.js.map +1 -0
  527. package/lib/module/components/HMSManageRaiseHand.js +39 -0
  528. package/lib/module/components/HMSManageRaiseHand.js.map +1 -0
  529. package/lib/module/components/HMSPreviewDeviceSettings.js +296 -0
  530. package/lib/module/components/HMSPreviewDeviceSettings.js.map +1 -0
  531. package/lib/module/components/HMSPreviewEditName.js +54 -0
  532. package/lib/module/components/HMSPreviewEditName.js.map +1 -0
  533. package/lib/module/components/HMSPreviewJoinButton.js +47 -0
  534. package/lib/module/components/HMSPreviewJoinButton.js.map +1 -0
  535. package/lib/module/components/HMSPreviewPeersList.js +80 -0
  536. package/lib/module/components/HMSPreviewPeersList.js.map +1 -0
  537. package/lib/module/components/HMSPreviewSubtitle.js +23 -0
  538. package/lib/module/components/HMSPreviewSubtitle.js.map +1 -0
  539. package/lib/module/components/HMSPreviewTile.js +129 -0
  540. package/lib/module/components/HMSPreviewTile.js.map +1 -0
  541. package/lib/module/components/HMSPreviewTitle.js +23 -0
  542. package/lib/module/components/HMSPreviewTitle.js.map +1 -0
  543. package/lib/module/components/HMSRoomOptions.js +96 -0
  544. package/lib/module/components/HMSRoomOptions.js.map +1 -0
  545. package/lib/module/components/HMSShareScreen.js +50 -0
  546. package/lib/module/components/HMSShareScreen.js.map +1 -0
  547. package/lib/module/components/HMSShowNetworkQuality.js +48 -0
  548. package/lib/module/components/HMSShowNetworkQuality.js.map +1 -0
  549. package/lib/module/components/Header.js +167 -0
  550. package/lib/module/components/Header.js.map +1 -0
  551. package/lib/module/components/LiveButton.js +61 -0
  552. package/lib/module/components/LiveButton.js.map +1 -0
  553. package/lib/module/components/Meeting.js +55 -0
  554. package/lib/module/components/Meeting.js.map +1 -0
  555. package/lib/module/components/MeetingScreenContent.js +89 -0
  556. package/lib/module/components/MeetingScreenContent.js.map +1 -0
  557. package/lib/module/components/MenuModal/Menu.js +242 -0
  558. package/lib/module/components/MenuModal/Menu.js.map +1 -0
  559. package/lib/module/components/MenuModal/MenuDivider.js +20 -0
  560. package/lib/module/components/MenuModal/MenuDivider.js.map +1 -0
  561. package/lib/module/components/MenuModal/MenuItem.js +53 -0
  562. package/lib/module/components/MenuModal/MenuItem.js.map +1 -0
  563. package/lib/module/components/MenuModal/index.js +4 -0
  564. package/lib/module/components/MenuModal/index.js.map +1 -0
  565. package/lib/module/components/Modals.js +1609 -0
  566. package/lib/module/components/Modals.js.map +1 -0
  567. package/lib/module/components/PIPView.js +23 -0
  568. package/lib/module/components/PIPView.js.map +1 -0
  569. package/lib/module/components/Participants/ParticipantsFilter.js +121 -0
  570. package/lib/module/components/Participants/ParticipantsFilter.js.map +1 -0
  571. package/lib/module/components/Participants/ParticipantsHeader.js +58 -0
  572. package/lib/module/components/Participants/ParticipantsHeader.js.map +1 -0
  573. package/lib/module/components/Participants/ParticipantsList.js +264 -0
  574. package/lib/module/components/Participants/ParticipantsList.js.map +1 -0
  575. package/lib/module/components/Participants/ParticipantsSeachInput.js +45 -0
  576. package/lib/module/components/Participants/ParticipantsSeachInput.js.map +1 -0
  577. package/lib/module/components/Participants/SearchableParticipantsView.js +18 -0
  578. package/lib/module/components/Participants/SearchableParticipantsView.js.map +1 -0
  579. package/lib/module/components/Participants/index.js +6 -0
  580. package/lib/module/components/Participants/index.js.map +1 -0
  581. package/lib/module/components/ParticipantsModal.js +34 -0
  582. package/lib/module/components/ParticipantsModal.js.map +1 -0
  583. package/lib/module/components/PeerDisplayView.js +71 -0
  584. package/lib/module/components/PeerDisplayView.js.map +1 -0
  585. package/lib/module/components/PeerRTCStatsContainer.js +60 -0
  586. package/lib/module/components/PeerRTCStatsContainer.js.map +1 -0
  587. package/lib/module/components/PeerRTCStatsView.js +46 -0
  588. package/lib/module/components/PeerRTCStatsView.js.map +1 -0
  589. package/lib/module/components/PeerSettingsModalContent.js +233 -0
  590. package/lib/module/components/PeerSettingsModalContent.js.map +1 -0
  591. package/lib/module/components/Picker.js +83 -0
  592. package/lib/module/components/Picker.js.map +1 -0
  593. package/lib/module/components/PressableIcon.js +37 -0
  594. package/lib/module/components/PressableIcon.js.map +1 -0
  595. package/lib/module/components/Preview.js +77 -0
  596. package/lib/module/components/Preview.js.map +1 -0
  597. package/lib/module/components/RoomSettingsModalContent.js +505 -0
  598. package/lib/module/components/RoomSettingsModalContent.js.map +1 -0
  599. package/lib/module/components/StatusBar.js +17 -0
  600. package/lib/module/components/StatusBar.js.map +1 -0
  601. package/lib/module/components/StreamingQualityModalContent.js +205 -0
  602. package/lib/module/components/StreamingQualityModalContent.js.map +1 -0
  603. package/lib/module/components/SwitchRow.js +41 -0
  604. package/lib/module/components/SwitchRow.js.map +1 -0
  605. package/lib/module/components/Tile.js +104 -0
  606. package/lib/module/components/Tile.js.map +1 -0
  607. package/lib/module/components/TilesContainer.js +31 -0
  608. package/lib/module/components/TilesContainer.js.map +1 -0
  609. package/lib/module/components/ZoomableView.js +76 -0
  610. package/lib/module/components/ZoomableView.js.map +1 -0
  611. package/lib/module/components/index.js +9 -0
  612. package/lib/module/components/index.js.map +1 -0
  613. package/lib/module/components/styles.js +959 -0
  614. package/lib/module/components/styles.js.map +1 -0
  615. package/lib/module/hooks/useHmsInstance.js +174 -0
  616. package/lib/module/hooks/useHmsInstance.js.map +1 -0
  617. package/lib/module/hooks-sdk-selectors.js +9 -0
  618. package/lib/module/hooks-sdk-selectors.js.map +1 -0
  619. package/lib/module/hooks-sdk.js +115 -0
  620. package/lib/module/hooks-sdk.js.map +1 -0
  621. package/lib/module/hooks-util-selectors.js +5 -0
  622. package/lib/module/hooks-util-selectors.js.map +1 -0
  623. package/lib/module/hooks-util.js +772 -0
  624. package/lib/module/hooks-util.js.map +1 -0
  625. package/lib/module/index.js +2 -0
  626. package/lib/module/index.js.map +1 -0
  627. package/lib/module/peerTrackNodeUtils.js +52 -0
  628. package/lib/module/peerTrackNodeUtils.js.map +1 -0
  629. package/lib/module/redux/actionTypes.js +67 -0
  630. package/lib/module/redux/actionTypes.js.map +1 -0
  631. package/lib/module/redux/actions/index.js +144 -0
  632. package/lib/module/redux/actions/index.js.map +1 -0
  633. package/lib/module/redux/index.js +4 -0
  634. package/lib/module/redux/index.js.map +1 -0
  635. package/lib/module/redux/reducers/appState.js +123 -0
  636. package/lib/module/redux/reducers/appState.js.map +1 -0
  637. package/lib/module/redux/reducers/chatWindow.js +38 -0
  638. package/lib/module/redux/reducers/chatWindow.js.map +1 -0
  639. package/lib/module/redux/reducers/hmsStates.js +60 -0
  640. package/lib/module/redux/reducers/hmsStates.js.map +1 -0
  641. package/lib/module/redux/reducers/index.js +14 -0
  642. package/lib/module/redux/reducers/index.js.map +1 -0
  643. package/lib/module/redux/reducers/message.js +34 -0
  644. package/lib/module/redux/reducers/message.js.map +1 -0
  645. package/lib/module/redux/reducers/userState.js +58 -0
  646. package/lib/module/redux/reducers/userState.js.map +1 -0
  647. package/lib/module/types.js +9 -0
  648. package/lib/module/types.js.map +1 -0
  649. package/lib/module/utils/dimension.js +53 -0
  650. package/lib/module/utils/dimension.js.map +1 -0
  651. package/lib/module/utils/functions.js +338 -0
  652. package/lib/module/utils/functions.js.map +1 -0
  653. package/lib/module/utils/getRoomLinkDetails.js +16 -0
  654. package/lib/module/utils/getRoomLinkDetails.js.map +1 -0
  655. package/lib/module/utils/hooks.js +39 -0
  656. package/lib/module/utils/hooks.js.map +1 -0
  657. package/lib/module/utils/theme.js +134 -0
  658. package/lib/module/utils/theme.js.map +1 -0
  659. package/lib/module/utils/types.js +90 -0
  660. package/lib/module/utils/types.js.map +1 -0
  661. package/lib/module/utils.js +23 -0
  662. package/lib/module/utils.js.map +1 -0
  663. package/lib/typescript/HMSContainer.d.ts +3 -0
  664. package/lib/typescript/HMSContainer.d.ts.map +1 -0
  665. package/lib/typescript/HMSInstanceSetup.d.ts +3 -0
  666. package/lib/typescript/HMSInstanceSetup.d.ts.map +1 -0
  667. package/lib/typescript/HMSPrebuilt.d.ts +18 -0
  668. package/lib/typescript/HMSPrebuilt.d.ts.map +1 -0
  669. package/lib/typescript/HMSRoomSetup.d.ts +3 -0
  670. package/lib/typescript/HMSRoomSetup.d.ts.map +1 -0
  671. package/lib/typescript/Icons/100ms/index.d.ts +7 -0
  672. package/lib/typescript/Icons/100ms/index.d.ts.map +1 -0
  673. package/lib/typescript/Icons/Alert/index.d.ts +7 -0
  674. package/lib/typescript/Icons/Alert/index.d.ts.map +1 -0
  675. package/lib/typescript/Icons/Camera/index.d.ts +8 -0
  676. package/lib/typescript/Icons/Camera/index.d.ts.map +1 -0
  677. package/lib/typescript/Icons/Chat/index.d.ts +7 -0
  678. package/lib/typescript/Icons/Chat/index.d.ts.map +1 -0
  679. package/lib/typescript/Icons/Chevron/index.d.ts +8 -0
  680. package/lib/typescript/Icons/Chevron/index.d.ts.map +1 -0
  681. package/lib/typescript/Icons/Clock/index.d.ts +7 -0
  682. package/lib/typescript/Icons/Clock/index.d.ts.map +1 -0
  683. package/lib/typescript/Icons/Close/index.d.ts +7 -0
  684. package/lib/typescript/Icons/Close/index.d.ts.map +1 -0
  685. package/lib/typescript/Icons/End/index.d.ts +7 -0
  686. package/lib/typescript/Icons/End/index.d.ts.map +1 -0
  687. package/lib/typescript/Icons/Hand/index.d.ts +7 -0
  688. package/lib/typescript/Icons/Hand/index.d.ts.map +1 -0
  689. package/lib/typescript/Icons/Leave/index.d.ts +7 -0
  690. package/lib/typescript/Icons/Leave/index.d.ts.map +1 -0
  691. package/lib/typescript/Icons/Mic/index.d.ts +8 -0
  692. package/lib/typescript/Icons/Mic/index.d.ts.map +1 -0
  693. package/lib/typescript/Icons/NetworkQuality/index.d.ts +8 -0
  694. package/lib/typescript/Icons/NetworkQuality/index.d.ts.map +1 -0
  695. package/lib/typescript/Icons/Participants/index.d.ts +7 -0
  696. package/lib/typescript/Icons/Participants/index.d.ts.map +1 -0
  697. package/lib/typescript/Icons/RotateCamera/index.d.ts +7 -0
  698. package/lib/typescript/Icons/RotateCamera/index.d.ts.map +1 -0
  699. package/lib/typescript/Icons/ScreenShare/index.d.ts +7 -0
  700. package/lib/typescript/Icons/ScreenShare/index.d.ts.map +1 -0
  701. package/lib/typescript/Icons/Send/index.d.ts +7 -0
  702. package/lib/typescript/Icons/Send/index.d.ts.map +1 -0
  703. package/lib/typescript/Icons/Settings/index.d.ts +7 -0
  704. package/lib/typescript/Icons/Settings/index.d.ts.map +1 -0
  705. package/lib/typescript/Icons/Speaker/index.d.ts +8 -0
  706. package/lib/typescript/Icons/Speaker/index.d.ts.map +1 -0
  707. package/lib/typescript/Icons/ThreeDots/index.d.ts +8 -0
  708. package/lib/typescript/Icons/ThreeDots/index.d.ts.map +1 -0
  709. package/lib/typescript/Icons/index.d.ts +20 -0
  710. package/lib/typescript/Icons/index.d.ts.map +1 -0
  711. package/lib/typescript/components/AvatarView.d.ts +10 -0
  712. package/lib/typescript/components/AvatarView.d.ts.map +1 -0
  713. package/lib/typescript/components/BackButton.d.ts +5 -0
  714. package/lib/typescript/components/BackButton.d.ts.map +1 -0
  715. package/lib/typescript/components/Chat/ChatBanner.d.ts +3 -0
  716. package/lib/typescript/components/Chat/ChatBanner.d.ts.map +1 -0
  717. package/lib/typescript/components/Chat/ChatList.d.ts +5 -0
  718. package/lib/typescript/components/Chat/ChatList.d.ts.map +1 -0
  719. package/lib/typescript/components/Chat/ChatMessage.d.ts +8 -0
  720. package/lib/typescript/components/Chat/ChatMessage.d.ts.map +1 -0
  721. package/lib/typescript/components/Chat/PinnedMessage.d.ts +3 -0
  722. package/lib/typescript/components/Chat/PinnedMessage.d.ts.map +1 -0
  723. package/lib/typescript/components/Chat/index.d.ts +5 -0
  724. package/lib/typescript/components/Chat/index.d.ts.map +1 -0
  725. package/lib/typescript/components/ChatWindow.d.ts +22 -0
  726. package/lib/typescript/components/ChatWindow.d.ts.map +1 -0
  727. package/lib/typescript/components/CustomButton.d.ts +14 -0
  728. package/lib/typescript/components/CustomButton.d.ts.map +1 -0
  729. package/lib/typescript/components/CustomHLSPlayerControls.d.ts +7 -0
  730. package/lib/typescript/components/CustomHLSPlayerControls.d.ts.map +1 -0
  731. package/lib/typescript/components/CustomInput.d.ts +24 -0
  732. package/lib/typescript/components/CustomInput.d.ts.map +1 -0
  733. package/lib/typescript/components/DefaultModal.d.ts +15 -0
  734. package/lib/typescript/components/DefaultModal.d.ts.map +1 -0
  735. package/lib/typescript/components/DisplayTrack.d.ts +9 -0
  736. package/lib/typescript/components/DisplayTrack.d.ts.map +1 -0
  737. package/lib/typescript/components/DisplayView.d.ts +10 -0
  738. package/lib/typescript/components/DisplayView.d.ts.map +1 -0
  739. package/lib/typescript/components/Footer.d.ts +9 -0
  740. package/lib/typescript/components/Footer.d.ts.map +1 -0
  741. package/lib/typescript/components/FullScreenIndicator.d.ts +3 -0
  742. package/lib/typescript/components/FullScreenIndicator.d.ts.map +1 -0
  743. package/lib/typescript/components/GridView.d.ts +14 -0
  744. package/lib/typescript/components/GridView.d.ts.map +1 -0
  745. package/lib/typescript/components/HLSPlayerEmoticons.d.ts +2 -0
  746. package/lib/typescript/components/HLSPlayerEmoticons.d.ts.map +1 -0
  747. package/lib/typescript/components/HLSPlayerStatsView.d.ts +6 -0
  748. package/lib/typescript/components/HLSPlayerStatsView.d.ts.map +1 -0
  749. package/lib/typescript/components/HLSView.d.ts +3 -0
  750. package/lib/typescript/components/HLSView.d.ts.map +1 -0
  751. package/lib/typescript/components/HMSChat.d.ts +3 -0
  752. package/lib/typescript/components/HMSChat.d.ts.map +1 -0
  753. package/lib/typescript/components/HMSHLSNotStarted.d.ts +3 -0
  754. package/lib/typescript/components/HMSHLSNotStarted.d.ts.map +1 -0
  755. package/lib/typescript/components/HMSManageCameraRotation.d.ts +3 -0
  756. package/lib/typescript/components/HMSManageCameraRotation.d.ts.map +1 -0
  757. package/lib/typescript/components/HMSManageLeave.d.ts +9 -0
  758. package/lib/typescript/components/HMSManageLeave.d.ts.map +1 -0
  759. package/lib/typescript/components/HMSManageLocalAudio.d.ts +3 -0
  760. package/lib/typescript/components/HMSManageLocalAudio.d.ts.map +1 -0
  761. package/lib/typescript/components/HMSManageLocalVideo.d.ts +3 -0
  762. package/lib/typescript/components/HMSManageLocalVideo.d.ts.map +1 -0
  763. package/lib/typescript/components/HMSManageRaiseHand.d.ts +3 -0
  764. package/lib/typescript/components/HMSManageRaiseHand.d.ts.map +1 -0
  765. package/lib/typescript/components/HMSPreviewDeviceSettings.d.ts +3 -0
  766. package/lib/typescript/components/HMSPreviewDeviceSettings.d.ts.map +1 -0
  767. package/lib/typescript/components/HMSPreviewEditName.d.ts +5 -0
  768. package/lib/typescript/components/HMSPreviewEditName.d.ts.map +1 -0
  769. package/lib/typescript/components/HMSPreviewJoinButton.d.ts +7 -0
  770. package/lib/typescript/components/HMSPreviewJoinButton.d.ts.map +1 -0
  771. package/lib/typescript/components/HMSPreviewPeersList.d.ts +5 -0
  772. package/lib/typescript/components/HMSPreviewPeersList.d.ts.map +1 -0
  773. package/lib/typescript/components/HMSPreviewSubtitle.d.ts +6 -0
  774. package/lib/typescript/components/HMSPreviewSubtitle.d.ts.map +1 -0
  775. package/lib/typescript/components/HMSPreviewTile.d.ts +3 -0
  776. package/lib/typescript/components/HMSPreviewTile.d.ts.map +1 -0
  777. package/lib/typescript/components/HMSPreviewTitle.d.ts +6 -0
  778. package/lib/typescript/components/HMSPreviewTitle.d.ts.map +1 -0
  779. package/lib/typescript/components/HMSRoomOptions.d.ts +6 -0
  780. package/lib/typescript/components/HMSRoomOptions.d.ts.map +1 -0
  781. package/lib/typescript/components/HMSShareScreen.d.ts +9 -0
  782. package/lib/typescript/components/HMSShareScreen.d.ts.map +1 -0
  783. package/lib/typescript/components/HMSShowNetworkQuality.d.ts +3 -0
  784. package/lib/typescript/components/HMSShowNetworkQuality.d.ts.map +1 -0
  785. package/lib/typescript/components/Header.d.ts +9 -0
  786. package/lib/typescript/components/Header.d.ts.map +1 -0
  787. package/lib/typescript/components/LiveButton.d.ts +17 -0
  788. package/lib/typescript/components/LiveButton.d.ts.map +1 -0
  789. package/lib/typescript/components/Meeting.d.ts +8 -0
  790. package/lib/typescript/components/Meeting.d.ts.map +1 -0
  791. package/lib/typescript/components/MeetingScreenContent.d.ts +8 -0
  792. package/lib/typescript/components/MeetingScreenContent.d.ts.map +1 -0
  793. package/lib/typescript/components/MenuModal/Menu.d.ts +45 -0
  794. package/lib/typescript/components/MenuModal/Menu.d.ts.map +1 -0
  795. package/lib/typescript/components/MenuModal/MenuDivider.d.ts +6 -0
  796. package/lib/typescript/components/MenuModal/MenuDivider.d.ts.map +1 -0
  797. package/lib/typescript/components/MenuModal/MenuItem.d.ts +12 -0
  798. package/lib/typescript/components/MenuModal/MenuItem.d.ts.map +1 -0
  799. package/lib/typescript/components/MenuModal/index.d.ts +7 -0
  800. package/lib/typescript/components/MenuModal/index.d.ts.map +1 -0
  801. package/lib/typescript/components/Modals.d.ts +96 -0
  802. package/lib/typescript/components/Modals.d.ts.map +1 -0
  803. package/lib/typescript/components/PIPView.d.ts +8 -0
  804. package/lib/typescript/components/PIPView.d.ts.map +1 -0
  805. package/lib/typescript/components/Participants/ParticipantsFilter.d.ts +6 -0
  806. package/lib/typescript/components/Participants/ParticipantsFilter.d.ts.map +1 -0
  807. package/lib/typescript/components/Participants/ParticipantsHeader.d.ts +9 -0
  808. package/lib/typescript/components/Participants/ParticipantsHeader.d.ts.map +1 -0
  809. package/lib/typescript/components/Participants/ParticipantsList.d.ts +7 -0
  810. package/lib/typescript/components/Participants/ParticipantsList.d.ts.map +1 -0
  811. package/lib/typescript/components/Participants/ParticipantsSeachInput.d.ts +8 -0
  812. package/lib/typescript/components/Participants/ParticipantsSeachInput.d.ts.map +1 -0
  813. package/lib/typescript/components/Participants/SearchableParticipantsView.d.ts +3 -0
  814. package/lib/typescript/components/Participants/SearchableParticipantsView.d.ts.map +1 -0
  815. package/lib/typescript/components/Participants/index.d.ts +6 -0
  816. package/lib/typescript/components/Participants/index.d.ts.map +1 -0
  817. package/lib/typescript/components/ParticipantsModal.d.ts +5 -0
  818. package/lib/typescript/components/ParticipantsModal.d.ts.map +1 -0
  819. package/lib/typescript/components/PeerDisplayView.d.ts +11 -0
  820. package/lib/typescript/components/PeerDisplayView.d.ts.map +1 -0
  821. package/lib/typescript/components/PeerRTCStatsContainer.d.ts +9 -0
  822. package/lib/typescript/components/PeerRTCStatsContainer.d.ts.map +1 -0
  823. package/lib/typescript/components/PeerRTCStatsView.d.ts +10 -0
  824. package/lib/typescript/components/PeerRTCStatsView.d.ts.map +1 -0
  825. package/lib/typescript/components/PeerSettingsModalContent.d.ts +13 -0
  826. package/lib/typescript/components/PeerSettingsModalContent.d.ts.map +1 -0
  827. package/lib/typescript/components/Picker.d.ts +9 -0
  828. package/lib/typescript/components/Picker.d.ts.map +1 -0
  829. package/lib/typescript/components/PressableIcon.d.ts +11 -0
  830. package/lib/typescript/components/PressableIcon.d.ts.map +1 -0
  831. package/lib/typescript/components/Preview.d.ts +6 -0
  832. package/lib/typescript/components/Preview.d.ts.map +1 -0
  833. package/lib/typescript/components/RoomSettingsModalContent.d.ts +17 -0
  834. package/lib/typescript/components/RoomSettingsModalContent.d.ts.map +1 -0
  835. package/lib/typescript/components/StatusBar.d.ts +7 -0
  836. package/lib/typescript/components/StatusBar.d.ts.map +1 -0
  837. package/lib/typescript/components/StreamingQualityModalContent.d.ts +9 -0
  838. package/lib/typescript/components/StreamingQualityModalContent.d.ts.map +1 -0
  839. package/lib/typescript/components/SwitchRow.d.ts +12 -0
  840. package/lib/typescript/components/SwitchRow.d.ts.map +1 -0
  841. package/lib/typescript/components/Tile.d.ts +12 -0
  842. package/lib/typescript/components/Tile.d.ts.map +1 -0
  843. package/lib/typescript/components/TilesContainer.d.ts +11 -0
  844. package/lib/typescript/components/TilesContainer.d.ts.map +1 -0
  845. package/lib/typescript/components/ZoomableView.d.ts +6 -0
  846. package/lib/typescript/components/ZoomableView.d.ts.map +1 -0
  847. package/lib/typescript/components/index.d.ts +9 -0
  848. package/lib/typescript/components/index.d.ts.map +1 -0
  849. package/lib/typescript/components/styles.d.ts +945 -0
  850. package/lib/typescript/components/styles.d.ts.map +1 -0
  851. package/lib/typescript/hooks/useHmsInstance.d.ts +1 -0
  852. package/lib/typescript/hooks/useHmsInstance.d.ts.map +1 -0
  853. package/lib/typescript/hooks-sdk-selectors.d.ts +4 -0
  854. package/lib/typescript/hooks-sdk-selectors.d.ts.map +1 -0
  855. package/lib/typescript/hooks-sdk.d.ts +12 -0
  856. package/lib/typescript/hooks-sdk.d.ts.map +1 -0
  857. package/lib/typescript/hooks-util-selectors.d.ts +3 -0
  858. package/lib/typescript/hooks-util-selectors.d.ts.map +1 -0
  859. package/lib/typescript/hooks-util.d.ts +53 -0
  860. package/lib/typescript/hooks-util.d.ts.map +1 -0
  861. package/lib/typescript/index.d.ts +2 -0
  862. package/lib/typescript/index.d.ts.map +1 -0
  863. package/lib/typescript/peerTrackNodeUtils.d.ts +10 -0
  864. package/lib/typescript/peerTrackNodeUtils.d.ts.map +1 -0
  865. package/lib/typescript/redux/actionTypes.d.ts +56 -0
  866. package/lib/typescript/redux/actionTypes.d.ts.map +1 -0
  867. package/lib/typescript/redux/actions/index.d.ts +199 -0
  868. package/lib/typescript/redux/actions/index.d.ts.map +1 -0
  869. package/lib/typescript/redux/index.d.ts +55 -0
  870. package/lib/typescript/redux/index.d.ts.map +1 -0
  871. package/lib/typescript/redux/reducers/appState.d.ts +32 -0
  872. package/lib/typescript/redux/reducers/appState.d.ts.map +1 -0
  873. package/lib/typescript/redux/reducers/chatWindow.d.ts +10 -0
  874. package/lib/typescript/redux/reducers/chatWindow.d.ts.map +1 -0
  875. package/lib/typescript/redux/reducers/hmsStates.d.ts +46 -0
  876. package/lib/typescript/redux/reducers/hmsStates.d.ts.map +1 -0
  877. package/lib/typescript/redux/reducers/index.d.ts +54 -0
  878. package/lib/typescript/redux/reducers/index.d.ts.map +1 -0
  879. package/lib/typescript/redux/reducers/message.d.ts +12 -0
  880. package/lib/typescript/redux/reducers/message.d.ts.map +1 -0
  881. package/lib/typescript/redux/reducers/userState.d.ts +26 -0
  882. package/lib/typescript/redux/reducers/userState.d.ts.map +1 -0
  883. package/lib/typescript/types.d.ts +8 -0
  884. package/lib/typescript/types.d.ts.map +1 -0
  885. package/lib/typescript/utils/dimension.d.ts +15 -0
  886. package/lib/typescript/utils/dimension.d.ts.map +1 -0
  887. package/lib/typescript/utils/functions.d.ts +47 -0
  888. package/lib/typescript/utils/functions.d.ts.map +1 -0
  889. package/lib/typescript/utils/getRoomLinkDetails.d.ts +5 -0
  890. package/lib/typescript/utils/getRoomLinkDetails.d.ts.map +1 -0
  891. package/lib/typescript/utils/hooks.d.ts +2 -0
  892. package/lib/typescript/utils/hooks.d.ts.map +1 -0
  893. package/lib/typescript/utils/theme.d.ts +126 -0
  894. package/lib/typescript/utils/theme.d.ts.map +1 -0
  895. package/lib/typescript/utils/types.d.ts +82 -0
  896. package/lib/typescript/utils/types.d.ts.map +1 -0
  897. package/lib/typescript/utils.d.ts +12 -0
  898. package/lib/typescript/utils.d.ts.map +1 -0
  899. package/package.json +182 -0
  900. package/src/HMSContainer.tsx +18 -0
  901. package/src/HMSInstanceSetup.tsx +196 -0
  902. package/src/HMSPrebuilt.tsx +36 -0
  903. package/src/HMSRoomSetup.tsx +281 -0
  904. package/src/Icons/100ms/assets/hms-logo.png +0 -0
  905. package/src/Icons/100ms/assets/hms-logo@2x.png +0 -0
  906. package/src/Icons/100ms/assets/hms-logo@3x.png +0 -0
  907. package/src/Icons/100ms/index.tsx +27 -0
  908. package/src/Icons/Alert/assets/alert.png +0 -0
  909. package/src/Icons/Alert/assets/alert@2x.png +0 -0
  910. package/src/Icons/Alert/assets/alert@3x.png +0 -0
  911. package/src/Icons/Alert/index.tsx +27 -0
  912. package/src/Icons/Camera/assets/camera-muted.png +0 -0
  913. package/src/Icons/Camera/assets/camera-muted@2x.png +0 -0
  914. package/src/Icons/Camera/assets/camera-muted@3x.png +0 -0
  915. package/src/Icons/Camera/assets/camera-unmuted.png +0 -0
  916. package/src/Icons/Camera/assets/camera-unmuted@2x.png +0 -0
  917. package/src/Icons/Camera/assets/camera-unmuted@3x.png +0 -0
  918. package/src/Icons/Camera/index.tsx +34 -0
  919. package/src/Icons/Chat/assets/chat.png +0 -0
  920. package/src/Icons/Chat/assets/chat@2x.png +0 -0
  921. package/src/Icons/Chat/assets/chat@3x.png +0 -0
  922. package/src/Icons/Chat/index.tsx +24 -0
  923. package/src/Icons/Chevron/assets/chevron-down.png +0 -0
  924. package/src/Icons/Chevron/assets/chevron-down@2x.png +0 -0
  925. package/src/Icons/Chevron/assets/chevron-down@3x.png +0 -0
  926. package/src/Icons/Chevron/assets/chevron-left.png +0 -0
  927. package/src/Icons/Chevron/assets/chevron-left@2x.png +0 -0
  928. package/src/Icons/Chevron/assets/chevron-left@3x.png +0 -0
  929. package/src/Icons/Chevron/index.tsx +34 -0
  930. package/src/Icons/Clock/assets/clock.png +0 -0
  931. package/src/Icons/Clock/assets/clock@2x.png +0 -0
  932. package/src/Icons/Clock/assets/clock@3x.png +0 -0
  933. package/src/Icons/Clock/index.tsx +27 -0
  934. package/src/Icons/Close/assets/close.png +0 -0
  935. package/src/Icons/Close/assets/close@2x.png +0 -0
  936. package/src/Icons/Close/assets/close@3x.png +0 -0
  937. package/src/Icons/Close/index.tsx +27 -0
  938. package/src/Icons/End/assets/end.png +0 -0
  939. package/src/Icons/End/assets/end@2x.png +0 -0
  940. package/src/Icons/End/assets/end@3x.png +0 -0
  941. package/src/Icons/End/index.tsx +24 -0
  942. package/src/Icons/Hand/assets/hand.png +0 -0
  943. package/src/Icons/Hand/assets/hand@2x.png +0 -0
  944. package/src/Icons/Hand/assets/hand@3x.png +0 -0
  945. package/src/Icons/Hand/index.tsx +27 -0
  946. package/src/Icons/Leave/assets/leave.png +0 -0
  947. package/src/Icons/Leave/assets/leave@2x.png +0 -0
  948. package/src/Icons/Leave/assets/leave@3x.png +0 -0
  949. package/src/Icons/Leave/index.tsx +27 -0
  950. package/src/Icons/Mic/assets/mic-muted.png +0 -0
  951. package/src/Icons/Mic/assets/mic-muted@2x.png +0 -0
  952. package/src/Icons/Mic/assets/mic-muted@3x.png +0 -0
  953. package/src/Icons/Mic/assets/mic-unmuted.png +0 -0
  954. package/src/Icons/Mic/assets/mic-unmuted@2x.png +0 -0
  955. package/src/Icons/Mic/assets/mic-unmuted@3x.png +0 -0
  956. package/src/Icons/Mic/index.tsx +34 -0
  957. package/src/Icons/NetworkQuality/assets/network_0.png +0 -0
  958. package/src/Icons/NetworkQuality/assets/network_0@2x.png +0 -0
  959. package/src/Icons/NetworkQuality/assets/network_0@3x.png +0 -0
  960. package/src/Icons/NetworkQuality/assets/network_1.png +0 -0
  961. package/src/Icons/NetworkQuality/assets/network_1@2x.png +0 -0
  962. package/src/Icons/NetworkQuality/assets/network_1@3x.png +0 -0
  963. package/src/Icons/NetworkQuality/assets/network_2.png +0 -0
  964. package/src/Icons/NetworkQuality/assets/network_2@2x.png +0 -0
  965. package/src/Icons/NetworkQuality/assets/network_2@3x.png +0 -0
  966. package/src/Icons/NetworkQuality/assets/network_3.png +0 -0
  967. package/src/Icons/NetworkQuality/assets/network_3@2x.png +0 -0
  968. package/src/Icons/NetworkQuality/assets/network_3@3x.png +0 -0
  969. package/src/Icons/NetworkQuality/assets/network_4.png +0 -0
  970. package/src/Icons/NetworkQuality/assets/network_4@2x.png +0 -0
  971. package/src/Icons/NetworkQuality/assets/network_4@3x.png +0 -0
  972. package/src/Icons/NetworkQuality/assets/network_5.png +0 -0
  973. package/src/Icons/NetworkQuality/assets/network_5@2x.png +0 -0
  974. package/src/Icons/NetworkQuality/assets/network_5@3x.png +0 -0
  975. package/src/Icons/NetworkQuality/index.tsx +42 -0
  976. package/src/Icons/Participants/assets/participants.png +0 -0
  977. package/src/Icons/Participants/assets/participants@2x.png +0 -0
  978. package/src/Icons/Participants/assets/participants@3x.png +0 -0
  979. package/src/Icons/Participants/index.tsx +27 -0
  980. package/src/Icons/RotateCamera/assets/rotate-camera.png +0 -0
  981. package/src/Icons/RotateCamera/assets/rotate-camera@2x.png +0 -0
  982. package/src/Icons/RotateCamera/assets/rotate-camera@3x.png +0 -0
  983. package/src/Icons/RotateCamera/index.tsx +27 -0
  984. package/src/Icons/ScreenShare/assets/screen-share.png +0 -0
  985. package/src/Icons/ScreenShare/assets/screen-share@2x.png +0 -0
  986. package/src/Icons/ScreenShare/assets/screen-share@3x.png +0 -0
  987. package/src/Icons/ScreenShare/index.tsx +27 -0
  988. package/src/Icons/Send/assets/send.png +0 -0
  989. package/src/Icons/Send/assets/send@2x.png +0 -0
  990. package/src/Icons/Send/assets/send@3x.png +0 -0
  991. package/src/Icons/Send/index.tsx +24 -0
  992. package/src/Icons/Settings/assets/settings.png +0 -0
  993. package/src/Icons/Settings/assets/settings@2x.png +0 -0
  994. package/src/Icons/Settings/assets/settings@3x.png +0 -0
  995. package/src/Icons/Settings/index.tsx +27 -0
  996. package/src/Icons/Speaker/assets/speaker-muted.png +0 -0
  997. package/src/Icons/Speaker/assets/speaker-muted@2x.png +0 -0
  998. package/src/Icons/Speaker/assets/speaker-muted@3x.png +0 -0
  999. package/src/Icons/Speaker/assets/speaker.png +0 -0
  1000. package/src/Icons/Speaker/assets/speaker@2x.png +0 -0
  1001. package/src/Icons/Speaker/assets/speaker@3x.png +0 -0
  1002. package/src/Icons/Speaker/index.tsx +34 -0
  1003. package/src/Icons/ThreeDots/assets/three-dots-vertical.png +0 -0
  1004. package/src/Icons/ThreeDots/assets/three-dots-vertical@2x.png +0 -0
  1005. package/src/Icons/ThreeDots/assets/three-dots-vertical@3x.png +0 -0
  1006. package/src/Icons/ThreeDots/index.tsx +34 -0
  1007. package/src/Icons/index.ts +19 -0
  1008. package/src/assets/100ms-logo.png +0 -0
  1009. package/src/assets/brb.png +0 -0
  1010. package/src/assets/icon.png +0 -0
  1011. package/src/assets/illustration.png +0 -0
  1012. package/src/assets/network_0.png +0 -0
  1013. package/src/assets/network_1.png +0 -0
  1014. package/src/assets/network_2.png +0 -0
  1015. package/src/assets/network_3.png +0 -0
  1016. package/src/assets/network_4.png +0 -0
  1017. package/src/assets/user_music.png +0 -0
  1018. package/src/components/AvatarView.tsx +54 -0
  1019. package/src/components/BackButton.tsx +42 -0
  1020. package/src/components/Chat/ChatBanner.tsx +70 -0
  1021. package/src/components/Chat/ChatList.tsx +60 -0
  1022. package/src/components/Chat/ChatMessage.tsx +237 -0
  1023. package/src/components/Chat/PinnedMessage.tsx +89 -0
  1024. package/src/components/Chat/index.ts +4 -0
  1025. package/src/components/ChatWindow.tsx +706 -0
  1026. package/src/components/CustomButton.tsx +80 -0
  1027. package/src/components/CustomHLSPlayerControls.tsx +92 -0
  1028. package/src/components/CustomInput.tsx +139 -0
  1029. package/src/components/DefaultModal.tsx +117 -0
  1030. package/src/components/DisplayTrack.tsx +92 -0
  1031. package/src/components/DisplayView.tsx +314 -0
  1032. package/src/components/Footer.tsx +109 -0
  1033. package/src/components/FullScreenIndicator.tsx +21 -0
  1034. package/src/components/GridView.tsx +124 -0
  1035. package/src/components/HLSPlayerEmoticons.tsx +60 -0
  1036. package/src/components/HLSPlayerStatsView.tsx +68 -0
  1037. package/src/components/HLSView.tsx +170 -0
  1038. package/src/components/HMSChat.tsx +36 -0
  1039. package/src/components/HMSHLSNotStarted.tsx +62 -0
  1040. package/src/components/HMSManageCameraRotation.tsx +48 -0
  1041. package/src/components/HMSManageLeave.tsx +349 -0
  1042. package/src/components/HMSManageLocalAudio.tsx +49 -0
  1043. package/src/components/HMSManageLocalVideo.tsx +49 -0
  1044. package/src/components/HMSManageRaiseHand.tsx +48 -0
  1045. package/src/components/HMSPreviewDeviceSettings.tsx +387 -0
  1046. package/src/components/HMSPreviewEditName.tsx +63 -0
  1047. package/src/components/HMSPreviewJoinButton.tsx +64 -0
  1048. package/src/components/HMSPreviewPeersList.tsx +108 -0
  1049. package/src/components/HMSPreviewSubtitle.tsx +26 -0
  1050. package/src/components/HMSPreviewTile.tsx +152 -0
  1051. package/src/components/HMSPreviewTitle.tsx +26 -0
  1052. package/src/components/HMSRoomOptions.tsx +141 -0
  1053. package/src/components/HMSShareScreen.tsx +71 -0
  1054. package/src/components/HMSShowNetworkQuality.tsx +67 -0
  1055. package/src/components/Header.tsx +185 -0
  1056. package/src/components/LiveButton.tsx +77 -0
  1057. package/src/components/Meeting.tsx +72 -0
  1058. package/src/components/MeetingScreenContent.tsx +109 -0
  1059. package/src/components/MenuModal/Menu.tsx +305 -0
  1060. package/src/components/MenuModal/MenuDivider.tsx +22 -0
  1061. package/src/components/MenuModal/MenuItem.tsx +67 -0
  1062. package/src/components/MenuModal/index.ts +7 -0
  1063. package/src/components/Modals.tsx +2103 -0
  1064. package/src/components/PIPView.tsx +30 -0
  1065. package/src/components/Participants/ParticipantsFilter.tsx +144 -0
  1066. package/src/components/Participants/ParticipantsHeader.tsx +64 -0
  1067. package/src/components/Participants/ParticipantsList.tsx +331 -0
  1068. package/src/components/Participants/ParticipantsSeachInput.tsx +55 -0
  1069. package/src/components/Participants/SearchableParticipantsView.tsx +21 -0
  1070. package/src/components/Participants/index.ts +5 -0
  1071. package/src/components/ParticipantsModal.tsx +46 -0
  1072. package/src/components/PeerDisplayView.tsx +112 -0
  1073. package/src/components/PeerRTCStatsContainer.tsx +82 -0
  1074. package/src/components/PeerRTCStatsView.tsx +110 -0
  1075. package/src/components/PeerSettingsModalContent.tsx +355 -0
  1076. package/src/components/Picker.tsx +108 -0
  1077. package/src/components/PressableIcon.tsx +54 -0
  1078. package/src/components/Preview.tsx +108 -0
  1079. package/src/components/RoomSettingsModalContent.tsx +743 -0
  1080. package/src/components/StatusBar.tsx +22 -0
  1081. package/src/components/StreamingQualityModalContent.tsx +266 -0
  1082. package/src/components/SwitchRow.tsx +55 -0
  1083. package/src/components/Tile.tsx +119 -0
  1084. package/src/components/TilesContainer.tsx +48 -0
  1085. package/src/components/ZoomableView.tsx +91 -0
  1086. package/src/components/index.ts +8 -0
  1087. package/src/components/styles.ts +961 -0
  1088. package/src/hooks/useHmsInstance.ts +173 -0
  1089. package/src/hooks-sdk-selectors.tsx +9 -0
  1090. package/src/hooks-sdk.ts +156 -0
  1091. package/src/hooks-util-selectors.tsx +4 -0
  1092. package/src/hooks-util.ts +1124 -0
  1093. package/src/index.ts +1 -0
  1094. package/src/peerTrackNodeUtils.tsx +114 -0
  1095. package/src/redux/actionTypes.ts +85 -0
  1096. package/src/redux/actions/index.ts +196 -0
  1097. package/src/redux/index.ts +8 -0
  1098. package/src/redux/reducers/appState.ts +143 -0
  1099. package/src/redux/reducers/chatWindow.ts +35 -0
  1100. package/src/redux/reducers/hmsStates.ts +126 -0
  1101. package/src/redux/reducers/index.ts +14 -0
  1102. package/src/redux/reducers/message.ts +36 -0
  1103. package/src/redux/reducers/userState.ts +88 -0
  1104. package/src/types.ts +7 -0
  1105. package/src/utils/dimension.ts +57 -0
  1106. package/src/utils/functions.ts +522 -0
  1107. package/src/utils/getRoomLinkDetails.ts +23 -0
  1108. package/src/utils/hooks.ts +104 -0
  1109. package/src/utils/theme.ts +130 -0
  1110. package/src/utils/types.ts +95 -0
  1111. package/src/utils.ts +24 -0
@@ -0,0 +1,1609 @@
1
+ import React, { useEffect, useState } from 'react';
2
+ import { View, TouchableOpacity, Text, ScrollView, TextInput, StyleSheet, Image, Platform, InteractionManager, useWindowDimensions } from 'react-native';
3
+ import Toast from 'react-native-simple-toast';
4
+ import { useDispatch, useSelector } from 'react-redux';
5
+ import { HMSTrackType, HMSTrackSource, HMSAudioDevice, HMSAudioMixingMode, HMSHLSConfig } from '@100mslive/react-native-hms';
6
+ import Feather from 'react-native-vector-icons/Feather';
7
+ import Entypo from 'react-native-vector-icons/Entypo';
8
+ import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons';
9
+ import MaterialIcons from 'react-native-vector-icons/MaterialIcons';
10
+ import { Slider } from '@miblanchard/react-native-slider';
11
+ import RNFetchBlob from 'rn-fetch-blob';
12
+ import RNFS from 'react-native-fs';
13
+ import Share from 'react-native-share';
14
+ import { styles } from './styles';
15
+ import { CustomButton } from './CustomButton';
16
+ import { CustomInput } from './CustomInput';
17
+ import { Menu, MenuItem } from './MenuModal';
18
+ import { CustomPicker } from './Picker';
19
+ import { changeHLSAspectRatio, changeShowStats, saveUserData } from '../redux/actions';
20
+ import { requestExternalStoragePermission, getTime } from '../utils/functions';
21
+ import { ModalTypes, SUPPORTED_ASPECT_RATIOS, SortingType } from '../utils/types';
22
+ import { COLORS } from '../utils/theme';
23
+ import { SwitchRow } from './SwitchRow';
24
+ import { useHMSInstance } from '../hooks-util';
25
+ export const ChangeRoleModal = _ref => {
26
+ let {
27
+ cancelModal
28
+ } = _ref;
29
+ const instance = useHMSInstance();
30
+ const peer = useSelector(state => state.app.peerToUpdate);
31
+ const roles = useSelector(state => state.hmsStates.roles);
32
+ const [newRole, setNewRole] = useState(peer === null || peer === void 0 ? void 0 : peer.role);
33
+ const [request, setRequest] = useState(false);
34
+ const [visible, setVisible] = useState(false);
35
+ const hideMenu = () => setVisible(false);
36
+ const showMenu = () => setVisible(true);
37
+ const changeRole = () => {
38
+ instance === null || instance === void 0 ? void 0 : instance.changeRoleOfPeer(peer, newRole, !request).catch(e => {
39
+ console.log('Change Role of Peer Error: ', e);
40
+ Toast.showWithGravity(e.message, Toast.LONG, Toast.TOP);
41
+ });
42
+ cancelModal();
43
+ };
44
+ return /*#__PURE__*/React.createElement(View, {
45
+ style: styles.roleChangeModal
46
+ }, /*#__PURE__*/React.createElement(Text, {
47
+ style: styles.roleChangeModalHeading
48
+ }, "Change Role"), /*#__PURE__*/React.createElement(Text, {
49
+ style: styles.roleChangeModalDescription
50
+ }, "Change the role of '", peer === null || peer === void 0 ? void 0 : peer.name, "' to"), /*#__PURE__*/React.createElement(Menu, {
51
+ visible: visible,
52
+ anchor: /*#__PURE__*/React.createElement(TouchableOpacity, {
53
+ style: styles.participantChangeRoleContainer,
54
+ onPress: showMenu
55
+ }, /*#__PURE__*/React.createElement(Text, {
56
+ style: styles.participantFilterText,
57
+ numberOfLines: 1
58
+ }, newRole === null || newRole === void 0 ? void 0 : newRole.name), /*#__PURE__*/React.createElement(MaterialIcons, {
59
+ name: visible ? 'arrow-drop-up' : 'arrow-drop-down',
60
+ style: styles.participantFilterIcon,
61
+ size: 24
62
+ })),
63
+ onRequestClose: hideMenu,
64
+ style: styles.participantsMenuContainer
65
+ }, roles === null || roles === void 0 ? void 0 : roles.map(knownRole => {
66
+ return /*#__PURE__*/React.createElement(MenuItem, {
67
+ onPress: () => {
68
+ hideMenu();
69
+ setNewRole(knownRole);
70
+ },
71
+ key: knownRole.name
72
+ }, /*#__PURE__*/React.createElement(View, {
73
+ style: styles.participantMenuItem
74
+ }, /*#__PURE__*/React.createElement(Text, {
75
+ style: styles.participantMenuItemName
76
+ }, knownRole === null || knownRole === void 0 ? void 0 : knownRole.name)));
77
+ })), !(peer !== null && peer !== void 0 && peer.isLocal) && /*#__PURE__*/React.createElement(TouchableOpacity, {
78
+ style: styles.roleChangeModalPermissionContainer,
79
+ onPress: () => {
80
+ setRequest(!request);
81
+ }
82
+ }, /*#__PURE__*/React.createElement(View, {
83
+ style: styles.roleChangeModalCheckBox
84
+ }, request && /*#__PURE__*/React.createElement(Entypo, {
85
+ name: "check",
86
+ style: styles.roleChangeModalCheck,
87
+ size: 10
88
+ })), /*#__PURE__*/React.createElement(Text, {
89
+ style: styles.roleChangeModalPermission
90
+ }, "Request permission from the user")), /*#__PURE__*/React.createElement(View, {
91
+ style: styles.roleChangeModalPermissionContainer
92
+ }, /*#__PURE__*/React.createElement(CustomButton, {
93
+ title: "Cancel",
94
+ onPress: cancelModal,
95
+ viewStyle: styles.roleChangeModalCancelButton,
96
+ textStyle: styles.roleChangeModalButtonText
97
+ }), /*#__PURE__*/React.createElement(CustomButton, {
98
+ title: "Change",
99
+ onPress: changeRole,
100
+ viewStyle: styles.roleChangeModalSuccessButton,
101
+ textStyle: styles.roleChangeModalButtonText
102
+ })));
103
+ };
104
+ export const SaveScreenshot = _ref2 => {
105
+ let {
106
+ imageSource,
107
+ cancelModal
108
+ } = _ref2;
109
+ const peer = useSelector(state => state.hmsStates.localPeer || undefined);
110
+
111
+ /**
112
+ * Get target path on external storage to save image
113
+ * @param {string} imageExtension file extension to use for image
114
+ * @param {string} peerName name of peer to use in image name
115
+ * @returns string - path on external storage to save image
116
+ */
117
+ const getTargetPath = (imageExtension, peerName) => {
118
+ // formatting peer name
119
+ const formattedPeerName = peerName ? peerName.replace(/ /g, '-').toLowerCase() : '';
120
+
121
+ // name to use for image
122
+ const imageName = `${formattedPeerName}-snapshot-${Date.now()}.${imageExtension}`;
123
+
124
+ // directory for saving image
125
+ const targetDir = Platform.OS === 'ios' ? RNFetchBlob.fs.dirs.DocumentDir : RNFetchBlob.fs.dirs.DCIMDir;
126
+ const targetLocation = `${targetDir}/${imageName}`;
127
+ return targetLocation;
128
+ };
129
+ const saveToDisk = async () => {
130
+ try {
131
+ // Requesting External Storage permission to save image to disk
132
+ const permission = await requestExternalStoragePermission();
133
+
134
+ // checking External Storage permission and availability of image source that we have to save to disk
135
+ if (permission && peer && imageSource) {
136
+ // Waiting for Interactions (Modal Close Animation) to finish
137
+ InteractionManager.runAfterInteractions(async () => {
138
+ // image extension to use
139
+ const imageExtension = 'png';
140
+
141
+ // Removing `file://` from URI if it exists, to keep it consistent with `base64` image case
142
+ const source = imageSource.uri.replace('file://', '');
143
+
144
+ // Checking if source is the local file on device
145
+ const isSourceLocalFile = imageSource.uri.startsWith('file://');
146
+
147
+ // if source is local file on ios device then we don't need to do any file system operation
148
+ // We can use that local file to show preview window to user on ios
149
+ const targetLocation = isSourceLocalFile && Platform.OS === 'ios' ? source : getTargetPath(imageExtension, peer.name);
150
+
151
+ // if source is local file on android device, then we copy source file to target path
152
+ if (isSourceLocalFile) {
153
+ if (Platform.OS === 'android') {
154
+ await RNFS.copyFile(source,
155
+ // Source Dir
156
+ targetLocation // Target Dir
157
+ );
158
+ }
159
+ }
160
+ // if source is not local file, then we write to target path
161
+ else {
162
+ await RNFetchBlob.fs.writeFile(targetLocation,
163
+ // Target Dir
164
+ source.replace('data:image/png;base64,', ''),
165
+ // Data to write to "Target Dir"
166
+ 'base64');
167
+ }
168
+ Share.open({
169
+ url: 'file://' + targetLocation
170
+ }).then(_ref3 => {
171
+ let {
172
+ message
173
+ } = _ref3;
174
+ if (message.includes('SaveToCameraRoll')) {
175
+ Toast.showWithGravity('Snapshot has been saved successfully', Toast.LONG, Toast.TOP);
176
+ }
177
+ cancelModal();
178
+ }).catch(error => console.log('share error -> ', error)).finally(() => {
179
+ // On Android, We have already saved image into DCIM dir
180
+ // Therefore, we can notify user about "save success" and close modal
181
+ if (Platform.OS === 'android') {
182
+ Toast.showWithGravity('Snapshot has been saved successfully', Toast.LONG, Toast.TOP);
183
+ cancelModal();
184
+ }
185
+ });
186
+ });
187
+ }
188
+ } catch (error) {
189
+ console.warn('Snapshot Save Error: ', error);
190
+ }
191
+ };
192
+ return /*#__PURE__*/React.createElement(View, {
193
+ style: [{
194
+ flexGrow: 1
195
+ }, styles.volumeModalContainer]
196
+ }, /*#__PURE__*/React.createElement(Text, {
197
+ style: styles.roleChangeModalHeading
198
+ }, peer ? `${peer.name}'s Snapshot` : 'Snapshot'), imageSource ? /*#__PURE__*/React.createElement(Image, {
199
+ source: imageSource,
200
+ style: styles.screenshotImage,
201
+ resizeMode: "contain"
202
+ }) : null, /*#__PURE__*/React.createElement(View, {
203
+ style: styles.roleChangeModalPermissionContainer
204
+ }, /*#__PURE__*/React.createElement(CustomButton, {
205
+ title: "Cancel",
206
+ onPress: cancelModal,
207
+ viewStyle: [styles.roleChangeModalCancelButton, {
208
+ width: '40%'
209
+ }],
210
+ textStyle: styles.roleChangeModalButtonText
211
+ }), /*#__PURE__*/React.createElement(CustomButton, {
212
+ title: "Save to Disk",
213
+ onPress: saveToDisk,
214
+ viewStyle: [styles.roleChangeModalSuccessButton, {
215
+ width: '56%'
216
+ }],
217
+ textStyle: styles.roleChangeModalButtonText
218
+ })));
219
+ };
220
+ export const ChangeVolumeModal = _ref4 => {
221
+ let {
222
+ cancelModal
223
+ } = _ref4;
224
+ const instance = useHMSInstance();
225
+ const peer = useSelector(state => state.app.peerToUpdate);
226
+ const [volume, setVolume] = useState(0);
227
+ const changeVolume = () => {
228
+ if (peer !== null && peer !== void 0 && peer.audioTrack) {
229
+ instance === null || instance === void 0 ? void 0 : instance.setVolume(peer === null || peer === void 0 ? void 0 : peer.audioTrack, volume);
230
+ }
231
+ cancelModal();
232
+ };
233
+ return /*#__PURE__*/React.createElement(View, {
234
+ style: styles.volumeModalContainer
235
+ }, /*#__PURE__*/React.createElement(Text, {
236
+ style: styles.roleChangeModalHeading
237
+ }, "Set Volume"), /*#__PURE__*/React.createElement(View, {
238
+ style: styles.volumeModalSlider
239
+ }, /*#__PURE__*/React.createElement(Text, {
240
+ style: styles.roleChangeModalDescription
241
+ }, "Volume: ", volume), /*#__PURE__*/React.createElement(Slider, {
242
+ value: volume,
243
+ maximumValue: 10,
244
+ minimumValue: 0,
245
+ step: 1,
246
+ onValueChange: value => setVolume(value[0])
247
+ })), /*#__PURE__*/React.createElement(View, {
248
+ style: styles.roleChangeModalPermissionContainer
249
+ }, /*#__PURE__*/React.createElement(CustomButton, {
250
+ title: "Cancel",
251
+ onPress: cancelModal,
252
+ viewStyle: styles.roleChangeModalCancelButton,
253
+ textStyle: styles.roleChangeModalButtonText
254
+ }), /*#__PURE__*/React.createElement(CustomButton, {
255
+ title: "Change",
256
+ onPress: changeVolume,
257
+ viewStyle: styles.roleChangeModalSuccessButton,
258
+ textStyle: styles.roleChangeModalButtonText
259
+ })));
260
+ };
261
+ export const ChangeNameModal = _ref5 => {
262
+ let {
263
+ cancelModal
264
+ } = _ref5;
265
+ const instance = useHMSInstance();
266
+ const peer = useSelector(state => state.app.peerToUpdate);
267
+ const dispatch = useDispatch();
268
+ const [name, setName] = useState(peer === null || peer === void 0 ? void 0 : peer.name);
269
+ const changeName = () => {
270
+ if (name.length > 0) {
271
+ instance === null || instance === void 0 ? void 0 : instance.changeName(name).then(d => {
272
+ dispatch(saveUserData({
273
+ userName: name
274
+ }));
275
+ console.log('Change Name Success: ', d);
276
+ }).catch(e => console.log('Change Name Error: ', e));
277
+ }
278
+ cancelModal();
279
+ };
280
+ return /*#__PURE__*/React.createElement(View, {
281
+ style: styles.volumeModalContainer
282
+ }, /*#__PURE__*/React.createElement(Text, {
283
+ style: styles.roleChangeModalHeading
284
+ }, "Change Name"), /*#__PURE__*/React.createElement(View, {
285
+ style: styles.volumeModalSlider
286
+ }, /*#__PURE__*/React.createElement(CustomInput, {
287
+ value: name,
288
+ onChangeText: setName,
289
+ inputStyle: styles.participantChangeNameInput,
290
+ placeholderTextColor: COLORS.TEXT.DISABLED,
291
+ placeholder: "Find what you\u2019re looking for"
292
+ })), /*#__PURE__*/React.createElement(View, {
293
+ style: styles.roleChangeModalPermissionContainer
294
+ }, /*#__PURE__*/React.createElement(CustomButton, {
295
+ title: "Cancel",
296
+ onPress: cancelModal,
297
+ viewStyle: styles.roleChangeModalCancelButton,
298
+ textStyle: styles.roleChangeModalButtonText
299
+ }), /*#__PURE__*/React.createElement(CustomButton, {
300
+ title: "Change",
301
+ onPress: changeName,
302
+ viewStyle: styles.roleChangeModalSuccessButton,
303
+ textStyle: styles.roleChangeModalButtonText
304
+ })));
305
+ };
306
+ export const RtcStatsModal = () => {
307
+ var _currentTrack$track;
308
+ const dispatch = useDispatch();
309
+ const instance = useSelector(state => state.user.hmsInstance);
310
+ const showStatsOnTiles = useSelector(state => state.app.joinConfig.showStats);
311
+ const [localPeer, setLocalPeer] = useState(null);
312
+ const [remotePeers, setRemotePeers] = useState([]);
313
+ const [tracksListModalVisible, setTracksListModalVisible] = useState(false);
314
+ const [currentTrack, setCurrentTrack] = useState(null);
315
+ const hideMenu = () => setTracksListModalVisible(false);
316
+ const showMenu = () => setTracksListModalVisible(true);
317
+ const getStatsList = () => {
318
+ var _localPeer$audioTrack, _localPeer$videoTrack;
319
+ const list = [];
320
+ if (localPeer !== null && localPeer !== void 0 && (_localPeer$audioTrack = localPeer.audioTrack) !== null && _localPeer$audioTrack !== void 0 && _localPeer$audioTrack.trackId) {
321
+ list.push({
322
+ name: (localPeer === null || localPeer === void 0 ? void 0 : localPeer.name) + "'s audio",
323
+ peerId: localPeer === null || localPeer === void 0 ? void 0 : localPeer.peerID,
324
+ track: localPeer === null || localPeer === void 0 ? void 0 : localPeer.audioTrack
325
+ });
326
+ }
327
+ if (localPeer !== null && localPeer !== void 0 && (_localPeer$videoTrack = localPeer.videoTrack) !== null && _localPeer$videoTrack !== void 0 && _localPeer$videoTrack.trackId) {
328
+ list.push({
329
+ name: (localPeer === null || localPeer === void 0 ? void 0 : localPeer.name) + "'s video",
330
+ track: localPeer === null || localPeer === void 0 ? void 0 : localPeer.videoTrack
331
+ });
332
+ }
333
+ remotePeers.forEach(remotePeer => {
334
+ var _remotePeer$audioTrac, _remotePeer$videoTrac;
335
+ if (remotePeer !== null && remotePeer !== void 0 && (_remotePeer$audioTrac = remotePeer.audioTrack) !== null && _remotePeer$audioTrac !== void 0 && _remotePeer$audioTrac.trackId) {
336
+ list.push({
337
+ name: (remotePeer === null || remotePeer === void 0 ? void 0 : remotePeer.name) + "'s audio",
338
+ peerId: remotePeer === null || remotePeer === void 0 ? void 0 : remotePeer.peerID,
339
+ track: remotePeer === null || remotePeer === void 0 ? void 0 : remotePeer.audioTrack
340
+ });
341
+ }
342
+ if (remotePeer !== null && remotePeer !== void 0 && (_remotePeer$videoTrac = remotePeer.videoTrack) !== null && _remotePeer$videoTrac !== void 0 && _remotePeer$videoTrac.trackId) {
343
+ list.push({
344
+ name: (remotePeer === null || remotePeer === void 0 ? void 0 : remotePeer.name) + "'s video",
345
+ track: remotePeer === null || remotePeer === void 0 ? void 0 : remotePeer.videoTrack
346
+ });
347
+ }
348
+ });
349
+ return list;
350
+ };
351
+
352
+ // Getting Local Peer from hms instance
353
+ useEffect(() => {
354
+ if (instance) {
355
+ const updateLocalPeer = async () => {
356
+ setLocalPeer(await instance.getLocalPeer());
357
+ };
358
+ updateLocalPeer();
359
+ }
360
+ }, [instance]);
361
+
362
+ // Getting Remote Peers from hms instance
363
+ useEffect(() => {
364
+ if (instance) {
365
+ const updateRemotePeers = async () => {
366
+ setRemotePeers(await instance.getRemotePeers());
367
+ };
368
+ updateRemotePeers();
369
+ }
370
+ }, [instance]);
371
+ const isCurrentTrackSelected = currentTrack !== null;
372
+ const statsList = getStatsList();
373
+ const firstTrackInStatsList = statsList.length > 0 ? statsList[0] : null;
374
+
375
+ // If currentTrack is null and we have valid item in StatsList
376
+ // then showing stats for the first valid item in StatsList
377
+ useEffect(() => {
378
+ if (!isCurrentTrackSelected && firstTrackInStatsList) {
379
+ setCurrentTrack(firstTrackInStatsList);
380
+ }
381
+ }, [isCurrentTrackSelected, firstTrackInStatsList]);
382
+ const selectedTrackId = currentTrack ? currentTrack.peerId || ((_currentTrack$track = currentTrack.track) === null || _currentTrack$track === void 0 ? void 0 : _currentTrack$track.trackId) : null;
383
+ const rtcStatsData = useSelector(state => selectedTrackId ? state.app.rtcStats[selectedTrackId] : null);
384
+ return /*#__PURE__*/React.createElement(View, {
385
+ style: styles.participantContainer
386
+ }, /*#__PURE__*/React.createElement(View, {
387
+ style: styles.participantsHeaderContainer
388
+ }, /*#__PURE__*/React.createElement(Text, {
389
+ style: styles.participantsHeading
390
+ }, "Stats for Nerds")), /*#__PURE__*/React.createElement(SwitchRow, {
391
+ text: "Show Stats on Tiles",
392
+ value: showStatsOnTiles,
393
+ onChange: value => dispatch(changeShowStats(value))
394
+ }), /*#__PURE__*/React.createElement(Menu, {
395
+ visible: tracksListModalVisible,
396
+ anchor: /*#__PURE__*/React.createElement(TouchableOpacity, {
397
+ style: styles.statsModalMenu,
398
+ onPress: showMenu
399
+ }, /*#__PURE__*/React.createElement(Text, {
400
+ style: styles.participantFilterText,
401
+ numberOfLines: 1
402
+ }, (currentTrack === null || currentTrack === void 0 ? void 0 : currentTrack.name) ?? 'Choose'), /*#__PURE__*/React.createElement(MaterialIcons, {
403
+ name: tracksListModalVisible ? 'arrow-drop-up' : 'arrow-drop-down',
404
+ style: styles.participantFilterIcon,
405
+ size: 24
406
+ })),
407
+ onRequestClose: hideMenu,
408
+ style: styles.participantsMenuContainer
409
+ }, statsList.map(trackObj => {
410
+ var _trackObj$track;
411
+ return /*#__PURE__*/React.createElement(MenuItem, {
412
+ onPress: () => {
413
+ hideMenu();
414
+ setCurrentTrack(trackObj);
415
+ },
416
+ key: trackObj === null || trackObj === void 0 || (_trackObj$track = trackObj.track) === null || _trackObj$track === void 0 ? void 0 : _trackObj$track.trackId
417
+ }, /*#__PURE__*/React.createElement(View, {
418
+ style: styles.participantMenuItem
419
+ }, /*#__PURE__*/React.createElement(Text, {
420
+ style: styles.participantMenuItemName
421
+ }, trackObj === null || trackObj === void 0 ? void 0 : trackObj.name)));
422
+ })), /*#__PURE__*/React.createElement(ScrollView, {
423
+ contentContainerStyle: Array.isArray(rtcStatsData) ? null : styles.statsModalCardContainer
424
+ }, rtcStatsData ? Array.isArray(rtcStatsData) ? /*#__PURE__*/React.createElement(View, null, rtcStatsData.map(rtcStatsItem => {
425
+ return /*#__PURE__*/React.createElement(View, {
426
+ style: {
427
+ marginBottom: 12
428
+ }
429
+ }, /*#__PURE__*/React.createElement(Text, {
430
+ style: styles.statsModalCardDescription
431
+ }, rtcStatsItem.layer), /*#__PURE__*/React.createElement(View, {
432
+ style: styles.statsModalCardContainer
433
+ }, Object.entries(rtcStatsItem).filter(item => item[0] !== 'layer').map(item => {
434
+ const [key, value] = item;
435
+ return /*#__PURE__*/React.createElement(View, {
436
+ style: styles.statsModalCard,
437
+ key: key
438
+ }, /*#__PURE__*/React.createElement(Text, {
439
+ style: styles.statsModalCardHeading
440
+ }, key), /*#__PURE__*/React.createElement(Text, {
441
+ style: styles.statsModalCardDescription
442
+ }, key === 'resolution' ? `Height: ${(value === null || value === void 0 ? void 0 : value.height) ?? 0}, Width: ${(value === null || value === void 0 ? void 0 : value.width) ?? 0}` : key === 'qualityLimitationReasons' ? value.reason : value));
443
+ })));
444
+ })) : Object.entries(rtcStatsData).map(item => {
445
+ const [key, value] = item;
446
+ return /*#__PURE__*/React.createElement(View, {
447
+ style: styles.statsModalCard,
448
+ key: key
449
+ }, /*#__PURE__*/React.createElement(Text, {
450
+ style: styles.statsModalCardHeading
451
+ }, key), /*#__PURE__*/React.createElement(Text, {
452
+ style: styles.statsModalCardDescription
453
+ }, key === 'resolution' ? `Height: ${(value === null || value === void 0 ? void 0 : value.height) ?? 0}, Width: ${(value === null || value === void 0 ? void 0 : value.width) ?? 0}` : value));
454
+ }) : null));
455
+ };
456
+ export const LeaveRoomModal = _ref6 => {
457
+ let {
458
+ onSuccess,
459
+ cancelModal
460
+ } = _ref6;
461
+ const onLeave = () => {
462
+ cancelModal();
463
+ onSuccess();
464
+ };
465
+ return /*#__PURE__*/React.createElement(View, {
466
+ style: styles.volumeModalContainer
467
+ }, /*#__PURE__*/React.createElement(View, {
468
+ style: styles.participantMenuItem
469
+ }, /*#__PURE__*/React.createElement(Feather, {
470
+ name: "log-out",
471
+ style: styles.participantMenuItemIcon,
472
+ size: 24
473
+ }), /*#__PURE__*/React.createElement(Text, {
474
+ style: styles.roleChangeModalHeading
475
+ }, "Leave Studio")), /*#__PURE__*/React.createElement(View, {
476
+ style: styles.roleChangeModalPermissionContainer
477
+ }, /*#__PURE__*/React.createElement(Text, {
478
+ style: styles.roleChangeModalDescription
479
+ }, "Others will continue after you leave. You can join the studio again.")), /*#__PURE__*/React.createElement(View, {
480
+ style: styles.roleChangeModalPermissionContainer
481
+ }, /*#__PURE__*/React.createElement(CustomButton, {
482
+ title: "Don\u2019t Leave",
483
+ onPress: cancelModal,
484
+ viewStyle: styles.roleChangeModalCancelButton,
485
+ textStyle: styles.roleChangeModalButtonText
486
+ }), /*#__PURE__*/React.createElement(CustomButton, {
487
+ title: "Leave",
488
+ onPress: onLeave,
489
+ viewStyle: [styles.roleChangeModalSuccessButton, styles.errorContainer],
490
+ textStyle: styles.roleChangeModalButtonText
491
+ })));
492
+ };
493
+ export const EndRoomModal = _ref7 => {
494
+ let {
495
+ onSuccess,
496
+ cancelModal
497
+ } = _ref7;
498
+ const onEnd = () => {
499
+ cancelModal();
500
+ onSuccess();
501
+ };
502
+ return /*#__PURE__*/React.createElement(View, {
503
+ style: styles.volumeModalContainer
504
+ }, /*#__PURE__*/React.createElement(View, {
505
+ style: styles.participantMenuItem
506
+ }, /*#__PURE__*/React.createElement(Feather, {
507
+ name: "alert-triangle",
508
+ style: [styles.participantMenuItemIcon, styles.error],
509
+ size: 24
510
+ }), /*#__PURE__*/React.createElement(Text, {
511
+ style: [styles.roleChangeModalHeading, styles.error]
512
+ }, "End Session")), /*#__PURE__*/React.createElement(View, {
513
+ style: styles.roleChangeModalPermissionContainer
514
+ }, /*#__PURE__*/React.createElement(Text, {
515
+ style: styles.roleChangeModalDescription
516
+ }, "The session will end for everyone and all the activities will stop. You can\u2019t undo this action.")), /*#__PURE__*/React.createElement(View, {
517
+ style: styles.roleChangeModalPermissionContainer
518
+ }, /*#__PURE__*/React.createElement(CustomButton, {
519
+ title: "Don\u2019t End",
520
+ onPress: cancelModal,
521
+ viewStyle: styles.roleChangeModalCancelButton,
522
+ textStyle: styles.roleChangeModalButtonText
523
+ }), /*#__PURE__*/React.createElement(CustomButton, {
524
+ title: "End Session",
525
+ onPress: onEnd,
526
+ viewStyle: [styles.roleChangeModalSuccessButton, styles.errorContainer],
527
+ textStyle: styles.roleChangeModalButtonText
528
+ })));
529
+ };
530
+ export const ChangeAudioOutputModal = _ref8 => {
531
+ let {
532
+ cancelModal
533
+ } = _ref8;
534
+ const instance = useHMSInstance();
535
+ const [currentOutputDevice, setCurrentOutputDevice] = useState(HMSAudioDevice.SPEAKER_PHONE);
536
+ const [audioOutputDevicesList, setAudioOutputDevicesList] = useState([]);
537
+ const switchAudioOutput = () => {
538
+ instance === null || instance === void 0 ? void 0 : instance.switchAudioOutput(currentOutputDevice);
539
+ cancelModal();
540
+ };
541
+ useEffect(() => {
542
+ const getList = async () => {
543
+ setAudioOutputDevicesList(await (instance === null || instance === void 0 ? void 0 : instance.getAudioDevicesList()));
544
+ setCurrentOutputDevice(await (instance === null || instance === void 0 ? void 0 : instance.getAudioOutputRouteType()));
545
+ };
546
+ getList();
547
+ }, [instance]);
548
+ return /*#__PURE__*/React.createElement(View, {
549
+ style: styles.roleChangeModal
550
+ }, /*#__PURE__*/React.createElement(Text, {
551
+ style: styles.roleChangeModalHeading
552
+ }, "Switch Audio Output"), audioOutputDevicesList.map(device => {
553
+ return /*#__PURE__*/React.createElement(TouchableOpacity, {
554
+ key: device,
555
+ style: styles.roleChangeModalPermissionContainer,
556
+ onPress: () => {
557
+ setCurrentOutputDevice(device);
558
+ }
559
+ }, /*#__PURE__*/React.createElement(View, {
560
+ style: styles.roleChangeModalCheckBox
561
+ }, currentOutputDevice === device && /*#__PURE__*/React.createElement(Entypo, {
562
+ name: "check",
563
+ style: styles.roleChangeModalCheck,
564
+ size: 10
565
+ })), /*#__PURE__*/React.createElement(Text, {
566
+ style: styles.roleChangeModalPermission
567
+ }, device));
568
+ }), /*#__PURE__*/React.createElement(View, {
569
+ style: styles.roleChangeModalPermissionContainer
570
+ }, /*#__PURE__*/React.createElement(CustomButton, {
571
+ title: "Cancel",
572
+ onPress: cancelModal,
573
+ viewStyle: styles.roleChangeModalCancelButton,
574
+ textStyle: styles.roleChangeModalButtonText
575
+ }), /*#__PURE__*/React.createElement(CustomButton, {
576
+ title: "Change",
577
+ onPress: switchAudioOutput,
578
+ viewStyle: styles.roleChangeModalSuccessButton,
579
+ textStyle: styles.roleChangeModalButtonText
580
+ })));
581
+ };
582
+ export const ChangeAspectRatio = _ref9 => {
583
+ let {
584
+ cancelModal
585
+ } = _ref9;
586
+ const {
587
+ height
588
+ } = useWindowDimensions();
589
+ const dispatch = useDispatch();
590
+ const hlsPlayerAspectRatio = useSelector(state => state.app.hlsAspectRatio);
591
+ const [selectedRatio, setSelectedRatio] = useState(hlsPlayerAspectRatio);
592
+ const handleChangePress = () => {
593
+ cancelModal();
594
+ if (hlsPlayerAspectRatio.id !== selectedRatio.id) {
595
+ dispatch(changeHLSAspectRatio(selectedRatio));
596
+ }
597
+ };
598
+ return /*#__PURE__*/React.createElement(View, {
599
+ style: styles.roleChangeModal
600
+ }, /*#__PURE__*/React.createElement(Text, {
601
+ style: styles.roleChangeModalHeading
602
+ }, "Change Aspect Ratio"), /*#__PURE__*/React.createElement(Text, {
603
+ style: styles.roleChangeModalDescription
604
+ }, "Current: ", hlsPlayerAspectRatio.id), /*#__PURE__*/React.createElement(ScrollView, {
605
+ style: {
606
+ maxHeight: height * 0.4
607
+ }
608
+ }, SUPPORTED_ASPECT_RATIOS.map(ratio => {
609
+ return /*#__PURE__*/React.createElement(TouchableOpacity, {
610
+ key: ratio.id,
611
+ style: styles.roleChangeModalPermissionContainer,
612
+ onPress: () => setSelectedRatio(ratio)
613
+ }, /*#__PURE__*/React.createElement(View, {
614
+ style: styles.roleChangeModalCheckBox
615
+ }, selectedRatio.id === ratio.id ? /*#__PURE__*/React.createElement(Entypo, {
616
+ name: "check",
617
+ style: styles.roleChangeModalCheck,
618
+ size: 10
619
+ }) : null), /*#__PURE__*/React.createElement(Text, {
620
+ style: styles.roleChangeModalPermission
621
+ }, ratio.id));
622
+ })), /*#__PURE__*/React.createElement(View, {
623
+ style: styles.roleChangeModalPermissionContainer
624
+ }, /*#__PURE__*/React.createElement(CustomButton, {
625
+ title: "Cancel",
626
+ onPress: cancelModal,
627
+ viewStyle: styles.roleChangeModalCancelButton,
628
+ textStyle: styles.roleChangeModalButtonText
629
+ }), /*#__PURE__*/React.createElement(CustomButton, {
630
+ title: "Change",
631
+ onPress: handleChangePress,
632
+ viewStyle: styles.roleChangeModalSuccessButton,
633
+ textStyle: styles.roleChangeModalButtonText
634
+ })));
635
+ };
636
+ export const ChangeAudioModeModal = _ref10 => {
637
+ let {
638
+ cancelModal,
639
+ audioMode,
640
+ setAudioMode
641
+ } = _ref10;
642
+ const instance = useHMSInstance();
643
+ const [currentAudioMode, setCurrentAudioMode] = useState(audioMode);
644
+ const AudioModeList = ['MODE_NORMAL', 'MODE_RINGTONE', 'MODE_IN_CALL', 'MODE_IN_COMMUNICATION', 'MODE_CALL_SCREENING'];
645
+ const switchAudioMode = () => {
646
+ instance === null || instance === void 0 ? void 0 : instance.setAudioMode(currentAudioMode);
647
+ setAudioMode(currentAudioMode);
648
+ cancelModal();
649
+ };
650
+ return /*#__PURE__*/React.createElement(View, {
651
+ style: styles.roleChangeModal
652
+ }, /*#__PURE__*/React.createElement(Text, {
653
+ style: styles.roleChangeModalHeading
654
+ }, "Switch Audio Output"), AudioModeList.map(mode => {
655
+ return /*#__PURE__*/React.createElement(TouchableOpacity, {
656
+ key: mode,
657
+ style: styles.roleChangeModalPermissionContainer,
658
+ onPress: () => {
659
+ setCurrentAudioMode(AudioModeList.indexOf(mode));
660
+ }
661
+ }, /*#__PURE__*/React.createElement(View, {
662
+ style: styles.roleChangeModalCheckBox
663
+ }, currentAudioMode === AudioModeList.indexOf(mode) && /*#__PURE__*/React.createElement(Entypo, {
664
+ name: "check",
665
+ style: styles.roleChangeModalCheck,
666
+ size: 10
667
+ })), /*#__PURE__*/React.createElement(Text, {
668
+ style: styles.roleChangeModalPermission
669
+ }, mode));
670
+ }), /*#__PURE__*/React.createElement(View, {
671
+ style: styles.roleChangeModalPermissionContainer
672
+ }, /*#__PURE__*/React.createElement(CustomButton, {
673
+ title: "Cancel",
674
+ onPress: cancelModal,
675
+ viewStyle: styles.roleChangeModalCancelButton,
676
+ textStyle: styles.roleChangeModalButtonText
677
+ }), /*#__PURE__*/React.createElement(CustomButton, {
678
+ title: "Change",
679
+ onPress: switchAudioMode,
680
+ viewStyle: styles.roleChangeModalSuccessButton,
681
+ textStyle: styles.roleChangeModalButtonText
682
+ })));
683
+ };
684
+ export const ChangeAudioMixingModeModal = _ref11 => {
685
+ let {
686
+ newAudioMixingMode,
687
+ cancelModal,
688
+ setNewAudioMixingMode
689
+ } = _ref11;
690
+ const instance = useHMSInstance();
691
+ const changeAudioMixingMode = async () => {
692
+ await (instance === null || instance === void 0 ? void 0 : instance.setAudioMixingMode(newAudioMixingMode));
693
+ cancelModal();
694
+ };
695
+ return /*#__PURE__*/React.createElement(View, {
696
+ style: styles.roleChangeModal
697
+ }, /*#__PURE__*/React.createElement(Text, {
698
+ style: styles.roleChangeModalHeading
699
+ }, "Change Audio Mixing Mode"), /*#__PURE__*/React.createElement(Text, {
700
+ style: styles.roleChangeModalDescription
701
+ }, "TALK_ONLY : only data captured by mic will be streamed in the room, TALK_AND_MUSIC : data captured by mic as well as playback audio being captured from device will be streamed in the room, MUSIC_ONLY : only the playback audio being captured from device will be streamed in the room"), Object.keys(HMSAudioMixingMode).map(audioMixingMode => {
702
+ return /*#__PURE__*/React.createElement(TouchableOpacity, {
703
+ key: audioMixingMode,
704
+ style: styles.roleChangeModalPermissionContainer,
705
+ onPress: () => {
706
+ setNewAudioMixingMode(audioMixingMode);
707
+ }
708
+ }, /*#__PURE__*/React.createElement(View, {
709
+ style: styles.roleChangeModalCheckBox
710
+ }, newAudioMixingMode === audioMixingMode && /*#__PURE__*/React.createElement(Entypo, {
711
+ name: "check",
712
+ style: styles.roleChangeModalCheck,
713
+ size: 10
714
+ })), /*#__PURE__*/React.createElement(Text, {
715
+ style: styles.roleChangeModalPermission
716
+ }, audioMixingMode));
717
+ }), /*#__PURE__*/React.createElement(View, {
718
+ style: styles.roleChangeModalPermissionContainer
719
+ }, /*#__PURE__*/React.createElement(CustomButton, {
720
+ title: "Cancel",
721
+ onPress: cancelModal,
722
+ viewStyle: styles.roleChangeModalCancelButton,
723
+ textStyle: styles.roleChangeModalButtonText
724
+ }), /*#__PURE__*/React.createElement(CustomButton, {
725
+ title: "Change",
726
+ onPress: changeAudioMixingMode,
727
+ viewStyle: styles.roleChangeModalSuccessButton,
728
+ textStyle: styles.roleChangeModalButtonText
729
+ })));
730
+ };
731
+ export const ChangeSortingModal = _ref12 => {
732
+ let {
733
+ data,
734
+ selectedItem,
735
+ onItemSelected,
736
+ cancelModal
737
+ } = _ref12;
738
+ const [sortingType, setSortingType] = useState(selectedItem || SortingType.DEFAULT);
739
+ const changeSorting = () => {
740
+ onItemSelected(sortingType);
741
+ cancelModal();
742
+ };
743
+ return /*#__PURE__*/React.createElement(View, {
744
+ style: styles.roleChangeModal
745
+ }, /*#__PURE__*/React.createElement(Text, {
746
+ style: styles.roleChangeModalHeading
747
+ }, "Sorting Style"), /*#__PURE__*/React.createElement(CustomPicker, {
748
+ data: data,
749
+ selectedItem: sortingType,
750
+ onItemSelected: setSortingType,
751
+ viewStyle: styles.picker
752
+ }), /*#__PURE__*/React.createElement(View, {
753
+ style: styles.sortingButtonContainer
754
+ }, /*#__PURE__*/React.createElement(CustomButton, {
755
+ title: "Cancel",
756
+ onPress: cancelModal,
757
+ viewStyle: styles.roleChangeModalCancelButton,
758
+ textStyle: styles.roleChangeModalButtonText
759
+ }), /*#__PURE__*/React.createElement(CustomButton, {
760
+ title: "Change",
761
+ onPress: changeSorting,
762
+ viewStyle: styles.roleChangeModalSuccessButton,
763
+ textStyle: styles.roleChangeModalButtonText
764
+ })));
765
+ };
766
+ export const ChangeLayoutModal = _ref13 => {
767
+ let {
768
+ data,
769
+ selectedItem,
770
+ onItemSelected,
771
+ cancelModal
772
+ } = _ref13;
773
+ const [layout, setLayout] = useState(selectedItem);
774
+ const changeLayout = () => {
775
+ onItemSelected(layout);
776
+ cancelModal();
777
+ };
778
+ return /*#__PURE__*/React.createElement(View, {
779
+ style: styles.roleChangeModal
780
+ }, /*#__PURE__*/React.createElement(Text, {
781
+ style: styles.roleChangeModalHeading
782
+ }, "Layout Style"), /*#__PURE__*/React.createElement(CustomPicker, {
783
+ data: data,
784
+ selectedItem: layout,
785
+ onItemSelected: setLayout,
786
+ viewStyle: styles.picker
787
+ }), /*#__PURE__*/React.createElement(View, {
788
+ style: styles.sortingButtonContainer
789
+ }, /*#__PURE__*/React.createElement(CustomButton, {
790
+ title: "Cancel",
791
+ onPress: cancelModal,
792
+ viewStyle: styles.roleChangeModalCancelButton,
793
+ textStyle: styles.roleChangeModalButtonText
794
+ }), /*#__PURE__*/React.createElement(CustomButton, {
795
+ title: "Change",
796
+ onPress: changeLayout,
797
+ viewStyle: styles.roleChangeModalSuccessButton,
798
+ textStyle: styles.roleChangeModalButtonText
799
+ })));
800
+ };
801
+ export const ChangeTrackStateForRoleModal = _ref14 => {
802
+ var _localPeerRole$permis, _localPeerRole$permis2;
803
+ let {
804
+ cancelModal
805
+ } = _ref14;
806
+ const instance = useHMSInstance();
807
+ const roles = useSelector(state => state.hmsStates.roles);
808
+ const localPeerRole = useSelector(state => {
809
+ var _state$hmsStates$loca;
810
+ return (_state$hmsStates$loca = state.hmsStates.localPeer) === null || _state$hmsStates$loca === void 0 ? void 0 : _state$hmsStates$loca.role;
811
+ });
812
+ const [role, setRole] = useState(localPeerRole);
813
+ const [visible, setVisible] = useState(false);
814
+ const [trackType, setTrackType] = useState(HMSTrackType.VIDEO);
815
+ const [trackState, setTrackState] = useState(false);
816
+ const hideMenu = () => setVisible(false);
817
+ const showMenu = () => setVisible(true);
818
+ const changeTrackState = async () => {
819
+ const source = HMSTrackSource.REGULAR;
820
+ await (instance === null || instance === void 0 ? void 0 : instance.changeTrackStateForRoles(trackState, trackType, source, [role]).then(d => console.log('Change Track State For Role Success: ', d)).catch(e => console.log('Change Track State For Role Error: ', e)));
821
+ cancelModal();
822
+ };
823
+ return /*#__PURE__*/React.createElement(View, {
824
+ style: styles.roleChangeModal
825
+ }, /*#__PURE__*/React.createElement(Text, {
826
+ style: styles.roleChangeModalHeading
827
+ }, "Change Track State For Role"), /*#__PURE__*/React.createElement(Menu, {
828
+ visible: visible,
829
+ anchor: /*#__PURE__*/React.createElement(TouchableOpacity, {
830
+ style: styles.participantChangeRoleContainer,
831
+ onPress: showMenu
832
+ }, /*#__PURE__*/React.createElement(Text, {
833
+ style: styles.participantFilterText,
834
+ numberOfLines: 1
835
+ }, role === null || role === void 0 ? void 0 : role.name), /*#__PURE__*/React.createElement(MaterialIcons, {
836
+ name: visible ? 'arrow-drop-up' : 'arrow-drop-down',
837
+ style: styles.participantFilterIcon,
838
+ size: 24
839
+ })),
840
+ onRequestClose: hideMenu,
841
+ style: styles.participantsMenuContainer
842
+ }, roles === null || roles === void 0 ? void 0 : roles.map(knownRole => {
843
+ return /*#__PURE__*/React.createElement(MenuItem, {
844
+ onPress: () => {
845
+ hideMenu();
846
+ setRole(knownRole);
847
+ },
848
+ key: knownRole.name
849
+ }, /*#__PURE__*/React.createElement(View, {
850
+ style: styles.participantMenuItem
851
+ }, /*#__PURE__*/React.createElement(Text, {
852
+ style: styles.participantMenuItemName
853
+ }, knownRole === null || knownRole === void 0 ? void 0 : knownRole.name)));
854
+ })), /*#__PURE__*/React.createElement(View, {
855
+ style: styles.roleChangeModalPermissionContainer
856
+ }, /*#__PURE__*/React.createElement(Text, {
857
+ style: styles.changeTrackStateRoleOptionHeading
858
+ }, 'Track State: '), (localPeerRole === null || localPeerRole === void 0 || (_localPeerRole$permis = localPeerRole.permissions) === null || _localPeerRole$permis === void 0 ? void 0 : _localPeerRole$permis.mute) && /*#__PURE__*/React.createElement(TouchableOpacity, {
859
+ style: styles.changeTrackStateRoleOption,
860
+ onPress: () => setTrackState(true)
861
+ }, /*#__PURE__*/React.createElement(View, {
862
+ style: styles.roleChangeModalCheckBox
863
+ }, trackState && /*#__PURE__*/React.createElement(Entypo, {
864
+ name: "check",
865
+ style: styles.roleChangeModalCheck,
866
+ size: 10
867
+ })), /*#__PURE__*/React.createElement(Text, {
868
+ style: styles.roleChangeModalPermission
869
+ }, "MUTE")), (localPeerRole === null || localPeerRole === void 0 || (_localPeerRole$permis2 = localPeerRole.permissions) === null || _localPeerRole$permis2 === void 0 ? void 0 : _localPeerRole$permis2.unmute) && /*#__PURE__*/React.createElement(TouchableOpacity, {
870
+ style: styles.changeTrackStateRoleOption,
871
+ onPress: () => setTrackState(false)
872
+ }, /*#__PURE__*/React.createElement(View, {
873
+ style: styles.roleChangeModalCheckBox
874
+ }, !trackState && /*#__PURE__*/React.createElement(Entypo, {
875
+ name: "check",
876
+ style: styles.roleChangeModalCheck,
877
+ size: 10
878
+ })), /*#__PURE__*/React.createElement(Text, {
879
+ style: styles.roleChangeModalPermission
880
+ }, "UNMUTE"))), /*#__PURE__*/React.createElement(View, {
881
+ style: styles.roleChangeModalPermissionContainer
882
+ }, /*#__PURE__*/React.createElement(Text, {
883
+ style: styles.changeTrackStateRoleOptionHeading
884
+ }, 'Track Type: '), /*#__PURE__*/React.createElement(TouchableOpacity, {
885
+ style: styles.changeTrackStateRoleOption,
886
+ onPress: () => setTrackType(HMSTrackType.AUDIO)
887
+ }, /*#__PURE__*/React.createElement(View, {
888
+ style: styles.roleChangeModalCheckBox
889
+ }, trackType === HMSTrackType.AUDIO && /*#__PURE__*/React.createElement(Entypo, {
890
+ name: "check",
891
+ style: styles.roleChangeModalCheck,
892
+ size: 10
893
+ })), /*#__PURE__*/React.createElement(Text, {
894
+ style: styles.roleChangeModalPermission
895
+ }, HMSTrackType.AUDIO)), /*#__PURE__*/React.createElement(TouchableOpacity, {
896
+ style: styles.changeTrackStateRoleOption,
897
+ onPress: () => setTrackType(HMSTrackType.VIDEO)
898
+ }, /*#__PURE__*/React.createElement(View, {
899
+ style: styles.roleChangeModalCheckBox
900
+ }, trackType === HMSTrackType.VIDEO && /*#__PURE__*/React.createElement(Entypo, {
901
+ name: "check",
902
+ style: styles.roleChangeModalCheck,
903
+ size: 10
904
+ })), /*#__PURE__*/React.createElement(Text, {
905
+ style: styles.roleChangeModalPermission
906
+ }, HMSTrackType.VIDEO))), /*#__PURE__*/React.createElement(View, {
907
+ style: styles.roleChangeModalPermissionContainer
908
+ }, /*#__PURE__*/React.createElement(CustomButton, {
909
+ title: "Cancel",
910
+ onPress: cancelModal,
911
+ viewStyle: styles.roleChangeModalCancelButton,
912
+ textStyle: styles.roleChangeModalButtonText
913
+ }), /*#__PURE__*/React.createElement(CustomButton, {
914
+ title: "Change",
915
+ onPress: changeTrackState,
916
+ viewStyle: styles.roleChangeModalSuccessButton,
917
+ textStyle: styles.roleChangeModalButtonText
918
+ })));
919
+ };
920
+ export const ChangeTrackStateModal = _ref15 => {
921
+ var _roleChangeRequest$re, _roleChangeRequest$su2;
922
+ let {
923
+ roleChangeRequest,
924
+ cancelModal
925
+ } = _ref15;
926
+ const localPeer = useSelector(state => state.hmsStates.localPeer);
927
+ const changeLayout = () => {
928
+ var _roleChangeRequest$su;
929
+ if ((roleChangeRequest === null || roleChangeRequest === void 0 || (_roleChangeRequest$su = roleChangeRequest.suggestedRole) === null || _roleChangeRequest$su === void 0 ? void 0 : _roleChangeRequest$su.toLocaleLowerCase()) === 'video') {
930
+ var _localPeer$localVideo;
931
+ localPeer === null || localPeer === void 0 || (_localPeer$localVideo = localPeer.localVideoTrack()) === null || _localPeer$localVideo === void 0 ? void 0 : _localPeer$localVideo.setMute(false);
932
+ } else {
933
+ var _localPeer$localAudio;
934
+ localPeer === null || localPeer === void 0 || (_localPeer$localAudio = localPeer.localAudioTrack()) === null || _localPeer$localAudio === void 0 ? void 0 : _localPeer$localAudio.setMute(false);
935
+ }
936
+ cancelModal();
937
+ };
938
+ return /*#__PURE__*/React.createElement(View, {
939
+ style: styles.roleChangeModal
940
+ }, /*#__PURE__*/React.createElement(Text, {
941
+ style: styles.roleChangeModalHeading
942
+ }, "Change Track State Request"), /*#__PURE__*/React.createElement(Text, {
943
+ style: styles.roleChangeText
944
+ }, `${roleChangeRequest === null || roleChangeRequest === void 0 || (_roleChangeRequest$re = roleChangeRequest.requestedBy) === null || _roleChangeRequest$re === void 0 ? void 0 : _roleChangeRequest$re.toLocaleUpperCase()} requested to unmute your regular ${roleChangeRequest === null || roleChangeRequest === void 0 || (_roleChangeRequest$su2 = roleChangeRequest.suggestedRole) === null || _roleChangeRequest$su2 === void 0 ? void 0 : _roleChangeRequest$su2.toLocaleUpperCase()}`), /*#__PURE__*/React.createElement(View, {
945
+ style: styles.sortingButtonContainer
946
+ }, /*#__PURE__*/React.createElement(CustomButton, {
947
+ title: "Reject",
948
+ onPress: cancelModal,
949
+ viewStyle: styles.roleChangeModalCancelButton,
950
+ textStyle: styles.roleChangeModalButtonText
951
+ }), /*#__PURE__*/React.createElement(CustomButton, {
952
+ title: "Accept",
953
+ onPress: changeLayout,
954
+ viewStyle: styles.roleChangeModalSuccessButton,
955
+ textStyle: styles.roleChangeModalButtonText
956
+ })));
957
+ };
958
+ export const HlsStreamingModal = _ref16 => {
959
+ let {
960
+ cancelModal
961
+ } = _ref16;
962
+ const instance = useHMSInstance();
963
+ const roomID = useSelector(state => state.user.roomID);
964
+ const [hlsStreamingDetails, setHLSStreamingDetails] = useState({
965
+ meetingUrl: roomID ? roomID + '?skip_preview=true' : '',
966
+ metadata: ''
967
+ });
968
+ const [startHlsRetry, setStartHlsRetry] = useState(true);
969
+ const [hlsRecordingDetails, setHLSRecordingDetails] = useState({
970
+ singleFilePerLayer: false,
971
+ videoOnDemand: false
972
+ });
973
+ const changeLayout = () => {
974
+ instance === null || instance === void 0 ? void 0 : instance.startHLSStreaming().then(d => console.log('Start HLS Streaming Success: ', d)).catch(err => {
975
+ if (startHlsRetry) {
976
+ setStartHlsRetry(false);
977
+ const hmsHLSConfig = new HMSHLSConfig({
978
+ hlsRecordingConfig: hlsRecordingDetails,
979
+ meetingURLVariants: [hlsStreamingDetails]
980
+ });
981
+ instance === null || instance === void 0 ? void 0 : instance.startHLSStreaming(hmsHLSConfig).then(d => console.log('Start HLS Streaming Success: ', d)).catch(e => console.log('Start HLS Streaming Error: ', e));
982
+ } else {
983
+ console.log('Start HLS Streaming Error: ', err);
984
+ }
985
+ });
986
+ cancelModal();
987
+ };
988
+ return /*#__PURE__*/React.createElement(View, {
989
+ style: styles.roleChangeModal
990
+ }, /*#__PURE__*/React.createElement(Text, {
991
+ style: styles.roleChangeModalHeading
992
+ }, "HLS Streaming Details"), /*#__PURE__*/React.createElement(TextInput, {
993
+ onChangeText: value => {
994
+ setHLSStreamingDetails({
995
+ ...hlsStreamingDetails,
996
+ meetingUrl: value
997
+ });
998
+ },
999
+ placeholderTextColor: COLORS.SECONDARY.DEFAULT,
1000
+ placeholder: "Enter meeting url",
1001
+ style: styles.input,
1002
+ defaultValue: hlsStreamingDetails.meetingUrl,
1003
+ returnKeyType: "done",
1004
+ multiline: true,
1005
+ blurOnSubmit: true
1006
+ }), /*#__PURE__*/React.createElement(TouchableOpacity, {
1007
+ style: styles.checkboxButtonContainer,
1008
+ onPress: () => {
1009
+ setHLSRecordingDetails({
1010
+ ...hlsRecordingDetails,
1011
+ singleFilePerLayer: !hlsRecordingDetails.singleFilePerLayer
1012
+ });
1013
+ }
1014
+ }, /*#__PURE__*/React.createElement(View, {
1015
+ style: styles.roleChangeModalCheckBox
1016
+ }, hlsRecordingDetails.singleFilePerLayer && /*#__PURE__*/React.createElement(Entypo, {
1017
+ name: "check",
1018
+ style: styles.roleChangeModalCheck,
1019
+ size: 10
1020
+ })), /*#__PURE__*/React.createElement(Text, {
1021
+ style: styles.roleChangeModalPermission
1022
+ }, "SingleFilePerLayer")), /*#__PURE__*/React.createElement(TouchableOpacity, {
1023
+ style: styles.checkboxButtonContainer,
1024
+ onPress: () => {
1025
+ setHLSRecordingDetails({
1026
+ ...hlsRecordingDetails,
1027
+ videoOnDemand: !hlsRecordingDetails.videoOnDemand
1028
+ });
1029
+ }
1030
+ }, /*#__PURE__*/React.createElement(View, {
1031
+ style: styles.roleChangeModalCheckBox
1032
+ }, hlsRecordingDetails.videoOnDemand && /*#__PURE__*/React.createElement(Entypo, {
1033
+ name: "check",
1034
+ style: styles.roleChangeModalCheck,
1035
+ size: 10
1036
+ })), /*#__PURE__*/React.createElement(Text, {
1037
+ style: styles.roleChangeModalPermission
1038
+ }, "VideoOnDemand")), /*#__PURE__*/React.createElement(View, {
1039
+ style: styles.roleChangeModalPermissionContainer
1040
+ }, /*#__PURE__*/React.createElement(CustomButton, {
1041
+ title: "Cancel",
1042
+ onPress: cancelModal,
1043
+ viewStyle: styles.roleChangeModalCancelButton,
1044
+ textStyle: styles.roleChangeModalButtonText
1045
+ }), /*#__PURE__*/React.createElement(CustomButton, {
1046
+ title: "Start",
1047
+ onPress: changeLayout,
1048
+ viewStyle: styles.roleChangeModalSuccessButton,
1049
+ textStyle: styles.roleChangeModalButtonText
1050
+ })));
1051
+ };
1052
+ export const RecordingModal = _ref17 => {
1053
+ var _recordingDetails$res, _recordingDetails$res2, _recordingDetails$res4, _recordingDetails$res5;
1054
+ let {
1055
+ recordingModal,
1056
+ setModalVisible
1057
+ } = _ref17;
1058
+ const instance = useHMSInstance();
1059
+ const roomID = useSelector(state => state.user.roomID);
1060
+ const [resolutionDetails, setResolutionDetails] = useState(false);
1061
+ const [recordingDetails, setRecordingDetails] = useState({
1062
+ record: false,
1063
+ meetingURL: roomID ? roomID + '?token=beam_recording' : undefined
1064
+ });
1065
+ const changeLayout = () => {
1066
+ instance === null || instance === void 0 ? void 0 : instance.startRTMPOrRecording(recordingDetails).then(d => console.log('Start RTMP Or Recording Success: ', d)).catch(e => console.log('Start RTMP Or Recording Error: ', e));
1067
+ setModalVisible(ModalTypes.DEFAULT);
1068
+ };
1069
+ return recordingModal ? /*#__PURE__*/React.createElement(View, {
1070
+ style: styles.roleChangeModal
1071
+ }, /*#__PURE__*/React.createElement(Text, {
1072
+ style: styles.roleChangeModalHeading
1073
+ }, "Recording Details"), /*#__PURE__*/React.createElement(TextInput, {
1074
+ onChangeText: value => {
1075
+ setRecordingDetails({
1076
+ ...recordingDetails,
1077
+ meetingURL: value
1078
+ });
1079
+ },
1080
+ placeholderTextColor: COLORS.SECONDARY.DEFAULT,
1081
+ placeholder: "Enter meeting url",
1082
+ style: styles.input,
1083
+ defaultValue: recordingDetails.meetingURL || '',
1084
+ returnKeyType: "done",
1085
+ multiline: true,
1086
+ blurOnSubmit: true
1087
+ }), /*#__PURE__*/React.createElement(TextInput, {
1088
+ onChangeText: value => {
1089
+ if (value === '') {
1090
+ setRecordingDetails({
1091
+ ...recordingDetails,
1092
+ rtmpURLs: undefined
1093
+ });
1094
+ } else {
1095
+ setRecordingDetails({
1096
+ ...recordingDetails,
1097
+ rtmpURLs: [value]
1098
+ });
1099
+ }
1100
+ },
1101
+ placeholderTextColor: COLORS.SECONDARY.DEFAULT,
1102
+ placeholder: "Enter rtmp url",
1103
+ style: styles.input,
1104
+ defaultValue: recordingDetails.rtmpURLs ? recordingDetails.rtmpURLs[0] : '',
1105
+ returnKeyType: "done",
1106
+ multiline: true,
1107
+ blurOnSubmit: true
1108
+ }), /*#__PURE__*/React.createElement(TouchableOpacity, {
1109
+ style: styles.checkboxButtonContainer,
1110
+ onPress: () => {
1111
+ setRecordingDetails({
1112
+ ...recordingDetails,
1113
+ record: !recordingDetails.record
1114
+ });
1115
+ }
1116
+ }, /*#__PURE__*/React.createElement(View, {
1117
+ style: styles.roleChangeModalCheckBox
1118
+ }, recordingDetails.record && /*#__PURE__*/React.createElement(Entypo, {
1119
+ name: "check",
1120
+ style: styles.roleChangeModalCheck,
1121
+ size: 10
1122
+ })), /*#__PURE__*/React.createElement(Text, {
1123
+ style: styles.roleChangeModalPermission
1124
+ }, "Record")), /*#__PURE__*/React.createElement(TouchableOpacity, {
1125
+ style: styles.checkboxButtonContainer,
1126
+ onPress: () => {
1127
+ setResolutionDetails(!resolutionDetails);
1128
+ if (!resolutionDetails) {
1129
+ setModalVisible(ModalTypes.RESOLUTION, true);
1130
+ setRecordingDetails({
1131
+ ...recordingDetails,
1132
+ resolution: {
1133
+ height: 720,
1134
+ width: 1280
1135
+ }
1136
+ });
1137
+ } else {
1138
+ setRecordingDetails({
1139
+ ...recordingDetails,
1140
+ resolution: undefined
1141
+ });
1142
+ }
1143
+ }
1144
+ }, /*#__PURE__*/React.createElement(View, {
1145
+ style: styles.roleChangeModalCheckBox
1146
+ }, resolutionDetails && /*#__PURE__*/React.createElement(Entypo, {
1147
+ name: "check",
1148
+ style: styles.roleChangeModalCheck,
1149
+ size: 10
1150
+ })), /*#__PURE__*/React.createElement(Text, {
1151
+ style: styles.roleChangeModalPermission
1152
+ }, "Resolution")), /*#__PURE__*/React.createElement(View, {
1153
+ style: styles.roleChangeModalPermissionContainer
1154
+ }, /*#__PURE__*/React.createElement(CustomButton, {
1155
+ title: "Cancel",
1156
+ onPress: () => setModalVisible(ModalTypes.DEFAULT),
1157
+ viewStyle: styles.roleChangeModalCancelButton,
1158
+ textStyle: styles.roleChangeModalButtonText
1159
+ }), /*#__PURE__*/React.createElement(CustomButton, {
1160
+ title: "Start",
1161
+ onPress: changeLayout,
1162
+ viewStyle: styles.roleChangeModalSuccessButton,
1163
+ textStyle: styles.roleChangeModalButtonText
1164
+ }))) : /*#__PURE__*/React.createElement(View, {
1165
+ style: styles.roleChangeModal
1166
+ }, /*#__PURE__*/React.createElement(Text, {
1167
+ style: styles.roleChangeModalHeading
1168
+ }, "Resolution Details"), /*#__PURE__*/React.createElement(View, {
1169
+ style: styles.resolutionContainer
1170
+ }, /*#__PURE__*/React.createElement(View, {
1171
+ style: styles.resolutionDetails
1172
+ }, /*#__PURE__*/React.createElement(Text, {
1173
+ style: styles.interRegular
1174
+ }, "Height :"), /*#__PURE__*/React.createElement(Text, {
1175
+ style: styles.resolutionValue
1176
+ }, (_recordingDetails$res = recordingDetails.resolution) === null || _recordingDetails$res === void 0 ? void 0 : _recordingDetails$res.height)), /*#__PURE__*/React.createElement(Slider, {
1177
+ value: (_recordingDetails$res2 = recordingDetails.resolution) === null || _recordingDetails$res2 === void 0 ? void 0 : _recordingDetails$res2.height,
1178
+ maximumValue: 1280,
1179
+ minimumValue: 480,
1180
+ step: 10,
1181
+ onValueChange: value => {
1182
+ var _recordingDetails$res3;
1183
+ setRecordingDetails({
1184
+ ...recordingDetails,
1185
+ resolution: {
1186
+ height: parseInt(value),
1187
+ width: ((_recordingDetails$res3 = recordingDetails.resolution) === null || _recordingDetails$res3 === void 0 ? void 0 : _recordingDetails$res3.width) ?? 1280
1188
+ }
1189
+ });
1190
+ }
1191
+ }), /*#__PURE__*/React.createElement(View, {
1192
+ style: styles.resolutionDetails
1193
+ }, /*#__PURE__*/React.createElement(Text, {
1194
+ style: styles.interRegular
1195
+ }, "Width :"), /*#__PURE__*/React.createElement(Text, {
1196
+ style: styles.resolutionValue
1197
+ }, (_recordingDetails$res4 = recordingDetails.resolution) === null || _recordingDetails$res4 === void 0 ? void 0 : _recordingDetails$res4.width)), /*#__PURE__*/React.createElement(Slider, {
1198
+ value: (_recordingDetails$res5 = recordingDetails.resolution) === null || _recordingDetails$res5 === void 0 ? void 0 : _recordingDetails$res5.width,
1199
+ maximumValue: 1280,
1200
+ minimumValue: 500,
1201
+ step: 10,
1202
+ onValueChange: value => {
1203
+ var _recordingDetails$res6;
1204
+ setRecordingDetails({
1205
+ ...recordingDetails,
1206
+ resolution: {
1207
+ width: parseInt(value),
1208
+ height: ((_recordingDetails$res6 = recordingDetails.resolution) === null || _recordingDetails$res6 === void 0 ? void 0 : _recordingDetails$res6.height) ?? 720
1209
+ }
1210
+ });
1211
+ }
1212
+ })), /*#__PURE__*/React.createElement(View, {
1213
+ style: styles.sortingButtonContainer
1214
+ }, /*#__PURE__*/React.createElement(CustomButton, {
1215
+ title: "Back",
1216
+ onPress: () => setModalVisible(ModalTypes.RECORDING, true),
1217
+ viewStyle: styles.backButton,
1218
+ textStyle: styles.roleChangeModalButtonText
1219
+ })));
1220
+ };
1221
+ export const ChangeRoleAccepteModal = _ref18 => {
1222
+ var _roleChangeRequest$re2, _roleChangeRequest$su3;
1223
+ let {
1224
+ instance,
1225
+ roleChangeRequest,
1226
+ cancelModal
1227
+ } = _ref18;
1228
+ const changeLayout = () => {
1229
+ instance === null || instance === void 0 ? void 0 : instance.acceptRoleChange();
1230
+ cancelModal();
1231
+ };
1232
+ return /*#__PURE__*/React.createElement(View, {
1233
+ style: styles.roleChangeModal
1234
+ }, /*#__PURE__*/React.createElement(Text, {
1235
+ style: styles.roleChangeModalHeading
1236
+ }, "Role Change Details"), /*#__PURE__*/React.createElement(Text, {
1237
+ style: styles.roleChangeText
1238
+ }, `Role change requested by ${roleChangeRequest === null || roleChangeRequest === void 0 || (_roleChangeRequest$re2 = roleChangeRequest.requestedBy) === null || _roleChangeRequest$re2 === void 0 ? void 0 : _roleChangeRequest$re2.toLocaleUpperCase()}. Changing role to ${roleChangeRequest === null || roleChangeRequest === void 0 || (_roleChangeRequest$su3 = roleChangeRequest.suggestedRole) === null || _roleChangeRequest$su3 === void 0 ? void 0 : _roleChangeRequest$su3.toLocaleUpperCase()}`), /*#__PURE__*/React.createElement(View, {
1239
+ style: styles.sortingButtonContainer
1240
+ }, /*#__PURE__*/React.createElement(CustomButton, {
1241
+ title: "Reject",
1242
+ onPress: cancelModal,
1243
+ viewStyle: styles.roleChangeModalCancelButton,
1244
+ textStyle: styles.roleChangeModalButtonText
1245
+ }), /*#__PURE__*/React.createElement(CustomButton, {
1246
+ title: "Accept",
1247
+ onPress: changeLayout,
1248
+ viewStyle: styles.roleChangeModalSuccessButton,
1249
+ textStyle: styles.roleChangeModalButtonText
1250
+ })));
1251
+ };
1252
+ export const EndHlsModal = _ref19 => {
1253
+ let {
1254
+ onSuccess,
1255
+ cancelModal
1256
+ } = _ref19;
1257
+ const onEnd = () => {
1258
+ cancelModal();
1259
+ onSuccess();
1260
+ };
1261
+ return /*#__PURE__*/React.createElement(View, {
1262
+ style: styles.volumeModalContainer
1263
+ }, /*#__PURE__*/React.createElement(View, {
1264
+ style: styles.participantMenuItem
1265
+ }, /*#__PURE__*/React.createElement(Feather, {
1266
+ name: "alert-triangle",
1267
+ style: [styles.participantMenuItemIcon, styles.error],
1268
+ size: 24
1269
+ }), /*#__PURE__*/React.createElement(Text, {
1270
+ style: [styles.roleChangeModalHeading, styles.error]
1271
+ }, "End live stream for all?")), /*#__PURE__*/React.createElement(View, {
1272
+ style: styles.roleChangeModalPermissionContainer
1273
+ }, /*#__PURE__*/React.createElement(Text, {
1274
+ style: styles.roleChangeModalDescription
1275
+ }, "Your stream will end and everone will go offline immediately in this room. You can\u2019t undo this action.")), /*#__PURE__*/React.createElement(View, {
1276
+ style: styles.roleChangeModalPermissionContainer
1277
+ }, /*#__PURE__*/React.createElement(CustomButton, {
1278
+ title: "Don\u2019t End",
1279
+ onPress: cancelModal,
1280
+ viewStyle: styles.roleChangeModalCancelButton,
1281
+ textStyle: styles.roleChangeModalButtonText
1282
+ }), /*#__PURE__*/React.createElement(CustomButton, {
1283
+ title: "End Stream",
1284
+ onPress: onEnd,
1285
+ viewStyle: [styles.roleChangeModalSuccessButton, styles.errorContainer],
1286
+ textStyle: styles.roleChangeModalButtonText
1287
+ })));
1288
+ };
1289
+ export const RealTime = _ref20 => {
1290
+ let {
1291
+ startedAt
1292
+ } = _ref20;
1293
+ const [hour, setHour] = useState(0);
1294
+ const [minute, setMinute] = useState(0);
1295
+ const [second, setSecond] = useState(0);
1296
+ useEffect(() => {
1297
+ if (startedAt) {
1298
+ const millisecs = Date.now() - startedAt.getTime();
1299
+ const [h, min, sec] = getTime(Math.abs(millisecs));
1300
+ if (h > 0) {
1301
+ setHour(h);
1302
+ }
1303
+ if (min > 0) {
1304
+ setMinute(min);
1305
+ }
1306
+ if (sec > 0) {
1307
+ setSecond(sec);
1308
+ }
1309
+ }
1310
+ }, [startedAt]);
1311
+ useEffect(() => {
1312
+ const updatePostInfo = setInterval(() => {
1313
+ setSecond(sec => sec + 1);
1314
+ }, 1000);
1315
+ return () => {
1316
+ clearInterval(updatePostInfo);
1317
+ };
1318
+ }, []);
1319
+ useEffect(() => {
1320
+ if (second === 60) {
1321
+ setSecond(0);
1322
+ setMinute(min => min + 1);
1323
+ }
1324
+ }, [second]);
1325
+ useEffect(() => {
1326
+ if (minute === 60) {
1327
+ setMinute(0);
1328
+ setHour(hr => hr + 1);
1329
+ }
1330
+ }, [minute]);
1331
+ return /*#__PURE__*/React.createElement(View, {
1332
+ style: styles.liveTextContainer
1333
+ }, hour > 0 && /*#__PURE__*/React.createElement(Text, {
1334
+ style: styles.liveTimeText
1335
+ }, hour < 10 ? '0' + hour : hour, ":"), /*#__PURE__*/React.createElement(Text, {
1336
+ style: styles.liveTimeText
1337
+ }, minute < 10 ? '0' + minute : minute, ":"), /*#__PURE__*/React.createElement(Text, {
1338
+ style: styles.liveTimeText
1339
+ }, second < 10 ? '0' + second : second));
1340
+ };
1341
+ export const AudioShareSetVolumeModal = _ref21 => {
1342
+ let {
1343
+ success,
1344
+ cancel
1345
+ } = _ref21;
1346
+ const [volume, setVolume] = useState(0);
1347
+ const changeVolume = () => {
1348
+ success(volume);
1349
+ cancel();
1350
+ };
1351
+ return /*#__PURE__*/React.createElement(View, {
1352
+ style: styles.volumeModalContainer
1353
+ }, /*#__PURE__*/React.createElement(Text, {
1354
+ style: styles.roleChangeModalHeading
1355
+ }, "Set Volume"), /*#__PURE__*/React.createElement(View, {
1356
+ style: styles.volumeModalSlider
1357
+ }, /*#__PURE__*/React.createElement(Text, {
1358
+ style: styles.roleChangeModalDescription
1359
+ }, "Volume: ", volume), /*#__PURE__*/React.createElement(Slider, {
1360
+ value: volume,
1361
+ maximumValue: 1,
1362
+ minimumValue: 0,
1363
+ step: 0.1,
1364
+ onValueChange: value => setVolume(value[0])
1365
+ })), /*#__PURE__*/React.createElement(View, {
1366
+ style: styles.roleChangeModalPermissionContainer
1367
+ }, /*#__PURE__*/React.createElement(CustomButton, {
1368
+ title: "Cancel",
1369
+ onPress: cancel,
1370
+ viewStyle: styles.roleChangeModalCancelButton,
1371
+ textStyle: styles.roleChangeModalButtonText
1372
+ }), /*#__PURE__*/React.createElement(CustomButton, {
1373
+ title: "Change",
1374
+ onPress: changeVolume,
1375
+ viewStyle: styles.roleChangeModalSuccessButton,
1376
+ textStyle: styles.roleChangeModalButtonText
1377
+ })));
1378
+ };
1379
+ var RoleSelection = /*#__PURE__*/function (RoleSelection) {
1380
+ RoleSelection["TARGET"] = "TARGET";
1381
+ RoleSelection["TO_CHANGE"] = "TO_CHANGE";
1382
+ return RoleSelection;
1383
+ }(RoleSelection || {});
1384
+ export const ChangeBulkRoleModal = _ref22 => {
1385
+ let {
1386
+ cancelModal
1387
+ } = _ref22;
1388
+ const hmsInstance = useSelector(state => state.user.hmsInstance);
1389
+ const roles = useSelector(state => state.hmsStates.roles);
1390
+ const [showRolesSelectionView, setShowRolesSelectionView] = useState(null);
1391
+ const [targetRole, setTargetRole] = useState(null);
1392
+ const [rolesToChange, setRolesToChange] = useState([]);
1393
+ const changeRole = async () => {
1394
+ if (!hmsInstance || !targetRole) {
1395
+ return;
1396
+ }
1397
+ hmsInstance.changeRoleOfPeersWithRoles(rolesToChange.filter(roleToChange => roleToChange.name !== targetRole.name), targetRole);
1398
+ cancelModal();
1399
+ };
1400
+ const handleRoleSelection = roleSelected => {
1401
+ if (showRolesSelectionView === RoleSelection.TARGET) {
1402
+ setTargetRole(roleSelected);
1403
+ } else {
1404
+ setRolesToChange(prevRolesToChange => {
1405
+ if (prevRolesToChange.findIndex(role => role.name === roleSelected.name) >= 0) {
1406
+ return prevRolesToChange.filter(role => role.name !== roleSelected.name);
1407
+ }
1408
+ return [...prevRolesToChange, roleSelected];
1409
+ });
1410
+ }
1411
+ };
1412
+
1413
+ // if targetRole is not available, OR
1414
+ // role or rolesToChange is not available. then "Change" button should be disabled
1415
+ const changeSubmitDisabled = !targetRole || rolesToChange.length === 0;
1416
+ return /*#__PURE__*/React.createElement(View, {
1417
+ style: bulkRoleStyles.container
1418
+ }, /*#__PURE__*/React.createElement(Text, {
1419
+ style: styles.roleChangeModalHeading
1420
+ }, "Bulk Role Change"), /*#__PURE__*/React.createElement(View, {
1421
+ style: bulkRoleStyles.contentContainer
1422
+ }, /*#__PURE__*/React.createElement(View, {
1423
+ style: bulkRoleStyles.row
1424
+ }, /*#__PURE__*/React.createElement(Text, {
1425
+ style: bulkRoleStyles.label
1426
+ }, "Select Roles to Change"), /*#__PURE__*/React.createElement(TouchableOpacity, {
1427
+ style: bulkRoleStyles.btn,
1428
+ onPress: () => setShowRolesSelectionView(RoleSelection.TO_CHANGE)
1429
+ }, /*#__PURE__*/React.createElement(Text, {
1430
+ style: bulkRoleStyles.value,
1431
+ numberOfLines: 1
1432
+ }, rolesToChange.map(role => role.name).join(', ') || 'Select Roles'), /*#__PURE__*/React.createElement(MaterialCommunityIcons, {
1433
+ name: "chevron-right",
1434
+ size: 16,
1435
+ style: bulkRoleStyles.chevronIcon
1436
+ }))), /*#__PURE__*/React.createElement(View, {
1437
+ style: bulkRoleStyles.row
1438
+ }, /*#__PURE__*/React.createElement(Text, {
1439
+ style: bulkRoleStyles.label
1440
+ }, "Target Role"), /*#__PURE__*/React.createElement(TouchableOpacity, {
1441
+ style: bulkRoleStyles.btn,
1442
+ onPress: () => setShowRolesSelectionView(RoleSelection.TARGET)
1443
+ }, /*#__PURE__*/React.createElement(Text, {
1444
+ style: bulkRoleStyles.value
1445
+ }, targetRole ? targetRole.name : 'Select Role'), /*#__PURE__*/React.createElement(MaterialCommunityIcons, {
1446
+ name: "chevron-right",
1447
+ size: 16,
1448
+ style: bulkRoleStyles.chevronIcon
1449
+ })))), /*#__PURE__*/React.createElement(View, {
1450
+ style: styles.roleChangeModalPermissionContainer
1451
+ }, /*#__PURE__*/React.createElement(CustomButton, {
1452
+ title: "Cancel",
1453
+ onPress: cancelModal,
1454
+ viewStyle: styles.roleChangeModalCancelButton,
1455
+ textStyle: styles.roleChangeModalButtonText
1456
+ }), /*#__PURE__*/React.createElement(CustomButton, {
1457
+ disabled: changeSubmitDisabled,
1458
+ title: "Change",
1459
+ onPress: changeRole,
1460
+ viewStyle: styles.roleChangeModalSuccessButton,
1461
+ textStyle: styles.roleChangeModalButtonText
1462
+ })), showRolesSelectionView ? /*#__PURE__*/React.createElement(View, {
1463
+ style: bulkRoleStyles.roleSelectionBackdrop
1464
+ }, /*#__PURE__*/React.createElement(View, {
1465
+ style: bulkRoleStyles.roleSelectionContainer
1466
+ }, /*#__PURE__*/React.createElement(Text, {
1467
+ style: bulkRoleStyles.heading
1468
+ }, showRolesSelectionView === RoleSelection.TARGET ? 'Select Target Role' : 'Select Role to Change'), /*#__PURE__*/React.createElement(ScrollView, {
1469
+ centerContent: true,
1470
+ contentContainerStyle: bulkRoleStyles.scrollContainer
1471
+ }, roles.map(role => {
1472
+ const selected = showRolesSelectionView === RoleSelection.TARGET ? role.name === (targetRole === null || targetRole === void 0 ? void 0 : targetRole.name) : rolesToChange.findIndex(roleToChange => roleToChange.name === role.name) >= 0;
1473
+ return /*#__PURE__*/React.createElement(TouchableOpacity, {
1474
+ key: role.name,
1475
+ style: bulkRoleStyles.roleBtn,
1476
+ onPress: () => handleRoleSelection(role)
1477
+ }, /*#__PURE__*/React.createElement(View, {
1478
+ style: bulkRoleStyles.checkboxContainer
1479
+ }, showRolesSelectionView === RoleSelection.TARGET ? /*#__PURE__*/React.createElement(MaterialCommunityIcons, {
1480
+ name: selected ? 'radiobox-marked' : 'radiobox-blank',
1481
+ style: styles.roleChangeModalCheck,
1482
+ size: 20
1483
+ }) : /*#__PURE__*/React.createElement(MaterialCommunityIcons, {
1484
+ name: selected ? 'checkbox-outline' : 'checkbox-blank-outline',
1485
+ style: styles.roleChangeModalCheck,
1486
+ size: 24
1487
+ })), /*#__PURE__*/React.createElement(Text, {
1488
+ style: bulkRoleStyles.checkboxLabel
1489
+ }, role.name));
1490
+ })), /*#__PURE__*/React.createElement(TouchableOpacity, {
1491
+ style: bulkRoleStyles.roleSelectionDone,
1492
+ onPress: () => setShowRolesSelectionView(null)
1493
+ }, /*#__PURE__*/React.createElement(Text, {
1494
+ style: bulkRoleStyles.roleSelectionDoneText
1495
+ }, "Done")))) : null);
1496
+ };
1497
+ const bulkRoleStyles = StyleSheet.create({
1498
+ container: {
1499
+ padding: 24,
1500
+ position: 'relative',
1501
+ height: 320
1502
+ },
1503
+ contentContainer: {
1504
+ flex: 1,
1505
+ justifyContent: 'center',
1506
+ marginTop: 24
1507
+ },
1508
+ row: {
1509
+ // flexGrow: 1,
1510
+ marginVertical: 20,
1511
+ flexDirection: 'row',
1512
+ alignItems: 'center',
1513
+ justifyContent: 'space-between'
1514
+ },
1515
+ label: {
1516
+ color: COLORS.TEXT.HIGH_EMPHASIS
1517
+ },
1518
+ value: {
1519
+ flex: 1,
1520
+ color: COLORS.TEXT.MEDIUM_EMPHASIS,
1521
+ textAlign: 'right'
1522
+ },
1523
+ toggleContainer: {
1524
+ width: 160,
1525
+ borderRadius: 6,
1526
+ backgroundColor: COLORS.SECONDARY.DARK,
1527
+ flexDirection: 'row',
1528
+ paddingVertical: 2,
1529
+ paddingHorizontal: 2
1530
+ },
1531
+ toggleItem: {
1532
+ flex: 1,
1533
+ alignItems: 'center',
1534
+ paddingVertical: 6
1535
+ },
1536
+ toggleActiveItem: {
1537
+ flex: 1,
1538
+ alignItems: 'center',
1539
+ paddingVertical: 6,
1540
+ borderRadius: 4,
1541
+ backgroundColor: COLORS.SECONDARY.DEFAULT
1542
+ },
1543
+ btn: {
1544
+ flex: 1,
1545
+ flexDirection: 'row',
1546
+ alignItems: 'center',
1547
+ justifyContent: 'flex-end',
1548
+ marginLeft: 4
1549
+ },
1550
+ chevronIcon: {
1551
+ color: COLORS.TEXT.MEDIUM_EMPHASIS
1552
+ },
1553
+ roleSelectionBackdrop: {
1554
+ position: 'absolute',
1555
+ top: 24,
1556
+ left: 24,
1557
+ width: '100%',
1558
+ height: '100%',
1559
+ shadowColor: COLORS.SURFACE.LIGHT,
1560
+ shadowOpacity: 0.5,
1561
+ shadowRadius: 24,
1562
+ padding: 8
1563
+ },
1564
+ roleSelectionContainer: {
1565
+ flex: 1,
1566
+ padding: 12,
1567
+ backgroundColor: COLORS.SURFACE.LIGHT,
1568
+ borderRadius: 8,
1569
+ borderWidth: 0.5,
1570
+ borderColor: COLORS.BORDER.LIGHT
1571
+ },
1572
+ heading: {
1573
+ fontSize: 16,
1574
+ lineHeight: 24,
1575
+ color: COLORS.TEXT.HIGH_EMPHASIS,
1576
+ marginVertical: 4,
1577
+ marginLeft: 4
1578
+ },
1579
+ scrollContainer: {
1580
+ paddingHorizontal: 12
1581
+ },
1582
+ checkboxContainer: {
1583
+ marginRight: 12,
1584
+ justifyContent: 'center',
1585
+ alignItems: 'center'
1586
+ },
1587
+ checkboxLabel: {
1588
+ color: COLORS.TEXT.MEDIUM_EMPHASIS
1589
+ },
1590
+ roleBtn: {
1591
+ paddingVertical: 12,
1592
+ flexDirection: 'row',
1593
+ alignItems: 'center'
1594
+ },
1595
+ roleSelectionDone: {
1596
+ flexDirection: 'row',
1597
+ alignItems: 'center',
1598
+ justifyContent: 'center',
1599
+ marginTop: 4,
1600
+ paddingVertical: 6
1601
+ },
1602
+ roleSelectionDoneText: {
1603
+ fontSize: 14,
1604
+ lineHeight: 22,
1605
+ fontFamily: 'Inter-Medium',
1606
+ color: COLORS.TEXT.HIGH_EMPHASIS
1607
+ }
1608
+ });
1609
+ //# sourceMappingURL=Modals.js.map