@stream-io/video-react-native-sdk 0.0.1-alpha.141

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 (360) hide show
  1. package/CHANGELOG.md +739 -0
  2. package/LICENSE +219 -0
  3. package/README.md +19 -0
  4. package/dist/__tests__/components/ActiveCall.test.d.ts +1 -0
  5. package/dist/__tests__/components/ActiveCall.test.js +89 -0
  6. package/dist/__tests__/components/ActiveCall.test.js.map +1 -0
  7. package/dist/__tests__/components/Avatar.test.d.ts +1 -0
  8. package/dist/__tests__/components/Avatar.test.js +34 -0
  9. package/dist/__tests__/components/Avatar.test.js.map +1 -0
  10. package/dist/__tests__/components/ParticipantView.test.d.ts +1 -0
  11. package/dist/__tests__/components/ParticipantView.test.js +66 -0
  12. package/dist/__tests__/components/ParticipantView.test.js.map +1 -0
  13. package/dist/__tests__/mocks/call.d.ts +2 -0
  14. package/dist/__tests__/mocks/call.js +21 -0
  15. package/dist/__tests__/mocks/call.js.map +1 -0
  16. package/dist/__tests__/mocks/client.d.ts +2 -0
  17. package/dist/__tests__/mocks/client.js +31 -0
  18. package/dist/__tests__/mocks/client.js.map +1 -0
  19. package/dist/__tests__/mocks/participant.d.ts +3 -0
  20. package/dist/__tests__/mocks/participant.js +25 -0
  21. package/dist/__tests__/mocks/participant.js.map +1 -0
  22. package/dist/__tests__/utils/RNTLTools.d.ts +15 -0
  23. package/dist/__tests__/utils/RNTLTools.js +54 -0
  24. package/dist/__tests__/utils/RNTLTools.js.map +1 -0
  25. package/dist/index.d.ts +9 -0
  26. package/dist/index.js +39 -0
  27. package/dist/index.js.map +1 -0
  28. package/dist/jest-setup.d.ts +1 -0
  29. package/dist/jest-setup.js +34 -0
  30. package/dist/jest-setup.js.map +1 -0
  31. package/dist/src/components/ActiveCall.d.ts +18 -0
  32. package/dist/src/components/ActiveCall.js +117 -0
  33. package/dist/src/components/ActiveCall.js.map +1 -0
  34. package/dist/src/components/Avatar.d.ts +25 -0
  35. package/dist/src/components/Avatar.js +55 -0
  36. package/dist/src/components/Avatar.js.map +1 -0
  37. package/dist/src/components/CallControlsButton.d.ts +22 -0
  38. package/dist/src/components/CallControlsButton.js +43 -0
  39. package/dist/src/components/CallControlsButton.js.map +1 -0
  40. package/dist/src/components/CallControlsView.d.ts +9 -0
  41. package/dist/src/components/CallControlsView.js +95 -0
  42. package/dist/src/components/CallControlsView.js.map +1 -0
  43. package/dist/src/components/CallParticipantsBadge.d.ts +1 -0
  44. package/dist/src/components/CallParticipantsBadge.js +48 -0
  45. package/dist/src/components/CallParticipantsBadge.js.map +1 -0
  46. package/dist/src/components/CallParticipantsInfoView.d.ts +21 -0
  47. package/dist/src/components/CallParticipantsInfoView.js +213 -0
  48. package/dist/src/components/CallParticipantsInfoView.js.map +1 -0
  49. package/dist/src/components/CallParticipantsList.d.ts +25 -0
  50. package/dist/src/components/CallParticipantsList.js +124 -0
  51. package/dist/src/components/CallParticipantsList.js.map +1 -0
  52. package/dist/src/components/CallParticipantsOptions.d.ts +8 -0
  53. package/dist/src/components/CallParticipantsOptions.js +189 -0
  54. package/dist/src/components/CallParticipantsOptions.js.map +1 -0
  55. package/dist/src/components/CallParticipantsSpotlightView.d.ts +1 -0
  56. package/dist/src/components/CallParticipantsSpotlightView.js +40 -0
  57. package/dist/src/components/CallParticipantsSpotlightView.js.map +1 -0
  58. package/dist/src/components/CallParticipantsView.d.ts +1 -0
  59. package/dist/src/components/CallParticipantsView.js +31 -0
  60. package/dist/src/components/CallParticipantsView.js.map +1 -0
  61. package/dist/src/components/IncomingCallView.d.ts +1 -0
  62. package/dist/src/components/IncomingCallView.js +98 -0
  63. package/dist/src/components/IncomingCallView.js.map +1 -0
  64. package/dist/src/components/LobbyView.d.ts +1 -0
  65. package/dist/src/components/LobbyView.js +215 -0
  66. package/dist/src/components/LobbyView.js.map +1 -0
  67. package/dist/src/components/LocalVideoView.d.ts +34 -0
  68. package/dist/src/components/LocalVideoView.js +100 -0
  69. package/dist/src/components/LocalVideoView.js.map +1 -0
  70. package/dist/src/components/NetworkQualityIndicator.d.ts +8 -0
  71. package/dist/src/components/NetworkQualityIndicator.js +36 -0
  72. package/dist/src/components/NetworkQualityIndicator.js.map +1 -0
  73. package/dist/src/components/OutgoingCallView.d.ts +1 -0
  74. package/dist/src/components/OutgoingCallView.js +103 -0
  75. package/dist/src/components/OutgoingCallView.js.map +1 -0
  76. package/dist/src/components/ParticipantReaction.d.ts +7 -0
  77. package/dist/src/components/ParticipantReaction.js +45 -0
  78. package/dist/src/components/ParticipantReaction.js.map +1 -0
  79. package/dist/src/components/ParticipantView.d.ts +42 -0
  80. package/dist/src/components/ParticipantView.js +256 -0
  81. package/dist/src/components/ParticipantView.js.map +1 -0
  82. package/dist/src/components/ReactionsModal.d.ts +7 -0
  83. package/dist/src/components/ReactionsModal.js +65 -0
  84. package/dist/src/components/ReactionsModal.js.map +1 -0
  85. package/dist/src/components/ToggleAudioButton.d.ts +1 -0
  86. package/dist/src/components/ToggleAudioButton.js +78 -0
  87. package/dist/src/components/ToggleAudioButton.js.map +1 -0
  88. package/dist/src/components/ToggleVideoButton.d.ts +1 -0
  89. package/dist/src/components/ToggleVideoButton.js +78 -0
  90. package/dist/src/components/ToggleVideoButton.js.map +1 -0
  91. package/dist/src/components/UserInfoView.d.ts +13 -0
  92. package/dist/src/components/UserInfoView.js +82 -0
  93. package/dist/src/components/UserInfoView.js.map +1 -0
  94. package/dist/src/components/VideoRenderer.d.ts +65 -0
  95. package/dist/src/components/VideoRenderer.js +18 -0
  96. package/dist/src/components/VideoRenderer.js.map +1 -0
  97. package/dist/src/components/index.d.ts +12 -0
  98. package/dist/src/components/index.js +29 -0
  99. package/dist/src/components/index.js.map +1 -0
  100. package/dist/src/constants/A11yLabels.d.ts +20 -0
  101. package/dist/src/constants/A11yLabels.js +29 -0
  102. package/dist/src/constants/A11yLabels.js.map +1 -0
  103. package/dist/src/constants/index.d.ts +11 -0
  104. package/dist/src/constants/index.js +30 -0
  105. package/dist/src/constants/index.js.map +1 -0
  106. package/dist/src/contexts/StreamVideoContext/createStoreContext.d.ts +14 -0
  107. package/dist/src/contexts/StreamVideoContext/createStoreContext.js +100 -0
  108. package/dist/src/contexts/StreamVideoContext/createStoreContext.js.map +1 -0
  109. package/dist/src/contexts/StreamVideoContext/index.d.ts +30 -0
  110. package/dist/src/contexts/StreamVideoContext/index.js +18 -0
  111. package/dist/src/contexts/StreamVideoContext/index.js.map +1 -0
  112. package/dist/src/contexts/index.d.ts +1 -0
  113. package/dist/src/contexts/index.js +18 -0
  114. package/dist/src/contexts/index.js.map +1 -0
  115. package/dist/src/hooks/index.d.ts +10 -0
  116. package/dist/src/hooks/index.js +27 -0
  117. package/dist/src/hooks/index.js.map +1 -0
  118. package/dist/src/hooks/useCallControls.d.ts +14 -0
  119. package/dist/src/hooks/useCallControls.js +148 -0
  120. package/dist/src/hooks/useCallControls.js.map +1 -0
  121. package/dist/src/hooks/useCallCycleEffect.d.ts +8 -0
  122. package/dist/src/hooks/useCallCycleEffect.js +62 -0
  123. package/dist/src/hooks/useCallCycleEffect.js.map +1 -0
  124. package/dist/src/hooks/useCallKeep.d.ts +11 -0
  125. package/dist/src/hooks/useCallKeep.js +41 -0
  126. package/dist/src/hooks/useCallKeep.js.map +1 -0
  127. package/dist/src/hooks/useCreateStreamVideoClient.d.ts +33 -0
  128. package/dist/src/hooks/useCreateStreamVideoClient.js +40 -0
  129. package/dist/src/hooks/useCreateStreamVideoClient.js.map +1 -0
  130. package/dist/src/hooks/useIncallManager.d.ts +13 -0
  131. package/dist/src/hooks/useIncallManager.js +24 -0
  132. package/dist/src/hooks/useIncallManager.js.map +1 -0
  133. package/dist/src/hooks/useLocalVideoStream.d.ts +7 -0
  134. package/dist/src/hooks/useLocalVideoStream.js +34 -0
  135. package/dist/src/hooks/useLocalVideoStream.js.map +1 -0
  136. package/dist/src/hooks/useMutingState.d.ts +12 -0
  137. package/dist/src/hooks/useMutingState.js +25 -0
  138. package/dist/src/hooks/useMutingState.js.map +1 -0
  139. package/dist/src/hooks/usePermissionNotification.d.ts +18 -0
  140. package/dist/src/hooks/usePermissionNotification.js +33 -0
  141. package/dist/src/hooks/usePermissionNotification.js.map +1 -0
  142. package/dist/src/hooks/usePermissionRequest.d.ts +1 -0
  143. package/dist/src/hooks/usePermissionRequest.js +62 -0
  144. package/dist/src/hooks/usePermissionRequest.js.map +1 -0
  145. package/dist/src/hooks/usePublishMediaStreams.d.ts +6 -0
  146. package/dist/src/hooks/usePublishMediaStreams.js +49 -0
  147. package/dist/src/hooks/usePublishMediaStreams.js.map +1 -0
  148. package/dist/src/icons/ArrowRight.d.ts +5 -0
  149. package/dist/src/icons/ArrowRight.js +9 -0
  150. package/dist/src/icons/ArrowRight.js.map +1 -0
  151. package/dist/src/icons/CameraSwitch.d.ts +5 -0
  152. package/dist/src/icons/CameraSwitch.js +9 -0
  153. package/dist/src/icons/CameraSwitch.js.map +1 -0
  154. package/dist/src/icons/Chat.d.ts +5 -0
  155. package/dist/src/icons/Chat.js +9 -0
  156. package/dist/src/icons/Chat.js.map +1 -0
  157. package/dist/src/icons/Cross.d.ts +5 -0
  158. package/dist/src/icons/Cross.js +9 -0
  159. package/dist/src/icons/Cross.js.map +1 -0
  160. package/dist/src/icons/Mic.d.ts +5 -0
  161. package/dist/src/icons/Mic.js +10 -0
  162. package/dist/src/icons/Mic.js.map +1 -0
  163. package/dist/src/icons/MicOff.d.ts +5 -0
  164. package/dist/src/icons/MicOff.js +9 -0
  165. package/dist/src/icons/MicOff.js.map +1 -0
  166. package/dist/src/icons/Participants.d.ts +5 -0
  167. package/dist/src/icons/Participants.js +9 -0
  168. package/dist/src/icons/Participants.js.map +1 -0
  169. package/dist/src/icons/Phone.d.ts +5 -0
  170. package/dist/src/icons/Phone.js +9 -0
  171. package/dist/src/icons/Phone.js.map +1 -0
  172. package/dist/src/icons/PhoneDown.d.ts +5 -0
  173. package/dist/src/icons/PhoneDown.js +10 -0
  174. package/dist/src/icons/PhoneDown.js.map +1 -0
  175. package/dist/src/icons/Pin.d.ts +5 -0
  176. package/dist/src/icons/Pin.js +9 -0
  177. package/dist/src/icons/Pin.js.map +1 -0
  178. package/dist/src/icons/Reaction.d.ts +5 -0
  179. package/dist/src/icons/Reaction.js +9 -0
  180. package/dist/src/icons/Reaction.js.map +1 -0
  181. package/dist/src/icons/ScreenShare.d.ts +5 -0
  182. package/dist/src/icons/ScreenShare.js +40 -0
  183. package/dist/src/icons/ScreenShare.js.map +1 -0
  184. package/dist/src/icons/Settings.d.ts +5 -0
  185. package/dist/src/icons/Settings.js +34 -0
  186. package/dist/src/icons/Settings.js.map +1 -0
  187. package/dist/src/icons/Spotlight.d.ts +5 -0
  188. package/dist/src/icons/Spotlight.js +9 -0
  189. package/dist/src/icons/Spotlight.js.map +1 -0
  190. package/dist/src/icons/ThreeDots.d.ts +5 -0
  191. package/dist/src/icons/ThreeDots.js +11 -0
  192. package/dist/src/icons/ThreeDots.js.map +1 -0
  193. package/dist/src/icons/Video.d.ts +5 -0
  194. package/dist/src/icons/Video.js +9 -0
  195. package/dist/src/icons/Video.js.map +1 -0
  196. package/dist/src/icons/VideoDisabled.d.ts +5 -0
  197. package/dist/src/icons/VideoDisabled.js +10 -0
  198. package/dist/src/icons/VideoDisabled.js.map +1 -0
  199. package/dist/src/icons/VideoOff.d.ts +5 -0
  200. package/dist/src/icons/VideoOff.js +10 -0
  201. package/dist/src/icons/VideoOff.js.map +1 -0
  202. package/dist/src/icons/VideoSlash.d.ts +5 -0
  203. package/dist/src/icons/VideoSlash.js +10 -0
  204. package/dist/src/icons/VideoSlash.js.map +1 -0
  205. package/dist/src/icons/index.d.ts +19 -0
  206. package/dist/src/icons/index.js +36 -0
  207. package/dist/src/icons/index.js.map +1 -0
  208. package/dist/src/providers/MediaDevices.d.ts +9 -0
  209. package/dist/src/providers/MediaDevices.js +43 -0
  210. package/dist/src/providers/MediaDevices.js.map +1 -0
  211. package/dist/src/providers/StreamCall.d.ts +81 -0
  212. package/dist/src/providers/StreamCall.js +74 -0
  213. package/dist/src/providers/StreamCall.js.map +1 -0
  214. package/dist/src/providers/StreamVideo.d.ts +10 -0
  215. package/dist/src/providers/StreamVideo.js +66 -0
  216. package/dist/src/providers/StreamVideo.js.map +1 -0
  217. package/dist/src/providers/index.d.ts +2 -0
  218. package/dist/src/providers/index.js +19 -0
  219. package/dist/src/providers/index.js.map +1 -0
  220. package/dist/src/theme/avatar.d.ts +2 -0
  221. package/dist/src/theme/avatar.js +11 -0
  222. package/dist/src/theme/avatar.js.map +1 -0
  223. package/dist/src/theme/button.d.ts +2 -0
  224. package/dist/src/theme/button.js +11 -0
  225. package/dist/src/theme/button.js.map +1 -0
  226. package/dist/src/theme/colors.d.ts +3 -0
  227. package/dist/src/theme/colors.js +49 -0
  228. package/dist/src/theme/colors.js.map +1 -0
  229. package/dist/src/theme/constants.d.ts +47 -0
  230. package/dist/src/theme/constants.js +54 -0
  231. package/dist/src/theme/constants.js.map +1 -0
  232. package/dist/src/theme/fonts.d.ts +2 -0
  233. package/dist/src/theme/fonts.js +67 -0
  234. package/dist/src/theme/fonts.js.map +1 -0
  235. package/dist/src/theme/icon.d.ts +2 -0
  236. package/dist/src/theme/icon.js +11 -0
  237. package/dist/src/theme/icon.js.map +1 -0
  238. package/dist/src/theme/index.d.ts +2 -0
  239. package/dist/src/theme/index.js +26 -0
  240. package/dist/src/theme/index.js.map +1 -0
  241. package/dist/src/theme/margin.d.ts +2 -0
  242. package/dist/src/theme/margin.js +11 -0
  243. package/dist/src/theme/margin.js.map +1 -0
  244. package/dist/src/theme/padding.d.ts +2 -0
  245. package/dist/src/theme/padding.js +11 -0
  246. package/dist/src/theme/padding.js.map +1 -0
  247. package/dist/src/theme/rounded.d.ts +2 -0
  248. package/dist/src/theme/rounded.js +11 -0
  249. package/dist/src/theme/rounded.js.map +1 -0
  250. package/dist/src/theme/spacing.d.ts +2 -0
  251. package/dist/src/theme/spacing.js +11 -0
  252. package/dist/src/theme/spacing.js.map +1 -0
  253. package/dist/src/theme/types.d.ts +45 -0
  254. package/dist/src/theme/types.js +3 -0
  255. package/dist/src/theme/types.js.map +1 -0
  256. package/dist/src/utils/StreamVideoRN.d.ts +25 -0
  257. package/dist/src/utils/StreamVideoRN.js +23 -0
  258. package/dist/src/utils/StreamVideoRN.js.map +1 -0
  259. package/dist/src/utils/hooks/index.d.ts +3 -0
  260. package/dist/src/utils/hooks/index.js +20 -0
  261. package/dist/src/utils/hooks/index.js.map +1 -0
  262. package/dist/src/utils/hooks/useAppStateListener.d.ts +1 -0
  263. package/dist/src/utils/hooks/useAppStateListener.js +41 -0
  264. package/dist/src/utils/hooks/useAppStateListener.js.map +1 -0
  265. package/dist/src/utils/hooks/useDebouncedValue.d.ts +7 -0
  266. package/dist/src/utils/hooks/useDebouncedValue.js +22 -0
  267. package/dist/src/utils/hooks/useDebouncedValue.js.map +1 -0
  268. package/dist/src/utils/hooks/usePrevious.d.ts +1 -0
  269. package/dist/src/utils/hooks/usePrevious.js +13 -0
  270. package/dist/src/utils/hooks/usePrevious.js.map +1 -0
  271. package/dist/src/utils/index.d.ts +5 -0
  272. package/dist/src/utils/index.js +53 -0
  273. package/dist/src/utils/index.js.map +1 -0
  274. package/dist/src/utils/verifyAndroidBluetoothPermissions.d.ts +1 -0
  275. package/dist/src/utils/verifyAndroidBluetoothPermissions.js +30 -0
  276. package/dist/src/utils/verifyAndroidBluetoothPermissions.js.map +1 -0
  277. package/index.ts +22 -0
  278. package/package.json +70 -0
  279. package/src/components/ActiveCall.tsx +122 -0
  280. package/src/components/Avatar.tsx +88 -0
  281. package/src/components/CallControlsButton.tsx +72 -0
  282. package/src/components/CallControlsView.tsx +128 -0
  283. package/src/components/CallParticipantsBadge.tsx +57 -0
  284. package/src/components/CallParticipantsInfoView.tsx +287 -0
  285. package/src/components/CallParticipantsList.tsx +172 -0
  286. package/src/components/CallParticipantsOptions.tsx +248 -0
  287. package/src/components/CallParticipantsSpotlightView.tsx +53 -0
  288. package/src/components/CallParticipantsView.tsx +30 -0
  289. package/src/components/IncomingCallView.tsx +133 -0
  290. package/src/components/LobbyView.tsx +236 -0
  291. package/src/components/LocalVideoView.tsx +141 -0
  292. package/src/components/NetworkQualityIndicator.tsx +72 -0
  293. package/src/components/OutgoingCallView.tsx +133 -0
  294. package/src/components/ParticipantReaction.tsx +59 -0
  295. package/src/components/ParticipantView.tsx +315 -0
  296. package/src/components/ReactionsModal.tsx +90 -0
  297. package/src/components/ToggleAudioButton.tsx +103 -0
  298. package/src/components/ToggleVideoButton.tsx +103 -0
  299. package/src/components/UserInfoView.tsx +118 -0
  300. package/src/components/VideoRenderer.tsx +85 -0
  301. package/src/components/index.ts +12 -0
  302. package/src/constants/A11yLabels.ts +24 -0
  303. package/src/constants/index.ts +28 -0
  304. package/src/contexts/StreamVideoContext/createStoreContext.tsx +117 -0
  305. package/src/contexts/StreamVideoContext/index.tsx +37 -0
  306. package/src/contexts/index.ts +1 -0
  307. package/src/hooks/index.ts +10 -0
  308. package/src/hooks/useCallControls.tsx +186 -0
  309. package/src/hooks/useCallCycleEffect.tsx +68 -0
  310. package/src/hooks/useCallKeep.tsx +51 -0
  311. package/src/hooks/useCreateStreamVideoClient.tsx +77 -0
  312. package/src/hooks/useIncallManager.tsx +23 -0
  313. package/src/hooks/useLocalVideoStream.ts +36 -0
  314. package/src/hooks/useMutingState.ts +24 -0
  315. package/src/hooks/usePermissionNotification.tsx +53 -0
  316. package/src/hooks/usePermissionRequest.tsx +67 -0
  317. package/src/hooks/usePublishMediaStreams.ts +59 -0
  318. package/src/icons/ArrowRight.tsx +16 -0
  319. package/src/icons/CameraSwitch.tsx +14 -0
  320. package/src/icons/Chat.tsx +14 -0
  321. package/src/icons/Cross.tsx +14 -0
  322. package/src/icons/Mic.tsx +18 -0
  323. package/src/icons/MicOff.tsx +14 -0
  324. package/src/icons/Participants.tsx +16 -0
  325. package/src/icons/Phone.tsx +14 -0
  326. package/src/icons/PhoneDown.tsx +15 -0
  327. package/src/icons/Pin.tsx +16 -0
  328. package/src/icons/Reaction.tsx +14 -0
  329. package/src/icons/ScreenShare.tsx +32 -0
  330. package/src/icons/Settings.tsx +13 -0
  331. package/src/icons/Spotlight.tsx +16 -0
  332. package/src/icons/ThreeDots.tsx +13 -0
  333. package/src/icons/Video.tsx +14 -0
  334. package/src/icons/VideoDisabled.tsx +22 -0
  335. package/src/icons/VideoOff.tsx +20 -0
  336. package/src/icons/VideoSlash.tsx +15 -0
  337. package/src/icons/index.tsx +19 -0
  338. package/src/providers/MediaDevices.tsx +45 -0
  339. package/src/providers/StreamCall.tsx +136 -0
  340. package/src/providers/StreamVideo.tsx +50 -0
  341. package/src/providers/index.ts +2 -0
  342. package/src/theme/avatar.ts +9 -0
  343. package/src/theme/button.ts +9 -0
  344. package/src/theme/colors.ts +49 -0
  345. package/src/theme/constants.ts +51 -0
  346. package/src/theme/fonts.ts +65 -0
  347. package/src/theme/icon.ts +9 -0
  348. package/src/theme/index.ts +25 -0
  349. package/src/theme/margin.ts +9 -0
  350. package/src/theme/padding.ts +9 -0
  351. package/src/theme/rounded.ts +9 -0
  352. package/src/theme/spacing.ts +9 -0
  353. package/src/theme/types.ts +64 -0
  354. package/src/utils/StreamVideoRN.ts +35 -0
  355. package/src/utils/hooks/index.ts +3 -0
  356. package/src/utils/hooks/useAppStateListener.ts +48 -0
  357. package/src/utils/hooks/useDebouncedValue.ts +21 -0
  358. package/src/utils/hooks/usePrevious.ts +11 -0
  359. package/src/utils/index.ts +45 -0
  360. package/src/utils/verifyAndroidBluetoothPermissions.ts +31 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ToggleAudioButton.js","sourceRoot":"","sources":["../../../src/components/ToggleAudioButton.tsx"],"names":[],"mappings":";;;AAAA,0DAAoE;AACpE,0EAIyC;AACzC,6DAA0D;AAC1D,oCAAsE;AACtE,oCAAiC;AACjC,oCAAuC;AACvC,+CAAiD;AACjD,oCAA2C;AAC3C,iCAAyD;AAElD,MAAM,iBAAiB,GAAG,GAAG,EAAE;IACpC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CAAC"}
@@ -0,0 +1 @@
1
+ export declare const ToggleVideoButton: () => JSX.Element;
@@ -0,0 +1,78 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ToggleVideoButton = void 0;
4
+ const video_client_1 = require("@stream-io/video-client");
5
+ const video_react_bindings_1 = require("@stream-io/video-react-bindings");
6
+ const CallControlsButton_1 = require("./CallControlsButton");
7
+ const utils_1 = require("../utils");
8
+ const react_native_1 = require("react-native");
9
+ const theme_1 = require("../theme");
10
+ const icons_1 = require("../icons");
11
+ const hooks_1 = require("../hooks");
12
+ const react_1 = require("react");
13
+ const ToggleVideoButton = () => {
14
+ const [isAwaitingApproval, setIsAwaitingApproval] = (0, react_1.useState)(false);
15
+ const { toggleVideoMuted, isVideoPublished } = (0, hooks_1.useCallControls)();
16
+ const isVideoMuted = !isVideoPublished;
17
+ const userHasSendVideoCapability = (0, video_react_bindings_1.useHasPermissions)(video_client_1.OwnCapability.SEND_VIDEO);
18
+ const call = (0, video_react_bindings_1.useCall)();
19
+ (0, react_1.useEffect)(() => {
20
+ if (userHasSendVideoCapability) {
21
+ setIsAwaitingApproval(false);
22
+ }
23
+ }, [userHasSendVideoCapability]);
24
+ const handleRequestPermission = (0, react_1.useCallback)(async (permission) => {
25
+ if (!call?.permissionsContext.canRequest(permission)) {
26
+ return;
27
+ }
28
+ setIsAwaitingApproval(true);
29
+ try {
30
+ await call.requestPermissions({ permissions: [permission] });
31
+ }
32
+ catch (error) {
33
+ if (error instanceof video_client_1.AxiosError) {
34
+ console.log('RequestPermissions failed', error.response?.data.message);
35
+ }
36
+ }
37
+ }, [call]);
38
+ (0, hooks_1.usePermissionNotification)({
39
+ permission: video_client_1.OwnCapability.SEND_VIDEO,
40
+ messageApproved: 'You can now share your video.',
41
+ messageRevoked: 'You can no longer share your video.',
42
+ });
43
+ const handleToggleVideoButton = async () => {
44
+ if (userHasSendVideoCapability) {
45
+ await toggleVideoMuted();
46
+ return;
47
+ }
48
+ if (!isAwaitingApproval) {
49
+ await handleRequestPermission(video_client_1.OwnCapability.SEND_VIDEO);
50
+ }
51
+ else {
52
+ react_native_1.Alert.alert('Awaiting for an approval to share your video.');
53
+ }
54
+ };
55
+ return (<video_react_bindings_1.Restricted requiredGrants={[video_client_1.OwnCapability.SEND_VIDEO]}>
56
+ <CallControlsButton_1.CallControlsButton onPress={handleToggleVideoButton} color={(0, utils_1.muteStatusColor)(isVideoMuted)} style={!isVideoMuted ? styles.button : null}>
57
+ {isVideoMuted ? (<icons_1.VideoSlash color={theme_1.theme.light.static_white}/>) : (<icons_1.Video color={theme_1.theme.light.static_black}/>)}
58
+ </CallControlsButton_1.CallControlsButton>
59
+ </video_react_bindings_1.Restricted>);
60
+ };
61
+ exports.ToggleVideoButton = ToggleVideoButton;
62
+ const styles = react_native_1.StyleSheet.create({
63
+ button: {
64
+ // For iOS
65
+ shadowOffset: {
66
+ width: 0,
67
+ height: 6,
68
+ },
69
+ shadowOpacity: 0.37,
70
+ shadowRadius: 7.49,
71
+ // For android
72
+ elevation: 6,
73
+ },
74
+ svgContainerStyle: {
75
+ paddingTop: theme_1.theme.padding.xs,
76
+ },
77
+ });
78
+ //# sourceMappingURL=ToggleVideoButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ToggleVideoButton.js","sourceRoot":"","sources":["../../../src/components/ToggleVideoButton.tsx"],"names":[],"mappings":";;;AAAA,0DAAoE;AACpE,0EAIyC;AACzC,6DAA0D;AAC1D,oCAA2C;AAC3C,+CAAiD;AACjD,oCAAiC;AACjC,oCAA6C;AAC7C,oCAAsE;AACtE,iCAAyD;AAElD,MAAM,iBAAiB,GAAG,GAAG,EAAE;IACpC,MAAM,CAAC,kBAAkB,EAAE,qBAAqB,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IACpE,MAAM,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,GAAG,IAAA,uBAAe,GAAE,CAAC;IAEjE,MAAM,YAAY,GAAG,C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CAA+C,CAAC,CAAC;SAC9D;IACH,CAAC,CAAC;IAEF,OAAO,CACL,CAAC,iCAAU,CAAC,cAAc,CAAC,CAAC,CAAC,4BAAa,CAAC,UAAU,CAAC,CAAC,CACrD;MAAA,CAAC,uCAAkB,CACjB,OAAO,CAAC,CAAC,uBAAuB,CAAC,CACjC,KAAK,CAAC,CAAC,IAAA,uBAAe,EAAC,YAAY,CAAC,CAAC,CACrC,KAAK,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAE5C;QAAA,CAAC,YAAY,CAAC,CAAC,CAAC,CACd,CAAC,kBAAU,CAAC,KAAK,CAAC,CAAC,aAAK,CAAC,KAAK,CAAC,YAAY,CAAC,EAAG,CAChD,CAAC,CAAC,CAAC,CACF,CAAC,aAAK,CAAC,KAAK,CAAC,CAAC,aAAK,CAAC,KAAK,CAAC,YAAY,CAAC,EAAG,CAC3C,CACH;MAAA,EAAE,uCAAkB,CACtB;IAAA,EAAE,iCAAU,CAAC,CACd,CAAC;AACJ,CAAC,CAAC;AAtEW,QAAA,iBAAiB,qBAsE5B;AAEF,MAAM,MAAM,GAAG,yBAAU,CAAC,MAAM,CAAC;IAC/B,MAAM,EAAE;QACN,UAAU;QACV,YAAY,EAAE;YACZ,KAAK,EAAE,CAAC;YACR,MAAM,EAAE,CAAC;SACV;QACD,aAAa,EAAE,IAAI;QACnB,YAAY,EAAE,IAAI;QAElB,cAAc;QACd,SAAS,EAAE,CAAC;KACb;IACD,iBAAiB,EAAE;QACjB,UAAU,EAAE,aAAK,CAAC,OAAO,CAAC,EAAE;KAC7B;CACF,CAAC,CAAC"}
@@ -0,0 +1,13 @@
1
+ export type UserInfoViewType = {
2
+ /**
3
+ * Whether to include the current user in the list of members to show.
4
+ * @default false.
5
+ */
6
+ includeSelf?: boolean;
7
+ /**
8
+ * The maximum number of members to show.
9
+ * @default 3.
10
+ */
11
+ totalMembersToShow?: number;
12
+ };
13
+ export declare const UserInfoView: ({ includeSelf, totalMembersToShow, }: UserInfoViewType) => JSX.Element;
@@ -0,0 +1,82 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.UserInfoView = void 0;
7
+ const react_1 = __importDefault(require("react"));
8
+ const react_native_1 = require("react-native");
9
+ const utils_1 = require("../utils");
10
+ const video_react_bindings_1 = require("@stream-io/video-react-bindings");
11
+ const theme_1 = require("../theme");
12
+ var AvatarModes;
13
+ (function (AvatarModes) {
14
+ AvatarModes["small"] = "sm";
15
+ AvatarModes["medium"] = "md";
16
+ AvatarModes["large"] = "lg";
17
+ })(AvatarModes || (AvatarModes = {}));
18
+ const UserInfoView = ({ includeSelf = false, totalMembersToShow = 3, }) => {
19
+ const connectedUser = (0, video_react_bindings_1.useConnectedUser)();
20
+ const members = (0, video_react_bindings_1.useCallMembers)();
21
+ // take the first N members to show their avatars
22
+ const membersToShow = (members || [])
23
+ .slice(0, totalMembersToShow)
24
+ .map(({ user }) => user)
25
+ .filter((user) => user.id !== connectedUser?.id ?? includeSelf);
26
+ if (includeSelf &&
27
+ !membersToShow.find((user) => user.id === connectedUser?.id)) {
28
+ // if the current user is not in the initial batch of members,
29
+ // add it to the beginning of the list
30
+ const self = members.find(({ user }) => user.id === connectedUser?.id);
31
+ if (self) {
32
+ membersToShow.splice(0, 1, self.user);
33
+ }
34
+ }
35
+ const memberUserIds = membersToShow.map((memberToShow) => memberToShow.name ?? memberToShow.id);
36
+ const callTitle = (0, utils_1.generateCallTitle)(memberUserIds, totalMembersToShow);
37
+ const avatarSizeModes = {
38
+ 1: AvatarModes.large,
39
+ 2: AvatarModes.medium,
40
+ 3: AvatarModes.small,
41
+ };
42
+ const mode = avatarSizeModes[memberUserIds.length] || AvatarModes.small;
43
+ const avatarStyles = {
44
+ height: theme_1.theme.avatar[mode],
45
+ width: theme_1.theme.avatar[mode],
46
+ borderRadius: theme_1.theme.avatar[mode] / 2,
47
+ };
48
+ const fontStyleByMembersCount = memberUserIds.length > 1 ? theme_1.theme.fonts.heading5 : theme_1.theme.fonts.heading4;
49
+ return (<react_native_1.View style={styles.userInfo}>
50
+ <react_native_1.View style={styles.avatarGroup}>
51
+ {membersToShow.map((memberToShow) => {
52
+ return (<react_native_1.Image key={memberToShow.id} style={[avatarStyles]}
53
+ // FIXME: use real avatar from coordinator this is temporary
54
+ source={{
55
+ uri: memberToShow.image,
56
+ }}/>);
57
+ })}
58
+ </react_native_1.View>
59
+ <react_native_1.Text style={[styles.name, fontStyleByMembersCount]}>{callTitle}</react_native_1.Text>
60
+ </react_native_1.View>);
61
+ };
62
+ exports.UserInfoView = UserInfoView;
63
+ const styles = react_native_1.StyleSheet.create({
64
+ userInfo: {
65
+ paddingHorizontal: react_native_1.Platform.OS === 'android' ? theme_1.theme.padding.xl * 4 : theme_1.theme.padding.xl * 2,
66
+ display: 'flex',
67
+ flexDirection: 'column',
68
+ justifyContent: 'space-between',
69
+ },
70
+ avatarGroup: {
71
+ display: 'flex',
72
+ flexDirection: 'row',
73
+ justifyContent: 'space-evenly',
74
+ flexWrap: 'wrap',
75
+ },
76
+ name: {
77
+ color: theme_1.theme.light.static_white,
78
+ textAlign: 'center',
79
+ marginTop: theme_1.theme.margin.xl,
80
+ },
81
+ });
82
+ //# sourceMappingURL=UserInfoView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UserInfoView.js","sourceRoot":"","sources":["../../../src/components/UserInfoView.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,+CAAuE;AACvE,oCAA6C;AAC7C,0EAGyC;AAEzC,oCAAiC;AAEjC,IAAK,WAIJ;AAJD,WAAK,WAAW;IACd,2BAAY,CAAA;IACZ,4BAAa,CAAA;IACb,2BAAY,CAAA;AACd,CAAC,EAJI,WAAW,KAAX,WAAW,QAIf;AAgBM,MAAM,YA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AAM,MAAM,GAAG,yBAAU,CAAC,MAAM,CAAC;IAC/B,QAAQ,EAAE;QACR,iBAAiB,EACf,uBAAQ,CAAC,EAAE,KAAK,SAAS,CAAC,CAAC,CAAC,aAAK,CAAC,OAAO,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,aAAK,CAAC,OAAO,CAAC,EAAE,GAAG,CAAC;QACzE,OAAO,EAAE,MAAM;QACf,aAAa,EAAE,QAAQ;QACvB,cAAc,EAAE,eAAe;KAChC;IACD,WAAW,EAAE;QACX,OAAO,EAAE,MAAM;QACf,aAAa,EAAE,KAAK;QACpB,cAAc,EAAE,cAAc;QAC9B,QAAQ,EAAE,MAAM;KACjB;IACD,IAAI,EAAE;QACJ,KAAK,EAAE,aAAK,CAAC,KAAK,CAAC,YAAY;QAC/B,SAAS,EAAE,QAAQ;QACnB,SAAS,EAAE,aAAK,CAAC,MAAM,CAAC,EAAE;KAC3B;CACF,CAAC,CAAC"}
@@ -0,0 +1,65 @@
1
+ import { StyleProp, ViewStyle } from 'react-native';
2
+ import { MediaStream } from 'react-native-webrtc';
3
+ /**
4
+ * Props to be passed for the VideoRenderer component.
5
+ */
6
+ export interface VideoRendererProps {
7
+ /**
8
+ * The stream that should be rendered.
9
+ */
10
+ mediaStream: MediaStream;
11
+ /**
12
+ * Indicates whether the video should be
13
+ * mirrored during rendering. Commonly, applications choose to mirror the
14
+ * user-facing camera.
15
+ *
16
+ * @defaultValue
17
+ * The default is `false`
18
+ */
19
+ mirror?: boolean;
20
+ /**
21
+ * Similarly to the CSS property z-index, specifies the z-order of this
22
+ * `RTCView` in the stacking space of all `RTCView`s. When `RTCView`s overlap,
23
+ * `zOrder` determines which one covers the other. An `RTCView` with a larger
24
+ * `zOrder` generally covers an RTCView with a lower one.
25
+ *
26
+ * Non-overlapping `RTCView`s may safely share a z-order (because one does not
27
+ * have to cover the other).
28
+ *
29
+ * The support for `zOrder` is platform-dependent and/or
30
+ * implementation-specific. Thus, specifying a value for `zOrder` is to be
31
+ * thought of as giving a hint rather than as imposing a requirement. For
32
+ * example, video renderers such as `RTCView` are commonly implemented using
33
+ * OpenGL and OpenGL views may have different numbers of layers in their
34
+ * stacking space. android has three: a layer bellow the window (aka
35
+ * default), a layer bellow the window again but above the previous layer
36
+ * (aka media overlay), and above the window. Consequently, it is advisable
37
+ * to limit the number of utilized layers in the stacking space to the
38
+ * minimum sufficient for the desired display. For example, a video call
39
+ * application usually needs a maximum of two `zOrder` values: 0 for the
40
+ * remote one or more videos which appear in the background, and 1 for the local
41
+ * one or more videos which appear above the remote one or more videos.
42
+ */
43
+ zOrder?: number;
44
+ /**
45
+ * In the fashion of
46
+ * https://www.w3.org/TR/html5/embedded-content-0.html#dom-video-videowidth
47
+ * and https://www.w3.org/TR/html5/rendering.html#video-object-fit,
48
+ * resembles the CSS style object-fit.
49
+ *
50
+ * @defaultValue
51
+ * The default is `cover`
52
+ */
53
+ objectFit?: 'contain' | 'cover';
54
+ /**
55
+ * Style to override the default style of the `RTCView`.
56
+ * @defaultValue
57
+ * The default is `{ flex: 1 }`
58
+ */
59
+ style?: StyleProp<ViewStyle>;
60
+ }
61
+ /**
62
+ * Lower level component, that represents only the video part (wrapper around the WebRTC)
63
+ * //Todo: SG: add photo's with all states
64
+ */
65
+ export declare const VideoRenderer: (props: VideoRendererProps) => JSX.Element;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.VideoRenderer = void 0;
7
+ const react_1 = __importDefault(require("react"));
8
+ const react_native_webrtc_1 = require("react-native-webrtc");
9
+ /**
10
+ * Lower level component, that represents only the video part (wrapper around the WebRTC)
11
+ * //Todo: SG: add photo's with all states
12
+ */
13
+ const VideoRenderer = (props) => {
14
+ const { mediaStream, mirror = false, style = { flex: 1 }, zOrder = undefined, objectFit = 'cover', } = props;
15
+ return (<react_native_webrtc_1.RTCView streamURL={mediaStream?.toURL()} mirror={mirror} style={style} objectFit={objectFit} zOrder={zOrder}/>);
16
+ };
17
+ exports.VideoRenderer = VideoRenderer;
18
+ //# sourceMappingURL=VideoRenderer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VideoRenderer.js","sourceRoot":"","sources":["../../../src/components/VideoRenderer.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B,6DAA2D;AA6D3D;;;GAGG;AACI,MAAM,aAAa,GAAG,CAAC,KAAyB,EAAE,EAAE;IACzD,MAAM,EACJ,WAAW,EACX,MAAM,GAAG,KAAK,EACd,KAAK,GAAG,EAAE,IAAI,EAAE,CAAC,EAAE,EACnB,MAAM,GAAG,SAAS,EAClB,SAAS,GAAG,OAAO,GACpB,GAAG,KAAK,CAAC;IACV,OAAO,CACL,CAAC,6BAAO,CACN,SAAS,CAAC,CAAC,WAAW,EAAE,KAAK,EAAE,CAAC,CAChC,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,SAAS,CAAC,CAAC,SAAS,CAAC,CACrB,MAAM,CAAC,CAAC,MAAM,CAAC,EACf,CACH,CAAC;AACJ,CAAC,CAAC;AAjBW,QAAA,aAAa,iBAiBxB"}
@@ -0,0 +1,12 @@
1
+ export * from './ActiveCall';
2
+ export * from './IncomingCallView';
3
+ export * from './OutgoingCallView';
4
+ export * from './Avatar';
5
+ export * from './VideoRenderer';
6
+ export * from './LocalVideoView';
7
+ export * from './ParticipantView';
8
+ export * from './CallParticipantsView';
9
+ export * from './CallControlsView';
10
+ export * from './CallParticipantsInfoView';
11
+ export * from './LobbyView';
12
+ export * from './ReactionsModal';
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./ActiveCall"), exports);
18
+ __exportStar(require("./IncomingCallView"), exports);
19
+ __exportStar(require("./OutgoingCallView"), exports);
20
+ __exportStar(require("./Avatar"), exports);
21
+ __exportStar(require("./VideoRenderer"), exports);
22
+ __exportStar(require("./LocalVideoView"), exports);
23
+ __exportStar(require("./ParticipantView"), exports);
24
+ __exportStar(require("./CallParticipantsView"), exports);
25
+ __exportStar(require("./CallControlsView"), exports);
26
+ __exportStar(require("./CallParticipantsInfoView"), exports);
27
+ __exportStar(require("./LobbyView"), exports);
28
+ __exportStar(require("./ReactionsModal"), exports);
29
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,qDAAmC;AACnC,qDAAmC;AACnC,2CAAyB;AACzB,kDAAgC;AAChC,mDAAiC;AACjC,oDAAkC;AAClC,yDAAuC;AACvC,qDAAmC;AACnC,6DAA2C;AAC3C,8CAA4B;AAC5B,mDAAiC"}
@@ -0,0 +1,20 @@
1
+ export declare enum A11yIcons {
2
+ MUTED_VIDEO = "muted-video-icon",
3
+ HANG_UP_CALL = "hang-up-call-icon",
4
+ SCREEN_SHARE = "screen-share-icon"
5
+ }
6
+ export declare enum A11yComponents {
7
+ PARTICIPANT_AVATAR = "participant-avatar",
8
+ CALL_PARTICIPANTS_LIST = "call-participants-list",
9
+ LOCAL_PARTICIPANT = "local-participant",
10
+ PARTICIPANT_MEDIA_STREAM = "participant-media-stream"
11
+ }
12
+ export declare enum A11yButtons {
13
+ PARTICIPANTS_INFO = "participants-info-button"
14
+ }
15
+ export declare enum A11yValues {
16
+ PARTICIPANTS_IS_SPEAKING = "participant-is-speaking"
17
+ }
18
+ export declare enum A11yImages {
19
+ AVATAR = "avatar-image"
20
+ }
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.A11yImages = exports.A11yValues = exports.A11yButtons = exports.A11yComponents = exports.A11yIcons = void 0;
4
+ var A11yIcons;
5
+ (function (A11yIcons) {
6
+ A11yIcons["MUTED_VIDEO"] = "muted-video-icon";
7
+ A11yIcons["HANG_UP_CALL"] = "hang-up-call-icon";
8
+ A11yIcons["SCREEN_SHARE"] = "screen-share-icon";
9
+ })(A11yIcons = exports.A11yIcons || (exports.A11yIcons = {}));
10
+ var A11yComponents;
11
+ (function (A11yComponents) {
12
+ A11yComponents["PARTICIPANT_AVATAR"] = "participant-avatar";
13
+ A11yComponents["CALL_PARTICIPANTS_LIST"] = "call-participants-list";
14
+ A11yComponents["LOCAL_PARTICIPANT"] = "local-participant";
15
+ A11yComponents["PARTICIPANT_MEDIA_STREAM"] = "participant-media-stream";
16
+ })(A11yComponents = exports.A11yComponents || (exports.A11yComponents = {}));
17
+ var A11yButtons;
18
+ (function (A11yButtons) {
19
+ A11yButtons["PARTICIPANTS_INFO"] = "participants-info-button";
20
+ })(A11yButtons = exports.A11yButtons || (exports.A11yButtons = {}));
21
+ var A11yValues;
22
+ (function (A11yValues) {
23
+ A11yValues["PARTICIPANTS_IS_SPEAKING"] = "participant-is-speaking";
24
+ })(A11yValues = exports.A11yValues || (exports.A11yValues = {}));
25
+ var A11yImages;
26
+ (function (A11yImages) {
27
+ A11yImages["AVATAR"] = "avatar-image";
28
+ })(A11yImages = exports.A11yImages || (exports.A11yImages = {}));
29
+ //# sourceMappingURL=A11yLabels.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"A11yLabels.js","sourceRoot":"","sources":["../../../src/constants/A11yLabels.ts"],"names":[],"mappings":";;;AAAA,IAAY,SAIX;AAJD,WAAY,SAAS;IACnB,6CAAgC,CAAA;IAChC,+CAAkC,CAAA;IAClC,+CAAkC,CAAA;AACpC,CAAC,EAJW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAIpB;AAED,IAAY,cAKX;AALD,WAAY,cAAc;IACxB,2DAAyC,CAAA;IACzC,mEAAiD,CAAA;IACjD,yDAAuC,CAAA;IACvC,uEAAqD,CAAA;AACvD,CAAC,EALW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAKzB;AAED,IAAY,WAEX;AAFD,WAAY,WAAW;IACrB,6DAA8C,CAAA;AAChD,CAAC,EAFW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAEtB;AAED,IAAY,UAEX;AAFD,WAAY,UAAU;IACpB,kEAAoD,CAAA;AACtD,CAAC,EAFW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAErB;AAED,IAAY,UAEX;AAFD,WAAY,UAAU;IACpB,qCAAuB,CAAA;AACzB,CAAC,EAFW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAErB"}
@@ -0,0 +1,11 @@
1
+ export declare const LOCAL_VIDEO_VIEW_STYLE: {
2
+ height: number;
3
+ width: number;
4
+ borderRadius: number;
5
+ };
6
+ export declare const defaultEmojiReactions: {
7
+ type: string;
8
+ emoji_code: string;
9
+ custom: {};
10
+ icon: string;
11
+ }[];
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.defaultEmojiReactions = exports.LOCAL_VIDEO_VIEW_STYLE = void 0;
4
+ const theme_1 = require("../theme");
5
+ exports.LOCAL_VIDEO_VIEW_STYLE = {
6
+ height: 140,
7
+ width: 80,
8
+ borderRadius: theme_1.theme.rounded.sm,
9
+ };
10
+ exports.defaultEmojiReactions = [
11
+ {
12
+ type: 'reaction',
13
+ emoji_code: ':like:',
14
+ custom: {},
15
+ icon: '👍',
16
+ },
17
+ {
18
+ type: 'raised-hand',
19
+ emoji_code: ':raise-hand:',
20
+ custom: {},
21
+ icon: '✋',
22
+ },
23
+ {
24
+ type: 'reaction',
25
+ emoji_code: ':fireworks:',
26
+ custom: {},
27
+ icon: '🎉',
28
+ },
29
+ ];
30
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/constants/index.ts"],"names":[],"mappings":";;;AAAA,oCAAiC;AAEpB,QAAA,sBAAsB,GAAG;IACpC,MAAM,EAAE,GAAG;IACX,KAAK,EAAE,EAAE;IACT,YAAY,EAAE,aAAK,CAAC,OAAO,CAAC,EAAE;CAC/B,CAAC;AAEW,QAAA,qBAAqB,GAAG;IACnC;QACE,IAAI,EAAE,UAAU;QAChB,UAAU,EAAE,QAAQ;QACpB,MAAM,EAAE,EAAE;QACV,IAAI,EAAE,IAAI;KACX;IACD;QACE,IAAI,EAAE,aAAa;QACnB,UAAU,EAAE,cAAc;QAC1B,MAAM,EAAE,EAAE;QACV,IAAI,EAAE,GAAG;KACV;IACD;QACE,IAAI,EAAE,UAAU;QAChB,UAAU,EAAE,aAAa;QACzB,MAAM,EAAE,EAAE;QACV,IAAI,EAAE,IAAI;KACX;CACF,CAAC"}
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ export default function createStoreContext<PassedStoreType extends object>(initialState: PassedStoreType): {
3
+ Provider: (props: React.PropsWithChildren<{}>) => JSX.Element;
4
+ useStoreValue: <SelectorOutput extends (PassedStoreType & {
5
+ isStoreInitialized: boolean;
6
+ })[keyof PassedStoreType | "isStoreInitialized"]>(selector: (store: PassedStoreType & {
7
+ isStoreInitialized: boolean;
8
+ }) => SelectorOutput) => SelectorOutput;
9
+ useStoreSetState: () => (partialStateOrFunc: Partial<PassedStoreType & {
10
+ isStoreInitialized: boolean;
11
+ }> | ((prevState: PassedStoreType & {
12
+ isStoreInitialized: boolean;
13
+ }) => Partial<PassedStoreType>)) => void;
14
+ };
@@ -0,0 +1,100 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ const react_1 = __importStar(require("react"));
27
+ function createStoreContext(initialState) {
28
+ function useStoreData() {
29
+ const storeRef = (0, react_1.useRef)({
30
+ ...initialState,
31
+ isStoreInitialized: false,
32
+ });
33
+ const getSnapshot = (0, react_1.useRef)(() => storeRef.current).current;
34
+ const subscribersRef = (0, react_1.useRef)([]);
35
+ const setState = (0, react_1.useRef)((partialStateOrFunc) => {
36
+ if (typeof partialStateOrFunc === 'function') {
37
+ const value = partialStateOrFunc(storeRef.current);
38
+ storeRef.current = {
39
+ ...storeRef.current,
40
+ ...value,
41
+ };
42
+ }
43
+ else {
44
+ storeRef.current = { ...storeRef.current, ...partialStateOrFunc };
45
+ }
46
+ subscribersRef.current.forEach((callback) => callback());
47
+ }).current;
48
+ const subscribe = (0, react_1.useRef)((callback) => {
49
+ subscribersRef.current.push(callback);
50
+ return () => subscribersRef.current.filter((cb) => cb !== callback);
51
+ }).current;
52
+ return {
53
+ getSnapshot,
54
+ setState,
55
+ subscribe,
56
+ };
57
+ }
58
+ const StoreContext = (0, react_1.createContext)(null);
59
+ function Provider(props) {
60
+ const value = useStoreData();
61
+ return (<StoreContext.Provider value={value}>
62
+ {props.children}
63
+ </StoreContext.Provider>);
64
+ }
65
+ /**
66
+ * @param selector
67
+ * @returns
68
+ *
69
+ * @category Client State
70
+ */
71
+ function useStoreValue(selector) {
72
+ const store = (0, react_1.useContext)(StoreContext);
73
+ if (!store) {
74
+ throw new Error('Store not found');
75
+ }
76
+ const [state, setState] = (0, react_1.useState)(selector(store.getSnapshot()));
77
+ (0, react_1.useEffect)(() => store.subscribe(() => setState(selector(store.getSnapshot()))), [selector, store]);
78
+ return state;
79
+ }
80
+ /**
81
+ *
82
+ * @returns
83
+ *
84
+ * @category Client State
85
+ */
86
+ function useStoreSetState() {
87
+ const store = (0, react_1.useContext)(StoreContext);
88
+ if (!store) {
89
+ throw new Error('Store not found');
90
+ }
91
+ return store.setState;
92
+ }
93
+ return {
94
+ Provider,
95
+ useStoreValue,
96
+ useStoreSetState,
97
+ };
98
+ }
99
+ exports.default = createStoreContext;
100
+ //# sourceMappingURL=createStoreContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createStoreContext.js","sourceRoot":"","sources":["../../../../src/contexts/StreamVideoContext/createStoreContext.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAMe;AAEf,SAAwB,kBAAkB,CACxC,YAA6B;IAa7B,SAAS,YAAY;QAKnB,MAAM,QAAQ,GAAG,IAAA,cAAM,EAAY;YACjC,GAAG,YAAY;YACf,kBAAkB,EAAE,KAAK;SAC1B,CAAC,CAAC;QAEH,MAAM,WAAW,GAAG,IAAA,cAAM,EAAC,GAAG,EA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QAAA,CAAC,KAAK,CAAC,QAAQ,CACjB;MAAA,EAAE,YAAY,CAAC,QAAQ,CAAC,CACzB,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACH,SAAS,aAAa,CACpB,QAA8C;QAE9C,MAAM,KAAK,GAAG,IAAA,kBAAU,EAAC,YAAY,CAAC,CAAC;QACvC,IAAI,CAAC,KAAK,EAAE;YACV,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;SACpC;QAED,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,IAAA,gBAAQ,EAAC,QAAQ,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;QAClE,IAAA,iBAAS,EACP,GAAG,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,EACpE,CAAC,QAAQ,EAAE,KAAK,CAAC,CAClB,CAAC;QAEF,OAAO,KAAK,CAAC;IACf,CAAC;IAED;;;;;OAKG;IACH,SAAS,gBAAgB;QACvB,MAAM,KAAK,GAAG,IAAA,kBAAU,EAAC,YAAY,CAAC,CAAC;QACvC,IAAI,CAAC,KAAK,EAAE;YACV,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;SACpC;QACD,OAAO,KAAK,CAAC,QAAQ,CAAC;IACxB,CAAC;IAED,OAAO;QACL,QAAQ;QACR,aAAa;QACb,gBAAgB;KACjB,CAAC;AACJ,CAAC;AA5GD,qCA4GC"}
@@ -0,0 +1,30 @@
1
+ /// <reference types="react" />
2
+ export type MediaDeviceInfo = {
3
+ deviceId: string;
4
+ facing?: 'environment' | 'front';
5
+ groupId: string;
6
+ kind: 'videoinput' | 'audioinput';
7
+ label: string;
8
+ };
9
+ /**
10
+ * Exclude types from documentation site, but we should still add doc comments
11
+ * @internal
12
+ */
13
+ export interface SDKStreamVideoStore {
14
+ isCameraOnFrontFacingMode: boolean;
15
+ isVideoMuted: boolean;
16
+ isAudioMuted: boolean;
17
+ currentAudioDevice?: MediaDeviceInfo;
18
+ currentVideoDevice?: MediaDeviceInfo;
19
+ audioDevices: MediaDeviceInfo[];
20
+ videoDevices: MediaDeviceInfo[];
21
+ }
22
+ export declare const StreamVideoStoreProvider: (props: {
23
+ children?: import("react").ReactNode;
24
+ }) => JSX.Element, useStreamVideoStoreValue: <SelectorOutput extends boolean | MediaDeviceInfo | MediaDeviceInfo[] | undefined>(selector: (store: SDKStreamVideoStore & {
25
+ isStoreInitialized: boolean;
26
+ }) => SelectorOutput) => SelectorOutput, useStreamVideoStoreSetState: () => (partialStateOrFunc: Partial<SDKStreamVideoStore & {
27
+ isStoreInitialized: boolean;
28
+ }> | ((prevState: SDKStreamVideoStore & {
29
+ isStoreInitialized: boolean;
30
+ }) => Partial<SDKStreamVideoStore>)) => void;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ var _a;
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.useStreamVideoStoreSetState = exports.useStreamVideoStoreValue = exports.StreamVideoStoreProvider = void 0;
8
+ const createStoreContext_1 = __importDefault(require("./createStoreContext"));
9
+ _a = (0, createStoreContext_1.default)({
10
+ isCameraOnFrontFacingMode: false,
11
+ isVideoMuted: false,
12
+ isAudioMuted: false,
13
+ videoDevices: [],
14
+ audioDevices: [],
15
+ currentVideoDevice: undefined,
16
+ currentAudioDevice: undefined,
17
+ }), exports.StreamVideoStoreProvider = _a.Provider, exports.useStreamVideoStoreValue = _a.useStoreValue, exports.useStreamVideoStoreSetState = _a.useStoreSetState;
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/contexts/StreamVideoContext/index.tsx"],"names":[],"mappings":";;;;;;;AAAA,8EAAsD;AAwBzC,KAIT,IAAA,4BAAkB,EAAsB;IAC1C,yBAAyB,EAAE,KAAK;IAChC,YAAY,EAAE,KAAK;IACnB,YAAY,EAAE,KAAK;IACnB,YAAY,EAAE,EAAE;IAChB,YAAY,EAAE,EAAE;IAChB,kBAAkB,EAAE,SAAS;IAC7B,kBAAkB,EAAE,SAAS;CAC9B,CAAC,EAXU,gCAAwB,gBACnB,gCAAwB,qBACrB,mCAA2B,uBAS5C"}
@@ -0,0 +1 @@
1
+ export * from './StreamVideoContext';
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./StreamVideoContext"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/contexts/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC"}