@100mslive/react-native-room-kit 0.0.2 → 0.0.4

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 (413) hide show
  1. package/lib/commonjs/HMSInstanceSetup.js +1 -14
  2. package/lib/commonjs/HMSInstanceSetup.js.map +1 -1
  3. package/lib/commonjs/HMSPrebuilt.js +13 -4
  4. package/lib/commonjs/HMSPrebuilt.js.map +1 -1
  5. package/lib/commonjs/HMSRoomSetup.js +38 -14
  6. package/lib/commonjs/HMSRoomSetup.js.map +1 -1
  7. package/lib/commonjs/Icons/AnswerPhone/assets/answer-phone.png +0 -0
  8. package/lib/commonjs/Icons/AnswerPhone/assets/answer-phone@2x.png +0 -0
  9. package/lib/commonjs/Icons/AnswerPhone/assets/answer-phone@3x.png +0 -0
  10. package/lib/commonjs/Icons/AnswerPhone/index.js +30 -0
  11. package/lib/commonjs/Icons/AnswerPhone/index.js.map +1 -0
  12. package/lib/commonjs/Icons/Bluetooth/assets/bluetooth-on.png +0 -0
  13. package/lib/commonjs/Icons/Bluetooth/assets/bluetooth-on@2x.png +0 -0
  14. package/lib/commonjs/Icons/Bluetooth/assets/bluetooth-on@3x.png +0 -0
  15. package/lib/commonjs/Icons/Bluetooth/index.js +30 -0
  16. package/lib/commonjs/Icons/Bluetooth/index.js.map +1 -0
  17. package/lib/commonjs/Icons/Check/assets/check.png +0 -0
  18. package/lib/commonjs/Icons/Check/assets/check@2x.png +0 -0
  19. package/lib/commonjs/Icons/Check/assets/check@3x.png +0 -0
  20. package/lib/commonjs/Icons/Check/index.js +30 -0
  21. package/lib/commonjs/Icons/Check/index.js.map +1 -0
  22. package/lib/commonjs/Icons/GenericLogo/assets/generic-logo.png +0 -0
  23. package/lib/commonjs/Icons/GenericLogo/assets/generic-logo@2x.png +0 -0
  24. package/lib/commonjs/Icons/GenericLogo/assets/generic-logo@3x.png +0 -0
  25. package/lib/commonjs/Icons/GenericLogo/index.js +30 -0
  26. package/lib/commonjs/Icons/GenericLogo/index.js.map +1 -0
  27. package/lib/commonjs/Icons/Headphones/assets/headphones.png +0 -0
  28. package/lib/commonjs/Icons/Headphones/assets/headphones@2x.png +0 -0
  29. package/lib/commonjs/Icons/Headphones/assets/headphones@3x.png +0 -0
  30. package/lib/commonjs/Icons/Headphones/index.js +30 -0
  31. package/lib/commonjs/Icons/Headphones/index.js.map +1 -0
  32. package/lib/commonjs/Icons/Person/assets/person.png +0 -0
  33. package/lib/commonjs/Icons/Person/assets/person@2x.png +0 -0
  34. package/lib/commonjs/Icons/Person/assets/person@3x.png +0 -0
  35. package/lib/commonjs/Icons/Person/index.js +30 -0
  36. package/lib/commonjs/Icons/Person/index.js.map +1 -0
  37. package/lib/commonjs/Icons/Radio/assets/radio.png +0 -0
  38. package/lib/commonjs/Icons/Radio/assets/radio@2x.png +0 -0
  39. package/lib/commonjs/Icons/Radio/assets/radio@3x.png +0 -0
  40. package/lib/commonjs/Icons/Radio/index.js +30 -0
  41. package/lib/commonjs/Icons/Radio/index.js.map +1 -0
  42. package/lib/commonjs/Icons/Speaker/assets/speaker-large.png +0 -0
  43. package/lib/commonjs/Icons/Speaker/assets/speaker-large@2x.png +0 -0
  44. package/lib/commonjs/Icons/Speaker/assets/speaker-large@3x.png +0 -0
  45. package/lib/commonjs/Icons/Speaker/index.js +7 -2
  46. package/lib/commonjs/Icons/Speaker/index.js.map +1 -1
  47. package/lib/commonjs/Icons/Wave/assets/wave.png +0 -0
  48. package/lib/commonjs/Icons/Wave/assets/wave@2x.png +0 -0
  49. package/lib/commonjs/Icons/Wave/assets/wave@3x.png +0 -0
  50. package/lib/commonjs/Icons/Wave/index.js +30 -0
  51. package/lib/commonjs/Icons/Wave/index.js.map +1 -0
  52. package/lib/commonjs/Icons/index.js +88 -0
  53. package/lib/commonjs/Icons/index.js.map +1 -1
  54. package/lib/commonjs/components/BackButton.js +3 -3
  55. package/lib/commonjs/components/BackButton.js.map +1 -1
  56. package/lib/commonjs/components/DisplayView.js +0 -6
  57. package/lib/commonjs/components/DisplayView.js.map +1 -1
  58. package/lib/commonjs/components/HMSHLSStreamLoading.js +56 -0
  59. package/lib/commonjs/components/HMSHLSStreamLoading.js.map +1 -0
  60. package/lib/commonjs/components/HMSLocalVideoView.js +41 -0
  61. package/lib/commonjs/components/HMSLocalVideoView.js.map +1 -0
  62. package/lib/commonjs/components/{HMSPreviewDeviceSettings.js → HMSManageAudioOutput.js} +97 -161
  63. package/lib/commonjs/components/HMSManageAudioOutput.js.map +1 -0
  64. package/lib/commonjs/components/HMSManageLeave.js +7 -60
  65. package/lib/commonjs/components/HMSManageLeave.js.map +1 -1
  66. package/lib/commonjs/components/HMSMeetingEnded.js +36 -0
  67. package/lib/commonjs/components/HMSMeetingEnded.js.map +1 -0
  68. package/lib/commonjs/components/HMSPreviewEditName.js +7 -4
  69. package/lib/commonjs/components/HMSPreviewEditName.js.map +1 -1
  70. package/lib/commonjs/components/HMSPreviewHLSLiveIndicator.js +64 -0
  71. package/lib/commonjs/components/HMSPreviewHLSLiveIndicator.js.map +1 -0
  72. package/lib/commonjs/components/HMSPreviewJoinButton.js +25 -6
  73. package/lib/commonjs/components/HMSPreviewJoinButton.js.map +1 -1
  74. package/lib/commonjs/components/HMSPreviewNetworkQuality.js +43 -0
  75. package/lib/commonjs/components/HMSPreviewNetworkQuality.js.map +1 -0
  76. package/lib/commonjs/components/HMSPreviewPeersList.js +4 -50
  77. package/lib/commonjs/components/HMSPreviewPeersList.js.map +1 -1
  78. package/lib/commonjs/components/HMSPreviewSubtitle.js +26 -3
  79. package/lib/commonjs/components/HMSPreviewSubtitle.js.map +1 -1
  80. package/lib/commonjs/components/HMSPreviewTile.js +11 -77
  81. package/lib/commonjs/components/HMSPreviewTile.js.map +1 -1
  82. package/lib/commonjs/components/HMSPreviewTitle.js +0 -1
  83. package/lib/commonjs/components/HMSPreviewTitle.js.map +1 -1
  84. package/lib/commonjs/components/HMSRoomOptions.js +2 -3
  85. package/lib/commonjs/components/HMSRoomOptions.js.map +1 -1
  86. package/lib/commonjs/components/HMSShowNetworkQuality.js +0 -2
  87. package/lib/commonjs/components/HMSShowNetworkQuality.js.map +1 -1
  88. package/lib/commonjs/components/Meeting.js +7 -0
  89. package/lib/commonjs/components/Meeting.js.map +1 -1
  90. package/lib/commonjs/components/MenuModal/Menu.js +1 -2
  91. package/lib/commonjs/components/MenuModal/Menu.js.map +1 -1
  92. package/lib/commonjs/components/Modals.js +39 -299
  93. package/lib/commonjs/components/Modals.js.map +1 -1
  94. package/lib/commonjs/components/Participants/ParticipantsList.js +1 -20
  95. package/lib/commonjs/components/Participants/ParticipantsList.js.map +1 -1
  96. package/lib/commonjs/components/PeerSettingsModalContent.js +2 -13
  97. package/lib/commonjs/components/PeerSettingsModalContent.js.map +1 -1
  98. package/lib/commonjs/components/Preview.js +87 -28
  99. package/lib/commonjs/components/Preview.js.map +1 -1
  100. package/lib/commonjs/components/RoomSettingsModalContent.js +2 -101
  101. package/lib/commonjs/components/RoomSettingsModalContent.js.map +1 -1
  102. package/lib/commonjs/components/index.js +0 -11
  103. package/lib/commonjs/components/index.js.map +1 -1
  104. package/lib/commonjs/hooks/useHmsInstance.js +0 -1
  105. package/lib/commonjs/hooks/useHmsInstance.js.map +1 -1
  106. package/lib/commonjs/hooks-util-selectors.js +8 -1
  107. package/lib/commonjs/hooks-util-selectors.js.map +1 -1
  108. package/lib/commonjs/hooks-util.js +140 -82
  109. package/lib/commonjs/hooks-util.js.map +1 -1
  110. package/lib/commonjs/redux/actionTypes.js +7 -1
  111. package/lib/commonjs/redux/actionTypes.js.map +1 -1
  112. package/lib/commonjs/redux/actions/index.js +25 -1
  113. package/lib/commonjs/redux/actions/index.js.map +1 -1
  114. package/lib/commonjs/redux/reducers/appState.js +14 -1
  115. package/lib/commonjs/redux/reducers/appState.js.map +1 -1
  116. package/lib/commonjs/redux/reducers/hmsStates.js +12 -1
  117. package/lib/commonjs/redux/reducers/hmsStates.js.map +1 -1
  118. package/lib/commonjs/utils/theme.js +6 -1
  119. package/lib/commonjs/utils/theme.js.map +1 -1
  120. package/lib/commonjs/utils/types.js +0 -1
  121. package/lib/commonjs/utils/types.js.map +1 -1
  122. package/lib/commonjs/utils.js +2 -2
  123. package/lib/commonjs/utils.js.map +1 -1
  124. package/lib/module/HMSInstanceSetup.js +1 -14
  125. package/lib/module/HMSInstanceSetup.js.map +1 -1
  126. package/lib/module/HMSPrebuilt.js +13 -3
  127. package/lib/module/HMSPrebuilt.js.map +1 -1
  128. package/lib/module/HMSRoomSetup.js +43 -19
  129. package/lib/module/HMSRoomSetup.js.map +1 -1
  130. package/lib/module/Icons/AnswerPhone/assets/answer-phone.png +0 -0
  131. package/lib/module/Icons/AnswerPhone/assets/answer-phone@2x.png +0 -0
  132. package/lib/module/Icons/AnswerPhone/assets/answer-phone@3x.png +0 -0
  133. package/lib/module/Icons/AnswerPhone/index.js +22 -0
  134. package/lib/module/Icons/AnswerPhone/index.js.map +1 -0
  135. package/lib/module/Icons/Bluetooth/assets/bluetooth-on.png +0 -0
  136. package/lib/module/Icons/Bluetooth/assets/bluetooth-on@2x.png +0 -0
  137. package/lib/module/Icons/Bluetooth/assets/bluetooth-on@3x.png +0 -0
  138. package/lib/module/Icons/Bluetooth/index.js +22 -0
  139. package/lib/module/Icons/Bluetooth/index.js.map +1 -0
  140. package/lib/module/Icons/Check/assets/check.png +0 -0
  141. package/lib/module/Icons/Check/assets/check@2x.png +0 -0
  142. package/lib/module/Icons/Check/assets/check@3x.png +0 -0
  143. package/lib/module/Icons/Check/index.js +22 -0
  144. package/lib/module/Icons/Check/index.js.map +1 -0
  145. package/lib/module/Icons/GenericLogo/assets/generic-logo.png +0 -0
  146. package/lib/module/Icons/GenericLogo/assets/generic-logo@2x.png +0 -0
  147. package/lib/module/Icons/GenericLogo/assets/generic-logo@3x.png +0 -0
  148. package/lib/module/Icons/GenericLogo/index.js +22 -0
  149. package/lib/module/Icons/GenericLogo/index.js.map +1 -0
  150. package/lib/module/Icons/Headphones/assets/headphones.png +0 -0
  151. package/lib/module/Icons/Headphones/assets/headphones@2x.png +0 -0
  152. package/lib/module/Icons/Headphones/assets/headphones@3x.png +0 -0
  153. package/lib/module/Icons/Headphones/index.js +22 -0
  154. package/lib/module/Icons/Headphones/index.js.map +1 -0
  155. package/lib/module/Icons/Person/assets/person.png +0 -0
  156. package/lib/module/Icons/Person/assets/person@2x.png +0 -0
  157. package/lib/module/Icons/Person/assets/person@3x.png +0 -0
  158. package/lib/module/Icons/Person/index.js +22 -0
  159. package/lib/module/Icons/Person/index.js.map +1 -0
  160. package/lib/module/Icons/Radio/assets/radio.png +0 -0
  161. package/lib/module/Icons/Radio/assets/radio@2x.png +0 -0
  162. package/lib/module/Icons/Radio/assets/radio@3x.png +0 -0
  163. package/lib/module/Icons/Radio/index.js +22 -0
  164. package/lib/module/Icons/Radio/index.js.map +1 -0
  165. package/lib/module/Icons/Speaker/assets/speaker-large.png +0 -0
  166. package/lib/module/Icons/Speaker/assets/speaker-large@2x.png +0 -0
  167. package/lib/module/Icons/Speaker/assets/speaker-large@3x.png +0 -0
  168. package/lib/module/Icons/Speaker/index.js +7 -2
  169. package/lib/module/Icons/Speaker/index.js.map +1 -1
  170. package/lib/module/Icons/Wave/assets/wave.png +0 -0
  171. package/lib/module/Icons/Wave/assets/wave@2x.png +0 -0
  172. package/lib/module/Icons/Wave/assets/wave@3x.png +0 -0
  173. package/lib/module/Icons/Wave/index.js +22 -0
  174. package/lib/module/Icons/Wave/index.js.map +1 -0
  175. package/lib/module/Icons/index.js +8 -0
  176. package/lib/module/Icons/index.js.map +1 -1
  177. package/lib/module/components/BackButton.js +4 -4
  178. package/lib/module/components/BackButton.js.map +1 -1
  179. package/lib/module/components/DisplayView.js +1 -7
  180. package/lib/module/components/DisplayView.js.map +1 -1
  181. package/lib/module/components/HMSHLSStreamLoading.js +47 -0
  182. package/lib/module/components/HMSHLSStreamLoading.js.map +1 -0
  183. package/lib/module/components/HMSLocalVideoView.js +32 -0
  184. package/lib/module/components/HMSLocalVideoView.js.map +1 -0
  185. package/lib/module/components/HMSManageAudioOutput.js +232 -0
  186. package/lib/module/components/HMSManageAudioOutput.js.map +1 -0
  187. package/lib/module/components/HMSManageLeave.js +9 -62
  188. package/lib/module/components/HMSManageLeave.js.map +1 -1
  189. package/lib/module/components/HMSMeetingEnded.js +27 -0
  190. package/lib/module/components/HMSMeetingEnded.js.map +1 -0
  191. package/lib/module/components/HMSPreviewEditName.js +8 -5
  192. package/lib/module/components/HMSPreviewEditName.js.map +1 -1
  193. package/lib/module/components/HMSPreviewHLSLiveIndicator.js +55 -0
  194. package/lib/module/components/HMSPreviewHLSLiveIndicator.js.map +1 -0
  195. package/lib/module/components/HMSPreviewJoinButton.js +25 -6
  196. package/lib/module/components/HMSPreviewJoinButton.js.map +1 -1
  197. package/lib/module/components/HMSPreviewNetworkQuality.js +34 -0
  198. package/lib/module/components/HMSPreviewNetworkQuality.js.map +1 -0
  199. package/lib/module/components/HMSPreviewPeersList.js +4 -50
  200. package/lib/module/components/HMSPreviewPeersList.js.map +1 -1
  201. package/lib/module/components/HMSPreviewSubtitle.js +26 -3
  202. package/lib/module/components/HMSPreviewSubtitle.js.map +1 -1
  203. package/lib/module/components/HMSPreviewTile.js +12 -78
  204. package/lib/module/components/HMSPreviewTile.js.map +1 -1
  205. package/lib/module/components/HMSPreviewTitle.js +0 -1
  206. package/lib/module/components/HMSPreviewTitle.js.map +1 -1
  207. package/lib/module/components/HMSRoomOptions.js +2 -3
  208. package/lib/module/components/HMSRoomOptions.js.map +1 -1
  209. package/lib/module/components/HMSShowNetworkQuality.js +0 -2
  210. package/lib/module/components/HMSShowNetworkQuality.js.map +1 -1
  211. package/lib/module/components/Meeting.js +7 -0
  212. package/lib/module/components/Meeting.js.map +1 -1
  213. package/lib/module/components/MenuModal/Menu.js +1 -2
  214. package/lib/module/components/MenuModal/Menu.js.map +1 -1
  215. package/lib/module/components/Modals.js +40 -298
  216. package/lib/module/components/Modals.js.map +1 -1
  217. package/lib/module/components/Participants/ParticipantsList.js +1 -20
  218. package/lib/module/components/Participants/ParticipantsList.js.map +1 -1
  219. package/lib/module/components/PeerSettingsModalContent.js +2 -13
  220. package/lib/module/components/PeerSettingsModalContent.js.map +1 -1
  221. package/lib/module/components/Preview.js +88 -30
  222. package/lib/module/components/Preview.js.map +1 -1
  223. package/lib/module/components/RoomSettingsModalContent.js +3 -100
  224. package/lib/module/components/RoomSettingsModalContent.js.map +1 -1
  225. package/lib/module/components/index.js +0 -1
  226. package/lib/module/components/index.js.map +1 -1
  227. package/lib/module/hooks/useHmsInstance.js +0 -1
  228. package/lib/module/hooks/useHmsInstance.js.map +1 -1
  229. package/lib/module/hooks-util-selectors.js +6 -0
  230. package/lib/module/hooks-util-selectors.js.map +1 -1
  231. package/lib/module/hooks-util.js +142 -86
  232. package/lib/module/hooks-util.js.map +1 -1
  233. package/lib/module/redux/actionTypes.js +7 -1
  234. package/lib/module/redux/actionTypes.js.map +1 -1
  235. package/lib/module/redux/actions/index.js +20 -0
  236. package/lib/module/redux/actions/index.js.map +1 -1
  237. package/lib/module/redux/reducers/appState.js +14 -1
  238. package/lib/module/redux/reducers/appState.js.map +1 -1
  239. package/lib/module/redux/reducers/hmsStates.js +12 -1
  240. package/lib/module/redux/reducers/hmsStates.js.map +1 -1
  241. package/lib/module/utils/theme.js +6 -1
  242. package/lib/module/utils/theme.js.map +1 -1
  243. package/lib/module/utils/types.js +0 -1
  244. package/lib/module/utils/types.js.map +1 -1
  245. package/lib/module/utils.js +2 -2
  246. package/lib/module/utils.js.map +1 -1
  247. package/lib/typescript/HMSInstanceSetup.d.ts.map +1 -1
  248. package/lib/typescript/HMSPrebuilt.d.ts +2 -3
  249. package/lib/typescript/HMSPrebuilt.d.ts.map +1 -1
  250. package/lib/typescript/HMSRoomSetup.d.ts.map +1 -1
  251. package/lib/typescript/Icons/AnswerPhone/index.d.ts +7 -0
  252. package/lib/typescript/Icons/AnswerPhone/index.d.ts.map +1 -0
  253. package/lib/typescript/Icons/Bluetooth/index.d.ts +7 -0
  254. package/lib/typescript/Icons/Bluetooth/index.d.ts.map +1 -0
  255. package/lib/typescript/Icons/Check/index.d.ts +7 -0
  256. package/lib/typescript/Icons/Check/index.d.ts.map +1 -0
  257. package/lib/typescript/Icons/GenericLogo/index.d.ts +7 -0
  258. package/lib/typescript/Icons/GenericLogo/index.d.ts.map +1 -0
  259. package/lib/typescript/Icons/Headphones/index.d.ts +7 -0
  260. package/lib/typescript/Icons/Headphones/index.d.ts.map +1 -0
  261. package/lib/typescript/Icons/Person/index.d.ts +7 -0
  262. package/lib/typescript/Icons/Person/index.d.ts.map +1 -0
  263. package/lib/typescript/Icons/Radio/index.d.ts +7 -0
  264. package/lib/typescript/Icons/Radio/index.d.ts.map +1 -0
  265. package/lib/typescript/Icons/Speaker/index.d.ts +1 -0
  266. package/lib/typescript/Icons/Speaker/index.d.ts.map +1 -1
  267. package/lib/typescript/Icons/Wave/index.d.ts +7 -0
  268. package/lib/typescript/Icons/Wave/index.d.ts.map +1 -0
  269. package/lib/typescript/Icons/index.d.ts +8 -0
  270. package/lib/typescript/Icons/index.d.ts.map +1 -1
  271. package/lib/typescript/components/CustomInput.d.ts +1 -1
  272. package/lib/typescript/components/DisplayView.d.ts.map +1 -1
  273. package/lib/typescript/components/HMSHLSStreamLoading.d.ts +3 -0
  274. package/lib/typescript/components/HMSHLSStreamLoading.d.ts.map +1 -0
  275. package/lib/typescript/components/HMSLocalVideoView.d.ts +3 -0
  276. package/lib/typescript/components/HMSLocalVideoView.d.ts.map +1 -0
  277. package/lib/typescript/components/HMSManageAudioOutput.d.ts +3 -0
  278. package/lib/typescript/components/HMSManageAudioOutput.d.ts.map +1 -0
  279. package/lib/typescript/components/HMSManageLeave.d.ts.map +1 -1
  280. package/lib/typescript/components/HMSMeetingEnded.d.ts +3 -0
  281. package/lib/typescript/components/HMSMeetingEnded.d.ts.map +1 -0
  282. package/lib/typescript/components/HMSPreviewHLSLiveIndicator.d.ts +3 -0
  283. package/lib/typescript/components/HMSPreviewHLSLiveIndicator.d.ts.map +1 -0
  284. package/lib/typescript/components/HMSPreviewJoinButton.d.ts.map +1 -1
  285. package/lib/typescript/components/HMSPreviewNetworkQuality.d.ts +3 -0
  286. package/lib/typescript/components/HMSPreviewNetworkQuality.d.ts.map +1 -0
  287. package/lib/typescript/components/HMSPreviewPeersList.d.ts.map +1 -1
  288. package/lib/typescript/components/HMSPreviewSubtitle.d.ts.map +1 -1
  289. package/lib/typescript/components/HMSPreviewTile.d.ts.map +1 -1
  290. package/lib/typescript/components/HMSRoomOptions.d.ts.map +1 -1
  291. package/lib/typescript/components/HMSShowNetworkQuality.d.ts.map +1 -1
  292. package/lib/typescript/components/Meeting.d.ts.map +1 -1
  293. package/lib/typescript/components/MenuModal/Menu.d.ts.map +1 -1
  294. package/lib/typescript/components/Modals.d.ts +1 -9
  295. package/lib/typescript/components/Modals.d.ts.map +1 -1
  296. package/lib/typescript/components/Participants/ParticipantsList.d.ts.map +1 -1
  297. package/lib/typescript/components/PeerSettingsModalContent.d.ts.map +1 -1
  298. package/lib/typescript/components/Preview.d.ts.map +1 -1
  299. package/lib/typescript/components/RoomSettingsModalContent.d.ts.map +1 -1
  300. package/lib/typescript/components/index.d.ts +0 -1
  301. package/lib/typescript/components/index.d.ts.map +1 -1
  302. package/lib/typescript/hooks-util-selectors.d.ts +2 -0
  303. package/lib/typescript/hooks-util-selectors.d.ts.map +1 -1
  304. package/lib/typescript/hooks-util.d.ts +9 -2
  305. package/lib/typescript/hooks-util.d.ts.map +1 -1
  306. package/lib/typescript/redux/actionTypes.d.ts +5 -1
  307. package/lib/typescript/redux/actionTypes.d.ts.map +1 -1
  308. package/lib/typescript/redux/actions/index.d.ts +24 -3
  309. package/lib/typescript/redux/actions/index.d.ts.map +1 -1
  310. package/lib/typescript/redux/index.d.ts +4 -1
  311. package/lib/typescript/redux/index.d.ts.map +1 -1
  312. package/lib/typescript/redux/reducers/appState.d.ts +3 -0
  313. package/lib/typescript/redux/reducers/appState.d.ts.map +1 -1
  314. package/lib/typescript/redux/reducers/hmsStates.d.ts +11 -2
  315. package/lib/typescript/redux/reducers/hmsStates.d.ts.map +1 -1
  316. package/lib/typescript/redux/reducers/index.d.ts +4 -1
  317. package/lib/typescript/redux/reducers/index.d.ts.map +1 -1
  318. package/lib/typescript/redux/reducers/userState.d.ts +2 -2
  319. package/lib/typescript/redux/reducers/userState.d.ts.map +1 -1
  320. package/lib/typescript/utils/theme.d.ts +5 -0
  321. package/lib/typescript/utils/theme.d.ts.map +1 -1
  322. package/lib/typescript/utils/types.d.ts +3 -4
  323. package/lib/typescript/utils/types.d.ts.map +1 -1
  324. package/package.json +11 -17
  325. package/src/HMSInstanceSetup.tsx +4 -31
  326. package/src/HMSPrebuilt.tsx +24 -6
  327. package/src/HMSRoomSetup.tsx +55 -17
  328. package/src/Icons/AnswerPhone/assets/answer-phone.png +0 -0
  329. package/src/Icons/AnswerPhone/assets/answer-phone@2x.png +0 -0
  330. package/src/Icons/AnswerPhone/assets/answer-phone@3x.png +0 -0
  331. package/src/Icons/AnswerPhone/index.tsx +27 -0
  332. package/src/Icons/Bluetooth/assets/bluetooth-on.png +0 -0
  333. package/src/Icons/Bluetooth/assets/bluetooth-on@2x.png +0 -0
  334. package/src/Icons/Bluetooth/assets/bluetooth-on@3x.png +0 -0
  335. package/src/Icons/Bluetooth/index.tsx +27 -0
  336. package/src/Icons/Check/assets/check.png +0 -0
  337. package/src/Icons/Check/assets/check@2x.png +0 -0
  338. package/src/Icons/Check/assets/check@3x.png +0 -0
  339. package/src/Icons/Check/index.tsx +27 -0
  340. package/src/Icons/GenericLogo/assets/generic-logo.png +0 -0
  341. package/src/Icons/GenericLogo/assets/generic-logo@2x.png +0 -0
  342. package/src/Icons/GenericLogo/assets/generic-logo@3x.png +0 -0
  343. package/src/Icons/GenericLogo/index.tsx +27 -0
  344. package/src/Icons/Headphones/assets/headphones.png +0 -0
  345. package/src/Icons/Headphones/assets/headphones@2x.png +0 -0
  346. package/src/Icons/Headphones/assets/headphones@3x.png +0 -0
  347. package/src/Icons/Headphones/index.tsx +27 -0
  348. package/src/Icons/Person/assets/person.png +0 -0
  349. package/src/Icons/Person/assets/person@2x.png +0 -0
  350. package/src/Icons/Person/assets/person@3x.png +0 -0
  351. package/src/Icons/Person/index.tsx +27 -0
  352. package/src/Icons/Radio/assets/radio.png +0 -0
  353. package/src/Icons/Radio/assets/radio@2x.png +0 -0
  354. package/src/Icons/Radio/assets/radio@3x.png +0 -0
  355. package/src/Icons/Radio/index.tsx +27 -0
  356. package/src/Icons/Speaker/assets/speaker-large.png +0 -0
  357. package/src/Icons/Speaker/assets/speaker-large@2x.png +0 -0
  358. package/src/Icons/Speaker/assets/speaker-large@3x.png +0 -0
  359. package/src/Icons/Speaker/index.tsx +10 -2
  360. package/src/Icons/Wave/assets/wave.png +0 -0
  361. package/src/Icons/Wave/assets/wave@2x.png +0 -0
  362. package/src/Icons/Wave/assets/wave@3x.png +0 -0
  363. package/src/Icons/Wave/index.tsx +24 -0
  364. package/src/Icons/index.ts +8 -0
  365. package/src/components/BackButton.tsx +4 -4
  366. package/src/components/DisplayView.tsx +0 -10
  367. package/src/components/HMSHLSStreamLoading.tsx +57 -0
  368. package/src/components/HMSLocalVideoView.tsx +42 -0
  369. package/src/components/HMSManageAudioOutput.tsx +311 -0
  370. package/src/components/HMSManageLeave.tsx +6 -77
  371. package/src/components/HMSMeetingEnded.tsx +29 -0
  372. package/src/components/HMSPreviewEditName.tsx +6 -5
  373. package/src/components/HMSPreviewHLSLiveIndicator.tsx +58 -0
  374. package/src/components/HMSPreviewJoinButton.tsx +44 -4
  375. package/src/components/HMSPreviewNetworkQuality.tsx +40 -0
  376. package/src/components/HMSPreviewPeersList.tsx +12 -72
  377. package/src/components/HMSPreviewSubtitle.tsx +27 -3
  378. package/src/components/HMSPreviewTile.tsx +13 -91
  379. package/src/components/HMSPreviewTitle.tsx +0 -1
  380. package/src/components/HMSRoomOptions.tsx +2 -8
  381. package/src/components/HMSShowNetworkQuality.tsx +0 -1
  382. package/src/components/Meeting.tsx +11 -0
  383. package/src/components/MenuModal/Menu.tsx +1 -1
  384. package/src/components/Modals.tsx +4 -299
  385. package/src/components/Participants/ParticipantsList.tsx +0 -24
  386. package/src/components/PeerSettingsModalContent.tsx +9 -23
  387. package/src/components/Preview.tsx +131 -48
  388. package/src/components/RoomSettingsModalContent.tsx +1 -138
  389. package/src/components/index.ts +0 -1
  390. package/src/hooks/useHmsInstance.ts +0 -1
  391. package/src/hooks-util-selectors.tsx +10 -0
  392. package/src/hooks-util.ts +168 -89
  393. package/src/redux/actionTypes.ts +8 -0
  394. package/src/redux/actions/index.ts +23 -2
  395. package/src/redux/reducers/appState.ts +9 -0
  396. package/src/redux/reducers/hmsStates.ts +28 -1
  397. package/src/redux/reducers/userState.ts +2 -2
  398. package/src/utils/theme.ts +6 -1
  399. package/src/utils/types.ts +3 -4
  400. package/src/utils.ts +2 -2
  401. package/lib/commonjs/components/HMSPreviewDeviceSettings.js.map +0 -1
  402. package/lib/commonjs/components/ZoomableView.js +0 -84
  403. package/lib/commonjs/components/ZoomableView.js.map +0 -1
  404. package/lib/module/components/HMSPreviewDeviceSettings.js +0 -296
  405. package/lib/module/components/HMSPreviewDeviceSettings.js.map +0 -1
  406. package/lib/module/components/ZoomableView.js +0 -76
  407. package/lib/module/components/ZoomableView.js.map +0 -1
  408. package/lib/typescript/components/HMSPreviewDeviceSettings.d.ts +0 -3
  409. package/lib/typescript/components/HMSPreviewDeviceSettings.d.ts.map +0 -1
  410. package/lib/typescript/components/ZoomableView.d.ts +0 -6
  411. package/lib/typescript/components/ZoomableView.d.ts.map +0 -1
  412. package/src/components/HMSPreviewDeviceSettings.tsx +0 -387
  413. package/src/components/ZoomableView.tsx +0 -91
@@ -7,8 +7,6 @@ import {
7
7
  TextInput,
8
8
  StyleSheet,
9
9
  Image,
10
- Platform,
11
- InteractionManager,
12
10
  useWindowDimensions,
13
11
  } from 'react-native';
14
12
  import type { ImageURISource } from 'react-native';
@@ -34,10 +32,6 @@ import Feather from 'react-native-vector-icons/Feather';
34
32
  import Entypo from 'react-native-vector-icons/Entypo';
35
33
  import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons';
36
34
  import MaterialIcons from 'react-native-vector-icons/MaterialIcons';
37
- import { Slider } from '@miblanchard/react-native-slider';
38
- import RNFetchBlob from 'rn-fetch-blob';
39
- import RNFS from 'react-native-fs';
40
- import Share from 'react-native-share';
41
35
 
42
36
  import { styles } from './styles';
43
37
 
@@ -51,7 +45,7 @@ import {
51
45
  changeShowStats,
52
46
  saveUserData,
53
47
  } from '../redux/actions';
54
- import { requestExternalStoragePermission, getTime } from '../utils/functions';
48
+ import { getTime } from '../utils/functions';
55
49
  import {
56
50
  LayoutParams,
57
51
  ModalTypes,
@@ -176,106 +170,6 @@ export const SaveScreenshot = ({
176
170
  (state: RootState) => state.hmsStates.localPeer || undefined
177
171
  );
178
172
 
179
- /**
180
- * Get target path on external storage to save image
181
- * @param {string} imageExtension file extension to use for image
182
- * @param {string} peerName name of peer to use in image name
183
- * @returns string - path on external storage to save image
184
- */
185
- const getTargetPath = (imageExtension: string, peerName?: string) => {
186
- // formatting peer name
187
- const formattedPeerName = peerName
188
- ? peerName.replace(/ /g, '-').toLowerCase()
189
- : '';
190
-
191
- // name to use for image
192
- const imageName = `${formattedPeerName}-snapshot-${Date.now()}.${imageExtension}`;
193
-
194
- // directory for saving image
195
- const targetDir =
196
- Platform.OS === 'ios'
197
- ? RNFetchBlob.fs.dirs.DocumentDir
198
- : RNFetchBlob.fs.dirs.DCIMDir;
199
-
200
- const targetLocation = `${targetDir}/${imageName}`;
201
-
202
- return targetLocation;
203
- };
204
-
205
- const saveToDisk = async () => {
206
- try {
207
- // Requesting External Storage permission to save image to disk
208
- const permission = await requestExternalStoragePermission();
209
-
210
- // checking External Storage permission and availability of image source that we have to save to disk
211
- if (permission && peer && imageSource) {
212
- // Waiting for Interactions (Modal Close Animation) to finish
213
- InteractionManager.runAfterInteractions(async () => {
214
- // image extension to use
215
- const imageExtension = 'png';
216
-
217
- // Removing `file://` from URI if it exists, to keep it consistent with `base64` image case
218
- const source = imageSource.uri.replace('file://', '');
219
-
220
- // Checking if source is the local file on device
221
- const isSourceLocalFile = imageSource.uri.startsWith('file://');
222
-
223
- // if source is local file on ios device then we don't need to do any file system operation
224
- // We can use that local file to show preview window to user on ios
225
- const targetLocation =
226
- isSourceLocalFile && Platform.OS === 'ios'
227
- ? source
228
- : getTargetPath(imageExtension, peer.name);
229
-
230
- // if source is local file on android device, then we copy source file to target path
231
- if (isSourceLocalFile) {
232
- if (Platform.OS === 'android') {
233
- await RNFS.copyFile(
234
- source, // Source Dir
235
- targetLocation // Target Dir
236
- );
237
- }
238
- }
239
- // if source is not local file, then we write to target path
240
- else {
241
- await RNFetchBlob.fs.writeFile(
242
- targetLocation, // Target Dir
243
- source.replace('data:image/png;base64,', ''), // Data to write to "Target Dir"
244
- 'base64'
245
- );
246
- }
247
-
248
- Share.open({ url: 'file://' + targetLocation })
249
- .then(({ message }) => {
250
- if (message.includes('SaveToCameraRoll')) {
251
- Toast.showWithGravity(
252
- 'Snapshot has been saved successfully',
253
- Toast.LONG,
254
- Toast.TOP
255
- );
256
- }
257
- cancelModal();
258
- })
259
- .catch((error) => console.log('share error -> ', error))
260
- .finally(() => {
261
- // On Android, We have already saved image into DCIM dir
262
- // Therefore, we can notify user about "save success" and close modal
263
- if (Platform.OS === 'android') {
264
- Toast.showWithGravity(
265
- 'Snapshot has been saved successfully',
266
- Toast.LONG,
267
- Toast.TOP
268
- );
269
- cancelModal();
270
- }
271
- });
272
- });
273
- }
274
- } catch (error) {
275
- console.warn('Snapshot Save Error: ', error);
276
- }
277
- };
278
-
279
173
  return (
280
174
  <View style={[{ flexGrow: 1 }, styles.volumeModalContainer]}>
281
175
  <Text style={styles.roleChangeModalHeading}>
@@ -290,62 +184,9 @@ export const SaveScreenshot = ({
290
184
  ) : null}
291
185
  <View style={styles.roleChangeModalPermissionContainer}>
292
186
  <CustomButton
293
- title="Cancel"
294
- onPress={cancelModal}
295
- viewStyle={[styles.roleChangeModalCancelButton, { width: '40%' }]}
296
- textStyle={styles.roleChangeModalButtonText}
297
- />
298
- <CustomButton
299
- title="Save to Disk"
300
- onPress={saveToDisk}
301
- viewStyle={[styles.roleChangeModalSuccessButton, { width: '56%' }]}
302
- textStyle={styles.roleChangeModalButtonText}
303
- />
304
- </View>
305
- </View>
306
- );
307
- };
308
-
309
- export const ChangeVolumeModal = ({
310
- cancelModal,
311
- }: {
312
- cancelModal: Function;
313
- }) => {
314
- const instance = useHMSInstance();
315
- const peer = useSelector((state: RootState) => state.app.peerToUpdate);
316
- const [volume, setVolume] = useState<number>(0);
317
-
318
- const changeVolume = () => {
319
- if (peer?.audioTrack) {
320
- instance?.setVolume(peer?.audioTrack, volume);
321
- }
322
- cancelModal();
323
- };
324
-
325
- return (
326
- <View style={styles.volumeModalContainer}>
327
- <Text style={styles.roleChangeModalHeading}>Set Volume</Text>
328
- <View style={styles.volumeModalSlider}>
329
- <Text style={styles.roleChangeModalDescription}>Volume: {volume}</Text>
330
- <Slider
331
- value={volume}
332
- maximumValue={10}
333
- minimumValue={0}
334
- step={1}
335
- onValueChange={(value: any) => setVolume(value[0])}
336
- />
337
- </View>
338
- <View style={styles.roleChangeModalPermissionContainer}>
339
- <CustomButton
340
- title="Cancel"
187
+ title="Done"
341
188
  onPress={cancelModal}
342
- viewStyle={styles.roleChangeModalCancelButton}
343
- textStyle={styles.roleChangeModalButtonText}
344
- />
345
- <CustomButton
346
- title="Change"
347
- onPress={changeVolume}
348
- viewStyle={styles.roleChangeModalSuccessButton}
189
+ viewStyle={[styles.roleChangeModalCancelButton, { width: '100%' }]}
349
190
  textStyle={styles.roleChangeModalButtonText}
350
191
  />
351
192
  </View>
@@ -1423,15 +1264,12 @@ export const HlsStreamingModal = ({
1423
1264
  };
1424
1265
 
1425
1266
  export const RecordingModal = ({
1426
- recordingModal,
1427
1267
  setModalVisible,
1428
1268
  }: {
1429
- recordingModal: boolean;
1430
1269
  setModalVisible(modalType: ModalTypes, delay?: any): void;
1431
1270
  }) => {
1432
1271
  const instance = useHMSInstance();
1433
1272
  const roomID = useSelector((state: RootState) => state.user.roomID);
1434
- const [resolutionDetails, setResolutionDetails] = useState<boolean>(false);
1435
1273
  const [recordingDetails, setRecordingDetails] = useState<HMSRTMPConfig>({
1436
1274
  record: false,
1437
1275
  meetingURL: roomID ? roomID + '?token=beam_recording' : undefined,
@@ -1445,7 +1283,7 @@ export const RecordingModal = ({
1445
1283
  setModalVisible(ModalTypes.DEFAULT);
1446
1284
  };
1447
1285
 
1448
- return recordingModal ? (
1286
+ return (
1449
1287
  <View style={styles.roleChangeModal}>
1450
1288
  <Text style={styles.roleChangeModalHeading}>Recording Details</Text>
1451
1289
  <TextInput
@@ -1498,38 +1336,6 @@ export const RecordingModal = ({
1498
1336
  </View>
1499
1337
  <Text style={styles.roleChangeModalPermission}>Record</Text>
1500
1338
  </TouchableOpacity>
1501
- <TouchableOpacity
1502
- style={styles.checkboxButtonContainer}
1503
- onPress={() => {
1504
- setResolutionDetails(!resolutionDetails);
1505
- if (!resolutionDetails) {
1506
- setModalVisible(ModalTypes.RESOLUTION, true);
1507
- setRecordingDetails({
1508
- ...recordingDetails,
1509
- resolution: {
1510
- height: 720,
1511
- width: 1280,
1512
- },
1513
- });
1514
- } else {
1515
- setRecordingDetails({
1516
- ...recordingDetails,
1517
- resolution: undefined,
1518
- });
1519
- }
1520
- }}
1521
- >
1522
- <View style={styles.roleChangeModalCheckBox}>
1523
- {resolutionDetails && (
1524
- <Entypo
1525
- name="check"
1526
- style={styles.roleChangeModalCheck}
1527
- size={10}
1528
- />
1529
- )}
1530
- </View>
1531
- <Text style={styles.roleChangeModalPermission}>Resolution</Text>
1532
- </TouchableOpacity>
1533
1339
  <View style={styles.roleChangeModalPermissionContainer}>
1534
1340
  <CustomButton
1535
1341
  title="Cancel"
@@ -1545,62 +1351,6 @@ export const RecordingModal = ({
1545
1351
  />
1546
1352
  </View>
1547
1353
  </View>
1548
- ) : (
1549
- <View style={styles.roleChangeModal}>
1550
- <Text style={styles.roleChangeModalHeading}>Resolution Details</Text>
1551
- <View style={styles.resolutionContainer}>
1552
- <View style={styles.resolutionDetails}>
1553
- <Text style={styles.interRegular}>Height :</Text>
1554
- <Text style={styles.resolutionValue}>
1555
- {recordingDetails.resolution?.height}
1556
- </Text>
1557
- </View>
1558
- <Slider
1559
- value={recordingDetails.resolution?.height}
1560
- maximumValue={1280}
1561
- minimumValue={480}
1562
- step={10}
1563
- onValueChange={(value: any) => {
1564
- setRecordingDetails({
1565
- ...recordingDetails,
1566
- resolution: {
1567
- height: parseInt(value),
1568
- width: recordingDetails.resolution?.width ?? 1280,
1569
- },
1570
- });
1571
- }}
1572
- />
1573
- <View style={styles.resolutionDetails}>
1574
- <Text style={styles.interRegular}>Width :</Text>
1575
- <Text style={styles.resolutionValue}>
1576
- {recordingDetails.resolution?.width}
1577
- </Text>
1578
- </View>
1579
- <Slider
1580
- value={recordingDetails.resolution?.width}
1581
- maximumValue={1280}
1582
- minimumValue={500}
1583
- step={10}
1584
- onValueChange={(value: any) => {
1585
- setRecordingDetails({
1586
- ...recordingDetails,
1587
- resolution: {
1588
- width: parseInt(value),
1589
- height: recordingDetails.resolution?.height ?? 720,
1590
- },
1591
- });
1592
- }}
1593
- />
1594
- </View>
1595
- <View style={styles.sortingButtonContainer}>
1596
- <CustomButton
1597
- title="Back"
1598
- onPress={() => setModalVisible(ModalTypes.RECORDING, true)}
1599
- viewStyle={styles.backButton}
1600
- textStyle={styles.roleChangeModalButtonText}
1601
- />
1602
- </View>
1603
- </View>
1604
1354
  );
1605
1355
  };
1606
1356
 
@@ -1757,51 +1507,6 @@ export const RealTime = ({ startedAt }: { startedAt?: Date }) => {
1757
1507
  );
1758
1508
  };
1759
1509
 
1760
- export const AudioShareSetVolumeModal = ({
1761
- success,
1762
- cancel,
1763
- }: {
1764
- success: Function;
1765
- cancel: Function;
1766
- }) => {
1767
- const [volume, setVolume] = useState<number>(0);
1768
-
1769
- const changeVolume = () => {
1770
- success(volume);
1771
- cancel();
1772
- };
1773
-
1774
- return (
1775
- <View style={styles.volumeModalContainer}>
1776
- <Text style={styles.roleChangeModalHeading}>Set Volume</Text>
1777
- <View style={styles.volumeModalSlider}>
1778
- <Text style={styles.roleChangeModalDescription}>Volume: {volume}</Text>
1779
- <Slider
1780
- value={volume}
1781
- maximumValue={1}
1782
- minimumValue={0}
1783
- step={0.1}
1784
- onValueChange={(value: any) => setVolume(value[0])}
1785
- />
1786
- </View>
1787
- <View style={styles.roleChangeModalPermissionContainer}>
1788
- <CustomButton
1789
- title="Cancel"
1790
- onPress={cancel}
1791
- viewStyle={styles.roleChangeModalCancelButton}
1792
- textStyle={styles.roleChangeModalButtonText}
1793
- />
1794
- <CustomButton
1795
- title="Change"
1796
- onPress={changeVolume}
1797
- viewStyle={styles.roleChangeModalSuccessButton}
1798
- textStyle={styles.roleChangeModalButtonText}
1799
- />
1800
- </View>
1801
- </View>
1802
- );
1803
- };
1804
-
1805
1510
  interface ChangeBulkRoleModalProps {
1806
1511
  cancelModal(): void;
1807
1512
  }
@@ -88,16 +88,6 @@ export const ParticipantsList: React.FC<ParticipantsListProps> = ({ data }) => {
88
88
  }
89
89
  };
90
90
 
91
- const onSetVolumePress = (peer: HMSPeer) => {
92
- hideMenu();
93
- setTimeout(() => {
94
- batch(() => {
95
- dispatch(setPeerToUpdate(peer));
96
- setModalVisible(ModalTypes.VOLUME, true);
97
- });
98
- }, 500);
99
- };
100
-
101
91
  return (
102
92
  <FlatList
103
93
  data={data}
@@ -226,20 +216,6 @@ export const ParticipantsList: React.FC<ParticipantsListProps> = ({ data }) => {
226
216
  </View>
227
217
  </MenuItem>
228
218
  ) : null}
229
- {peer.isLocal === false && !!peer.audioTrack ? (
230
- <MenuItem onPress={() => onSetVolumePress(peer)}>
231
- <View style={styles.participantMenuItem}>
232
- <Ionicons
233
- name="volume-high-outline"
234
- style={styles.participantMenuItemIcon}
235
- size={24}
236
- />
237
- <Text style={styles.participantMenuItemName}>
238
- Set Volume
239
- </Text>
240
- </View>
241
- </MenuItem>
242
- ) : null}
243
219
  </Menu>
244
220
  </View>
245
221
  );
@@ -93,13 +93,6 @@ export const PeerSettingsModalContent: React.FC<
93
93
  });
94
94
  };
95
95
 
96
- const changeVolumeLevelOfPeer = () => {
97
- batch(() => {
98
- dispatch(setPeerToUpdate(peerTrackNode.peer));
99
- setModalVisible(ModalTypes.VOLUME, true);
100
- });
101
- };
102
-
103
96
  // Check if selected tile is "On Spotlight"
104
97
  const { onSpotlight, tileVideoTrackId, tileAudioTrackId } = isTileOnSpotlight(
105
98
  spotlightTrackId,
@@ -147,13 +140,15 @@ export const PeerSettingsModalContent: React.FC<
147
140
  <Text style={styles.participantRole}>{peer.role?.name}</Text>
148
141
 
149
142
  <View style={styles.contentContainer}>
150
- <SettingItem
151
- text={onSpotlight ? 'Remove from Spotlight' : 'Add to Spotlight'}
152
- IconType={Ionicons}
153
- iconName={onSpotlight ? 'ios-star' : 'ios-star-outline'}
154
- onPress={handleSpotlightPress}
155
- disabled={!peerTrackNode.track?.trackId}
156
- />
143
+ {debugMode ? (
144
+ <SettingItem
145
+ text={onSpotlight ? 'Remove from Spotlight' : 'Add to Spotlight'}
146
+ IconType={Ionicons}
147
+ iconName={onSpotlight ? 'ios-star' : 'ios-star-outline'}
148
+ onPress={handleSpotlightPress}
149
+ disabled={!peerTrackNode.track?.trackId}
150
+ />
151
+ ) : null}
157
152
 
158
153
  {!peer.isLocal &&
159
154
  (localPeerPermissions?.mute || localPeerPermissions?.unmute) ? (
@@ -232,15 +227,6 @@ export const PeerSettingsModalContent: React.FC<
232
227
  />
233
228
  ) : null}
234
229
 
235
- {!peer.isLocal ? (
236
- <SettingItem
237
- text="Set Volume"
238
- IconType={Ionicons}
239
- iconName={'volume-high-outline'}
240
- onPress={() => changeVolumeLevelOfPeer()}
241
- />
242
- ) : null}
243
-
244
230
  {/* Don't show Capture Screenshot option, if track is screenshare of local peer */}
245
231
  {!debugMode ||
246
232
  (peerTrackNode.peer.isLocal &&
@@ -1,11 +1,16 @@
1
- import React, { useEffect } from 'react';
2
- import { ScrollView, StyleSheet, View } from 'react-native';
3
- import { AvoidSoftInput } from 'react-native-avoid-softinput';
4
-
1
+ import React from 'react';
5
2
  import {
6
- SafeAreaView,
7
- useSafeAreaInsets,
8
- } from 'react-native-safe-area-context';
3
+ Keyboard,
4
+ StyleSheet,
5
+ TouchableWithoutFeedback,
6
+ View,
7
+ } from 'react-native';
8
+ import Animated, {
9
+ useAnimatedStyle,
10
+ useAnimatedKeyboard,
11
+ } from 'react-native-reanimated';
12
+ import { SafeAreaView } from 'react-native-safe-area-context';
13
+ import LinearGradient from 'react-native-linear-gradient';
9
14
 
10
15
  import { COLORS } from '../utils/theme';
11
16
 
@@ -19,7 +24,23 @@ import { HMSPreviewPeersList } from './HMSPreviewPeersList';
19
24
  import { HMSPreviewSubtitle } from './HMSPreviewSubtitle';
20
25
  import { HMSPreviewTile } from './HMSPreviewTile';
21
26
  import { HMSPreviewTitle } from './HMSPreviewTitle';
22
- import { HMSPreviewDeviceSettings } from './HMSPreviewDeviceSettings';
27
+ import { HMSManageAudioOutput } from './HMSManageAudioOutput';
28
+ import { HMSPreviewNetworkQuality } from './HMSPreviewNetworkQuality';
29
+ import { useCanPublishVideo } from '../hooks-sdk';
30
+ import { HMSPreviewHLSLiveIndicator } from './HMSPreviewHLSLiveIndicator';
31
+
32
+ const backButtonEdges = ['top'] as const;
33
+ const headerEdges = ['top', 'left', 'right'] as const;
34
+
35
+ const gradientColorShades = [
36
+ '#000000',
37
+ 'rgba(0, 0, 0, 0.9)',
38
+ 'rgba(0, 0, 0, 0.7)',
39
+ 'rgba(0, 0, 0, 0.1)',
40
+ 'rgba(0, 0, 0, 0.05)',
41
+ 'rgba(0, 0, 0, 0)',
42
+ ];
43
+ const gradientColorShadeLocations = [0.45, 0.55, 0.7, 0.9, 0.95, 1];
23
44
 
24
45
  export const Preview = ({
25
46
  join,
@@ -28,72 +49,117 @@ export const Preview = ({
28
49
  join(): void;
29
50
  loadingButtonState: boolean;
30
51
  }) => {
31
- const { bottom } = useSafeAreaInsets();
32
-
33
- useEffect(() => {
34
- AvoidSoftInput.setAdjustNothing();
35
- AvoidSoftInput.setEnabled(true);
52
+ const canPublishVideo = useCanPublishVideo();
53
+ const animatedKeyboard = useAnimatedKeyboard();
36
54
 
37
- return () => AvoidSoftInput.setEnabled(false);
38
- }, []);
55
+ const keyboardAvoidStyle = useAnimatedStyle(() => {
56
+ return {
57
+ transform: [{ translateY: -animatedKeyboard.height.value }],
58
+ };
59
+ });
39
60
 
40
61
  return (
41
- <SafeAreaView style={styles.container}>
42
- <ScrollView
43
- contentContainerStyle={styles.scrollContainer}
44
- bounces={false}
45
- >
46
- <BackButton />
62
+ <TouchableWithoutFeedback onPress={Keyboard.dismiss}>
63
+ <View style={styles.container}>
64
+ {canPublishVideo ? <HMSPreviewTile /> : null}
65
+
66
+ {canPublishVideo ? (
67
+ <LinearGradient
68
+ colors={gradientColorShades}
69
+ locations={gradientColorShadeLocations}
70
+ style={styles.headerGradient}
71
+ />
72
+ ) : null}
73
+
74
+ <SafeAreaView
75
+ style={canPublishVideo ? styles.header : null}
76
+ edges={headerEdges}
77
+ mode="margin"
78
+ >
79
+ <HMSPreviewTitle />
47
80
 
48
- <HMSPreviewTitle />
81
+ <HMSPreviewSubtitle />
49
82
 
50
- <HMSPreviewSubtitle />
83
+ <View style={styles.peerListWrapper}>
84
+ <HMSPreviewHLSLiveIndicator />
51
85
 
52
- <HMSPreviewPeersList />
86
+ <HMSPreviewPeersList />
87
+ </View>
88
+ </SafeAreaView>
53
89
 
54
- <HMSPreviewTile />
90
+ <SafeAreaView
91
+ style={styles.backButtonContainer}
92
+ edges={backButtonEdges}
93
+ mode="margin"
94
+ >
95
+ <BackButton />
96
+ </SafeAreaView>
55
97
 
56
- <View style={styles.controlsContainer}>
57
- <View style={styles.micAndCameraControls}>
58
- <HMSManageLocalAudio />
98
+ <View style={styles.footerWrapper}>
99
+ <HMSPreviewNetworkQuality />
59
100
 
60
- <View style={styles.manageLocalVideoWrapper}>
61
- <HMSManageLocalVideo />
62
- </View>
101
+ <Animated.View style={[styles.footer, keyboardAvoidStyle]}>
102
+ <View style={styles.controlsContainer}>
103
+ <View style={styles.micAndCameraControls}>
104
+ <HMSManageLocalAudio />
63
105
 
64
- <HMSManageCameraRotation />
65
- </View>
106
+ <View style={styles.manageLocalVideoWrapper}>
107
+ <HMSManageLocalVideo />
108
+ </View>
66
109
 
67
- <HMSPreviewDeviceSettings />
68
- </View>
110
+ <HMSManageCameraRotation />
111
+ </View>
69
112
 
70
- <View
71
- style={[styles.joinButtonRow, { marginBottom: 34 - bottom + 12 }]}
72
- >
73
- <HMSPreviewEditName />
113
+ <HMSManageAudioOutput />
114
+ </View>
115
+
116
+ <View style={styles.joinButtonRow}>
117
+ <HMSPreviewEditName />
74
118
 
75
- <HMSPreviewJoinButton onJoin={join} loading={loadingButtonState} />
119
+ <HMSPreviewJoinButton
120
+ onJoin={join}
121
+ loading={loadingButtonState}
122
+ />
123
+ </View>
124
+ </Animated.View>
76
125
  </View>
77
- </ScrollView>
78
- </SafeAreaView>
126
+ </View>
127
+ </TouchableWithoutFeedback>
79
128
  );
80
129
  };
81
130
 
82
131
  const styles = StyleSheet.create({
83
132
  container: {
84
133
  flex: 1,
134
+ position: 'relative',
85
135
  backgroundColor: COLORS.BACKGROUND.DIM,
136
+ justifyContent: 'center',
86
137
  },
87
- scrollContainer: {
88
- flexGrow: 1,
138
+ header: {
139
+ position: 'absolute',
140
+ top: 0,
141
+ width: '100%',
142
+ marginTop: 24,
143
+ zIndex: 20,
144
+ alignItems: 'center',
145
+ },
146
+ headerGradient: {
147
+ position: 'absolute',
148
+ top: 0,
149
+ width: '100%',
150
+ height: 260,
151
+ zIndex: 10,
89
152
  },
90
153
  controlsContainer: {
91
- marginHorizontal: 24,
92
- marginTop: 24,
93
154
  flexDirection: 'row',
94
155
  alignItems: 'center',
95
156
  justifyContent: 'space-between',
96
157
  },
158
+ peerListWrapper: {
159
+ flexDirection: 'row',
160
+ marginTop: 16,
161
+ alignSelf: 'center',
162
+ },
97
163
  micAndCameraControls: {
98
164
  flexDirection: 'row',
99
165
  },
@@ -101,8 +167,25 @@ const styles = StyleSheet.create({
101
167
  marginHorizontal: 16,
102
168
  },
103
169
  joinButtonRow: {
104
- marginHorizontal: 24,
105
- marginTop: 16,
170
+ marginVertical: 16,
106
171
  flexDirection: 'row',
107
172
  },
173
+ backButtonContainer: {
174
+ position: 'absolute',
175
+ top: 0,
176
+ zIndex: 40,
177
+ },
178
+ footerWrapper: {
179
+ position: 'absolute',
180
+ bottom: 0,
181
+ width: '100%',
182
+ zIndex: 30,
183
+ },
184
+ footer: {
185
+ flex: 1,
186
+ backgroundColor: COLORS.BACKGROUND.DEFAULT,
187
+ borderTopLeftRadius: 16,
188
+ borderTopRightRadius: 16,
189
+ padding: 16,
190
+ },
108
191
  });