@100mslive/react-native-room-kit 0.0.3 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (857) hide show
  1. package/README.md +413 -11
  2. package/lib/commonjs/HMSInstanceSetup.js +3 -15
  3. package/lib/commonjs/HMSInstanceSetup.js.map +1 -1
  4. package/lib/commonjs/HMSPrebuilt.js +17 -6
  5. package/lib/commonjs/HMSPrebuilt.js.map +1 -1
  6. package/lib/commonjs/HMSRoomSetup.js +76 -21
  7. package/lib/commonjs/HMSRoomSetup.js.map +1 -1
  8. package/lib/commonjs/Icons/AlertTriangle/assets/alert-triangle.png +0 -0
  9. package/lib/commonjs/Icons/AlertTriangle/assets/alert-triangle@2x.png +0 -0
  10. package/lib/commonjs/Icons/AlertTriangle/assets/alert-triangle@3x.png +0 -0
  11. package/lib/commonjs/Icons/AlertTriangle/index.js +34 -0
  12. package/lib/commonjs/Icons/AlertTriangle/index.js.map +1 -0
  13. package/lib/commonjs/Icons/AnswerPhone/index.js +5 -1
  14. package/lib/commonjs/Icons/AnswerPhone/index.js.map +1 -1
  15. package/lib/commonjs/Icons/BRB/assets/BRB.png +0 -0
  16. package/lib/commonjs/Icons/BRB/assets/BRB@2x.png +0 -0
  17. package/lib/commonjs/Icons/BRB/assets/BRB@3x.png +0 -0
  18. package/lib/commonjs/Icons/BRB/index.js +35 -0
  19. package/lib/commonjs/Icons/BRB/index.js.map +1 -0
  20. package/lib/commonjs/Icons/Bluetooth/index.js +5 -1
  21. package/lib/commonjs/Icons/Bluetooth/index.js.map +1 -1
  22. package/lib/commonjs/Icons/Camera/index.js +5 -1
  23. package/lib/commonjs/Icons/Camera/index.js.map +1 -1
  24. package/lib/commonjs/Icons/Chat/index.js +5 -1
  25. package/lib/commonjs/Icons/Chat/index.js.map +1 -1
  26. package/lib/commonjs/Icons/Check/assets/check.png +0 -0
  27. package/lib/commonjs/Icons/Check/assets/check@2x.png +0 -0
  28. package/lib/commonjs/Icons/Check/assets/check@3x.png +0 -0
  29. package/lib/commonjs/Icons/Check/index.js +34 -0
  30. package/lib/commonjs/Icons/Check/index.js.map +1 -0
  31. package/lib/commonjs/Icons/Chevron/index.js +5 -1
  32. package/lib/commonjs/Icons/Chevron/index.js.map +1 -1
  33. package/lib/commonjs/Icons/Close/index.js +5 -1
  34. package/lib/commonjs/Icons/Close/index.js.map +1 -1
  35. package/lib/commonjs/Icons/Hamburger/assets/hamburger.png +0 -0
  36. package/lib/commonjs/Icons/Hamburger/assets/hamburger@2x.png +0 -0
  37. package/lib/commonjs/Icons/Hamburger/assets/hamburger@3x.png +0 -0
  38. package/lib/commonjs/Icons/Hamburger/index.js +34 -0
  39. package/lib/commonjs/Icons/Hamburger/index.js.map +1 -0
  40. package/lib/commonjs/Icons/Hand/index.js +6 -4
  41. package/lib/commonjs/Icons/Hand/index.js.map +1 -1
  42. package/lib/commonjs/Icons/Headphones/index.js +5 -1
  43. package/lib/commonjs/Icons/Headphones/index.js.map +1 -1
  44. package/lib/commonjs/Icons/Maximize/assets/maximize.png +0 -0
  45. package/lib/commonjs/Icons/Maximize/assets/maximize@2x.png +0 -0
  46. package/lib/commonjs/Icons/Maximize/assets/maximize@3x.png +0 -0
  47. package/lib/commonjs/Icons/Maximize/index.js +34 -0
  48. package/lib/commonjs/Icons/Maximize/index.js.map +1 -0
  49. package/lib/commonjs/Icons/Mic/index.js +5 -1
  50. package/lib/commonjs/Icons/Mic/index.js.map +1 -1
  51. package/lib/commonjs/Icons/Minimize/assets/minimize.png +0 -0
  52. package/lib/commonjs/Icons/Minimize/assets/minimize@2x.png +0 -0
  53. package/lib/commonjs/Icons/Minimize/assets/minimize@3x.png +0 -0
  54. package/lib/commonjs/Icons/Minimize/index.js +34 -0
  55. package/lib/commonjs/Icons/Minimize/index.js.map +1 -0
  56. package/lib/commonjs/Icons/Participants/index.js +5 -1
  57. package/lib/commonjs/Icons/Participants/index.js.map +1 -1
  58. package/lib/commonjs/Icons/Pencil/assets/pencil.png +0 -0
  59. package/lib/commonjs/Icons/Pencil/assets/pencil@2x.png +0 -0
  60. package/lib/commonjs/Icons/Pencil/assets/pencil@3x.png +0 -0
  61. package/lib/commonjs/Icons/Pencil/index.js +34 -0
  62. package/lib/commonjs/Icons/Pencil/index.js.map +1 -0
  63. package/lib/commonjs/Icons/Pin/assets/pin.png +0 -0
  64. package/lib/commonjs/Icons/Pin/assets/pin@2x.png +0 -0
  65. package/lib/commonjs/Icons/Pin/assets/pin@3x.png +0 -0
  66. package/lib/commonjs/Icons/Pin/index.js +34 -0
  67. package/lib/commonjs/Icons/Pin/index.js.map +1 -0
  68. package/lib/commonjs/Icons/Radio/assets/radio.png +0 -0
  69. package/lib/commonjs/Icons/Radio/assets/radio@2x.png +0 -0
  70. package/lib/commonjs/Icons/Radio/assets/radio@3x.png +0 -0
  71. package/lib/commonjs/Icons/Radio/index.js +30 -0
  72. package/lib/commonjs/Icons/Radio/index.js.map +1 -0
  73. package/lib/commonjs/Icons/Recording/assets/recording.png +0 -0
  74. package/lib/commonjs/Icons/Recording/assets/recording@2x.png +0 -0
  75. package/lib/commonjs/Icons/Recording/assets/recording@3x.png +0 -0
  76. package/lib/commonjs/Icons/Recording/index.js +34 -0
  77. package/lib/commonjs/Icons/Recording/index.js.map +1 -0
  78. package/lib/commonjs/Icons/RotateCamera/index.js +5 -1
  79. package/lib/commonjs/Icons/RotateCamera/index.js.map +1 -1
  80. package/lib/commonjs/Icons/ScreenShare/index.js +5 -1
  81. package/lib/commonjs/Icons/ScreenShare/index.js.map +1 -1
  82. package/lib/commonjs/Icons/Speaker/index.js +5 -1
  83. package/lib/commonjs/Icons/Speaker/index.js.map +1 -1
  84. package/lib/commonjs/Icons/Star/assets/star.png +0 -0
  85. package/lib/commonjs/Icons/Star/assets/star@2x.png +0 -0
  86. package/lib/commonjs/Icons/Star/assets/star@3x.png +0 -0
  87. package/lib/commonjs/Icons/Star/index.js +34 -0
  88. package/lib/commonjs/Icons/Star/index.js.map +1 -0
  89. package/lib/commonjs/Icons/Stop/assets/stop.png +0 -0
  90. package/lib/commonjs/Icons/Stop/assets/stop@2x.png +0 -0
  91. package/lib/commonjs/Icons/Stop/assets/stop@3x.png +0 -0
  92. package/lib/commonjs/Icons/Stop/index.js +34 -0
  93. package/lib/commonjs/Icons/Stop/index.js.map +1 -0
  94. package/lib/commonjs/Icons/ThreeDots/index.js +5 -1
  95. package/lib/commonjs/Icons/ThreeDots/index.js.map +1 -1
  96. package/lib/commonjs/Icons/Wave/index.js +5 -1
  97. package/lib/commonjs/Icons/Wave/index.js.map +1 -1
  98. package/lib/commonjs/Icons/index.js +132 -0
  99. package/lib/commonjs/Icons/index.js.map +1 -1
  100. package/lib/commonjs/components/AvatarView.js +1 -2
  101. package/lib/commonjs/components/AvatarView.js.map +1 -1
  102. package/lib/commonjs/components/BackButton.js +8 -6
  103. package/lib/commonjs/components/BackButton.js.map +1 -1
  104. package/lib/commonjs/components/BottomSheet.js +157 -0
  105. package/lib/commonjs/components/BottomSheet.js.map +1 -0
  106. package/lib/commonjs/components/ChangeNameModalContent.js +131 -0
  107. package/lib/commonjs/components/ChangeNameModalContent.js.map +1 -0
  108. package/lib/commonjs/components/CompanyLogo.js +38 -0
  109. package/lib/commonjs/components/CompanyLogo.js.map +1 -0
  110. package/lib/commonjs/components/CustomInput.js +2 -3
  111. package/lib/commonjs/components/CustomInput.js.map +1 -1
  112. package/lib/commonjs/components/DisplayView.js +12 -58
  113. package/lib/commonjs/components/DisplayView.js.map +1 -1
  114. package/lib/commonjs/components/EndRoomModalContent.js +85 -0
  115. package/lib/commonjs/components/EndRoomModalContent.js.map +1 -0
  116. package/lib/commonjs/components/Footer.js +8 -9
  117. package/lib/commonjs/components/Footer.js.map +1 -1
  118. package/lib/commonjs/components/GridView.js +53 -7
  119. package/lib/commonjs/components/GridView.js.map +1 -1
  120. package/lib/commonjs/components/HMSBaseButton.js +66 -0
  121. package/lib/commonjs/components/HMSBaseButton.js.map +1 -0
  122. package/lib/commonjs/components/HMSDangerButton.js +53 -0
  123. package/lib/commonjs/components/HMSDangerButton.js.map +1 -0
  124. package/lib/commonjs/components/HMSHLSStreamLoading.js +65 -0
  125. package/lib/commonjs/components/HMSHLSStreamLoading.js.map +1 -0
  126. package/lib/commonjs/components/HMSLocalVideoView.js +41 -0
  127. package/lib/commonjs/components/HMSLocalVideoView.js.map +1 -0
  128. package/lib/commonjs/components/{HMSSpeakerSettings.js → HMSManageAudioOutput.js} +70 -76
  129. package/lib/commonjs/components/HMSManageAudioOutput.js.map +1 -0
  130. package/lib/commonjs/components/HMSManageCameraRotation.js +5 -4
  131. package/lib/commonjs/components/HMSManageCameraRotation.js.map +1 -1
  132. package/lib/commonjs/components/HMSManageLeave.js +91 -159
  133. package/lib/commonjs/components/HMSManageLeave.js.map +1 -1
  134. package/lib/commonjs/components/HMSManageLocalAudio.js +1 -9
  135. package/lib/commonjs/components/HMSManageLocalAudio.js.map +1 -1
  136. package/lib/commonjs/components/HMSManageLocalVideo.js +1 -9
  137. package/lib/commonjs/components/HMSManageLocalVideo.js.map +1 -1
  138. package/lib/commonjs/components/HMSMeetingEnded.js +35 -0
  139. package/lib/commonjs/components/HMSMeetingEnded.js.map +1 -0
  140. package/lib/commonjs/components/HMSPreviewEditName.js +7 -38
  141. package/lib/commonjs/components/HMSPreviewEditName.js.map +1 -1
  142. package/lib/commonjs/components/HMSPreviewHLSLiveIndicator.js +71 -0
  143. package/lib/commonjs/components/HMSPreviewHLSLiveIndicator.js.map +1 -0
  144. package/lib/commonjs/components/HMSPreviewJoinButton.js +26 -37
  145. package/lib/commonjs/components/HMSPreviewJoinButton.js.map +1 -1
  146. package/lib/commonjs/components/HMSPreviewNetworkQuality.js +45 -0
  147. package/lib/commonjs/components/HMSPreviewNetworkQuality.js.map +1 -0
  148. package/lib/commonjs/components/HMSPreviewPeersList.js +21 -33
  149. package/lib/commonjs/components/HMSPreviewPeersList.js.map +1 -1
  150. package/lib/commonjs/components/HMSPreviewSubtitle.js +43 -7
  151. package/lib/commonjs/components/HMSPreviewSubtitle.js.map +1 -1
  152. package/lib/commonjs/components/HMSPreviewTile.js +18 -26
  153. package/lib/commonjs/components/HMSPreviewTile.js.map +1 -1
  154. package/lib/commonjs/components/HMSPreviewTitle.js +14 -6
  155. package/lib/commonjs/components/HMSPreviewTitle.js.map +1 -1
  156. package/lib/commonjs/components/HMSPrimaryButton.js +53 -0
  157. package/lib/commonjs/components/HMSPrimaryButton.js.map +1 -0
  158. package/lib/commonjs/components/HMSRecordingIndicator.js +46 -0
  159. package/lib/commonjs/components/HMSRecordingIndicator.js.map +1 -0
  160. package/lib/commonjs/components/HMSRoomOptions.js +22 -10
  161. package/lib/commonjs/components/HMSRoomOptions.js.map +1 -1
  162. package/lib/commonjs/components/HMSShowNetworkQuality.js +5 -6
  163. package/lib/commonjs/components/HMSShowNetworkQuality.js.map +1 -1
  164. package/lib/commonjs/components/HMSTextInput.js +66 -0
  165. package/lib/commonjs/components/HMSTextInput.js.map +1 -0
  166. package/lib/commonjs/components/Header.js +30 -30
  167. package/lib/commonjs/components/Header.js.map +1 -1
  168. package/lib/commonjs/components/LocalPeerRegularVideoView.js +26 -0
  169. package/lib/commonjs/components/LocalPeerRegularVideoView.js.map +1 -0
  170. package/lib/commonjs/components/LocalPeerScreenshareView.js +76 -0
  171. package/lib/commonjs/components/LocalPeerScreenshareView.js.map +1 -0
  172. package/lib/commonjs/components/Meeting.js +14 -3
  173. package/lib/commonjs/components/Meeting.js.map +1 -1
  174. package/lib/commonjs/components/MenuModal/Menu.js +1 -2
  175. package/lib/commonjs/components/MenuModal/Menu.js.map +1 -1
  176. package/lib/commonjs/components/MiniView.js +163 -0
  177. package/lib/commonjs/components/MiniView.js.map +1 -0
  178. package/lib/commonjs/components/Modals.js +35 -380
  179. package/lib/commonjs/components/Modals.js.map +1 -1
  180. package/lib/commonjs/components/PaginationDots.js +56 -0
  181. package/lib/commonjs/components/PaginationDots.js.map +1 -0
  182. package/lib/commonjs/components/Participants/ParticipantsList.js +1 -20
  183. package/lib/commonjs/components/Participants/ParticipantsList.js.map +1 -1
  184. package/lib/commonjs/components/ParticipantsCount.js +55 -0
  185. package/lib/commonjs/components/ParticipantsCount.js.map +1 -0
  186. package/lib/commonjs/components/PeerMinimizedView.js +114 -0
  187. package/lib/commonjs/components/PeerMinimizedView.js.map +1 -0
  188. package/lib/commonjs/components/PeerSettingsModalContent.js +69 -63
  189. package/lib/commonjs/components/PeerSettingsModalContent.js.map +1 -1
  190. package/lib/commonjs/components/PeerVideoTile/AvatarView.js +76 -0
  191. package/lib/commonjs/components/PeerVideoTile/AvatarView.js.map +1 -0
  192. package/lib/commonjs/components/PeerVideoTile/PeerAudioMutedIndicator.js +44 -0
  193. package/lib/commonjs/components/PeerVideoTile/PeerAudioMutedIndicator.js.map +1 -0
  194. package/lib/commonjs/components/PeerVideoTile/PeerMetadata.js +44 -0
  195. package/lib/commonjs/components/PeerVideoTile/PeerMetadata.js.map +1 -0
  196. package/lib/commonjs/components/PeerVideoTile/PeerNameAndNetwork.js +74 -0
  197. package/lib/commonjs/components/PeerVideoTile/PeerNameAndNetwork.js.map +1 -0
  198. package/lib/commonjs/components/PeerVideoTile/PeerVideoTileView.js +146 -0
  199. package/lib/commonjs/components/PeerVideoTile/PeerVideoTileView.js.map +1 -0
  200. package/lib/commonjs/components/PeerVideoTile/VideoView.js +84 -0
  201. package/lib/commonjs/components/PeerVideoTile/VideoView.js.map +1 -0
  202. package/lib/commonjs/components/PeerVideoTile/index.js +2 -0
  203. package/lib/commonjs/components/PeerVideoTile/index.js.map +1 -0
  204. package/lib/commonjs/components/PressableIcon.js +15 -8
  205. package/lib/commonjs/components/PressableIcon.js.map +1 -1
  206. package/lib/commonjs/components/Preview.js +93 -72
  207. package/lib/commonjs/components/Preview.js.map +1 -1
  208. package/lib/commonjs/components/RoomSettingsModalContent.js +228 -457
  209. package/lib/commonjs/components/RoomSettingsModalContent.js.map +1 -1
  210. package/lib/commonjs/components/RoomSettingsModalDebugModeContent.js +295 -0
  211. package/lib/commonjs/components/RoomSettingsModalDebugModeContent.js.map +1 -0
  212. package/lib/commonjs/components/StopRecordingModalContent.js +97 -0
  213. package/lib/commonjs/components/StopRecordingModalContent.js.map +1 -0
  214. package/lib/commonjs/components/Tile.js +29 -90
  215. package/lib/commonjs/components/Tile.js.map +1 -1
  216. package/lib/commonjs/components/TilesContainer.js +99 -10
  217. package/lib/commonjs/components/TilesContainer.js.map +1 -1
  218. package/lib/commonjs/components/UnmountAfterDelay.js +48 -0
  219. package/lib/commonjs/components/UnmountAfterDelay.js.map +1 -0
  220. package/lib/commonjs/components/WebrtcView.js +51 -0
  221. package/lib/commonjs/components/WebrtcView.js.map +1 -0
  222. package/lib/commonjs/components/WelcomeInMeeting.js +54 -0
  223. package/lib/commonjs/components/WelcomeInMeeting.js.map +1 -0
  224. package/lib/commonjs/components/index.js +0 -11
  225. package/lib/commonjs/components/index.js.map +1 -1
  226. package/lib/commonjs/hooks/useHmsInstance.js +0 -1
  227. package/lib/commonjs/hooks/useHmsInstance.js.map +1 -1
  228. package/lib/commonjs/hooks-sdk-selectors.js +6 -1
  229. package/lib/commonjs/hooks-sdk-selectors.js.map +1 -1
  230. package/lib/commonjs/hooks-sdk.js +16 -1
  231. package/lib/commonjs/hooks-sdk.js.map +1 -1
  232. package/lib/commonjs/hooks-util-selectors.js +14 -1
  233. package/lib/commonjs/hooks-util-selectors.js.map +1 -1
  234. package/lib/commonjs/hooks-util.js +421 -98
  235. package/lib/commonjs/hooks-util.js.map +1 -1
  236. package/lib/commonjs/modules/HMSManager.js +23 -0
  237. package/lib/commonjs/modules/HMSManager.js.map +1 -0
  238. package/lib/commonjs/modules/parser.js +22 -0
  239. package/lib/commonjs/modules/parser.js.map +1 -0
  240. package/lib/commonjs/peerTrackNodeUtils.js +8 -3
  241. package/lib/commonjs/peerTrackNodeUtils.js.map +1 -1
  242. package/lib/commonjs/redux/actionTypes.js +20 -1
  243. package/lib/commonjs/redux/actionTypes.js.map +1 -1
  244. package/lib/commonjs/redux/actions/index.js +65 -1
  245. package/lib/commonjs/redux/actions/index.js.map +1 -1
  246. package/lib/commonjs/redux/reducers/appState.js +70 -1
  247. package/lib/commonjs/redux/reducers/appState.js.map +1 -1
  248. package/lib/commonjs/redux/reducers/hmsStates.js +7 -1
  249. package/lib/commonjs/redux/reducers/hmsStates.js.map +1 -1
  250. package/lib/commonjs/redux/reducers/userState.js +3 -1
  251. package/lib/commonjs/redux/reducers/userState.js.map +1 -1
  252. package/lib/commonjs/utils/functions.js +51 -1
  253. package/lib/commonjs/utils/functions.js.map +1 -1
  254. package/lib/commonjs/utils/theme.js +63 -8
  255. package/lib/commonjs/utils/theme.js.map +1 -1
  256. package/lib/commonjs/utils/types.js +8 -2
  257. package/lib/commonjs/utils/types.js.map +1 -1
  258. package/lib/commonjs/utils.js +2 -2
  259. package/lib/commonjs/utils.js.map +1 -1
  260. package/lib/module/HMSInstanceSetup.js +3 -15
  261. package/lib/module/HMSInstanceSetup.js.map +1 -1
  262. package/lib/module/HMSPrebuilt.js +17 -5
  263. package/lib/module/HMSPrebuilt.js.map +1 -1
  264. package/lib/module/HMSRoomSetup.js +81 -26
  265. package/lib/module/HMSRoomSetup.js.map +1 -1
  266. package/lib/module/Icons/AlertTriangle/assets/alert-triangle.png +0 -0
  267. package/lib/module/Icons/AlertTriangle/assets/alert-triangle@2x.png +0 -0
  268. package/lib/module/Icons/AlertTriangle/assets/alert-triangle@3x.png +0 -0
  269. package/lib/module/Icons/AlertTriangle/index.js +26 -0
  270. package/lib/module/Icons/AlertTriangle/index.js.map +1 -0
  271. package/lib/module/Icons/AnswerPhone/index.js +5 -1
  272. package/lib/module/Icons/AnswerPhone/index.js.map +1 -1
  273. package/lib/module/Icons/BRB/assets/BRB.png +0 -0
  274. package/lib/module/Icons/BRB/assets/BRB@2x.png +0 -0
  275. package/lib/module/Icons/BRB/assets/BRB@3x.png +0 -0
  276. package/lib/module/Icons/BRB/index.js +27 -0
  277. package/lib/module/Icons/BRB/index.js.map +1 -0
  278. package/lib/module/Icons/Bluetooth/index.js +5 -1
  279. package/lib/module/Icons/Bluetooth/index.js.map +1 -1
  280. package/lib/module/Icons/Camera/index.js +5 -1
  281. package/lib/module/Icons/Camera/index.js.map +1 -1
  282. package/lib/module/Icons/Chat/index.js +5 -1
  283. package/lib/module/Icons/Chat/index.js.map +1 -1
  284. package/lib/module/Icons/Check/assets/check.png +0 -0
  285. package/lib/module/Icons/Check/assets/check@2x.png +0 -0
  286. package/lib/module/Icons/Check/assets/check@3x.png +0 -0
  287. package/lib/module/Icons/Check/index.js +26 -0
  288. package/lib/module/Icons/Check/index.js.map +1 -0
  289. package/lib/module/Icons/Chevron/index.js +5 -1
  290. package/lib/module/Icons/Chevron/index.js.map +1 -1
  291. package/lib/module/Icons/Close/index.js +5 -1
  292. package/lib/module/Icons/Close/index.js.map +1 -1
  293. package/lib/module/Icons/Hamburger/assets/hamburger.png +0 -0
  294. package/lib/module/Icons/Hamburger/assets/hamburger@2x.png +0 -0
  295. package/lib/module/Icons/Hamburger/assets/hamburger@3x.png +0 -0
  296. package/lib/module/Icons/Hamburger/index.js +26 -0
  297. package/lib/module/Icons/Hamburger/index.js.map +1 -0
  298. package/lib/module/Icons/Hand/index.js +6 -4
  299. package/lib/module/Icons/Hand/index.js.map +1 -1
  300. package/lib/module/Icons/Headphones/index.js +5 -1
  301. package/lib/module/Icons/Headphones/index.js.map +1 -1
  302. package/lib/module/Icons/Maximize/assets/maximize.png +0 -0
  303. package/lib/module/Icons/Maximize/assets/maximize@2x.png +0 -0
  304. package/lib/module/Icons/Maximize/assets/maximize@3x.png +0 -0
  305. package/lib/module/Icons/Maximize/index.js +26 -0
  306. package/lib/module/Icons/Maximize/index.js.map +1 -0
  307. package/lib/module/Icons/Mic/index.js +5 -1
  308. package/lib/module/Icons/Mic/index.js.map +1 -1
  309. package/lib/module/Icons/Minimize/assets/minimize.png +0 -0
  310. package/lib/module/Icons/Minimize/assets/minimize@2x.png +0 -0
  311. package/lib/module/Icons/Minimize/assets/minimize@3x.png +0 -0
  312. package/lib/module/Icons/Minimize/index.js +26 -0
  313. package/lib/module/Icons/Minimize/index.js.map +1 -0
  314. package/lib/module/Icons/Participants/index.js +5 -1
  315. package/lib/module/Icons/Participants/index.js.map +1 -1
  316. package/lib/module/Icons/Pencil/assets/pencil.png +0 -0
  317. package/lib/module/Icons/Pencil/assets/pencil@2x.png +0 -0
  318. package/lib/module/Icons/Pencil/assets/pencil@3x.png +0 -0
  319. package/lib/module/Icons/Pencil/index.js +26 -0
  320. package/lib/module/Icons/Pencil/index.js.map +1 -0
  321. package/lib/module/Icons/Pin/assets/pin.png +0 -0
  322. package/lib/module/Icons/Pin/assets/pin@2x.png +0 -0
  323. package/lib/module/Icons/Pin/assets/pin@3x.png +0 -0
  324. package/lib/module/Icons/Pin/index.js +26 -0
  325. package/lib/module/Icons/Pin/index.js.map +1 -0
  326. package/lib/module/Icons/Radio/assets/radio.png +0 -0
  327. package/lib/module/Icons/Radio/assets/radio@2x.png +0 -0
  328. package/lib/module/Icons/Radio/assets/radio@3x.png +0 -0
  329. package/lib/module/Icons/Radio/index.js +22 -0
  330. package/lib/module/Icons/Radio/index.js.map +1 -0
  331. package/lib/module/Icons/Recording/assets/recording.png +0 -0
  332. package/lib/module/Icons/Recording/assets/recording@2x.png +0 -0
  333. package/lib/module/Icons/Recording/assets/recording@3x.png +0 -0
  334. package/lib/module/Icons/Recording/index.js +26 -0
  335. package/lib/module/Icons/Recording/index.js.map +1 -0
  336. package/lib/module/Icons/RotateCamera/index.js +5 -1
  337. package/lib/module/Icons/RotateCamera/index.js.map +1 -1
  338. package/lib/module/Icons/ScreenShare/index.js +5 -1
  339. package/lib/module/Icons/ScreenShare/index.js.map +1 -1
  340. package/lib/module/Icons/Speaker/index.js +5 -1
  341. package/lib/module/Icons/Speaker/index.js.map +1 -1
  342. package/lib/module/Icons/Star/assets/star.png +0 -0
  343. package/lib/module/Icons/Star/assets/star@2x.png +0 -0
  344. package/lib/module/Icons/Star/assets/star@3x.png +0 -0
  345. package/lib/module/Icons/Star/index.js +26 -0
  346. package/lib/module/Icons/Star/index.js.map +1 -0
  347. package/lib/module/Icons/Stop/assets/stop.png +0 -0
  348. package/lib/module/Icons/Stop/assets/stop@2x.png +0 -0
  349. package/lib/module/Icons/Stop/assets/stop@3x.png +0 -0
  350. package/lib/module/Icons/Stop/index.js +26 -0
  351. package/lib/module/Icons/Stop/index.js.map +1 -0
  352. package/lib/module/Icons/ThreeDots/index.js +5 -1
  353. package/lib/module/Icons/ThreeDots/index.js.map +1 -1
  354. package/lib/module/Icons/Wave/index.js +5 -1
  355. package/lib/module/Icons/Wave/index.js.map +1 -1
  356. package/lib/module/Icons/index.js +12 -0
  357. package/lib/module/Icons/index.js.map +1 -1
  358. package/lib/module/components/AvatarView.js +1 -2
  359. package/lib/module/components/AvatarView.js.map +1 -1
  360. package/lib/module/components/BackButton.js +9 -7
  361. package/lib/module/components/BackButton.js.map +1 -1
  362. package/lib/module/components/BottomSheet.js +146 -0
  363. package/lib/module/components/BottomSheet.js.map +1 -0
  364. package/lib/module/components/ChangeNameModalContent.js +122 -0
  365. package/lib/module/components/ChangeNameModalContent.js.map +1 -0
  366. package/lib/module/components/CompanyLogo.js +30 -0
  367. package/lib/module/components/CompanyLogo.js.map +1 -0
  368. package/lib/module/components/CustomInput.js +2 -3
  369. package/lib/module/components/CustomInput.js.map +1 -1
  370. package/lib/module/components/DisplayView.js +16 -61
  371. package/lib/module/components/DisplayView.js.map +1 -1
  372. package/lib/module/components/EndRoomModalContent.js +76 -0
  373. package/lib/module/components/EndRoomModalContent.js.map +1 -0
  374. package/lib/module/components/Footer.js +9 -10
  375. package/lib/module/components/Footer.js.map +1 -1
  376. package/lib/module/components/GridView.js +55 -10
  377. package/lib/module/components/GridView.js.map +1 -1
  378. package/lib/module/components/HMSBaseButton.js +57 -0
  379. package/lib/module/components/HMSBaseButton.js.map +1 -0
  380. package/lib/module/components/HMSDangerButton.js +44 -0
  381. package/lib/module/components/HMSDangerButton.js.map +1 -0
  382. package/lib/module/components/HMSHLSStreamLoading.js +56 -0
  383. package/lib/module/components/HMSHLSStreamLoading.js.map +1 -0
  384. package/lib/module/components/HMSLocalVideoView.js +32 -0
  385. package/lib/module/components/HMSLocalVideoView.js.map +1 -0
  386. package/lib/module/components/{HMSSpeakerSettings.js → HMSManageAudioOutput.js} +70 -77
  387. package/lib/module/components/HMSManageAudioOutput.js.map +1 -0
  388. package/lib/module/components/HMSManageCameraRotation.js +5 -4
  389. package/lib/module/components/HMSManageCameraRotation.js.map +1 -1
  390. package/lib/module/components/HMSManageLeave.js +95 -161
  391. package/lib/module/components/HMSManageLeave.js.map +1 -1
  392. package/lib/module/components/HMSManageLocalAudio.js +1 -9
  393. package/lib/module/components/HMSManageLocalAudio.js.map +1 -1
  394. package/lib/module/components/HMSManageLocalVideo.js +1 -9
  395. package/lib/module/components/HMSManageLocalVideo.js.map +1 -1
  396. package/lib/module/components/HMSMeetingEnded.js +26 -0
  397. package/lib/module/components/HMSMeetingEnded.js.map +1 -0
  398. package/lib/module/components/HMSPreviewEditName.js +7 -38
  399. package/lib/module/components/HMSPreviewEditName.js.map +1 -1
  400. package/lib/module/components/HMSPreviewHLSLiveIndicator.js +62 -0
  401. package/lib/module/components/HMSPreviewHLSLiveIndicator.js.map +1 -0
  402. package/lib/module/components/HMSPreviewJoinButton.js +28 -39
  403. package/lib/module/components/HMSPreviewJoinButton.js.map +1 -1
  404. package/lib/module/components/HMSPreviewNetworkQuality.js +36 -0
  405. package/lib/module/components/HMSPreviewNetworkQuality.js.map +1 -0
  406. package/lib/module/components/HMSPreviewPeersList.js +21 -33
  407. package/lib/module/components/HMSPreviewPeersList.js.map +1 -1
  408. package/lib/module/components/HMSPreviewSubtitle.js +43 -7
  409. package/lib/module/components/HMSPreviewSubtitle.js.map +1 -1
  410. package/lib/module/components/HMSPreviewTile.js +18 -26
  411. package/lib/module/components/HMSPreviewTile.js.map +1 -1
  412. package/lib/module/components/HMSPreviewTitle.js +14 -6
  413. package/lib/module/components/HMSPreviewTitle.js.map +1 -1
  414. package/lib/module/components/HMSPrimaryButton.js +44 -0
  415. package/lib/module/components/HMSPrimaryButton.js.map +1 -0
  416. package/lib/module/components/HMSRecordingIndicator.js +37 -0
  417. package/lib/module/components/HMSRecordingIndicator.js.map +1 -0
  418. package/lib/module/components/HMSRoomOptions.js +23 -11
  419. package/lib/module/components/HMSRoomOptions.js.map +1 -1
  420. package/lib/module/components/HMSShowNetworkQuality.js +6 -7
  421. package/lib/module/components/HMSShowNetworkQuality.js.map +1 -1
  422. package/lib/module/components/HMSTextInput.js +57 -0
  423. package/lib/module/components/HMSTextInput.js.map +1 -0
  424. package/lib/module/components/Header.js +32 -32
  425. package/lib/module/components/Header.js.map +1 -1
  426. package/lib/module/components/LocalPeerRegularVideoView.js +17 -0
  427. package/lib/module/components/LocalPeerRegularVideoView.js.map +1 -0
  428. package/lib/module/components/LocalPeerScreenshareView.js +66 -0
  429. package/lib/module/components/LocalPeerScreenshareView.js.map +1 -0
  430. package/lib/module/components/Meeting.js +15 -4
  431. package/lib/module/components/Meeting.js.map +1 -1
  432. package/lib/module/components/MenuModal/Menu.js +1 -2
  433. package/lib/module/components/MenuModal/Menu.js.map +1 -1
  434. package/lib/module/components/MiniView.js +154 -0
  435. package/lib/module/components/MiniView.js.map +1 -0
  436. package/lib/module/components/Modals.js +37 -378
  437. package/lib/module/components/Modals.js.map +1 -1
  438. package/lib/module/components/PaginationDots.js +47 -0
  439. package/lib/module/components/PaginationDots.js.map +1 -0
  440. package/lib/module/components/Participants/ParticipantsList.js +1 -20
  441. package/lib/module/components/Participants/ParticipantsList.js.map +1 -1
  442. package/lib/module/components/ParticipantsCount.js +46 -0
  443. package/lib/module/components/ParticipantsCount.js.map +1 -0
  444. package/lib/module/components/PeerMinimizedView.js +104 -0
  445. package/lib/module/components/PeerMinimizedView.js.map +1 -0
  446. package/lib/module/components/PeerSettingsModalContent.js +72 -66
  447. package/lib/module/components/PeerSettingsModalContent.js.map +1 -1
  448. package/lib/module/components/PeerVideoTile/AvatarView.js +66 -0
  449. package/lib/module/components/PeerVideoTile/AvatarView.js.map +1 -0
  450. package/lib/module/components/PeerVideoTile/PeerAudioMutedIndicator.js +35 -0
  451. package/lib/module/components/PeerVideoTile/PeerAudioMutedIndicator.js.map +1 -0
  452. package/lib/module/components/PeerVideoTile/PeerMetadata.js +35 -0
  453. package/lib/module/components/PeerVideoTile/PeerMetadata.js.map +1 -0
  454. package/lib/module/components/PeerVideoTile/PeerNameAndNetwork.js +65 -0
  455. package/lib/module/components/PeerVideoTile/PeerNameAndNetwork.js.map +1 -0
  456. package/lib/module/components/PeerVideoTile/PeerVideoTileView.js +136 -0
  457. package/lib/module/components/PeerVideoTile/PeerVideoTileView.js.map +1 -0
  458. package/lib/module/components/PeerVideoTile/VideoView.js +75 -0
  459. package/lib/module/components/PeerVideoTile/VideoView.js.map +1 -0
  460. package/lib/module/components/PeerVideoTile/index.js +2 -0
  461. package/lib/module/components/PeerVideoTile/index.js.map +1 -0
  462. package/lib/module/components/PressableIcon.js +15 -8
  463. package/lib/module/components/PressableIcon.js.map +1 -1
  464. package/lib/module/components/Preview.js +93 -72
  465. package/lib/module/components/Preview.js.map +1 -1
  466. package/lib/module/components/RoomSettingsModalContent.js +231 -459
  467. package/lib/module/components/RoomSettingsModalContent.js.map +1 -1
  468. package/lib/module/components/RoomSettingsModalDebugModeContent.js +287 -0
  469. package/lib/module/components/RoomSettingsModalDebugModeContent.js.map +1 -0
  470. package/lib/module/components/StopRecordingModalContent.js +88 -0
  471. package/lib/module/components/StopRecordingModalContent.js.map +1 -0
  472. package/lib/module/components/Tile.js +30 -91
  473. package/lib/module/components/Tile.js.map +1 -1
  474. package/lib/module/components/TilesContainer.js +100 -10
  475. package/lib/module/components/TilesContainer.js.map +1 -1
  476. package/lib/module/components/UnmountAfterDelay.js +39 -0
  477. package/lib/module/components/UnmountAfterDelay.js.map +1 -0
  478. package/lib/module/components/WebrtcView.js +41 -0
  479. package/lib/module/components/WebrtcView.js.map +1 -0
  480. package/lib/module/components/WelcomeInMeeting.js +45 -0
  481. package/lib/module/components/WelcomeInMeeting.js.map +1 -0
  482. package/lib/module/components/index.js +0 -1
  483. package/lib/module/components/index.js.map +1 -1
  484. package/lib/module/hooks/useHmsInstance.js +0 -1
  485. package/lib/module/hooks/useHmsInstance.js.map +1 -1
  486. package/lib/module/hooks-sdk-selectors.js +4 -0
  487. package/lib/module/hooks-sdk-selectors.js.map +1 -1
  488. package/lib/module/hooks-sdk.js +16 -1
  489. package/lib/module/hooks-sdk.js.map +1 -1
  490. package/lib/module/hooks-util-selectors.js +12 -0
  491. package/lib/module/hooks-util-selectors.js.map +1 -1
  492. package/lib/module/hooks-util.js +417 -104
  493. package/lib/module/hooks-util.js.map +1 -1
  494. package/lib/module/modules/HMSManager.js +17 -0
  495. package/lib/module/modules/HMSManager.js.map +1 -0
  496. package/lib/module/modules/parser.js +16 -0
  497. package/lib/module/modules/parser.js.map +1 -0
  498. package/lib/module/peerTrackNodeUtils.js +6 -2
  499. package/lib/module/peerTrackNodeUtils.js.map +1 -1
  500. package/lib/module/redux/actionTypes.js +20 -1
  501. package/lib/module/redux/actionTypes.js.map +1 -1
  502. package/lib/module/redux/actions/index.js +54 -0
  503. package/lib/module/redux/actions/index.js.map +1 -1
  504. package/lib/module/redux/reducers/appState.js +70 -1
  505. package/lib/module/redux/reducers/appState.js.map +1 -1
  506. package/lib/module/redux/reducers/hmsStates.js +7 -1
  507. package/lib/module/redux/reducers/hmsStates.js.map +1 -1
  508. package/lib/module/redux/reducers/userState.js +3 -1
  509. package/lib/module/redux/reducers/userState.js.map +1 -1
  510. package/lib/module/utils/functions.js +47 -0
  511. package/lib/module/utils/functions.js.map +1 -1
  512. package/lib/module/utils/theme.js +58 -5
  513. package/lib/module/utils/theme.js.map +1 -1
  514. package/lib/module/utils/types.js +6 -1
  515. package/lib/module/utils/types.js.map +1 -1
  516. package/lib/module/utils.js +2 -2
  517. package/lib/module/utils.js.map +1 -1
  518. package/lib/typescript/HMSInstanceSetup.d.ts.map +1 -1
  519. package/lib/typescript/HMSPrebuilt.d.ts +3 -3
  520. package/lib/typescript/HMSPrebuilt.d.ts.map +1 -1
  521. package/lib/typescript/HMSRoomSetup.d.ts.map +1 -1
  522. package/lib/typescript/Icons/AlertTriangle/index.d.ts +7 -0
  523. package/lib/typescript/Icons/AlertTriangle/index.d.ts.map +1 -0
  524. package/lib/typescript/Icons/AnswerPhone/index.d.ts.map +1 -1
  525. package/lib/typescript/Icons/BRB/index.d.ts +7 -0
  526. package/lib/typescript/Icons/BRB/index.d.ts.map +1 -0
  527. package/lib/typescript/Icons/Bluetooth/index.d.ts.map +1 -1
  528. package/lib/typescript/Icons/Camera/index.d.ts.map +1 -1
  529. package/lib/typescript/Icons/Chat/index.d.ts.map +1 -1
  530. package/lib/typescript/Icons/Check/index.d.ts +7 -0
  531. package/lib/typescript/Icons/Check/index.d.ts.map +1 -0
  532. package/lib/typescript/Icons/Chevron/index.d.ts.map +1 -1
  533. package/lib/typescript/Icons/Close/index.d.ts.map +1 -1
  534. package/lib/typescript/Icons/Hamburger/index.d.ts +7 -0
  535. package/lib/typescript/Icons/Hamburger/index.d.ts.map +1 -0
  536. package/lib/typescript/Icons/Hand/index.d.ts.map +1 -1
  537. package/lib/typescript/Icons/Headphones/index.d.ts.map +1 -1
  538. package/lib/typescript/Icons/Maximize/index.d.ts +7 -0
  539. package/lib/typescript/Icons/Maximize/index.d.ts.map +1 -0
  540. package/lib/typescript/Icons/Mic/index.d.ts.map +1 -1
  541. package/lib/typescript/Icons/Minimize/index.d.ts +7 -0
  542. package/lib/typescript/Icons/Minimize/index.d.ts.map +1 -0
  543. package/lib/typescript/Icons/Participants/index.d.ts.map +1 -1
  544. package/lib/typescript/Icons/Pencil/index.d.ts +7 -0
  545. package/lib/typescript/Icons/Pencil/index.d.ts.map +1 -0
  546. package/lib/typescript/Icons/Pin/index.d.ts +7 -0
  547. package/lib/typescript/Icons/Pin/index.d.ts.map +1 -0
  548. package/lib/typescript/Icons/Radio/index.d.ts +7 -0
  549. package/lib/typescript/Icons/Radio/index.d.ts.map +1 -0
  550. package/lib/typescript/Icons/Recording/index.d.ts +7 -0
  551. package/lib/typescript/Icons/Recording/index.d.ts.map +1 -0
  552. package/lib/typescript/Icons/RotateCamera/index.d.ts.map +1 -1
  553. package/lib/typescript/Icons/ScreenShare/index.d.ts.map +1 -1
  554. package/lib/typescript/Icons/Speaker/index.d.ts.map +1 -1
  555. package/lib/typescript/Icons/Star/index.d.ts +7 -0
  556. package/lib/typescript/Icons/Star/index.d.ts.map +1 -0
  557. package/lib/typescript/Icons/Stop/index.d.ts +7 -0
  558. package/lib/typescript/Icons/Stop/index.d.ts.map +1 -0
  559. package/lib/typescript/Icons/ThreeDots/index.d.ts.map +1 -1
  560. package/lib/typescript/Icons/Wave/index.d.ts.map +1 -1
  561. package/lib/typescript/Icons/index.d.ts +12 -0
  562. package/lib/typescript/Icons/index.d.ts.map +1 -1
  563. package/lib/typescript/components/BackButton.d.ts.map +1 -1
  564. package/lib/typescript/components/BottomSheet.d.ts +25 -0
  565. package/lib/typescript/components/BottomSheet.d.ts.map +1 -0
  566. package/lib/typescript/components/ChangeNameModalContent.d.ts +6 -0
  567. package/lib/typescript/components/ChangeNameModalContent.d.ts.map +1 -0
  568. package/lib/typescript/components/CompanyLogo.d.ts +7 -0
  569. package/lib/typescript/components/CompanyLogo.d.ts.map +1 -0
  570. package/lib/typescript/components/CustomInput.d.ts +1 -1
  571. package/lib/typescript/components/CustomInput.d.ts.map +1 -1
  572. package/lib/typescript/components/DisplayView.d.ts.map +1 -1
  573. package/lib/typescript/components/EndRoomModalContent.d.ts +6 -0
  574. package/lib/typescript/components/EndRoomModalContent.d.ts.map +1 -0
  575. package/lib/typescript/components/Footer.d.ts.map +1 -1
  576. package/lib/typescript/components/GridView.d.ts +3 -4
  577. package/lib/typescript/components/GridView.d.ts.map +1 -1
  578. package/lib/typescript/components/HMSBaseButton.d.ts +15 -0
  579. package/lib/typescript/components/HMSBaseButton.d.ts.map +1 -0
  580. package/lib/typescript/components/HMSDangerButton.d.ts +12 -0
  581. package/lib/typescript/components/HMSDangerButton.d.ts.map +1 -0
  582. package/lib/typescript/components/HMSHLSStreamLoading.d.ts +3 -0
  583. package/lib/typescript/components/HMSHLSStreamLoading.d.ts.map +1 -0
  584. package/lib/typescript/components/HMSLocalVideoView.d.ts +3 -0
  585. package/lib/typescript/components/HMSLocalVideoView.d.ts.map +1 -0
  586. package/lib/typescript/components/HMSManageAudioOutput.d.ts +3 -0
  587. package/lib/typescript/components/HMSManageAudioOutput.d.ts.map +1 -0
  588. package/lib/typescript/components/HMSManageLeave.d.ts.map +1 -1
  589. package/lib/typescript/components/HMSManageLocalAudio.d.ts.map +1 -1
  590. package/lib/typescript/components/HMSManageLocalVideo.d.ts.map +1 -1
  591. package/lib/typescript/components/HMSMeetingEnded.d.ts +3 -0
  592. package/lib/typescript/components/HMSMeetingEnded.d.ts.map +1 -0
  593. package/lib/typescript/components/HMSPreviewEditName.d.ts.map +1 -1
  594. package/lib/typescript/components/HMSPreviewHLSLiveIndicator.d.ts +3 -0
  595. package/lib/typescript/components/HMSPreviewHLSLiveIndicator.d.ts.map +1 -0
  596. package/lib/typescript/components/HMSPreviewJoinButton.d.ts.map +1 -1
  597. package/lib/typescript/components/HMSPreviewNetworkQuality.d.ts +3 -0
  598. package/lib/typescript/components/HMSPreviewNetworkQuality.d.ts.map +1 -0
  599. package/lib/typescript/components/HMSPreviewPeersList.d.ts.map +1 -1
  600. package/lib/typescript/components/HMSPreviewSubtitle.d.ts.map +1 -1
  601. package/lib/typescript/components/HMSPreviewTile.d.ts.map +1 -1
  602. package/lib/typescript/components/HMSPreviewTitle.d.ts.map +1 -1
  603. package/lib/typescript/components/HMSPrimaryButton.d.ts +12 -0
  604. package/lib/typescript/components/HMSPrimaryButton.d.ts.map +1 -0
  605. package/lib/typescript/components/HMSRecordingIndicator.d.ts +3 -0
  606. package/lib/typescript/components/HMSRecordingIndicator.d.ts.map +1 -0
  607. package/lib/typescript/components/HMSRoomOptions.d.ts.map +1 -1
  608. package/lib/typescript/components/HMSShowNetworkQuality.d.ts.map +1 -1
  609. package/lib/typescript/components/HMSTextInput.d.ts +10 -0
  610. package/lib/typescript/components/HMSTextInput.d.ts.map +1 -0
  611. package/lib/typescript/components/Header.d.ts.map +1 -1
  612. package/lib/typescript/components/LocalPeerRegularVideoView.d.ts +6 -0
  613. package/lib/typescript/components/LocalPeerRegularVideoView.d.ts.map +1 -0
  614. package/lib/typescript/components/LocalPeerScreenshareView.d.ts +3 -0
  615. package/lib/typescript/components/LocalPeerScreenshareView.d.ts.map +1 -0
  616. package/lib/typescript/components/Meeting.d.ts.map +1 -1
  617. package/lib/typescript/components/MenuModal/Menu.d.ts.map +1 -1
  618. package/lib/typescript/components/MiniView.d.ts +9 -0
  619. package/lib/typescript/components/MiniView.d.ts.map +1 -0
  620. package/lib/typescript/components/Modals.d.ts +1 -16
  621. package/lib/typescript/components/Modals.d.ts.map +1 -1
  622. package/lib/typescript/components/PaginationDots.d.ts +6 -0
  623. package/lib/typescript/components/PaginationDots.d.ts.map +1 -0
  624. package/lib/typescript/components/Participants/ParticipantsList.d.ts.map +1 -1
  625. package/lib/typescript/components/ParticipantsCount.d.ts +3 -0
  626. package/lib/typescript/components/ParticipantsCount.d.ts.map +1 -0
  627. package/lib/typescript/components/PeerMinimizedView.d.ts +12 -0
  628. package/lib/typescript/components/PeerMinimizedView.d.ts.map +1 -0
  629. package/lib/typescript/components/PeerSettingsModalContent.d.ts +1 -0
  630. package/lib/typescript/components/PeerSettingsModalContent.d.ts.map +1 -1
  631. package/lib/typescript/components/PeerVideoTile/AvatarView.d.ts +9 -0
  632. package/lib/typescript/components/PeerVideoTile/AvatarView.d.ts.map +1 -0
  633. package/lib/typescript/components/PeerVideoTile/PeerAudioMutedIndicator.d.ts +6 -0
  634. package/lib/typescript/components/PeerVideoTile/PeerAudioMutedIndicator.d.ts.map +1 -0
  635. package/lib/typescript/components/PeerVideoTile/PeerMetadata.d.ts +6 -0
  636. package/lib/typescript/components/PeerVideoTile/PeerMetadata.d.ts.map +1 -0
  637. package/lib/typescript/components/PeerVideoTile/PeerNameAndNetwork.d.ts +10 -0
  638. package/lib/typescript/components/PeerVideoTile/PeerNameAndNetwork.d.ts.map +1 -0
  639. package/lib/typescript/components/PeerVideoTile/PeerVideoTileView.d.ts +10 -0
  640. package/lib/typescript/components/PeerVideoTile/PeerVideoTileView.d.ts.map +1 -0
  641. package/lib/typescript/components/PeerVideoTile/VideoView.d.ts +13 -0
  642. package/lib/typescript/components/PeerVideoTile/VideoView.d.ts.map +1 -0
  643. package/lib/typescript/components/PeerVideoTile/index.d.ts +1 -0
  644. package/lib/typescript/components/PeerVideoTile/index.d.ts.map +1 -0
  645. package/lib/typescript/components/PressableIcon.d.ts.map +1 -1
  646. package/lib/typescript/components/Preview.d.ts.map +1 -1
  647. package/lib/typescript/components/RoomSettingsModalContent.d.ts +2 -2
  648. package/lib/typescript/components/RoomSettingsModalContent.d.ts.map +1 -1
  649. package/lib/typescript/components/RoomSettingsModalDebugModeContent.d.ts +17 -0
  650. package/lib/typescript/components/RoomSettingsModalDebugModeContent.d.ts.map +1 -0
  651. package/lib/typescript/components/StopRecordingModalContent.d.ts +6 -0
  652. package/lib/typescript/components/StopRecordingModalContent.d.ts.map +1 -0
  653. package/lib/typescript/components/Tile.d.ts +12 -3
  654. package/lib/typescript/components/Tile.d.ts.map +1 -1
  655. package/lib/typescript/components/TilesContainer.d.ts.map +1 -1
  656. package/lib/typescript/components/UnmountAfterDelay.d.ts +12 -0
  657. package/lib/typescript/components/UnmountAfterDelay.d.ts.map +1 -0
  658. package/lib/typescript/components/WebrtcView.d.ts +10 -0
  659. package/lib/typescript/components/WebrtcView.d.ts.map +1 -0
  660. package/lib/typescript/components/WelcomeInMeeting.d.ts +5 -0
  661. package/lib/typescript/components/WelcomeInMeeting.d.ts.map +1 -0
  662. package/lib/typescript/components/index.d.ts +0 -1
  663. package/lib/typescript/components/index.d.ts.map +1 -1
  664. package/lib/typescript/hooks-sdk-selectors.d.ts +2 -0
  665. package/lib/typescript/hooks-sdk-selectors.d.ts.map +1 -1
  666. package/lib/typescript/hooks-sdk.d.ts +1 -0
  667. package/lib/typescript/hooks-sdk.d.ts.map +1 -1
  668. package/lib/typescript/hooks-util-selectors.d.ts +2 -0
  669. package/lib/typescript/hooks-util-selectors.d.ts.map +1 -1
  670. package/lib/typescript/hooks-util.d.ts +24 -4
  671. package/lib/typescript/hooks-util.d.ts.map +1 -1
  672. package/lib/typescript/modules/HMSManager.d.ts +4 -0
  673. package/lib/typescript/modules/HMSManager.d.ts.map +1 -0
  674. package/lib/typescript/modules/parser.d.ts +3 -0
  675. package/lib/typescript/modules/parser.d.ts.map +1 -0
  676. package/lib/typescript/peerTrackNodeUtils.d.ts +1 -0
  677. package/lib/typescript/peerTrackNodeUtils.d.ts.map +1 -1
  678. package/lib/typescript/redux/actionTypes.d.ts +11 -1
  679. package/lib/typescript/redux/actionTypes.d.ts.map +1 -1
  680. package/lib/typescript/redux/actions/index.d.ts +61 -3
  681. package/lib/typescript/redux/actions/index.d.ts.map +1 -1
  682. package/lib/typescript/redux/index.d.ts +10 -1
  683. package/lib/typescript/redux/index.d.ts.map +1 -1
  684. package/lib/typescript/redux/reducers/appState.d.ts +8 -0
  685. package/lib/typescript/redux/reducers/appState.d.ts.map +1 -1
  686. package/lib/typescript/redux/reducers/hmsStates.d.ts +7 -1
  687. package/lib/typescript/redux/reducers/hmsStates.d.ts.map +1 -1
  688. package/lib/typescript/redux/reducers/index.d.ts +10 -1
  689. package/lib/typescript/redux/reducers/index.d.ts.map +1 -1
  690. package/lib/typescript/redux/reducers/userState.d.ts +3 -2
  691. package/lib/typescript/redux/reducers/userState.d.ts.map +1 -1
  692. package/lib/typescript/utils/functions.d.ts +14 -0
  693. package/lib/typescript/utils/functions.d.ts.map +1 -1
  694. package/lib/typescript/utils/theme.d.ts +7 -3
  695. package/lib/typescript/utils/theme.d.ts.map +1 -1
  696. package/lib/typescript/utils/types.d.ts +8 -4
  697. package/lib/typescript/utils/types.d.ts.map +1 -1
  698. package/package.json +11 -16
  699. package/src/HMSInstanceSetup.tsx +5 -31
  700. package/src/HMSPrebuilt.tsx +27 -8
  701. package/src/HMSRoomSetup.tsx +98 -23
  702. package/src/Icons/AlertTriangle/assets/alert-triangle.png +0 -0
  703. package/src/Icons/AlertTriangle/assets/alert-triangle@2x.png +0 -0
  704. package/src/Icons/AlertTriangle/assets/alert-triangle@3x.png +0 -0
  705. package/src/Icons/AlertTriangle/index.tsx +33 -0
  706. package/src/Icons/AnswerPhone/index.tsx +7 -1
  707. package/src/Icons/BRB/assets/BRB.png +0 -0
  708. package/src/Icons/BRB/assets/BRB@2x.png +0 -0
  709. package/src/Icons/BRB/assets/BRB@3x.png +0 -0
  710. package/src/Icons/BRB/index.tsx +31 -0
  711. package/src/Icons/Bluetooth/index.tsx +7 -1
  712. package/src/Icons/Camera/index.tsx +7 -1
  713. package/src/Icons/Chat/index.tsx +7 -1
  714. package/src/Icons/Check/assets/check.png +0 -0
  715. package/src/Icons/Check/assets/check@2x.png +0 -0
  716. package/src/Icons/Check/assets/check@3x.png +0 -0
  717. package/src/Icons/Check/index.tsx +33 -0
  718. package/src/Icons/Chevron/index.tsx +7 -1
  719. package/src/Icons/Close/index.tsx +7 -1
  720. package/src/Icons/Hamburger/assets/hamburger.png +0 -0
  721. package/src/Icons/Hamburger/assets/hamburger@2x.png +0 -0
  722. package/src/Icons/Hamburger/assets/hamburger@3x.png +0 -0
  723. package/src/Icons/Hamburger/index.tsx +33 -0
  724. package/src/Icons/Hand/index.tsx +6 -3
  725. package/src/Icons/Headphones/index.tsx +7 -1
  726. package/src/Icons/Maximize/assets/maximize.png +0 -0
  727. package/src/Icons/Maximize/assets/maximize@2x.png +0 -0
  728. package/src/Icons/Maximize/assets/maximize@3x.png +0 -0
  729. package/src/Icons/Maximize/index.tsx +33 -0
  730. package/src/Icons/Mic/index.tsx +7 -1
  731. package/src/Icons/Minimize/assets/minimize.png +0 -0
  732. package/src/Icons/Minimize/assets/minimize@2x.png +0 -0
  733. package/src/Icons/Minimize/assets/minimize@3x.png +0 -0
  734. package/src/Icons/Minimize/index.tsx +33 -0
  735. package/src/Icons/Participants/index.tsx +7 -1
  736. package/src/Icons/Pencil/assets/pencil.png +0 -0
  737. package/src/Icons/Pencil/assets/pencil@2x.png +0 -0
  738. package/src/Icons/Pencil/assets/pencil@3x.png +0 -0
  739. package/src/Icons/Pencil/index.tsx +33 -0
  740. package/src/Icons/Pin/assets/pin.png +0 -0
  741. package/src/Icons/Pin/assets/pin@2x.png +0 -0
  742. package/src/Icons/Pin/assets/pin@3x.png +0 -0
  743. package/src/Icons/Pin/index.tsx +30 -0
  744. package/src/Icons/Radio/assets/radio.png +0 -0
  745. package/src/Icons/Radio/assets/radio@2x.png +0 -0
  746. package/src/Icons/Radio/assets/radio@3x.png +0 -0
  747. package/src/Icons/Radio/index.tsx +27 -0
  748. package/src/Icons/Recording/assets/recording.png +0 -0
  749. package/src/Icons/Recording/assets/recording@2x.png +0 -0
  750. package/src/Icons/Recording/assets/recording@3x.png +0 -0
  751. package/src/Icons/Recording/index.tsx +33 -0
  752. package/src/Icons/RotateCamera/index.tsx +7 -1
  753. package/src/Icons/ScreenShare/index.tsx +7 -1
  754. package/src/Icons/Speaker/index.tsx +12 -1
  755. package/src/Icons/Star/assets/star.png +0 -0
  756. package/src/Icons/Star/assets/star@2x.png +0 -0
  757. package/src/Icons/Star/assets/star@3x.png +0 -0
  758. package/src/Icons/Star/index.tsx +30 -0
  759. package/src/Icons/Stop/assets/stop.png +0 -0
  760. package/src/Icons/Stop/assets/stop@2x.png +0 -0
  761. package/src/Icons/Stop/assets/stop@3x.png +0 -0
  762. package/src/Icons/Stop/index.tsx +33 -0
  763. package/src/Icons/ThreeDots/index.tsx +7 -1
  764. package/src/Icons/Wave/index.tsx +7 -1
  765. package/src/Icons/index.ts +12 -0
  766. package/src/components/AvatarView.tsx +1 -2
  767. package/src/components/BackButton.tsx +9 -6
  768. package/src/components/BottomSheet.tsx +191 -0
  769. package/src/components/ChangeNameModalContent.tsx +157 -0
  770. package/src/components/CompanyLogo.tsx +35 -0
  771. package/src/components/CustomInput.tsx +2 -3
  772. package/src/components/DisplayView.tsx +16 -75
  773. package/src/components/EndRoomModalContent.tsx +90 -0
  774. package/src/components/Footer.tsx +7 -7
  775. package/src/components/GridView.tsx +91 -20
  776. package/src/components/HLSView.tsx +1 -1
  777. package/src/components/HMSBaseButton.tsx +91 -0
  778. package/src/components/HMSDangerButton.tsx +65 -0
  779. package/src/components/HMSHLSStreamLoading.tsx +68 -0
  780. package/src/components/HMSLocalVideoView.tsx +42 -0
  781. package/src/components/{HMSSpeakerSettings.tsx → HMSManageAudioOutput.tsx} +99 -78
  782. package/src/components/HMSManageCameraRotation.tsx +11 -8
  783. package/src/components/HMSManageLeave.tsx +107 -183
  784. package/src/components/HMSManageLocalAudio.tsx +1 -10
  785. package/src/components/HMSManageLocalVideo.tsx +1 -10
  786. package/src/components/HMSMeetingEnded.tsx +28 -0
  787. package/src/components/HMSPreviewEditName.tsx +4 -45
  788. package/src/components/HMSPreviewHLSLiveIndicator.tsx +66 -0
  789. package/src/components/HMSPreviewJoinButton.tsx +36 -51
  790. package/src/components/HMSPreviewNetworkQuality.tsx +43 -0
  791. package/src/components/HMSPreviewPeersList.tsx +25 -54
  792. package/src/components/HMSPreviewSubtitle.tsx +46 -6
  793. package/src/components/HMSPreviewTile.tsx +20 -31
  794. package/src/components/HMSPreviewTitle.tsx +18 -5
  795. package/src/components/HMSPrimaryButton.tsx +63 -0
  796. package/src/components/HMSRecordingIndicator.tsx +37 -0
  797. package/src/components/HMSRoomOptions.tsx +30 -16
  798. package/src/components/HMSShowNetworkQuality.tsx +7 -6
  799. package/src/components/HMSTextInput.tsx +78 -0
  800. package/src/components/Header.tsx +37 -36
  801. package/src/components/LocalPeerRegularVideoView.tsx +28 -0
  802. package/src/components/LocalPeerScreenshareView.tsx +72 -0
  803. package/src/components/Meeting.tsx +21 -3
  804. package/src/components/MenuModal/Menu.tsx +1 -1
  805. package/src/components/MiniView.tsx +213 -0
  806. package/src/components/Modals.tsx +5 -409
  807. package/src/components/PaginationDots.tsx +65 -0
  808. package/src/components/Participants/ParticipantsList.tsx +0 -24
  809. package/src/components/ParticipantsCount.tsx +52 -0
  810. package/src/components/PeerMinimizedView.tsx +131 -0
  811. package/src/components/PeerSettingsModalContent.tsx +108 -66
  812. package/src/components/PeerVideoTile/AvatarView.tsx +79 -0
  813. package/src/components/PeerVideoTile/PeerAudioMutedIndicator.tsx +41 -0
  814. package/src/components/PeerVideoTile/PeerMetadata.tsx +46 -0
  815. package/src/components/PeerVideoTile/PeerNameAndNetwork.tsx +81 -0
  816. package/src/components/PeerVideoTile/PeerVideoTileView.tsx +180 -0
  817. package/src/components/PeerVideoTile/VideoView.tsx +104 -0
  818. package/src/components/PeerVideoTile/index.ts +0 -0
  819. package/src/components/PressableIcon.tsx +15 -8
  820. package/src/components/Preview.tsx +150 -104
  821. package/src/components/RoomSettingsModalContent.tsx +234 -659
  822. package/src/components/RoomSettingsModalDebugModeContent.tsx +446 -0
  823. package/src/components/StopRecordingModalContent.tsx +109 -0
  824. package/src/components/Tile.tsx +49 -90
  825. package/src/components/TilesContainer.tsx +116 -14
  826. package/src/components/UnmountAfterDelay.tsx +61 -0
  827. package/src/components/WebrtcView.tsx +72 -0
  828. package/src/components/WelcomeInMeeting.tsx +52 -0
  829. package/src/components/index.ts +0 -1
  830. package/src/hooks/useHmsInstance.ts +0 -1
  831. package/src/hooks-sdk-selectors.tsx +7 -0
  832. package/src/hooks-sdk.ts +18 -0
  833. package/src/hooks-util-selectors.tsx +21 -0
  834. package/src/hooks-util.ts +548 -130
  835. package/src/modules/HMSManager.ts +25 -0
  836. package/src/modules/parser.ts +22 -0
  837. package/src/peerTrackNodeUtils.tsx +13 -10
  838. package/src/redux/actionTypes.ts +28 -0
  839. package/src/redux/actions/index.ts +64 -2
  840. package/src/redux/reducers/appState.ts +65 -0
  841. package/src/redux/reducers/hmsStates.ts +15 -1
  842. package/src/redux/reducers/userState.ts +5 -2
  843. package/src/utils/functions.ts +48 -0
  844. package/src/utils/theme.ts +75 -5
  845. package/src/utils/types.ts +9 -4
  846. package/src/utils.ts +2 -2
  847. package/lib/commonjs/components/HMSSpeakerSettings.js.map +0 -1
  848. package/lib/commonjs/components/ZoomableView.js +0 -84
  849. package/lib/commonjs/components/ZoomableView.js.map +0 -1
  850. package/lib/module/components/HMSSpeakerSettings.js.map +0 -1
  851. package/lib/module/components/ZoomableView.js +0 -76
  852. package/lib/module/components/ZoomableView.js.map +0 -1
  853. package/lib/typescript/components/HMSSpeakerSettings.d.ts +0 -3
  854. package/lib/typescript/components/HMSSpeakerSettings.d.ts.map +0 -1
  855. package/lib/typescript/components/ZoomableView.d.ts +0 -6
  856. package/lib/typescript/components/ZoomableView.d.ts.map +0 -1
  857. package/src/components/ZoomableView.tsx +0 -91
@@ -3,21 +3,20 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.HMSSpeakerSettings = void 0;
6
+ exports.HMSManageAudioOutput = void 0;
7
7
  var React = _interopRequireWildcard(require("react"));
8
- var _reactNativeModal = _interopRequireDefault(require("react-native-modal"));
9
8
  var _reactNative = require("react-native");
10
9
  var _reactNativeSimpleToast = _interopRequireDefault(require("react-native-simple-toast"));
11
10
  var _reactRedux = require("react-redux");
12
11
  var _reactNativeHms = require("@100mslive/react-native-hms");
13
12
  var _Icons = require("../Icons");
14
13
  var _PressableIcon = require("./PressableIcon");
15
- var _theme = require("../utils/theme");
16
14
  var _hooksUtil = require("../hooks-util");
15
+ var _BottomSheet = require("./BottomSheet");
17
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
18
17
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
19
18
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
20
- const HMSSpeakerSettings = () => {
19
+ const HMSManageAudioOutput = () => {
21
20
  const hmsInstance = (0, _hooksUtil.useHMSInstance)();
22
21
  const [settingsModalVisible, setSettingsModalVisible] = React.useState(false);
23
22
  const [currentAudioOutputDevice, setCurrentAudioOutputDevice] = React.useState(null);
@@ -90,92 +89,66 @@ const HMSSpeakerSettings = () => {
90
89
  hmsInstance.switchAudioOutput(device);
91
90
  setSettingsModalVisible(false);
92
91
  };
92
+ const hmsRoomStyles = (0, _hooksUtil.useHMSRoomStyleSheet)((theme, typography) => ({
93
+ headerText: {
94
+ color: theme.palette.on_surface_high,
95
+ fontFamily: `${typography.font_family}-Medium`
96
+ },
97
+ text: {
98
+ color: theme.palette.on_surface_high,
99
+ fontFamily: `${typography.font_family}-SemiBold`
100
+ },
101
+ divider: {
102
+ backgroundColor: theme.palette.border_default
103
+ }
104
+ }));
93
105
  return /*#__PURE__*/React.createElement(_reactNative.View, null, /*#__PURE__*/React.createElement(_PressableIcon.PressableIcon, {
94
106
  onPress: handleSpeakerChange
95
107
  }, _reactNative.Platform.OS === 'ios' ? /*#__PURE__*/React.createElement(_Icons.SpeakerIcon, {
96
108
  muted: false
97
- }) : getIcon(currentAudioOutputDevice || _reactNativeHms.HMSAudioDevice.AUTOMATIC)), /*#__PURE__*/React.createElement(_reactNativeModal.default, {
109
+ }) : getIcon(currentAudioOutputDevice || _reactNativeHms.HMSAudioDevice.AUTOMATIC)), /*#__PURE__*/React.createElement(_BottomSheet.BottomSheet, {
98
110
  isVisible: settingsModalVisible,
99
- animationIn: 'slideInUp',
100
- animationOut: 'slideOutDown',
101
- backdropColor: _theme.COLORS.BACKGROUND.DIM,
102
- backdropOpacity: 0.3,
103
- onBackButtonPress: dismissModal,
104
- onBackdropPress: dismissModal,
105
- useNativeDriver: true,
106
- useNativeDriverForBackdrop: true,
107
- hideModalContentWhileAnimating: true
108
- // swipeDirection={['up', 'down']}
109
- // swipe
110
- ,
111
- style: styles.modal
112
- }, /*#__PURE__*/React.createElement(_reactNative.View, {
113
- style: styles.container
114
- }, /*#__PURE__*/React.createElement(_reactNative.View, {
115
- style: styles.header
116
- }, /*#__PURE__*/React.createElement(_reactNative.Text, {
117
- style: styles.headerText
118
- }, "Speaker Settings"), /*#__PURE__*/React.createElement(_reactNative.TouchableOpacity, {
119
- onPress: dismissModal,
120
- hitSlop: styles.closeIconHitSlop
121
- }, /*#__PURE__*/React.createElement(_Icons.CloseIcon, null))), availableAudioOutputDevices.length === 0 ? /*#__PURE__*/React.createElement(_reactNative.View, {
111
+ dismissModal: dismissModal
112
+ }, /*#__PURE__*/React.createElement(_BottomSheet.BottomSheet.Header, {
113
+ dismissModal: dismissModal,
114
+ heading: "Audio Output"
115
+ }), /*#__PURE__*/React.createElement(_BottomSheet.BottomSheet.Divider, null), /*#__PURE__*/React.createElement(_reactNative.View, {
116
+ style: styles.contentContainer
117
+ }, availableAudioOutputDevices.length === 0 ? /*#__PURE__*/React.createElement(_reactNative.View, {
122
118
  style: styles.emptyView
123
119
  }, /*#__PURE__*/React.createElement(_reactNative.Text, {
124
- style: styles.itemText
120
+ style: [styles.itemText, hmsRoomStyles.text]
125
121
  }, "No other devices available!")) : /*#__PURE__*/React.createElement(_reactNative.ScrollView, {
126
122
  showsVerticalScrollIndicator: true
127
- }, availableAudioOutputDevices.sort().map(device => /*#__PURE__*/React.createElement(React.Fragment, {
128
- key: device
129
- }, true ? /*#__PURE__*/React.createElement(_reactNative.View, {
130
- style: styles.divider
131
- }) : null, /*#__PURE__*/React.createElement(_reactNative.TouchableOpacity, {
132
- style: styles.audioDeviceItem,
133
- onPress: () => handleSelectAudioDevice(device)
134
- }, getIcon(device), /*#__PURE__*/React.createElement(_reactNative.Text, {
135
- style: styles.itemText
136
- }, device))))))));
123
+ }, availableAudioOutputDevices.sort((a, b) => audioDeviceSortOrder[a] - audioDeviceSortOrder[b]).map((device, index) => {
124
+ const isFirst = index === 0;
125
+ return /*#__PURE__*/React.createElement(React.Fragment, {
126
+ key: device
127
+ }, isFirst ? null : /*#__PURE__*/React.createElement(_reactNative.View, {
128
+ style: [styles.divider, hmsRoomStyles.divider]
129
+ }), /*#__PURE__*/React.createElement(_reactNative.TouchableOpacity, {
130
+ style: styles.audioDeviceItem,
131
+ onPress: () => handleSelectAudioDevice(device)
132
+ }, /*#__PURE__*/React.createElement(_reactNative.View, {
133
+ style: styles.itemTextWrapper
134
+ }, getIcon(device === _reactNativeHms.HMSAudioDevice.AUTOMATIC && currentAudioOutputDevice ? currentAudioOutputDevice : device), /*#__PURE__*/React.createElement(_reactNative.Text, {
135
+ style: [styles.itemText, hmsRoomStyles.text]
136
+ }, getDescription(device, currentAudioOutputDevice))), device === currentAudioOutputDevice ? /*#__PURE__*/React.createElement(_Icons.CheckIcon, null) : null));
137
+ })))));
137
138
  };
138
- exports.HMSSpeakerSettings = HMSSpeakerSettings;
139
+ exports.HMSManageAudioOutput = HMSManageAudioOutput;
139
140
  const styles = _reactNative.StyleSheet.create({
140
- modal: {
141
- margin: 0,
142
- justifyContent: 'flex-end'
143
- },
144
- container: {
145
- backgroundColor: _theme.COLORS.SURFACE.DIM,
146
- borderTopLeftRadius: 16,
147
- borderTopRightRadius: 16,
148
- paddingTop: 24,
149
- paddingHorizontal: 16,
150
- paddingBottom: 32
141
+ contentContainer: {
142
+ marginHorizontal: 24
151
143
  },
152
- header: {
144
+ itemTextWrapper: {
153
145
  flexDirection: 'row',
154
146
  alignItems: 'center',
155
- justifyContent: 'space-between',
156
- marginBottom: 16
157
- },
158
- headerText: {
159
- color: _theme.COLORS.SURFACE.ON_SURFACE.HIGH,
160
- fontSize: 16,
161
- fontFamily: 'Inter',
162
- fontWeight: '500',
163
- lineHeight: 24,
164
- letterSpacing: 0.15
165
- },
166
- closeIconHitSlop: {
167
- bottom: 16,
168
- left: 16,
169
- right: 16,
170
- top: 16
147
+ justifyContent: 'center'
171
148
  },
172
149
  itemText: {
173
- flex: 1,
174
150
  marginHorizontal: 16,
175
- color: _theme.COLORS.SURFACE.ON_SURFACE.HIGH,
176
151
  fontSize: 14,
177
- fontFamily: 'Inter',
178
- fontWeight: '600',
179
152
  lineHeight: 20,
180
153
  letterSpacing: 0.1
181
154
  },
@@ -187,11 +160,11 @@ const styles = _reactNative.StyleSheet.create({
187
160
  audioDeviceItem: {
188
161
  flexDirection: 'row',
189
162
  alignItems: 'center',
190
- paddingVertical: 24
163
+ justifyContent: 'space-between',
164
+ paddingVertical: 20
191
165
  },
192
166
  divider: {
193
- height: 1,
194
- backgroundColor: _theme.COLORS.BORDER.DEFAULT
167
+ height: 1
195
168
  }
196
169
  });
197
170
  const getIcon = ofDevice => {
@@ -210,4 +183,25 @@ const getIcon = ofDevice => {
210
183
  return /*#__PURE__*/React.createElement(_Icons.HeadphonesIcon, null);
211
184
  }
212
185
  };
213
- //# sourceMappingURL=HMSSpeakerSettings.js.map
186
+ const getDescription = (ofDevice, currentDevice) => {
187
+ switch (ofDevice) {
188
+ case _reactNativeHms.HMSAudioDevice.AUTOMATIC:
189
+ return currentDevice && currentDevice !== _reactNativeHms.HMSAudioDevice.AUTOMATIC ? `Default (${getDescription(currentDevice, currentDevice)})` : 'Automatic';
190
+ case _reactNativeHms.HMSAudioDevice.BLUETOOTH:
191
+ return 'Bluetooth Device';
192
+ case _reactNativeHms.HMSAudioDevice.EARPIECE:
193
+ return 'Phone';
194
+ case _reactNativeHms.HMSAudioDevice.SPEAKER_PHONE:
195
+ return 'Speaker';
196
+ case _reactNativeHms.HMSAudioDevice.WIRED_HEADSET:
197
+ return 'Earphone';
198
+ }
199
+ };
200
+ const audioDeviceSortOrder = {
201
+ [_reactNativeHms.HMSAudioDevice.AUTOMATIC]: 0,
202
+ [_reactNativeHms.HMSAudioDevice.SPEAKER_PHONE]: 1,
203
+ [_reactNativeHms.HMSAudioDevice.WIRED_HEADSET]: 2,
204
+ [_reactNativeHms.HMSAudioDevice.EARPIECE]: 3,
205
+ [_reactNativeHms.HMSAudioDevice.BLUETOOTH]: 4
206
+ };
207
+ //# sourceMappingURL=HMSManageAudioOutput.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","_interopRequireWildcard","require","_reactNative","_reactNativeSimpleToast","_interopRequireDefault","_reactRedux","_reactNativeHms","_Icons","_PressableIcon","_hooksUtil","_BottomSheet","obj","__esModule","default","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","HMSManageAudioOutput","hmsInstance","useHMSInstance","settingsModalVisible","setSettingsModalVisible","useState","currentAudioOutputDevice","setCurrentAudioOutputDevice","availableAudioOutputDevices","setAvailableAudioOutputDevices","debugMode","useSelector","state","user","useEffect","Platform","OS","ignore","getCurrentAudioOutputDevice","device","getAudioOutputRouteType","getAvailableAudioOutputDevices","devices","getAudioDevicesList","dismissModal","handleSpeakerChange","switchAudioOutputUsingIOSUI","length","then","setAudioDeviceChangeListener","data","Toast","showWithGravity","LONG","TOP","removeEventListener","HMSUpdateListenerActions","ON_AUDIO_DEVICE_CHANGED","handleSelectAudioDevice","switchAudioOutput","hmsRoomStyles","useHMSRoomStyleSheet","theme","typography","headerText","color","palette","on_surface_high","fontFamily","font_family","text","divider","backgroundColor","border_default","createElement","View","PressableIcon","onPress","SpeakerIcon","muted","getIcon","HMSAudioDevice","AUTOMATIC","BottomSheet","isVisible","Header","heading","Divider","style","styles","contentContainer","emptyView","Text","itemText","ScrollView","showsVerticalScrollIndicator","sort","a","b","audioDeviceSortOrder","map","index","isFirst","Fragment","TouchableOpacity","audioDeviceItem","itemTextWrapper","getDescription","CheckIcon","exports","StyleSheet","create","marginHorizontal","flexDirection","alignItems","justifyContent","fontSize","lineHeight","letterSpacing","height","paddingVertical","ofDevice","WaveIcon","BLUETOOTH","BluetoothIcon","EARPIECE","AnswerPhoneIcon","SPEAKER_PHONE","WIRED_HEADSET","HeadphonesIcon","currentDevice"],"sourceRoot":"../../../src","sources":["components/HMSManageAudioOutput.tsx"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAQA,IAAAE,uBAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,eAAA,GAAAL,OAAA;AAKA,IAAAM,MAAA,GAAAN,OAAA;AAQA,IAAAO,cAAA,GAAAP,OAAA;AACA,IAAAQ,UAAA,GAAAR,OAAA;AAEA,IAAAS,YAAA,GAAAT,OAAA;AAA4C,SAAAG,uBAAAO,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAf,wBAAAW,GAAA,EAAAI,W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/B,oBAAO9I,KAAA,CAAAwF,aAAA,CAAChF,MAAA,CAAAuI,cAAc,MAAE,CAAC;EAC7B;AACF,CAAC;AAED,MAAMtB,cAAc,GAAGA,CACrBc,QAAwB,EACxBS,aAAoC,KACzB;EACX,QAAQT,QAAQ;IACd,KAAKxC,8BAAc,CAACC,SAAS;MAC3B,OAAOgD,aAAa,IAAIA,aAAa,KAAKjD,8BAAc,CAACC,SAAS,GAC7D,YAAWyB,cAAc,CAACuB,aAAa,EAAEA,aAAa,CAAE,GAAE,GAC3D,WAAW;IACjB,KAAKjD,8BAAc,CAAC0C,SAAS;MAC3B,OAAO,kBAAkB;IAC3B,KAAK1C,8BAAc,CAAC4C,QAAQ;MAC1B,OAAO,OAAO;IAChB,KAAK5C,8BAAc,CAAC8C,aAAa;MAC/B,OAAO,SAAS;IAClB,KAAK9C,8BAAc,CAAC+C,aAAa;MAC/B,OAAO,UAAU;EACrB;AACF,CAAC;AAED,MAAM7B,oBAAoB,GAAG;EAC3B,CAAClB,8BAAc,CAACC,SAAS,GAAG,CAAC;EAC7B,CAACD,8BAAc,CAAC8C,aAAa,GAAG,CAAC;EACjC,CAAC9C,8BAAc,CAAC+C,aAAa,GAAG,CAAC;EACjC,CAAC/C,8BAAc,CAAC4C,QAAQ,GAAG,CAAC;EAC5B,CAAC5C,8BAAc,CAAC0C,SAAS,GAAG;AAC9B,CAAU"}
@@ -8,8 +8,8 @@ var React = _interopRequireWildcard(require("react"));
8
8
  var _reactRedux = require("react-redux");
9
9
  var _Icons = require("../Icons");
10
10
  var _hooksSdk = require("../hooks-sdk");
11
- var _theme = require("../utils/theme");
12
11
  var _PressableIcon = require("./PressableIcon");
12
+ var _hooksUtil = require("../hooks-util");
13
13
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
14
14
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
15
15
  const HMSManageCameraRotation = () => {
@@ -30,13 +30,14 @@ const RotateCameraButton = () => {
30
30
  }
31
31
  await hmsActions.switchCamera();
32
32
  };
33
+ const cameraIconStyles = (0, _hooksUtil.useHMSRoomStyle)(theme => ({
34
+ tintColor: isLocalVideoMuted ? theme.palette.on_surface_low : theme.palette.on_surface_high
35
+ }), [isLocalVideoMuted]);
33
36
  return /*#__PURE__*/React.createElement(_PressableIcon.PressableIcon, {
34
37
  onPress: handleVideoMuteTogglePress,
35
38
  disabled: isLocalVideoMuted
36
39
  }, /*#__PURE__*/React.createElement(_Icons.RotateCameraIcon, {
37
- style: {
38
- tintColor: isLocalVideoMuted ? _theme.COLORS.SURFACE.ON_SURFACE.LOW : _theme.COLORS.SURFACE.ON_SURFACE.HIGH
39
- }
40
+ style: cameraIconStyles
40
41
  }));
41
42
  };
42
43
  //# sourceMappingURL=HMSManageCameraRotation.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","_interopRequireWildcard","require","_reactRedux","_Icons","_hooksSdk","_theme","_PressableIcon","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","HMSManageCameraRotation","canPublishVideo","useCanPublishVideo","createElement","RotateCameraButton","exports","hmsActions","useHMSActions","isLocalVideoMuted","useSelector","state","hmsStates","handleVideoMuteTogglePress","switchCamera","PressableIcon","onPress","disabled","RotateCameraIcon","style","tintColor","COLORS","SURFACE","ON_SURFACE","LOW","HIGH"],"sourceRoot":"../../../src","sources":["components/HMSManageCameraRotation.tsx"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAEA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AAEA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,cAAA,GAAAL,OAAA;AAAgD,SAAAM,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAR,wBAAAY,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAX,GAAA,QAAAW,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAd,GAAA,EAAAW,GAAA,SAAAI,IAAA,GAAAR,qBAAA,GAAAC,MAAA,CAAAE,wBAAA,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ACC,OAAO,CAACC,UAAU,CAACE;IAChC;EAAE,CACH,CACY,CAAC;AAEpB,CAAC"}
1
+ {"version":3,"names":["React","_interopRequireWildcard","require","_reactRedux","_Icons","_hooksSdk","_PressableIcon","_hooksUtil","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","HMSManageCameraRotation","canPublishVideo","useCanPublishVideo","createElement","RotateCameraButton","exports","hmsActions","useHMSActions","isLocalVideoMuted","useSelector","state","hmsStates","handleVideoMuteTogglePress","switchCamera","cameraIconStyles","useHMSRoomStyle","theme","tintColor","palette","on_surface_low","on_surface_high","PressableIcon","onPress","disabled","RotateCameraIcon","style"],"sourceRoot":"../../../src","sources":["components/HMSManageCameraRotation.tsx"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAEA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AAEA,IAAAI,cAAA,GAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAL,OAAA;AAAgD,SAAAM,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAR,wBAAAY,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GA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C,CAAC;EAED,MAAMC,gBAAgB,GAAG,IAAAC,0BAAe,EACrCC,KAAK,KAAM;IACVC,SAAS,EAAET,iBAAiB,GACxBQ,KAAK,CAACE,OAAO,CAACC,cAAc,GAC5BH,KAAK,CAACE,OAAO,CAACE;EACpB,CAAC,CAAC,EACF,CAACZ,iBAAiB,CACpB,CAAC;EAED,oBACEtC,KAAA,CAAAiC,aAAA,CAAC3B,cAAA,CAAA6C,aAAa;IACZC,OAAO,EAAEV,0BAA2B;IACpCW,QAAQ,EAAEf;EAAkB,gBAE5BtC,KAAA,CAAAiC,aAAA,CAAC7B,MAAA,CAAAkD,gBAAgB;IAACC,KAAK,EAAEX;EAAiB,CAAE,CAC/B,CAAC;AAEpB,CAAC"}
@@ -4,22 +4,16 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.HMSManageLeave = void 0;
7
- var _native = require("@react-navigation/native");
8
7
  var React = _interopRequireWildcard(require("react"));
9
8
  var _reactNative = require("react-native");
10
- var _reactNativeModal = _interopRequireDefault(require("react-native-modal"));
11
- var _reactNativeSafeAreaContext = require("react-native-safe-area-context");
12
- var _reactNativeSimpleToast = _interopRequireDefault(require("react-native-simple-toast"));
13
9
  var _reactRedux = require("react-redux");
14
10
  var _Icons = require("../Icons");
15
11
  var _hooksUtil = require("../hooks-util");
16
- var _actions = require("../redux/actions");
17
12
  var _theme = require("../utils/theme");
18
13
  var _types = require("../utils/types");
19
- var _DefaultModal = require("./DefaultModal");
20
- var _Modals = require("./Modals");
21
14
  var _PressableIcon = require("./PressableIcon");
22
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
+ var _BottomSheet = require("./BottomSheet");
16
+ var _EndRoomModalContent = require("./EndRoomModalContent");
23
17
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
24
18
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
25
19
  const HMSManageLeave = props => {
@@ -32,17 +26,17 @@ const HMSManageLeave = props => {
32
26
  };
33
27
  exports.HMSManageLeave = HMSManageLeave;
34
28
  const LeaveButton = props => {
35
- // TODO: What if useNavigation context is undefined?
36
- const navigation = (0, _native.useNavigation)();
37
- const hmsInstance = (0, _hooksUtil.useHMSInstance)();
38
- const dispatch = (0, _reactRedux.useDispatch)();
39
29
  const leavePopCloseAction = React.useRef(_types.ModalTypes.DEFAULT);
30
+ const isHLSViewer = (0, _hooksUtil.useIsHLSViewer)();
40
31
  const [leavePopVisible, setLeavePopVisible] = React.useState(false);
41
32
  const [leaveModalType, setLeaveModalType] = React.useState(_types.ModalTypes.DEFAULT);
42
33
  const canEndRoom = (0, _reactRedux.useSelector)(state => {
43
34
  var _state$hmsStates$loca;
44
35
  return (_state$hmsStates$loca = state.hmsStates.localPeer) === null || _state$hmsStates$loca === void 0 || (_state$hmsStates$loca = _state$hmsStates$loca.role) === null || _state$hmsStates$loca === void 0 || (_state$hmsStates$loca = _state$hmsStates$loca.permissions) === null || _state$hmsStates$loca === void 0 ? void 0 : _state$hmsStates$loca.endRoom;
45
36
  });
37
+ const {
38
+ leave
39
+ } = (0, _hooksUtil.useLeaveMethods)();
46
40
 
47
41
  /**
48
42
  * Opens the Leave Popup Menu
@@ -60,8 +54,8 @@ const LeaveButton = props => {
60
54
  * Leave Modal will open after the popup is hidden
61
55
  */
62
56
  const handleLeavePress = () => {
63
- leavePopCloseAction.current = _types.ModalTypes.LEAVE_ROOM;
64
57
  setLeavePopVisible(false);
58
+ leave();
65
59
  };
66
60
 
67
61
  /**
@@ -89,85 +83,34 @@ const LeaveButton = props => {
89
83
  setLeaveModalType(leavePopCloseAction.current);
90
84
  };
91
85
  const dismissModal = () => setLeaveModalType(_types.ModalTypes.DEFAULT);
92
- const destroy = () => {
93
- hmsInstance.destroy().then(s => {
94
- console.log('Destroy Success: ', s);
95
- // TODOS:
96
- // - If show `Meeting_Ended` is true, show Meeting screen by setting state to MEETING_ENDED
97
- // - Reset Redux States
98
- // - HMSInstance will not be available now
99
- // - When your presses "Re Join" Action button, restart process from root component
100
- // - When your presses "Done" Action button
101
- // - If we have callback fn, call it
102
- // - Otherwise try our best to navigate away from current screen
103
- //
104
- // - No screen to show
105
- // - No need to reset redux state?
106
- // - HMSInstance will be available till this point
107
- // - If we have callback fn, call it
108
- // - Otherwise try our best to navigate away from current screen
109
- // - When we are navigated away from screen, HMSInstance will be not available
110
-
111
- // dispatch(clearMessageData());
112
- // dispatch(clearPeerData());
113
- // dispatch(clearHmsReference());
114
-
115
- // if (navigation.canGoBack()) {
116
- // navigation.goBack();
117
- // } else {
118
- // TODO: remove this later
119
- navigation.navigate('QRCodeScreen');
120
- dispatch((0, _actions.clearStore)());
121
- // }
122
- }).catch(e => {
123
- console.log(`Destroy HMS instance Error: ${e}`);
124
- _reactNativeSimpleToast.default.showWithGravity(`Destroy HMS instance Error: ${e}`, _reactNativeSimpleToast.default.LONG, _reactNativeSimpleToast.default.TOP);
125
- });
126
- };
127
- const onLeavePress = () => {
128
- hmsInstance.leave().then(d => {
129
- console.log('Leave Success: ', d);
130
- destroy();
131
- }).catch(e => {
132
- console.log(`Leave Room Error: ${e}`);
133
- _reactNativeSimpleToast.default.showWithGravity(`Leave Room Error: ${e}`, _reactNativeSimpleToast.default.LONG, _reactNativeSimpleToast.default.TOP);
134
- });
135
- };
136
- const onEndRoomPress = () => {
137
- hmsInstance.endRoom('Host ended the room').then(d => {
138
- console.log('EndRoom Success: ', d);
139
- destroy();
140
- }).catch(e => console.log('EndRoom Error: ', e));
141
- };
142
- const leaveIconDelegate = 'leaveIconDelegate' in props && props.leaveIconDelegate ? props.leaveIconDelegate : /*#__PURE__*/React.createElement(_Icons.LeaveIcon, null);
86
+ const leaveIconDelegate = 'leaveIconDelegate' in props && props.leaveIconDelegate ? props.leaveIconDelegate : isHLSViewer ? /*#__PURE__*/React.createElement(_Icons.LeaveIcon, {
87
+ style: {
88
+ transform: [{
89
+ rotateZ: '180 deg'
90
+ }]
91
+ }
92
+ }) : /*#__PURE__*/React.createElement(_Icons.EndIcon, null);
143
93
  const leaveButtonDelegate = 'leaveButtonDelegate' in props && props.leaveButtonDelegate ? props.leaveButtonDelegate : /*#__PURE__*/React.createElement(_PressableIcon.PressableIcon, null, /*#__PURE__*/React.cloneElement(leaveIconDelegate));
144
94
  return /*#__PURE__*/React.createElement(_reactNative.View, null, /*#__PURE__*/React.cloneElement(leaveButtonDelegate, {
145
95
  onPress: handleLeaveButtonPress,
146
96
  style: styles.button
147
- }), /*#__PURE__*/React.createElement(LeavePopup, {
97
+ }), /*#__PURE__*/React.createElement(LeaveBottomSheet, {
148
98
  isVisible: leavePopVisible,
149
99
  onEndSessionPress: handleEndSessionPress,
150
100
  onLeavePress: handleLeavePress,
151
101
  onPopupDismiss: dismissPopup,
152
102
  onPopupHide: handlePopupHide
153
- }), /*#__PURE__*/React.createElement(_DefaultModal.DefaultModal, {
154
- modalPosiion: "center",
155
- modalVisible: leaveModalType === _types.ModalTypes.LEAVE_ROOM,
156
- setModalVisible: dismissModal
157
- }, /*#__PURE__*/React.createElement(_Modals.LeaveRoomModal, {
158
- onSuccess: onLeavePress,
159
- cancelModal: dismissModal
160
- })), /*#__PURE__*/React.createElement(_DefaultModal.DefaultModal, {
161
- modalPosiion: "center",
162
- modalVisible: leaveModalType === _types.ModalTypes.END_ROOM,
163
- setModalVisible: dismissModal
164
- }, /*#__PURE__*/React.createElement(_Modals.EndRoomModal, {
165
- onSuccess: onEndRoomPress,
166
- cancelModal: dismissModal
103
+ }), /*#__PURE__*/React.createElement(_BottomSheet.BottomSheet, {
104
+ dismissModal: dismissModal,
105
+ isVisible: leaveModalType === _types.ModalTypes.END_ROOM,
106
+ animationOutTiming: 700
107
+ }, /*#__PURE__*/React.createElement(_EndRoomModalContent.EndRoomModalContent, {
108
+ dismissModal: dismissModal
167
109
  })));
168
110
  };
169
- const HEADER_CONTENT_HEIGHT = 24 + 8 + 8 + 2; // ICON_SIZE + TOP_PADDING + BOTTOM_PADDING + TOP&BOTTOM_BORDER_WIDTH
170
- const HEADER_HEIGHT = 8 + HEADER_CONTENT_HEIGHT + 8; // TOP_HEADER_PADDING + HEADER_CONTENT_HEIGHT + BOTTOM_HEADER_PADDING
111
+
112
+ // const HEADER_CONTENT_HEIGHT = 24 + 8 + 8 + 2; // ICON_SIZE + TOP_PADDING + BOTTOM_PADDING + TOP&BOTTOM_BORDER_WIDTH
113
+ // const HEADER_HEIGHT = 8 + HEADER_CONTENT_HEIGHT + 8; // TOP_HEADER_PADDING + HEADER_CONTENT_HEIGHT + BOTTOM_HEADER_PADDING
171
114
 
172
115
  const styles = _reactNative.StyleSheet.create({
173
116
  button: {
@@ -175,7 +118,7 @@ const styles = _reactNative.StyleSheet.create({
175
118
  borderColor: _theme.COLORS.ALERT.ERROR.DEFAULT
176
119
  }
177
120
  });
178
- const LeavePopup = _ref => {
121
+ const LeaveBottomSheet = _ref => {
179
122
  let {
180
123
  isVisible,
181
124
  onPopupDismiss,
@@ -183,104 +126,93 @@ const LeavePopup = _ref => {
183
126
  onEndSessionPress,
184
127
  onPopupHide
185
128
  } = _ref;
186
- const safeAreaInsets = (0, _reactNativeSafeAreaContext.useSafeAreaInsets)();
187
129
  const canEndRoom = (0, _reactRedux.useSelector)(state => {
188
130
  var _state$hmsStates$loca2;
189
131
  return (_state$hmsStates$loca2 = state.hmsStates.localPeer) === null || _state$hmsStates$loca2 === void 0 || (_state$hmsStates$loca2 = _state$hmsStates$loca2.role) === null || _state$hmsStates$loca2 === void 0 || (_state$hmsStates$loca2 = _state$hmsStates$loca2.permissions) === null || _state$hmsStates$loca2 === void 0 ? void 0 : _state$hmsStates$loca2.endRoom;
190
132
  });
191
- return /*#__PURE__*/React.createElement(_reactNativeModal.default, {
133
+ const hmsRoomStyles = (0, _hooksUtil.useHMSRoomStyleSheet)((theme, typography) => ({
134
+ text: {
135
+ color: theme.palette.on_surface_high,
136
+ fontFamily: `${typography.font_family}-SemiBold`
137
+ },
138
+ subtext: {
139
+ color: theme.palette.on_surface_low,
140
+ fontFamily: `${typography.font_family}-Regular`
141
+ },
142
+ endButton: {
143
+ backgroundColor: theme.palette.alert_error_dim
144
+ },
145
+ endText: {
146
+ color: theme.palette.alert_error_brighter,
147
+ fontFamily: `${typography.font_family}-SemiBold`
148
+ },
149
+ endSubtext: {
150
+ color: theme.palette.alert_error_bright,
151
+ fontFamily: `${typography.font_family}-Regular`
152
+ },
153
+ endIcon: {
154
+ tintColor: theme.palette.alert_error_brighter
155
+ }
156
+ }));
157
+ return /*#__PURE__*/React.createElement(_BottomSheet.BottomSheet, {
192
158
  isVisible: isVisible,
193
- animationIn: 'fadeIn',
194
- animationOut: 'fadeOut',
195
- backdropColor: _theme.COLORS.BACKGROUND.DIM,
196
- backdropOpacity: 0,
197
- onBackButtonPress: onPopupDismiss,
198
- onBackdropPress: onPopupDismiss,
199
- useNativeDriver: true,
159
+ containerStyle: leavePopupStyles.container,
160
+ dismissModal: onPopupDismiss,
200
161
  onModalHide: onPopupHide,
201
- useNativeDriverForBackdrop: true,
202
- hideModalContentWhileAnimating: true,
203
- style: leavePopupStyles.modal
204
- }, /*#__PURE__*/React.createElement(_reactNative.View, {
205
- style: [leavePopupStyles.leavePopupContent, {
206
- marginTop: safeAreaInsets.top + HEADER_HEIGHT,
207
- marginLeft: safeAreaInsets.left + 16 - 1,
208
- // LEFT_HEADER_PADDING - HEADER_BORDER_WIDTH,
209
- marginRight: safeAreaInsets.right,
210
- marginBottom: safeAreaInsets.bottom
211
- }]
212
- }, /*#__PURE__*/React.createElement(_reactNative.TouchableOpacity, {
213
- style: leavePopupStyles.leaveButton,
162
+ animationOutTiming: 700
163
+ }, /*#__PURE__*/React.createElement(_reactNative.View, null, /*#__PURE__*/React.createElement(_reactNative.TouchableOpacity, {
164
+ style: leavePopupStyles.button,
214
165
  onPress: onLeavePress
215
166
  }, /*#__PURE__*/React.createElement(_Icons.LeaveIcon, {
216
- style: leavePopupStyles.leaveButtonIcon
217
- }), /*#__PURE__*/React.createElement(_reactNative.Text, {
218
- style: leavePopupStyles.leaveButtonText
219
- }, "Leave")), canEndRoom ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_reactNative.View, {
220
- style: leavePopupStyles.divider
221
- }), /*#__PURE__*/React.createElement(_reactNative.TouchableOpacity, {
222
- style: leavePopupStyles.endRoomButton,
167
+ style: leavePopupStyles.icon
168
+ }), /*#__PURE__*/React.createElement(_reactNative.View, {
169
+ style: leavePopupStyles.textContainer
170
+ }, /*#__PURE__*/React.createElement(_reactNative.Text, {
171
+ style: [leavePopupStyles.text, hmsRoomStyles.text]
172
+ }, "Leave"), /*#__PURE__*/React.createElement(_reactNative.Text, {
173
+ style: [leavePopupStyles.subtext, hmsRoomStyles.subtext]
174
+ }, "Others will continue after you leave. You can join the session again."))), canEndRoom ? /*#__PURE__*/React.createElement(_reactNative.TouchableOpacity, {
175
+ style: [leavePopupStyles.button, hmsRoomStyles.endButton],
223
176
  onPress: onEndSessionPress
224
- }, /*#__PURE__*/React.createElement(_Icons.AlertIcon, {
225
- style: leavePopupStyles.endRoomIcon
226
- }), /*#__PURE__*/React.createElement(_reactNative.Text, {
227
- style: leavePopupStyles.endRoomText
228
- }, "End Session"))) : null));
177
+ }, /*#__PURE__*/React.createElement(_Icons.StopIcon, {
178
+ style: [leavePopupStyles.icon, hmsRoomStyles.endIcon]
179
+ }), /*#__PURE__*/React.createElement(_reactNative.View, {
180
+ style: leavePopupStyles.textContainer
181
+ }, /*#__PURE__*/React.createElement(_reactNative.Text, {
182
+ style: [leavePopupStyles.text, hmsRoomStyles.endText]
183
+ }, "End Stream"), /*#__PURE__*/React.createElement(_reactNative.Text, {
184
+ style: [leavePopupStyles.subtext, hmsRoomStyles.endSubtext]
185
+ }, "The stream & session will end for everyone. You can't undo this action."))) : null));
229
186
  };
230
187
  const leavePopupStyles = _reactNative.StyleSheet.create({
231
- modal: {
232
- margin: 0,
233
- justifyContent: 'flex-start'
234
- },
235
- leavePopupContent: {
236
- overflow: 'hidden',
237
- width: 243,
238
- backgroundColor: _theme.COLORS.SURFACE.DIM,
239
- borderRadius: 8,
240
- borderWidth: 1,
241
- borderColor: _theme.COLORS.BORDER.BRIGHT
188
+ container: {
189
+ paddingBottom: 0
242
190
  },
243
- leaveButton: {
191
+ button: {
244
192
  flexDirection: 'row',
245
- paddingHorizontal: 8,
246
- paddingVertical: 16
193
+ padding: 24
247
194
  },
248
- leaveButtonIcon: {
249
- width: 20,
250
- height: 20,
251
- marginHorizontal: 8,
195
+ icon: {
196
+ width: 24,
197
+ height: 24,
198
+ marginRight: 16,
252
199
  transform: [{
253
200
  rotateY: '180deg'
254
201
  }]
255
202
  },
256
- leaveButtonText: {
257
- color: _theme.COLORS.SURFACE.ON_SURFACE.HIGH,
258
- fontSize: 14,
259
- fontFamily: 'Inter',
260
- fontWeight: '600',
261
- lineHeight: 20
262
- },
263
- divider: {
264
- height: 1,
265
- backgroundColor: _theme.COLORS.BORDER.BRIGHT
266
- },
267
- endRoomButton: {
268
- flexDirection: 'row',
269
- backgroundColor: _theme.COLORS.ALERT.ERROR.DIM,
270
- paddingHorizontal: 8,
271
- paddingVertical: 16
203
+ textContainer: {
204
+ flex: 1
272
205
  },
273
- endRoomIcon: {
274
- width: 20,
275
- height: 20,
276
- marginHorizontal: 8
206
+ text: {
207
+ fontSize: 20,
208
+ lineHeight: 24,
209
+ letterSpacing: 0.15
277
210
  },
278
- endRoomText: {
279
- color: _theme.COLORS.ALERT.ERROR.BRIGHT,
211
+ subtext: {
280
212
  fontSize: 14,
281
- fontFamily: 'Inter',
282
- fontWeight: '600',
283
- lineHeight: 20
213
+ lineHeight: 20,
214
+ letterSpacing: 0.25,
215
+ marginTop: 4
284
216
  }
285
217
  });
286
218
  //# sourceMappingURL=HMSManageLeave.js.map