@stream-io/video-react-sdk 0.0.1-alpha.9

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 (418) hide show
  1. package/CHANGELOG.md +183 -0
  2. package/LICENSE +219 -0
  3. package/README.md +5 -0
  4. package/dist/css/styles.css +2351 -0
  5. package/dist/css/styles.css.map +1 -0
  6. package/dist/index.d.ts +6 -0
  7. package/dist/index.js +15 -0
  8. package/dist/index.js.map +1 -0
  9. package/dist/src/components/Avatar/Avatar.d.ts +14 -0
  10. package/dist/src/components/Avatar/Avatar.js +11 -0
  11. package/dist/src/components/Avatar/Avatar.js.map +1 -0
  12. package/dist/src/components/Avatar/index.d.ts +1 -0
  13. package/dist/src/components/Avatar/index.js +2 -0
  14. package/dist/src/components/Avatar/index.js.map +1 -0
  15. package/dist/src/components/Button/CompositeButton.d.ts +16 -0
  16. package/dist/src/components/Button/CompositeButton.js +15 -0
  17. package/dist/src/components/Button/CompositeButton.js.map +1 -0
  18. package/dist/src/components/Button/CopyToClipboardButton.d.ts +27 -0
  19. package/dist/src/components/Button/CopyToClipboardButton.js +54 -0
  20. package/dist/src/components/Button/CopyToClipboardButton.js.map +1 -0
  21. package/dist/src/components/Button/IconButton.d.ts +7 -0
  22. package/dist/src/components/Button/IconButton.js +26 -0
  23. package/dist/src/components/Button/IconButton.js.map +1 -0
  24. package/dist/src/components/Button/TextButton.d.ts +2 -0
  25. package/dist/src/components/Button/TextButton.js +17 -0
  26. package/dist/src/components/Button/TextButton.js.map +1 -0
  27. package/dist/src/components/Button/index.d.ts +4 -0
  28. package/dist/src/components/Button/index.js +5 -0
  29. package/dist/src/components/Button/index.js.map +1 -0
  30. package/dist/src/components/CallControls/CallControls.d.ts +7 -0
  31. package/dist/src/components/CallControls/CallControls.js +8 -0
  32. package/dist/src/components/CallControls/CallControls.js.map +1 -0
  33. package/dist/src/components/CallControls/CallStatsButton.d.ts +6 -0
  34. package/dist/src/components/CallControls/CallStatsButton.js +10 -0
  35. package/dist/src/components/CallControls/CallStatsButton.js.map +1 -0
  36. package/dist/src/components/CallControls/CancelCallButton.d.ts +8 -0
  37. package/dist/src/components/CallControls/CancelCallButton.js +25 -0
  38. package/dist/src/components/CallControls/CancelCallButton.js.map +1 -0
  39. package/dist/src/components/CallControls/ReactionsButton.d.ts +11 -0
  40. package/dist/src/components/CallControls/ReactionsButton.js +33 -0
  41. package/dist/src/components/CallControls/ReactionsButton.js.map +1 -0
  42. package/dist/src/components/CallControls/RecordCallButton.d.ts +7 -0
  43. package/dist/src/components/CallControls/RecordCallButton.js +51 -0
  44. package/dist/src/components/CallControls/RecordCallButton.js.map +1 -0
  45. package/dist/src/components/CallControls/ScreenShareButton.d.ts +7 -0
  46. package/dist/src/components/CallControls/ScreenShareButton.js +54 -0
  47. package/dist/src/components/CallControls/ScreenShareButton.js.map +1 -0
  48. package/dist/src/components/CallControls/ToggleAudioButton.d.ts +9 -0
  49. package/dist/src/components/CallControls/ToggleAudioButton.js +66 -0
  50. package/dist/src/components/CallControls/ToggleAudioButton.js.map +1 -0
  51. package/dist/src/components/CallControls/ToggleAudioOutputButton.d.ts +5 -0
  52. package/dist/src/components/CallControls/ToggleAudioOutputButton.js +9 -0
  53. package/dist/src/components/CallControls/ToggleAudioOutputButton.js.map +1 -0
  54. package/dist/src/components/CallControls/ToggleCameraButton.d.ts +10 -0
  55. package/dist/src/components/CallControls/ToggleCameraButton.js +64 -0
  56. package/dist/src/components/CallControls/ToggleCameraButton.js.map +1 -0
  57. package/dist/src/components/CallControls/ToggleParticipantListButton.d.ts +6 -0
  58. package/dist/src/components/CallControls/ToggleParticipantListButton.js +7 -0
  59. package/dist/src/components/CallControls/ToggleParticipantListButton.js.map +1 -0
  60. package/dist/src/components/CallControls/index.d.ts +10 -0
  61. package/dist/src/components/CallControls/index.js +11 -0
  62. package/dist/src/components/CallControls/index.js.map +1 -0
  63. package/dist/src/components/CallParticipantsList/BlockedUserListing.d.ts +4 -0
  64. package/dist/src/components/CallParticipantsList/BlockedUserListing.js +19 -0
  65. package/dist/src/components/CallParticipantsList/BlockedUserListing.js.map +1 -0
  66. package/dist/src/components/CallParticipantsList/CallParticipantListHeader.d.ts +6 -0
  67. package/dist/src/components/CallParticipantsList/CallParticipantListHeader.js +7 -0
  68. package/dist/src/components/CallParticipantsList/CallParticipantListHeader.js.map +1 -0
  69. package/dist/src/components/CallParticipantsList/CallParticipantListing.d.ts +8 -0
  70. package/dist/src/components/CallParticipantsList/CallParticipantListing.js +4 -0
  71. package/dist/src/components/CallParticipantsList/CallParticipantListing.js.map +1 -0
  72. package/dist/src/components/CallParticipantsList/CallParticipantListingItem.d.ts +15 -0
  73. package/dist/src/components/CallParticipantsList/CallParticipantListingItem.js +77 -0
  74. package/dist/src/components/CallParticipantsList/CallParticipantListingItem.js.map +1 -0
  75. package/dist/src/components/CallParticipantsList/CallParticipantsList.d.ts +15 -0
  76. package/dist/src/components/CallParticipantsList/CallParticipantsList.js +82 -0
  77. package/dist/src/components/CallParticipantsList/CallParticipantsList.js.map +1 -0
  78. package/dist/src/components/CallParticipantsList/EmptyParticipantSearchList.d.ts +2 -0
  79. package/dist/src/components/CallParticipantsList/EmptyParticipantSearchList.js +5 -0
  80. package/dist/src/components/CallParticipantsList/EmptyParticipantSearchList.js.map +1 -0
  81. package/dist/src/components/CallParticipantsList/index.d.ts +3 -0
  82. package/dist/src/components/CallParticipantsList/index.js +4 -0
  83. package/dist/src/components/CallParticipantsList/index.js.map +1 -0
  84. package/dist/src/components/CallRecordingList/CallRecordingList.d.ts +20 -0
  85. package/dist/src/components/CallRecordingList/CallRecordingList.js +9 -0
  86. package/dist/src/components/CallRecordingList/CallRecordingList.js.map +1 -0
  87. package/dist/src/components/CallRecordingList/CallRecordingListHeader.d.ts +7 -0
  88. package/dist/src/components/CallRecordingList/CallRecordingListHeader.js +8 -0
  89. package/dist/src/components/CallRecordingList/CallRecordingListHeader.js.map +1 -0
  90. package/dist/src/components/CallRecordingList/CallRecordingListItem.d.ts +7 -0
  91. package/dist/src/components/CallRecordingList/CallRecordingListItem.js +11 -0
  92. package/dist/src/components/CallRecordingList/CallRecordingListItem.js.map +1 -0
  93. package/dist/src/components/CallRecordingList/EmptyCallRecordingListing.d.ts +2 -0
  94. package/dist/src/components/CallRecordingList/EmptyCallRecordingListing.js +5 -0
  95. package/dist/src/components/CallRecordingList/EmptyCallRecordingListing.js.map +1 -0
  96. package/dist/src/components/CallRecordingList/LoadingCallRecordingListing.d.ts +7 -0
  97. package/dist/src/components/CallRecordingList/LoadingCallRecordingListing.js +7 -0
  98. package/dist/src/components/CallRecordingList/LoadingCallRecordingListing.js.map +1 -0
  99. package/dist/src/components/CallRecordingList/index.d.ts +5 -0
  100. package/dist/src/components/CallRecordingList/index.js +6 -0
  101. package/dist/src/components/CallRecordingList/index.js.map +1 -0
  102. package/dist/src/components/Debug/DebugParticipantPublishQuality.d.ts +6 -0
  103. package/dist/src/components/Debug/DebugParticipantPublishQuality.js +46 -0
  104. package/dist/src/components/Debug/DebugParticipantPublishQuality.js.map +1 -0
  105. package/dist/src/components/Debug/DebugStatsView.d.ts +7 -0
  106. package/dist/src/components/Debug/DebugStatsView.js +26 -0
  107. package/dist/src/components/Debug/DebugStatsView.js.map +1 -0
  108. package/dist/src/components/Debug/useIsDebugMode.d.ts +5 -0
  109. package/dist/src/components/Debug/useIsDebugMode.js +18 -0
  110. package/dist/src/components/Debug/useIsDebugMode.js.map +1 -0
  111. package/dist/src/components/DeviceSettings/DeviceSelector.d.ts +7 -0
  112. package/dist/src/components/DeviceSettings/DeviceSelector.js +26 -0
  113. package/dist/src/components/DeviceSettings/DeviceSelector.js.map +1 -0
  114. package/dist/src/components/DeviceSettings/DeviceSelectorAudio.d.ts +9 -0
  115. package/dist/src/components/DeviceSettings/DeviceSelectorAudio.js +18 -0
  116. package/dist/src/components/DeviceSettings/DeviceSelectorAudio.js.map +1 -0
  117. package/dist/src/components/DeviceSettings/DeviceSelectorVideo.d.ts +5 -0
  118. package/dist/src/components/DeviceSettings/DeviceSelectorVideo.js +10 -0
  119. package/dist/src/components/DeviceSettings/DeviceSelectorVideo.js.map +1 -0
  120. package/dist/src/components/DeviceSettings/DeviceSettings.d.ts +2 -0
  121. package/dist/src/components/DeviceSettings/DeviceSettings.js +15 -0
  122. package/dist/src/components/DeviceSettings/DeviceSettings.js.map +1 -0
  123. package/dist/src/components/DeviceSettings/index.d.ts +4 -0
  124. package/dist/src/components/DeviceSettings/index.js +5 -0
  125. package/dist/src/components/DeviceSettings/index.js.map +1 -0
  126. package/dist/src/components/Icon/Icon.d.ts +5 -0
  127. package/dist/src/components/Icon/Icon.js +4 -0
  128. package/dist/src/components/Icon/Icon.js.map +1 -0
  129. package/dist/src/components/Icon/index.d.ts +1 -0
  130. package/dist/src/components/Icon/index.js +2 -0
  131. package/dist/src/components/Icon/index.js.map +1 -0
  132. package/dist/src/components/LoadingIndicator/LoadingIndicator.d.ts +11 -0
  133. package/dist/src/components/LoadingIndicator/LoadingIndicator.js +6 -0
  134. package/dist/src/components/LoadingIndicator/LoadingIndicator.js.map +1 -0
  135. package/dist/src/components/LoadingIndicator/index.d.ts +1 -0
  136. package/dist/src/components/LoadingIndicator/index.js +2 -0
  137. package/dist/src/components/LoadingIndicator/index.js.map +1 -0
  138. package/dist/src/components/Menu/GenericMenu.d.ts +3 -0
  139. package/dist/src/components/Menu/GenericMenu.js +20 -0
  140. package/dist/src/components/Menu/GenericMenu.js.map +1 -0
  141. package/dist/src/components/Menu/MenuToggle.d.ts +12 -0
  142. package/dist/src/components/Menu/MenuToggle.js +40 -0
  143. package/dist/src/components/Menu/MenuToggle.js.map +1 -0
  144. package/dist/src/components/Menu/index.d.ts +2 -0
  145. package/dist/src/components/Menu/index.js +3 -0
  146. package/dist/src/components/Menu/index.js.map +1 -0
  147. package/dist/src/components/Moderation/Restricted.d.ts +19 -0
  148. package/dist/src/components/Moderation/Restricted.js +13 -0
  149. package/dist/src/components/Moderation/Restricted.js.map +1 -0
  150. package/dist/src/components/Moderation/index.d.ts +1 -0
  151. package/dist/src/components/Moderation/index.js +2 -0
  152. package/dist/src/components/Moderation/index.js.map +1 -0
  153. package/dist/src/components/Notification/Notification.d.ts +11 -0
  154. package/dist/src/components/Notification/Notification.js +25 -0
  155. package/dist/src/components/Notification/Notification.js.map +1 -0
  156. package/dist/src/components/Notification/PermissionNotification.d.ts +33 -0
  157. package/dist/src/components/Notification/PermissionNotification.js +26 -0
  158. package/dist/src/components/Notification/PermissionNotification.js.map +1 -0
  159. package/dist/src/components/Notification/SpeakingWhileMutedNotification.d.ts +3 -0
  160. package/dist/src/components/Notification/SpeakingWhileMutedNotification.js +45 -0
  161. package/dist/src/components/Notification/SpeakingWhileMutedNotification.js.map +1 -0
  162. package/dist/src/components/Notification/index.d.ts +3 -0
  163. package/dist/src/components/Notification/index.js +4 -0
  164. package/dist/src/components/Notification/index.js.map +1 -0
  165. package/dist/src/components/Permissions/PermissionRequests.d.ts +8 -0
  166. package/dist/src/components/Permissions/PermissionRequests.js +109 -0
  167. package/dist/src/components/Permissions/PermissionRequests.js.map +1 -0
  168. package/dist/src/components/Permissions/index.d.ts +1 -0
  169. package/dist/src/components/Permissions/index.js +2 -0
  170. package/dist/src/components/Permissions/index.js.map +1 -0
  171. package/dist/src/components/Reaction/Reaction.d.ts +10 -0
  172. package/dist/src/components/Reaction/Reaction.js +28 -0
  173. package/dist/src/components/Reaction/Reaction.js.map +1 -0
  174. package/dist/src/components/Reaction/index.d.ts +1 -0
  175. package/dist/src/components/Reaction/index.js +2 -0
  176. package/dist/src/components/Reaction/index.js.map +1 -0
  177. package/dist/src/components/Search/SearchInput.d.ts +14 -0
  178. package/dist/src/components/Search/SearchInput.js +34 -0
  179. package/dist/src/components/Search/SearchInput.js.map +1 -0
  180. package/dist/src/components/Search/SearchResults.d.ts +14 -0
  181. package/dist/src/components/Search/SearchResults.js +12 -0
  182. package/dist/src/components/Search/SearchResults.js.map +1 -0
  183. package/dist/src/components/Search/hooks/index.d.ts +1 -0
  184. package/dist/src/components/Search/hooks/index.js +2 -0
  185. package/dist/src/components/Search/hooks/index.js.map +1 -0
  186. package/dist/src/components/Search/hooks/useSearch.d.ts +15 -0
  187. package/dist/src/components/Search/hooks/useSearch.js +39 -0
  188. package/dist/src/components/Search/hooks/useSearch.js.map +1 -0
  189. package/dist/src/components/Search/index.d.ts +2 -0
  190. package/dist/src/components/Search/index.js +3 -0
  191. package/dist/src/components/Search/index.js.map +1 -0
  192. package/dist/src/components/StreamCall/CallParticipantsScreenView.d.ts +5 -0
  193. package/dist/src/components/StreamCall/CallParticipantsScreenView.js +34 -0
  194. package/dist/src/components/StreamCall/CallParticipantsScreenView.js.map +1 -0
  195. package/dist/src/components/StreamCall/CallParticipantsView.d.ts +5 -0
  196. package/dist/src/components/StreamCall/CallParticipantsView.js +11 -0
  197. package/dist/src/components/StreamCall/CallParticipantsView.js.map +1 -0
  198. package/dist/src/components/StreamCall/CallStats.d.ts +2 -0
  199. package/dist/src/components/StreamCall/CallStats.js +69 -0
  200. package/dist/src/components/StreamCall/CallStats.js.map +1 -0
  201. package/dist/src/components/StreamCall/CallStatsLatencyChart.d.ts +7 -0
  202. package/dist/src/components/StreamCall/CallStatsLatencyChart.js +39 -0
  203. package/dist/src/components/StreamCall/CallStatsLatencyChart.js.map +1 -0
  204. package/dist/src/components/StreamCall/Stage.d.ts +8 -0
  205. package/dist/src/components/StreamCall/Stage.js +13 -0
  206. package/dist/src/components/StreamCall/Stage.js.map +1 -0
  207. package/dist/src/components/StreamCall/hooks/index.d.ts +1 -0
  208. package/dist/src/components/StreamCall/hooks/index.js +2 -0
  209. package/dist/src/components/StreamCall/hooks/index.js.map +1 -0
  210. package/dist/src/components/StreamCall/hooks/useScrollPosition.d.ts +6 -0
  211. package/dist/src/components/StreamCall/hooks/useScrollPosition.js +63 -0
  212. package/dist/src/components/StreamCall/hooks/useScrollPosition.js.map +1 -0
  213. package/dist/src/components/StreamCall/index.d.ts +3 -0
  214. package/dist/src/components/StreamCall/index.js +4 -0
  215. package/dist/src/components/StreamCall/index.js.map +1 -0
  216. package/dist/src/components/StreamMeeting/StreamMeeting.d.ts +34 -0
  217. package/dist/src/components/StreamMeeting/StreamMeeting.js +26 -0
  218. package/dist/src/components/StreamMeeting/StreamMeeting.js.map +1 -0
  219. package/dist/src/components/StreamMeeting/index.d.ts +1 -0
  220. package/dist/src/components/StreamMeeting/index.js +2 -0
  221. package/dist/src/components/StreamMeeting/index.js.map +1 -0
  222. package/dist/src/components/Tooltip/Tooltip.d.ts +15 -0
  223. package/dist/src/components/Tooltip/Tooltip.js +22 -0
  224. package/dist/src/components/Tooltip/Tooltip.js.map +1 -0
  225. package/dist/src/components/Tooltip/WithTooltip.d.ts +5 -0
  226. package/dist/src/components/Tooltip/WithTooltip.js +23 -0
  227. package/dist/src/components/Tooltip/WithTooltip.js.map +1 -0
  228. package/dist/src/components/Tooltip/hooks/index.d.ts +1 -0
  229. package/dist/src/components/Tooltip/hooks/index.js +2 -0
  230. package/dist/src/components/Tooltip/hooks/index.js.map +1 -0
  231. package/dist/src/components/Tooltip/hooks/useEnterLeaveHandlers.d.ts +6 -0
  232. package/dist/src/components/Tooltip/hooks/useEnterLeaveHandlers.js +14 -0
  233. package/dist/src/components/Tooltip/hooks/useEnterLeaveHandlers.js.map +1 -0
  234. package/dist/src/components/Tooltip/index.d.ts +2 -0
  235. package/dist/src/components/Tooltip/index.js +3 -0
  236. package/dist/src/components/Tooltip/index.js.map +1 -0
  237. package/dist/src/components/Video/VideoPreview.d.ts +13 -0
  238. package/dist/src/components/Video/VideoPreview.js +70 -0
  239. package/dist/src/components/Video/VideoPreview.js.map +1 -0
  240. package/dist/src/components/Video/index.d.ts +4 -0
  241. package/dist/src/components/Video/index.js +5 -0
  242. package/dist/src/components/Video/index.js.map +1 -0
  243. package/dist/src/components/index.d.ts +16 -0
  244. package/dist/src/components/index.js +17 -0
  245. package/dist/src/components/index.js.map +1 -0
  246. package/dist/src/core/components/Audio/Audio.d.ts +6 -0
  247. package/dist/src/core/components/Audio/Audio.js +39 -0
  248. package/dist/src/core/components/Audio/Audio.js.map +1 -0
  249. package/dist/src/core/components/Audio/index.d.ts +1 -0
  250. package/dist/src/core/components/Audio/index.js +2 -0
  251. package/dist/src/core/components/Audio/index.js.map +1 -0
  252. package/dist/src/core/components/CallLayout/PaginatedGridLayout.d.ts +21 -0
  253. package/dist/src/core/components/CallLayout/PaginatedGridLayout.js +39 -0
  254. package/dist/src/core/components/CallLayout/PaginatedGridLayout.js.map +1 -0
  255. package/dist/src/core/components/CallLayout/SpeakerLayout.d.ts +2 -0
  256. package/dist/src/core/components/CallLayout/SpeakerLayout.js +52 -0
  257. package/dist/src/core/components/CallLayout/SpeakerLayout.js.map +1 -0
  258. package/dist/src/core/components/CallLayout/index.d.ts +2 -0
  259. package/dist/src/core/components/CallLayout/index.js +3 -0
  260. package/dist/src/core/components/CallLayout/index.js.map +1 -0
  261. package/dist/src/core/components/ParticipantBox/ParticipantBox.d.ts +48 -0
  262. package/dist/src/core/components/ParticipantBox/ParticipantBox.js +58 -0
  263. package/dist/src/core/components/ParticipantBox/ParticipantBox.js.map +1 -0
  264. package/dist/src/core/components/ParticipantBox/index.d.ts +1 -0
  265. package/dist/src/core/components/ParticipantBox/index.js +2 -0
  266. package/dist/src/core/components/ParticipantBox/index.js.map +1 -0
  267. package/dist/src/core/components/Video/BaseVideo.d.ts +9 -0
  268. package/dist/src/core/components/Video/BaseVideo.js +54 -0
  269. package/dist/src/core/components/Video/BaseVideo.js.map +1 -0
  270. package/dist/src/core/components/Video/Video.d.ts +8 -0
  271. package/dist/src/core/components/Video/Video.js +151 -0
  272. package/dist/src/core/components/Video/Video.js.map +1 -0
  273. package/dist/src/core/components/Video/VideoPlaceholder.d.ts +6 -0
  274. package/dist/src/core/components/Video/VideoPlaceholder.js +12 -0
  275. package/dist/src/core/components/Video/VideoPlaceholder.js.map +1 -0
  276. package/dist/src/core/components/Video/index.d.ts +2 -0
  277. package/dist/src/core/components/Video/index.js +3 -0
  278. package/dist/src/core/components/Video/index.js.map +1 -0
  279. package/dist/src/core/components/index.d.ts +5 -0
  280. package/dist/src/core/components/index.js +5 -0
  281. package/dist/src/core/components/index.js.map +1 -0
  282. package/dist/src/core/contexts/MediaDevicesContext.d.ts +82 -0
  283. package/dist/src/core/contexts/MediaDevicesContext.js +215 -0
  284. package/dist/src/core/contexts/MediaDevicesContext.js.map +1 -0
  285. package/dist/src/core/contexts/index.d.ts +1 -0
  286. package/dist/src/core/contexts/index.js +2 -0
  287. package/dist/src/core/contexts/index.js.map +1 -0
  288. package/dist/src/core/hooks/index.d.ts +2 -0
  289. package/dist/src/core/hooks/index.js +3 -0
  290. package/dist/src/core/hooks/index.js.map +1 -0
  291. package/dist/src/core/hooks/useAudioPublisher.d.ts +12 -0
  292. package/dist/src/core/hooks/useAudioPublisher.js +89 -0
  293. package/dist/src/core/hooks/useAudioPublisher.js.map +1 -0
  294. package/dist/src/core/hooks/useVideoPublisher.d.ts +12 -0
  295. package/dist/src/core/hooks/useVideoPublisher.js +91 -0
  296. package/dist/src/core/hooks/useVideoPublisher.js.map +1 -0
  297. package/dist/src/core/index.d.ts +3 -0
  298. package/dist/src/core/index.js +4 -0
  299. package/dist/src/core/index.js.map +1 -0
  300. package/dist/src/hooks/index.d.ts +2 -0
  301. package/dist/src/hooks/index.js +3 -0
  302. package/dist/src/hooks/index.js.map +1 -0
  303. package/dist/src/hooks/useFloatingUIPreset.d.ts +9 -0
  304. package/dist/src/hooks/useFloatingUIPreset.js +29 -0
  305. package/dist/src/hooks/useFloatingUIPreset.js.map +1 -0
  306. package/dist/src/hooks/useRtcStats.d.ts +11 -0
  307. package/dist/src/hooks/useRtcStats.js +39 -0
  308. package/dist/src/hooks/useRtcStats.js.map +1 -0
  309. package/dist/src/types/components.d.ts +7 -0
  310. package/dist/src/types/components.js +2 -0
  311. package/dist/src/types/components.js.map +1 -0
  312. package/dist/src/types/index.d.ts +1 -0
  313. package/dist/src/types/index.js +2 -0
  314. package/dist/src/types/index.js.map +1 -0
  315. package/index.ts +18 -0
  316. package/package.json +49 -0
  317. package/src/components/Avatar/Avatar.tsx +45 -0
  318. package/src/components/Avatar/index.ts +1 -0
  319. package/src/components/Button/CompositeButton.tsx +59 -0
  320. package/src/components/Button/CopyToClipboardButton.tsx +129 -0
  321. package/src/components/Button/IconButton.tsx +32 -0
  322. package/src/components/Button/TextButton.tsx +12 -0
  323. package/src/components/Button/index.ts +4 -0
  324. package/src/components/CallControls/CallControls.tsx +32 -0
  325. package/src/components/CallControls/CallStatsButton.tsx +28 -0
  326. package/src/components/CallControls/CancelCallButton.tsx +28 -0
  327. package/src/components/CallControls/ReactionsButton.tsx +75 -0
  328. package/src/components/CallControls/RecordCallButton.tsx +68 -0
  329. package/src/components/CallControls/ScreenShareButton.tsx +85 -0
  330. package/src/components/CallControls/ToggleAudioButton.tsx +112 -0
  331. package/src/components/CallControls/ToggleAudioOutputButton.tsx +21 -0
  332. package/src/components/CallControls/ToggleCameraButton.tsx +109 -0
  333. package/src/components/CallControls/ToggleParticipantListButton.tsx +17 -0
  334. package/src/components/CallControls/index.ts +10 -0
  335. package/src/components/CallParticipantsList/BlockedUserListing.tsx +38 -0
  336. package/src/components/CallParticipantsList/CallParticipantListHeader.tsx +29 -0
  337. package/src/components/CallParticipantsList/CallParticipantListing.tsx +22 -0
  338. package/src/components/CallParticipantsList/CallParticipantListingItem.tsx +249 -0
  339. package/src/components/CallParticipantsList/CallParticipantsList.tsx +255 -0
  340. package/src/components/CallParticipantsList/EmptyParticipantSearchList.tsx +7 -0
  341. package/src/components/CallParticipantsList/index.ts +3 -0
  342. package/src/components/CallRecordingList/CallRecordingList.tsx +60 -0
  343. package/src/components/CallRecordingList/CallRecordingListHeader.tsx +29 -0
  344. package/src/components/CallRecordingList/CallRecordingListItem.tsx +67 -0
  345. package/src/components/CallRecordingList/EmptyCallRecordingListing.tsx +11 -0
  346. package/src/components/CallRecordingList/LoadingCallRecordingListing.tsx +21 -0
  347. package/src/components/CallRecordingList/index.ts +5 -0
  348. package/src/components/Debug/DebugParticipantPublishQuality.tsx +62 -0
  349. package/src/components/Debug/DebugStatsView.tsx +55 -0
  350. package/src/components/Debug/useIsDebugMode.ts +24 -0
  351. package/src/components/DeviceSettings/DeviceSelector.tsx +106 -0
  352. package/src/components/DeviceSettings/DeviceSelectorAudio.tsx +52 -0
  353. package/src/components/DeviceSettings/DeviceSelectorVideo.tsx +22 -0
  354. package/src/components/DeviceSettings/DeviceSettings.tsx +39 -0
  355. package/src/components/DeviceSettings/index.ts +4 -0
  356. package/src/components/Icon/Icon.tsx +11 -0
  357. package/src/components/Icon/index.ts +1 -0
  358. package/src/components/LoadingIndicator/LoadingIndicator.tsx +28 -0
  359. package/src/components/LoadingIndicator/index.ts +1 -0
  360. package/src/components/Menu/GenericMenu.tsx +16 -0
  361. package/src/components/Menu/MenuToggle.tsx +81 -0
  362. package/src/components/Menu/index.ts +2 -0
  363. package/src/components/Moderation/Restricted.tsx +38 -0
  364. package/src/components/Moderation/index.ts +1 -0
  365. package/src/components/Notification/Notification.tsx +61 -0
  366. package/src/components/Notification/PermissionNotification.tsx +97 -0
  367. package/src/components/Notification/SpeakingWhileMutedNotification.tsx +60 -0
  368. package/src/components/Notification/index.ts +3 -0
  369. package/src/components/Permissions/PermissionRequests.tsx +182 -0
  370. package/src/components/Permissions/index.ts +1 -0
  371. package/src/components/Reaction/Reaction.tsx +48 -0
  372. package/src/components/Reaction/index.ts +1 -0
  373. package/src/components/Search/SearchInput.tsx +56 -0
  374. package/src/components/Search/SearchResults.tsx +40 -0
  375. package/src/components/Search/hooks/index.ts +1 -0
  376. package/src/components/Search/hooks/useSearch.ts +52 -0
  377. package/src/components/Search/index.ts +2 -0
  378. package/src/components/StreamCall/CallParticipantsScreenView.tsx +126 -0
  379. package/src/components/StreamCall/CallParticipantsView.tsx +25 -0
  380. package/src/components/StreamCall/CallStats.tsx +162 -0
  381. package/src/components/StreamCall/CallStatsLatencyChart.tsx +58 -0
  382. package/src/components/StreamCall/Stage.tsx +22 -0
  383. package/src/components/StreamCall/hooks/index.ts +1 -0
  384. package/src/components/StreamCall/hooks/useScrollPosition.ts +95 -0
  385. package/src/components/StreamCall/index.ts +4 -0
  386. package/src/components/StreamMeeting/StreamMeeting.tsx +80 -0
  387. package/src/components/StreamMeeting/index.ts +1 -0
  388. package/src/components/Tooltip/Tooltip.tsx +51 -0
  389. package/src/components/Tooltip/WithTooltip.tsx +39 -0
  390. package/src/components/Tooltip/hooks/index.ts +1 -0
  391. package/src/components/Tooltip/hooks/useEnterLeaveHandlers.ts +28 -0
  392. package/src/components/Tooltip/index.ts +2 -0
  393. package/src/components/Video/VideoPreview.tsx +127 -0
  394. package/src/components/Video/index.ts +4 -0
  395. package/src/components/index.ts +16 -0
  396. package/src/core/components/Audio/Audio.tsx +42 -0
  397. package/src/core/components/Audio/index.ts +1 -0
  398. package/src/core/components/CallLayout/PaginatedGridLayout.tsx +163 -0
  399. package/src/core/components/CallLayout/SpeakerLayout.tsx +145 -0
  400. package/src/core/components/CallLayout/index.ts +2 -0
  401. package/src/core/components/ParticipantBox/ParticipantBox.tsx +248 -0
  402. package/src/core/components/ParticipantBox/index.ts +1 -0
  403. package/src/core/components/Video/BaseVideo.tsx +68 -0
  404. package/src/core/components/Video/Video.tsx +238 -0
  405. package/src/core/components/Video/VideoPlaceholder.tsx +40 -0
  406. package/src/core/components/Video/index.ts +2 -0
  407. package/src/core/components/index.ts +7 -0
  408. package/src/core/contexts/MediaDevicesContext.tsx +373 -0
  409. package/src/core/contexts/index.ts +1 -0
  410. package/src/core/hooks/index.ts +2 -0
  411. package/src/core/hooks/useAudioPublisher.ts +118 -0
  412. package/src/core/hooks/useVideoPublisher.ts +120 -0
  413. package/src/core/index.ts +3 -0
  414. package/src/hooks/index.ts +2 -0
  415. package/src/hooks/useFloatingUIPreset.ts +48 -0
  416. package/src/hooks/useRtcStats.ts +36 -0
  417. package/src/types/components.ts +7 -0
  418. package/src/types/index.ts +1 -0
@@ -0,0 +1,182 @@
1
+ import {
2
+ ButtonHTMLAttributes,
3
+ ComponentProps,
4
+ forwardRef,
5
+ Fragment,
6
+ PropsWithChildren,
7
+ useEffect,
8
+ useState,
9
+ } from 'react';
10
+ import {
11
+ OwnCapability,
12
+ PermissionRequestEvent,
13
+ UserResponse,
14
+ } from '@stream-io/video-client';
15
+ import { useCall, useHasPermissions } from '@stream-io/video-react-bindings';
16
+ import clsx from 'clsx';
17
+
18
+ import { useFloatingUIPreset } from '../../hooks';
19
+
20
+ const byNameOrId = (a: UserResponse, b: UserResponse) => {
21
+ if (a.name && b.name && a.name < b.name) return -1;
22
+ if (a.name && b.name && a.name > b.name) return 1;
23
+ if (a.id < b.id) return -1;
24
+ if (a.id > b.id) return 1;
25
+ return 0;
26
+ };
27
+
28
+ export const PermissionRequests = () => {
29
+ const call = useCall();
30
+ const [expanded, setExpanded] = useState(false);
31
+ const [permissionRequests, setPermissionRequests] = useState<
32
+ PermissionRequestEvent[]
33
+ >([]);
34
+
35
+ const canUpdateCallPermissions = useHasPermissions(
36
+ OwnCapability.UPDATE_CALL_PERMISSIONS,
37
+ );
38
+
39
+ useEffect(() => {
40
+ if (!call || !canUpdateCallPermissions) return;
41
+ return call.on('call.permission_request', (event) => {
42
+ if (event.type !== 'call.permission_request') return;
43
+ setPermissionRequests((requests) =>
44
+ [...requests, event].sort((a, b) => byNameOrId(a.user, b.user)),
45
+ );
46
+ });
47
+ }, [call, canUpdateCallPermissions]);
48
+
49
+ const handleUpdatePermission = (
50
+ request: PermissionRequestEvent,
51
+ allow: boolean,
52
+ ) => {
53
+ return async () => {
54
+ const { user, permissions } = request;
55
+ if (allow) {
56
+ await call?.updateUserPermissions({
57
+ user_id: user.id,
58
+ grant_permissions: permissions,
59
+ });
60
+ } else {
61
+ await call?.updateUserPermissions({
62
+ user_id: user.id,
63
+ revoke_permissions: permissions,
64
+ });
65
+ }
66
+ setPermissionRequests((requests) =>
67
+ requests.filter((r) => r !== request),
68
+ );
69
+ };
70
+ };
71
+
72
+ const { refs, x, y, strategy } = useFloatingUIPreset({
73
+ placement: 'bottom',
74
+ strategy: 'absolute',
75
+ });
76
+
77
+ // don't render anything if there are no permission requests
78
+ if (permissionRequests.length === 0) return null;
79
+
80
+ return (
81
+ <div className="str-video__permission-requests" ref={refs.setReference}>
82
+ <div className="str-video__permission-requests__notification">
83
+ <span className="str-video__permission-requests__notification__message">
84
+ {permissionRequests.length} pending permission requests
85
+ </span>
86
+ <Button
87
+ type="button"
88
+ onClick={() => {
89
+ setExpanded((e) => !e);
90
+ }}
91
+ >
92
+ {expanded ? 'Hide requests' : 'Show requests'}
93
+ </Button>
94
+ </div>
95
+ {expanded && (
96
+ <PermissionRequestList
97
+ ref={refs.setFloating}
98
+ style={{
99
+ position: strategy,
100
+ top: y ?? 0,
101
+ left: x ?? 0,
102
+ overflowY: 'auto',
103
+ }}
104
+ permissionRequests={permissionRequests}
105
+ handleUpdatePermission={handleUpdatePermission}
106
+ />
107
+ )}
108
+ </div>
109
+ );
110
+ };
111
+
112
+ export type PermissionRequestListProps = ComponentProps<'div'> & {
113
+ permissionRequests: PermissionRequestEvent[];
114
+ handleUpdatePermission: (
115
+ request: PermissionRequestEvent,
116
+ allow: boolean,
117
+ ) => () => Promise<void>;
118
+ };
119
+
120
+ export const PermissionRequestList = forwardRef<
121
+ HTMLDivElement,
122
+ PermissionRequestListProps
123
+ >((props, ref) => {
124
+ const { permissionRequests, handleUpdatePermission, ...rest } = props;
125
+ return (
126
+ <div className="str-video__permission-requests-list" ref={ref} {...rest}>
127
+ {permissionRequests.map((request, reqIndex) => {
128
+ const { user, permissions } = request;
129
+ return (
130
+ <Fragment key={`${user.id}/${reqIndex}`}>
131
+ {permissions.map((permission) => (
132
+ <div className="str-video__permission-request" key={permission}>
133
+ <div className="str-video__permission-request__message">
134
+ {messageForPermission(user.name || user.id, permission)}
135
+ </div>
136
+ <Button
137
+ className="str-video__permission-request__button--allow"
138
+ type="button"
139
+ onClick={handleUpdatePermission(request, true)}
140
+ >
141
+ Allow
142
+ </Button>
143
+ <Button
144
+ className="str-video__permission-request__button--reject"
145
+ type="button"
146
+ onClick={handleUpdatePermission(request, false)}
147
+ >
148
+ Reject
149
+ </Button>
150
+ </div>
151
+ ))}
152
+ </Fragment>
153
+ );
154
+ })}
155
+ </div>
156
+ );
157
+ });
158
+
159
+ const Button = (
160
+ props: PropsWithChildren<ButtonHTMLAttributes<HTMLButtonElement>>,
161
+ ) => {
162
+ const { className, ...rest } = props;
163
+ return (
164
+ <button
165
+ className={clsx('str-video__permission-request__button', className)}
166
+ {...rest}
167
+ />
168
+ );
169
+ };
170
+
171
+ const messageForPermission = (userName: string, permission: string) => {
172
+ switch (permission) {
173
+ case OwnCapability.SEND_AUDIO:
174
+ return `${userName} is requesting to speak`;
175
+ case OwnCapability.SEND_VIDEO:
176
+ return `${userName} is requesting to share their camera`;
177
+ case OwnCapability.SCREENSHARE:
178
+ return `${userName} is requesting to present their screen`;
179
+ default:
180
+ return `${userName} is requesting permission: ${permission}`;
181
+ }
182
+ };
@@ -0,0 +1 @@
1
+ export * from './PermissionRequests';
@@ -0,0 +1,48 @@
1
+ import { useEffect, useState } from 'react';
2
+ import { Call, StreamReaction } from '@stream-io/video-client';
3
+ import clsx from 'clsx';
4
+
5
+ export type ReactionProps = {
6
+ reaction: StreamReaction;
7
+ sessionId: string;
8
+ call: Call;
9
+ hideAfterTimeoutInMs?: number;
10
+ };
11
+
12
+ export const defaultEmojiReactions: Record<string, string> = {
13
+ ':like:': '👍',
14
+ ':raise-hand:': '✋',
15
+ ':fireworks:': '🎉',
16
+ };
17
+
18
+ export const Reaction = (props: ReactionProps) => {
19
+ const { reaction, sessionId, call, hideAfterTimeoutInMs = 5500 } = props;
20
+ const [isShowing, setIsShowing] = useState(false);
21
+ useEffect(() => {
22
+ let timeoutId: NodeJS.Timeout;
23
+ if (reaction) {
24
+ setIsShowing(true);
25
+ timeoutId = setTimeout(() => {
26
+ setIsShowing(false);
27
+ call.resetReaction(sessionId);
28
+ }, hideAfterTimeoutInMs);
29
+ }
30
+ return () => {
31
+ clearTimeout(timeoutId);
32
+ };
33
+ }, [call, hideAfterTimeoutInMs, reaction, sessionId]);
34
+
35
+ const { emoji_code } = reaction;
36
+ return (
37
+ <div
38
+ className={clsx(
39
+ 'str-video__reaction',
40
+ isShowing && 'str-video__reaction--visible',
41
+ )}
42
+ >
43
+ <span className="str-video__reaction__emoji">
44
+ {emoji_code && defaultEmojiReactions[emoji_code]}
45
+ </span>
46
+ </div>
47
+ );
48
+ };
@@ -0,0 +1 @@
1
+ export * from './Reaction';
@@ -0,0 +1,56 @@
1
+ import { ComponentProps, useEffect, useState } from 'react';
2
+ import clsx from 'clsx';
3
+
4
+ type SearchInputProps = ComponentProps<'input'> & {
5
+ /**
6
+ * Resets the search to its initial state.
7
+ * The function is called when Esc key or inputs clear button are pressed
8
+ */
9
+ exitSearch: () => void;
10
+ /**
11
+ * Flag to signal, whether search input elements should be rendered as active
12
+ */
13
+ isActive: boolean;
14
+ };
15
+ export const SearchInput = ({
16
+ exitSearch,
17
+ isActive,
18
+ ...rest
19
+ }: SearchInputProps) => {
20
+ const [inputElement, setInputElement] = useState<HTMLInputElement | null>(
21
+ null,
22
+ );
23
+ useEffect(() => {
24
+ if (!inputElement) return;
25
+
26
+ const handleKeyDown = (e: KeyboardEvent) => {
27
+ if (e.key.toLowerCase() === 'escape') exitSearch();
28
+ };
29
+
30
+ inputElement.addEventListener('keydown', handleKeyDown);
31
+
32
+ return () => {
33
+ inputElement.removeEventListener('keydown', handleKeyDown);
34
+ };
35
+ }, [exitSearch, inputElement]);
36
+
37
+ return (
38
+ <div
39
+ className={clsx('str-video__search-input__container', {
40
+ 'str-video__search-input__container--active': isActive,
41
+ })}
42
+ >
43
+ <input placeholder="Search" {...rest} ref={setInputElement} />
44
+ {isActive ? (
45
+ <button
46
+ className="str-video__search-input__clear-btn"
47
+ onClick={exitSearch}
48
+ >
49
+ <span className="str-video__search-input__icon--active" />
50
+ </button>
51
+ ) : (
52
+ <span className="str-video__search-input__icon" />
53
+ )}
54
+ </div>
55
+ );
56
+ };
@@ -0,0 +1,40 @@
1
+ import { ComponentType } from 'react';
2
+ import { LoadingIndicator as DefaultLoadingIndicator } from '../LoadingIndicator';
3
+ import { SearchController } from './hooks';
4
+
5
+ export type SearchResultListProps<T> = {
6
+ data: T[];
7
+ };
8
+
9
+ export type SearchResultsProps<T> = Pick<
10
+ SearchController<T>,
11
+ 'searchResults' | 'searchQueryInProgress'
12
+ > & {
13
+ /** Component to be displayed, when empty array of search results is provided */
14
+ EmptySearchResultComponent: ComponentType;
15
+ /** Component will be used to render non-empty array of search results */
16
+ SearchResultList: ComponentType<SearchResultListProps<T>>;
17
+ /** Component to be displayed while the search query request is in progress */
18
+ LoadingIndicator?: ComponentType;
19
+ };
20
+
21
+ export const SearchResults = <T extends unknown>({
22
+ EmptySearchResultComponent,
23
+ LoadingIndicator = DefaultLoadingIndicator,
24
+ searchQueryInProgress,
25
+ searchResults,
26
+ SearchResultList,
27
+ }: SearchResultsProps<T>) => {
28
+ if (searchQueryInProgress) {
29
+ return (
30
+ <div className="str-video__search-results--loading">
31
+ <LoadingIndicator />
32
+ </div>
33
+ );
34
+ }
35
+ if (!searchResults.length) {
36
+ return <EmptySearchResultComponent />;
37
+ }
38
+
39
+ return <SearchResultList data={searchResults} />;
40
+ };
@@ -0,0 +1 @@
1
+ export * from './useSearch';
@@ -0,0 +1,52 @@
1
+ import { useEffect, useState } from 'react';
2
+
3
+ export type SearchController<T> = {
4
+ /** Flag signals that the search request is flight await the response */
5
+ searchQueryInProgress: boolean;
6
+ /** Array of items returned by the search query */
7
+ searchResults: T[];
8
+ };
9
+
10
+ export type UseSearchParams<T> = {
11
+ /** Search function performing the search request */
12
+ searchFn: (searchQuery: string) => Promise<T[]>;
13
+ /** Debounce interval applied to the search function */
14
+ debounceInterval: number;
15
+ /** Search query string */
16
+ searchQuery?: string;
17
+ };
18
+
19
+ export const useSearch = <T>({
20
+ debounceInterval,
21
+ searchFn,
22
+ searchQuery = '',
23
+ }: UseSearchParams<T>): SearchController<T> => {
24
+ const [searchResults, setSearchResults] = useState<T[]>([]);
25
+ const [searchQueryInProgress, setSearchQueryInProgress] = useState(false);
26
+
27
+ useEffect(() => {
28
+ if (!searchQuery.length) return setSearchResults([]);
29
+
30
+ setSearchQueryInProgress(true);
31
+
32
+ const timeout = setTimeout(async () => {
33
+ try {
34
+ const results = await searchFn(searchQuery);
35
+ setSearchResults(results);
36
+ } catch (error) {
37
+ console.error(error);
38
+ } finally {
39
+ setSearchQueryInProgress(false);
40
+ }
41
+ }, debounceInterval);
42
+
43
+ return () => {
44
+ clearTimeout(timeout);
45
+ };
46
+ }, [debounceInterval, searchFn, searchQuery]);
47
+
48
+ return {
49
+ searchQueryInProgress,
50
+ searchResults,
51
+ };
52
+ };
@@ -0,0 +1,2 @@
1
+ export * from './SearchInput';
2
+ export * from './SearchResults';
@@ -0,0 +1,126 @@
1
+ import { useState, useEffect } from 'react';
2
+ import { Call, SfuModels } from '@stream-io/video-client';
3
+
4
+ import {
5
+ useLocalParticipant,
6
+ useParticipants,
7
+ } from '@stream-io/video-react-bindings';
8
+ import { ParticipantBox } from '../../core/components/ParticipantBox/ParticipantBox';
9
+ import { Video } from '../Video';
10
+
11
+ import { useVerticalScrollPosition } from './hooks';
12
+ import { IconButton } from '../Button';
13
+
14
+ export const CallParticipantsScreenView = (props: { call: Call }) => {
15
+ const { call } = props;
16
+ const localParticipant = useLocalParticipant();
17
+ const allParticipants = useParticipants();
18
+ const firstScreenSharingParticipant = allParticipants.find((p) =>
19
+ p.publishedTracks.includes(SfuModels.TrackType.SCREEN_SHARE),
20
+ );
21
+
22
+ const [scrollWrapper, setScrollWrapper] = useState<HTMLDivElement | null>(
23
+ null,
24
+ );
25
+
26
+ useEffect(() => {
27
+ if (!scrollWrapper) return;
28
+
29
+ const cleanup = call.viewportTracker.setViewport(scrollWrapper);
30
+
31
+ return () => cleanup();
32
+ }, [scrollWrapper, call.viewportTracker]);
33
+
34
+ const scrollUpClickHandler = () => {
35
+ scrollWrapper?.scrollBy({ top: -150, behavior: 'smooth' });
36
+ };
37
+
38
+ const scrollDownClickHandler = () => {
39
+ scrollWrapper?.scrollBy({ top: 150, behavior: 'smooth' });
40
+ };
41
+
42
+ const scrollPosition = useVerticalScrollPosition(scrollWrapper);
43
+
44
+ const [overlayVisible, setOverlayVisible] = useState(
45
+ () =>
46
+ firstScreenSharingParticipant?.sessionId === localParticipant?.sessionId,
47
+ );
48
+
49
+ return (
50
+ <div className="str-video__call-participants-screen-view">
51
+ <div className="str-video__call-participants-screen-view__screen">
52
+ {firstScreenSharingParticipant && (
53
+ <>
54
+ <span className="str-video__call-participants-screen-view__screen__presenter">
55
+ {firstScreenSharingParticipant.name ||
56
+ firstScreenSharingParticipant.userId}{' '}
57
+ is presenting their screen.
58
+ </span>
59
+ <div className="str-video__call-participants-screen-view__wrapper">
60
+ <Video
61
+ className="str-video__screen-share"
62
+ participant={firstScreenSharingParticipant}
63
+ call={call}
64
+ kind="screen"
65
+ autoPlay
66
+ muted
67
+ />
68
+ {overlayVisible && (
69
+ <div className="str-video__call-participants-screen-view__overlay">
70
+ <div>
71
+ <div>
72
+ To avoid an infinity mirror, don't share your entire
73
+ screen or browser window.
74
+ </div>
75
+ <div>
76
+ Share just a single tab or a different window instead.
77
+ </div>
78
+ </div>
79
+ <button
80
+ type="button"
81
+ onClick={() => {
82
+ setOverlayVisible(false);
83
+ }}
84
+ >
85
+ Got it
86
+ </button>
87
+ </div>
88
+ )}
89
+ </div>
90
+ </>
91
+ )}
92
+ </div>
93
+ <div className="str-video__call-participants-screen-view__buttons-wrapper">
94
+ {scrollPosition && scrollPosition !== 'top' && (
95
+ <IconButton
96
+ onClick={scrollUpClickHandler}
97
+ icon="caret-up"
98
+ className="str-video__call-participants-screen-view__button-up"
99
+ />
100
+ )}
101
+ <div
102
+ ref={setScrollWrapper}
103
+ className="str-video__call-participants-screen-view__participants-wrapper"
104
+ >
105
+ <div className="str-video__call-participants-screen-view__participants">
106
+ {allParticipants.map((participant) => (
107
+ <ParticipantBox
108
+ key={participant.sessionId}
109
+ participant={participant}
110
+ call={call}
111
+ sinkId={localParticipant?.audioOutputDeviceId}
112
+ />
113
+ ))}
114
+ </div>
115
+ </div>
116
+ {scrollPosition && scrollPosition !== 'bottom' && (
117
+ <IconButton
118
+ onClick={scrollDownClickHandler}
119
+ icon="caret-down"
120
+ className="str-video__call-participants-screen-view__button-down"
121
+ />
122
+ )}
123
+ </div>
124
+ </div>
125
+ );
126
+ };
@@ -0,0 +1,25 @@
1
+ import { Call } from '@stream-io/video-client';
2
+ import { ParticipantBox } from '../../core/components/ParticipantBox/ParticipantBox';
3
+ import {
4
+ useLocalParticipant,
5
+ useParticipants,
6
+ } from '@stream-io/video-react-bindings';
7
+
8
+ export const CallParticipantsView = (props: { call: Call }) => {
9
+ const { call } = props;
10
+ const localParticipant = useLocalParticipant();
11
+ const participants = useParticipants();
12
+ const grid = `str-video__grid-${participants.length || 1}`;
13
+ return (
14
+ <div className={`str-video__call-participants-view ${grid}`}>
15
+ {participants.map((participant) => (
16
+ <ParticipantBox
17
+ key={participant.sessionId}
18
+ participant={participant}
19
+ call={call}
20
+ sinkId={localParticipant?.audioOutputDeviceId}
21
+ />
22
+ ))}
23
+ </div>
24
+ );
25
+ };