@stream-io/video-react-sdk 1.41.0 → 1.42.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (305) hide show
  1. package/CHANGELOG.md +22 -6
  2. package/dist/embedded.cjs.js +1 -1
  3. package/dist/esm/embedded.js +3 -0
  4. package/dist/esm/embedded.js.map +1 -0
  5. package/dist/esm/index.js +92 -0
  6. package/dist/esm/index.js.map +1 -0
  7. package/dist/esm/src/components/Avatar/Avatar.js +14 -0
  8. package/dist/esm/src/components/Avatar/Avatar.js.map +1 -0
  9. package/dist/{background-filters-D2U5UBbH.es.js → esm/src/components/BackgroundFilters/BackgroundFilters.js} +1 -1
  10. package/dist/esm/src/components/BackgroundFilters/BackgroundFilters.js.map +1 -0
  11. package/dist/esm/src/components/BackgroundFilters/BackgroundFiltersProvider.js +33 -0
  12. package/dist/esm/src/components/BackgroundFilters/BackgroundFiltersProvider.js.map +1 -0
  13. package/dist/esm/src/components/Button/CompositeButton.js +29 -0
  14. package/dist/esm/src/components/Button/CompositeButton.js.map +1 -0
  15. package/dist/esm/src/components/Button/IconButton.js +18 -0
  16. package/dist/esm/src/components/Button/IconButton.js.map +1 -0
  17. package/dist/esm/src/components/Button/TextButton.js +8 -0
  18. package/dist/esm/src/components/Button/TextButton.js.map +1 -0
  19. package/dist/esm/src/components/CallControls/AcceptCallButton.js +28 -0
  20. package/dist/esm/src/components/CallControls/AcceptCallButton.js.map +1 -0
  21. package/dist/esm/src/components/CallControls/CallControls.js +21 -0
  22. package/dist/esm/src/components/CallControls/CallControls.js.map +1 -0
  23. package/dist/esm/src/components/CallControls/CallStatsButton.js +18 -0
  24. package/dist/esm/src/components/CallControls/CallStatsButton.js.map +1 -0
  25. package/dist/esm/src/components/CallControls/CancelCallButton.js +78 -0
  26. package/dist/esm/src/components/CallControls/CancelCallButton.js.map +1 -0
  27. package/dist/esm/src/components/CallControls/ReactionsButton.js +61 -0
  28. package/dist/esm/src/components/CallControls/ReactionsButton.js.map +1 -0
  29. package/dist/esm/src/components/CallControls/RecordCallButton.js +64 -0
  30. package/dist/esm/src/components/CallControls/RecordCallButton.js.map +1 -0
  31. package/dist/esm/src/components/CallControls/ScreenShareButton.js +44 -0
  32. package/dist/esm/src/components/CallControls/ScreenShareButton.js.map +1 -0
  33. package/dist/esm/src/components/CallControls/ToggleAudioButton.js +72 -0
  34. package/dist/esm/src/components/CallControls/ToggleAudioButton.js.map +1 -0
  35. package/dist/esm/src/components/CallControls/ToggleAudioOutputButton.js +27 -0
  36. package/dist/esm/src/components/CallControls/ToggleAudioOutputButton.js.map +1 -0
  37. package/dist/esm/src/components/CallControls/ToggleVideoButton.js +81 -0
  38. package/dist/esm/src/components/CallControls/ToggleVideoButton.js.map +1 -0
  39. package/dist/esm/src/components/CallParticipantsList/BlockedUserListing.js +23 -0
  40. package/dist/esm/src/components/CallParticipantsList/BlockedUserListing.js.map +1 -0
  41. package/dist/esm/src/components/CallParticipantsList/CallParticipantListHeader.js +15 -0
  42. package/dist/esm/src/components/CallParticipantsList/CallParticipantListHeader.js.map +1 -0
  43. package/dist/esm/src/components/CallParticipantsList/CallParticipantListing.js +7 -0
  44. package/dist/esm/src/components/CallParticipantsList/CallParticipantListing.js.map +1 -0
  45. package/dist/esm/src/components/CallParticipantsList/CallParticipantListingItem.js +46 -0
  46. package/dist/esm/src/components/CallParticipantsList/CallParticipantListingItem.js.map +1 -0
  47. package/dist/esm/src/components/CallParticipantsList/CallParticipantsList.js +81 -0
  48. package/dist/esm/src/components/CallParticipantsList/CallParticipantsList.js.map +1 -0
  49. package/dist/esm/src/components/CallParticipantsList/EmptyParticipantSearchList.js +10 -0
  50. package/dist/esm/src/components/CallParticipantsList/EmptyParticipantSearchList.js.map +1 -0
  51. package/dist/esm/src/components/CallPreview/CallPreview.js +24 -0
  52. package/dist/esm/src/components/CallPreview/CallPreview.js.map +1 -0
  53. package/dist/esm/src/components/CallRecordingList/CallRecordingList.js +12 -0
  54. package/dist/esm/src/components/CallRecordingList/CallRecordingList.js.map +1 -0
  55. package/dist/esm/src/components/CallRecordingList/CallRecordingListHeader.js +12 -0
  56. package/dist/esm/src/components/CallRecordingList/CallRecordingListHeader.js.map +1 -0
  57. package/dist/esm/src/components/CallRecordingList/CallRecordingListItem.js +14 -0
  58. package/dist/esm/src/components/CallRecordingList/CallRecordingListItem.js.map +1 -0
  59. package/dist/esm/src/components/CallRecordingList/EmptyCallRecordingListing.js +8 -0
  60. package/dist/esm/src/components/CallRecordingList/EmptyCallRecordingListing.js.map +1 -0
  61. package/dist/esm/src/components/CallRecordingList/LoadingCallRecordingListing.js +10 -0
  62. package/dist/esm/src/components/CallRecordingList/LoadingCallRecordingListing.js.map +1 -0
  63. package/dist/esm/src/components/CallStats/CallStats.js +180 -0
  64. package/dist/esm/src/components/CallStats/CallStats.js.map +1 -0
  65. package/dist/{latency-chart-Bj5OSYzg.es.js → esm/src/components/CallStats/CallStatsLatencyChart.js} +1 -1
  66. package/dist/esm/src/components/CallStats/CallStatsLatencyChart.js.map +1 -0
  67. package/dist/esm/src/components/DeviceSettings/AudioVolumeIndicator.js +27 -0
  68. package/dist/esm/src/components/DeviceSettings/AudioVolumeIndicator.js.map +1 -0
  69. package/dist/esm/src/components/DeviceSettings/DeviceAudioPreviewItem.js +42 -0
  70. package/dist/esm/src/components/DeviceSettings/DeviceAudioPreviewItem.js.map +1 -0
  71. package/dist/esm/src/components/DeviceSettings/DeviceSelector.js +67 -0
  72. package/dist/esm/src/components/DeviceSettings/DeviceSelector.js.map +1 -0
  73. package/dist/esm/src/components/DeviceSettings/DeviceSelectorAudio.js +26 -0
  74. package/dist/esm/src/components/DeviceSettings/DeviceSelectorAudio.js.map +1 -0
  75. package/dist/esm/src/components/DeviceSettings/DeviceSelectorVideo.js +15 -0
  76. package/dist/esm/src/components/DeviceSettings/DeviceSelectorVideo.js.map +1 -0
  77. package/dist/esm/src/components/DeviceSettings/DeviceSettings.js +26 -0
  78. package/dist/esm/src/components/DeviceSettings/DeviceSettings.js.map +1 -0
  79. package/dist/esm/src/components/DeviceSettings/DeviceVideoPreviewItem.js +42 -0
  80. package/dist/esm/src/components/DeviceSettings/DeviceVideoPreviewItem.js.map +1 -0
  81. package/dist/esm/src/components/DeviceSettings/SpeakerTest.js +57 -0
  82. package/dist/esm/src/components/DeviceSettings/SpeakerTest.js.map +1 -0
  83. package/dist/esm/src/components/DropdownSelect/DropdownSelect.js +79 -0
  84. package/dist/esm/src/components/DropdownSelect/DropdownSelect.js.map +1 -0
  85. package/dist/esm/src/components/Icon/Icon.js +7 -0
  86. package/dist/esm/src/components/Icon/Icon.js.map +1 -0
  87. package/dist/esm/src/components/LoadingIndicator/LoadingIndicator.js +9 -0
  88. package/dist/esm/src/components/LoadingIndicator/LoadingIndicator.js.map +1 -0
  89. package/dist/esm/src/components/Menu/GenericMenu.js +19 -0
  90. package/dist/esm/src/components/Menu/GenericMenu.js.map +1 -0
  91. package/dist/esm/src/components/Menu/MenuToggle.js +75 -0
  92. package/dist/esm/src/components/Menu/MenuToggle.js.map +1 -0
  93. package/dist/esm/src/components/NoiseCancellation/NoiseCancellationProvider.js +96 -0
  94. package/dist/esm/src/components/NoiseCancellation/NoiseCancellationProvider.js.map +1 -0
  95. package/dist/esm/src/components/Notification/MicCaptureErrorNotification.js +23 -0
  96. package/dist/esm/src/components/Notification/MicCaptureErrorNotification.js.map +1 -0
  97. package/dist/esm/src/components/Notification/Notification.js +31 -0
  98. package/dist/esm/src/components/Notification/Notification.js.map +1 -0
  99. package/dist/esm/src/components/Notification/PermissionNotification.js +32 -0
  100. package/dist/esm/src/components/Notification/PermissionNotification.js.map +1 -0
  101. package/dist/esm/src/components/Notification/RecordingInProgressNotification.js +23 -0
  102. package/dist/esm/src/components/Notification/RecordingInProgressNotification.js.map +1 -0
  103. package/dist/esm/src/components/Notification/SpeakingWhileMutedNotification.js +14 -0
  104. package/dist/esm/src/components/Notification/SpeakingWhileMutedNotification.js.map +1 -0
  105. package/dist/esm/src/components/Permissions/PermissionRequests.js +99 -0
  106. package/dist/esm/src/components/Permissions/PermissionRequests.js.map +1 -0
  107. package/dist/esm/src/components/Reaction/Reaction.js +32 -0
  108. package/dist/esm/src/components/Reaction/Reaction.js.map +1 -0
  109. package/dist/esm/src/components/RingingCall/RingingCall.js +48 -0
  110. package/dist/esm/src/components/RingingCall/RingingCall.js.map +1 -0
  111. package/dist/esm/src/components/RingingCall/RingingCallControls.js +34 -0
  112. package/dist/esm/src/components/RingingCall/RingingCallControls.js.map +1 -0
  113. package/dist/esm/src/components/Search/SearchInput.js +27 -0
  114. package/dist/esm/src/components/Search/SearchInput.js.map +1 -0
  115. package/dist/esm/src/components/Search/SearchResults.js +15 -0
  116. package/dist/esm/src/components/Search/SearchResults.js.map +1 -0
  117. package/dist/esm/src/components/Search/hooks/useSearch.js +38 -0
  118. package/dist/esm/src/components/Search/hooks/useSearch.js.map +1 -0
  119. package/dist/esm/src/components/StreamTheme/StreamTheme.js +9 -0
  120. package/dist/esm/src/components/StreamTheme/StreamTheme.js.map +1 -0
  121. package/dist/esm/src/components/Tooltip/Tooltip.js +29 -0
  122. package/dist/esm/src/components/Tooltip/Tooltip.js.map +1 -0
  123. package/dist/esm/src/components/Tooltip/WithTooltip.js +15 -0
  124. package/dist/esm/src/components/Tooltip/WithTooltip.js.map +1 -0
  125. package/dist/esm/src/components/Tooltip/hooks/useEnterLeaveHandlers.js +17 -0
  126. package/dist/esm/src/components/Tooltip/hooks/useEnterLeaveHandlers.js.map +1 -0
  127. package/dist/esm/src/components/VideoPreview/VideoPreview.js +37 -0
  128. package/dist/esm/src/components/VideoPreview/VideoPreview.js.map +1 -0
  129. package/dist/esm/src/core/components/Audio/Audio.js +22 -0
  130. package/dist/esm/src/core/components/Audio/Audio.js.map +1 -0
  131. package/dist/esm/src/core/components/Audio/ParticipantsAudio.js +23 -0
  132. package/dist/esm/src/core/components/Audio/ParticipantsAudio.js.map +1 -0
  133. package/dist/esm/src/core/components/CallLayout/LivestreamLayout.js +150 -0
  134. package/dist/esm/src/core/components/CallLayout/LivestreamLayout.js.map +1 -0
  135. package/dist/esm/src/core/components/CallLayout/PaginatedGridLayout.js +79 -0
  136. package/dist/esm/src/core/components/CallLayout/PaginatedGridLayout.js.map +1 -0
  137. package/dist/esm/src/core/components/CallLayout/PipLayout/Grid.js +80 -0
  138. package/dist/esm/src/core/components/CallLayout/PipLayout/Grid.js.map +1 -0
  139. package/dist/esm/src/core/components/CallLayout/PipLayout/Host.js +13 -0
  140. package/dist/esm/src/core/components/CallLayout/PipLayout/Host.js.map +1 -0
  141. package/dist/esm/src/core/components/CallLayout/PipLayout/Pip.js +57 -0
  142. package/dist/esm/src/core/components/CallLayout/PipLayout/Pip.js.map +1 -0
  143. package/dist/esm/src/core/components/CallLayout/PipLayout/index.js +8 -0
  144. package/dist/esm/src/core/components/CallLayout/PipLayout/index.js.map +1 -0
  145. package/dist/esm/src/core/components/CallLayout/SpeakerLayout.js +103 -0
  146. package/dist/esm/src/core/components/CallLayout/SpeakerLayout.js.map +1 -0
  147. package/dist/esm/src/core/components/CallLayout/hooks.js +62 -0
  148. package/dist/esm/src/core/components/CallLayout/hooks.js.map +1 -0
  149. package/dist/esm/src/core/components/ParticipantView/DefaultParticipantViewUI.js +94 -0
  150. package/dist/esm/src/core/components/ParticipantView/DefaultParticipantViewUI.js.map +1 -0
  151. package/dist/esm/src/core/components/ParticipantView/ParticipantActionsContextMenu.js +97 -0
  152. package/dist/esm/src/core/components/ParticipantView/ParticipantActionsContextMenu.js.map +1 -0
  153. package/dist/esm/src/core/components/ParticipantView/ParticipantView.js +65 -0
  154. package/dist/esm/src/core/components/ParticipantView/ParticipantView.js.map +1 -0
  155. package/dist/esm/src/core/components/ParticipantView/ParticipantViewContext.js +7 -0
  156. package/dist/esm/src/core/components/ParticipantView/ParticipantViewContext.js.map +1 -0
  157. package/dist/esm/src/core/components/StreamCall/StreamCall.js +8 -0
  158. package/dist/esm/src/core/components/StreamCall/StreamCall.js.map +1 -0
  159. package/dist/esm/src/core/components/StreamVideo/StreamVideo.js +11 -0
  160. package/dist/esm/src/core/components/StreamVideo/StreamVideo.js.map +1 -0
  161. package/dist/esm/src/core/components/Video/BaseVideo.js +41 -0
  162. package/dist/esm/src/core/components/Video/BaseVideo.js.map +1 -0
  163. package/dist/esm/src/core/components/Video/BaseVideoPlaceholder.js +21 -0
  164. package/dist/esm/src/core/components/Video/BaseVideoPlaceholder.js.map +1 -0
  165. package/dist/esm/src/core/components/Video/DefaultPictureInPicturePlaceholder.js +12 -0
  166. package/dist/esm/src/core/components/Video/DefaultPictureInPicturePlaceholder.js.map +1 -0
  167. package/dist/esm/src/core/components/Video/DefaultVideoPlaceholder.js +12 -0
  168. package/dist/esm/src/core/components/Video/DefaultVideoPlaceholder.js.map +1 -0
  169. package/dist/esm/src/core/components/Video/Video.js +88 -0
  170. package/dist/esm/src/core/components/Video/Video.js.map +1 -0
  171. package/dist/esm/src/core/hooks/useCalculateHardLimit.js +59 -0
  172. package/dist/esm/src/core/hooks/useCalculateHardLimit.js.map +1 -0
  173. package/dist/esm/src/core/hooks/usePictureInPictureState.js +24 -0
  174. package/dist/esm/src/core/hooks/usePictureInPictureState.js.map +1 -0
  175. package/dist/esm/src/core/hooks/useTrackElementVisibility.js +14 -0
  176. package/dist/esm/src/core/hooks/useTrackElementVisibility.js.map +1 -0
  177. package/dist/esm/src/embedded/EmbeddedClientProvider.js +83 -0
  178. package/dist/esm/src/embedded/EmbeddedClientProvider.js.map +1 -0
  179. package/dist/esm/src/embedded/call/CallControls.js +65 -0
  180. package/dist/esm/src/embedded/call/CallControls.js.map +1 -0
  181. package/dist/esm/src/embedded/call/CallHeader.js +57 -0
  182. package/dist/esm/src/embedded/call/CallHeader.js.map +1 -0
  183. package/dist/esm/src/embedded/call/CallLayout.js +63 -0
  184. package/dist/esm/src/embedded/call/CallLayout.js.map +1 -0
  185. package/dist/esm/src/embedded/call/CallStateRouter.js +87 -0
  186. package/dist/esm/src/embedded/call/CallStateRouter.js.map +1 -0
  187. package/dist/esm/src/embedded/call/EmbeddedCall.js +12 -0
  188. package/dist/esm/src/embedded/call/EmbeddedCall.js.map +1 -0
  189. package/dist/esm/src/embedded/context/ConfigurationContext.js +21 -0
  190. package/dist/esm/src/embedded/context/ConfigurationContext.js.map +1 -0
  191. package/dist/esm/src/embedded/hooks/useCallDuration.js +32 -0
  192. package/dist/esm/src/embedded/hooks/useCallDuration.js.map +1 -0
  193. package/dist/esm/src/embedded/hooks/useEmbeddedClient.js +40 -0
  194. package/dist/esm/src/embedded/hooks/useEmbeddedClient.js.map +1 -0
  195. package/dist/esm/src/embedded/hooks/useInitializeCall.js +39 -0
  196. package/dist/esm/src/embedded/hooks/useInitializeCall.js.map +1 -0
  197. package/dist/esm/src/embedded/hooks/useInitializeVideoClient.js +93 -0
  198. package/dist/esm/src/embedded/hooks/useInitializeVideoClient.js.map +1 -0
  199. package/dist/esm/src/embedded/hooks/useIsLivestreamPaused.js +42 -0
  200. package/dist/esm/src/embedded/hooks/useIsLivestreamPaused.js.map +1 -0
  201. package/dist/esm/src/embedded/hooks/useLayout.js +122 -0
  202. package/dist/esm/src/embedded/hooks/useLayout.js.map +1 -0
  203. package/dist/esm/src/embedded/hooks/useNoiseCancellationLoader.js +48 -0
  204. package/dist/esm/src/embedded/hooks/useNoiseCancellationLoader.js.map +1 -0
  205. package/dist/esm/src/embedded/hooks/useWakeLock.js +34 -0
  206. package/dist/esm/src/embedded/hooks/useWakeLock.js.map +1 -0
  207. package/dist/esm/src/embedded/livestream/EmbeddedLivestream.js +11 -0
  208. package/dist/esm/src/embedded/livestream/EmbeddedLivestream.js.map +1 -0
  209. package/dist/esm/src/embedded/livestream/LivestreamUI.js +17 -0
  210. package/dist/esm/src/embedded/livestream/LivestreamUI.js.map +1 -0
  211. package/dist/esm/src/embedded/livestream/host/HostLayout.js +76 -0
  212. package/dist/esm/src/embedded/livestream/host/HostLayout.js.map +1 -0
  213. package/dist/esm/src/embedded/livestream/host/HostStateRouter.js +110 -0
  214. package/dist/esm/src/embedded/livestream/host/HostStateRouter.js.map +1 -0
  215. package/dist/esm/src/embedded/livestream/viewer/ViewerLayout.js +74 -0
  216. package/dist/esm/src/embedded/livestream/viewer/ViewerLayout.js.map +1 -0
  217. package/dist/esm/src/embedded/livestream/viewer/ViewerLobby.js +109 -0
  218. package/dist/esm/src/embedded/livestream/viewer/ViewerLobby.js.map +1 -0
  219. package/dist/esm/src/embedded/livestream/viewer/ViewerStateRouter.js +105 -0
  220. package/dist/esm/src/embedded/livestream/viewer/ViewerStateRouter.js.map +1 -0
  221. package/dist/esm/src/embedded/shared/BlurToggleButton/BlurToggleButton.js +65 -0
  222. package/dist/esm/src/embedded/shared/BlurToggleButton/BlurToggleButton.js.map +1 -0
  223. package/dist/esm/src/embedded/shared/CallFeedback/CallEndedScreen.js +34 -0
  224. package/dist/esm/src/embedded/shared/CallFeedback/CallEndedScreen.js.map +1 -0
  225. package/dist/esm/src/embedded/shared/CallFeedback/CallFeedback.js +35 -0
  226. package/dist/esm/src/embedded/shared/CallFeedback/CallFeedback.js.map +1 -0
  227. package/dist/esm/src/embedded/shared/CallFeedback/RatingScreen.js +18 -0
  228. package/dist/esm/src/embedded/shared/CallFeedback/RatingScreen.js.map +1 -0
  229. package/dist/esm/src/embedded/shared/CallFeedback/StarRating.js +37 -0
  230. package/dist/esm/src/embedded/shared/CallFeedback/StarRating.js.map +1 -0
  231. package/dist/esm/src/embedded/shared/CallFeedback/ThankYouScreen.js +34 -0
  232. package/dist/esm/src/embedded/shared/CallFeedback/ThankYouScreen.js.map +1 -0
  233. package/dist/esm/src/embedded/shared/ConnectionNotification/ConnectionNotification.js +56 -0
  234. package/dist/esm/src/embedded/shared/ConnectionNotification/ConnectionNotification.js.map +1 -0
  235. package/dist/esm/src/embedded/shared/EmbeddedParticipantViewUI/EmbeddedParticipantViewUI.js +42 -0
  236. package/dist/esm/src/embedded/shared/EmbeddedParticipantViewUI/EmbeddedParticipantViewUI.js.map +1 -0
  237. package/dist/esm/src/embedded/shared/JoinError/JoinError.js +34 -0
  238. package/dist/esm/src/embedded/shared/JoinError/JoinError.js.map +1 -0
  239. package/dist/esm/src/embedded/shared/Lobby/DeviceControls.js +44 -0
  240. package/dist/esm/src/embedded/shared/Lobby/DeviceControls.js.map +1 -0
  241. package/dist/esm/src/embedded/shared/Lobby/DisabledDeviceButton.js +31 -0
  242. package/dist/esm/src/embedded/shared/Lobby/DisabledDeviceButton.js.map +1 -0
  243. package/dist/esm/src/embedded/shared/Lobby/Lobby.js +45 -0
  244. package/dist/esm/src/embedded/shared/Lobby/Lobby.js.map +1 -0
  245. package/dist/esm/src/embedded/shared/Lobby/ToggleCameraButton.js +40 -0
  246. package/dist/esm/src/embedded/shared/Lobby/ToggleCameraButton.js.map +1 -0
  247. package/dist/esm/src/embedded/shared/Lobby/ToggleMicButton.js +41 -0
  248. package/dist/esm/src/embedded/shared/Lobby/ToggleMicButton.js.map +1 -0
  249. package/dist/esm/src/embedded/shared/Lobby/VideoPreviewFallbacks.js +50 -0
  250. package/dist/esm/src/embedded/shared/Lobby/VideoPreviewFallbacks.js.map +1 -0
  251. package/dist/esm/src/embedded/shared/ViewersCount/ViewersCount.js +31 -0
  252. package/dist/esm/src/embedded/shared/ViewersCount/ViewersCount.js.map +1 -0
  253. package/dist/esm/src/hooks/useDeviceList.js +40 -0
  254. package/dist/esm/src/hooks/useDeviceList.js.map +1 -0
  255. package/dist/esm/src/hooks/useDragToScroll.js +116 -0
  256. package/dist/esm/src/hooks/useDragToScroll.js.map +1 -0
  257. package/dist/esm/src/hooks/useFloatingUIPreset.js +34 -0
  258. package/dist/esm/src/hooks/useFloatingUIPreset.js.map +1 -0
  259. package/dist/esm/src/hooks/useLoopbackRecording.js +138 -0
  260. package/dist/esm/src/hooks/useLoopbackRecording.js.map +1 -0
  261. package/dist/esm/src/hooks/useModeration.js +135 -0
  262. package/dist/esm/src/hooks/useModeration.js.map +1 -0
  263. package/dist/esm/src/hooks/usePersistedDevicePreferences.js +16 -0
  264. package/dist/esm/src/hooks/usePersistedDevicePreferences.js.map +1 -0
  265. package/dist/esm/src/hooks/useRequestPermission.js +41 -0
  266. package/dist/esm/src/hooks/useRequestPermission.js.map +1 -0
  267. package/dist/esm/src/hooks/useScrollPosition.js +66 -0
  268. package/dist/esm/src/hooks/useScrollPosition.js.map +1 -0
  269. package/dist/esm/src/translations/en.json.js +177 -0
  270. package/dist/esm/src/translations/en.json.js.map +1 -0
  271. package/dist/esm/src/translations/index.js +6 -0
  272. package/dist/esm/src/translations/index.js.map +1 -0
  273. package/dist/esm/src/utilities/applyElementToRef.js +10 -0
  274. package/dist/esm/src/utilities/applyElementToRef.js.map +1 -0
  275. package/dist/esm/src/utilities/callControlHandler.js +29 -0
  276. package/dist/esm/src/utilities/callControlHandler.js.map +1 -0
  277. package/dist/esm/src/utilities/chunk.js +7 -0
  278. package/dist/esm/src/utilities/chunk.js.map +1 -0
  279. package/dist/esm/src/utilities/filter.js +94 -0
  280. package/dist/esm/src/utilities/filter.js.map +1 -0
  281. package/dist/esm/src/utilities/isComponentType.js +10 -0
  282. package/dist/esm/src/utilities/isComponentType.js.map +1 -0
  283. package/dist/esm/src/utilities/normalizeString.js +11 -0
  284. package/dist/esm/src/utilities/normalizeString.js.map +1 -0
  285. package/dist/esm/src/wrappers/LivestreamPlayer/LivestreamPlayer.js +105 -0
  286. package/dist/esm/src/wrappers/LivestreamPlayer/LivestreamPlayer.js.map +1 -0
  287. package/dist/index.cjs.js +135 -2
  288. package/dist/index.cjs.js.map +1 -1
  289. package/dist/index.d.ts +1 -1
  290. package/dist/src/hooks/index.d.ts +1 -0
  291. package/dist/src/hooks/useLoopbackRecording.d.ts +23 -0
  292. package/index.ts +4 -0
  293. package/package.json +14 -10
  294. package/src/hooks/index.ts +1 -0
  295. package/src/hooks/useLoopbackRecording.ts +207 -0
  296. package/dist/background-filters-D2U5UBbH.es.js.map +0 -1
  297. package/dist/embedded-BackgroundFilters-D2U5UBbH.es.js +0 -420
  298. package/dist/embedded-BackgroundFilters-D2U5UBbH.es.js.map +0 -1
  299. package/dist/embedded-CallStatsLatencyChart-Bj5OSYzg.es.js +0 -57
  300. package/dist/embedded-CallStatsLatencyChart-Bj5OSYzg.es.js.map +0 -1
  301. package/dist/embedded.es.js +0 -3536
  302. package/dist/embedded.es.js.map +0 -1
  303. package/dist/index.es.js +0 -3291
  304. package/dist/index.es.js.map +0 -1
  305. package/dist/latency-chart-Bj5OSYzg.es.js.map +0 -1
@@ -0,0 +1,14 @@
1
+ import { useEffect } from 'react';
2
+ import { useCall } from '@stream-io/video-react-bindings';
3
+
4
+ const useTrackElementVisibility = ({ trackedElement, sessionId, trackType, }) => {
5
+ const call = useCall();
6
+ useEffect(() => {
7
+ if (!trackedElement || !call || trackType === 'none')
8
+ return;
9
+ return call.trackElementVisibility(trackedElement, sessionId, trackType);
10
+ }, [trackedElement, call, sessionId, trackType]);
11
+ };
12
+
13
+ export { useTrackElementVisibility };
14
+ //# sourceMappingURL=useTrackElementVisibility.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTrackElementVisibility.js","sources":["../../../../../../../src/core/hooks/useTrackElementVisibility.ts"],"sourcesContent":["import { useEffect } from 'react';\nimport { VideoTrackType } from '@stream-io/video-client';\nimport { useCall } from '@stream-io/video-react-bindings';\n\nexport const useTrackElementVisibility = <T extends HTMLElement>({\n trackedElement,\n sessionId,\n trackType,\n}: {\n trackedElement: T | null;\n sessionId: string;\n trackType: VideoTrackType | 'none';\n}) => {\n const call = useCall();\n useEffect(() => {\n if (!trackedElement || !call || trackType === 'none') return;\n return call.trackElementVisibility(trackedElement, sessionId, trackType);\n }, [trackedElement, call, sessionId, trackType]);\n};\n"],"names":[],"mappings":";;;AAIO,MAAM,yBAAyB,GAAG,CAAwB,EAC/D,cAAc,EACd,SAAS,EACT,SAAS,GAKV,KAAI;AACH,IAAA,MAAM,IAAI,GAAG,OAAO,EAAE;IACtB,SAAS,CAAC,MAAK;QACb,IAAI,CAAC,cAAc,IAAI,CAAC,IAAI,IAAI,SAAS,KAAK,MAAM;YAAE;QACtD,OAAO,IAAI,CAAC,sBAAsB,CAAC,cAAc,EAAE,SAAS,EAAE,SAAS,CAAC;IAC1E,CAAC,EAAE,CAAC,cAAc,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;AAClD;;;;"}
@@ -0,0 +1,83 @@
1
+ import { jsx, Fragment } from 'react/jsx-runtime';
2
+ import { useState, useCallback } from 'react';
3
+ import { useEffectEvent } from '@stream-io/video-react-bindings';
4
+ import '../core/components/Audio/Audio.js';
5
+ import '../core/components/Audio/ParticipantsAudio.js';
6
+ import '@stream-io/video-client';
7
+ import '../core/components/ParticipantView/ParticipantViewContext.js';
8
+ import '../components/Menu/MenuToggle.js';
9
+ import 'clsx';
10
+ import '../core/components/ParticipantView/ParticipantView.js';
11
+ import '../core/components/ParticipantView/DefaultParticipantViewUI.js';
12
+ import { StreamCall } from '../core/components/StreamCall/StreamCall.js';
13
+ import { StreamVideo } from '../core/components/StreamVideo/StreamVideo.js';
14
+ import '../core/components/Video/BaseVideo.js';
15
+ import '../core/components/Video/Video.js';
16
+ import '../core/components/CallLayout/LivestreamLayout.js';
17
+ import '../core/components/CallLayout/PaginatedGridLayout.js';
18
+ import '../core/components/CallLayout/SpeakerLayout.js';
19
+ import '../core/components/CallLayout/PipLayout/Pip.js';
20
+ import '../core/components/CallLayout/PipLayout/Host.js';
21
+ import '../core/components/CallLayout/PipLayout/Grid.js';
22
+ import { BackgroundFiltersProvider } from '../components/BackgroundFilters/BackgroundFiltersProvider.js';
23
+ import '../components/Button/CompositeButton.js';
24
+ import '../components/Button/IconButton.js';
25
+ import '@floating-ui/react';
26
+ import '../components/CallControls/RecordCallButton.js';
27
+ import '../components/CallControls/ReactionsButton.js';
28
+ import '../components/DeviceSettings/DeviceSettings.js';
29
+ import '../components/DropdownSelect/DropdownSelect.js';
30
+ import '../components/CallControls/CancelCallButton.js';
31
+ import '../components/CallControls/CallStatsButton.js';
32
+ import '../components/CallParticipantsList/CallParticipantsList.js';
33
+ import '../components/CallParticipantsList/CallParticipantListingItem.js';
34
+ import { LoadingIndicator } from '../components/LoadingIndicator/LoadingIndicator.js';
35
+ import '../components/CallStats/CallStats.js';
36
+ import { NoiseCancellationProvider } from '../components/NoiseCancellation/NoiseCancellationProvider.js';
37
+ import '../components/RingingCall/RingingCall.js';
38
+ import '../components/Permissions/PermissionRequests.js';
39
+ import { StreamTheme } from '../components/StreamTheme/StreamTheme.js';
40
+ import '../core/components/Video/DefaultVideoPlaceholder.js';
41
+ import { ConfigurationProvider } from './context/ConfigurationContext.js';
42
+ import './shared/Lobby/ToggleMicButton.js';
43
+ import './shared/Lobby/ToggleCameraButton.js';
44
+ import { useEmbeddedClient } from './hooks/useEmbeddedClient.js';
45
+
46
+ const NoiseCancellationWrapper = ({ noiseCancellation, children, }) => {
47
+ if (!noiseCancellation) {
48
+ return jsx(Fragment, { children: children });
49
+ }
50
+ return (jsx(NoiseCancellationProvider, { noiseCancellation: noiseCancellation, children: children }));
51
+ };
52
+ /**
53
+ * Shared provider wrapper for embedded components.
54
+ * Handles client/call initialization and wraps children with all necessary providers.
55
+ */
56
+ const EmbeddedClientProvider = ({ apiKey, user, callId, callType, token, tokenProvider, logLevel, onError, layout, theme, children, }) => {
57
+ const [showError, setShowError] = useState(false);
58
+ const onErrorStable = useEffectEvent(onError ?? console.error);
59
+ const handleError = useCallback((error) => {
60
+ setShowError(true);
61
+ onErrorStable(error);
62
+ }, [onErrorStable]);
63
+ const { client, call, noiseCancellation, noiseCancellationReady } = useEmbeddedClient({
64
+ apiKey,
65
+ user,
66
+ callId,
67
+ callType,
68
+ token,
69
+ tokenProvider,
70
+ logLevel,
71
+ handleError,
72
+ });
73
+ if (showError) {
74
+ return (jsx(StreamTheme, { className: "str-video__embedded", children: jsx("div", { className: "str-video__embedded-error", children: jsx("p", { className: "str-video__embedded-error__message", children: "An error occurred while initializing the client. Please try again later." }) }) }));
75
+ }
76
+ if (!call || !client || !noiseCancellationReady) {
77
+ return (jsx(StreamTheme, { className: "str-video__embedded", children: jsx(LoadingIndicator, { className: "str-video__embedded-loading" }) }));
78
+ }
79
+ return (jsx(StreamVideo, { client: client, children: jsx(StreamCall, { call: call, children: jsx(ConfigurationProvider, { layout: layout, onError: onErrorStable, children: jsx(BackgroundFiltersProvider, { children: jsx(NoiseCancellationWrapper, { noiseCancellation: noiseCancellation, children: jsx(StreamTheme, { className: "str-video__embedded", style: theme, children: children }) }) }) }) }) }));
80
+ };
81
+
82
+ export { EmbeddedClientProvider };
83
+ //# sourceMappingURL=EmbeddedClientProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EmbeddedClientProvider.js","sources":["../../../../../../src/embedded/EmbeddedClientProvider.tsx"],"sourcesContent":["import { useCallback, useState, type ReactNode } from 'react';\nimport type { INoiseCancellation } from '@stream-io/audio-filters-web';\nimport { useEffectEvent as useEffectEventShim } from '@stream-io/video-react-bindings';\n\nimport { StreamCall, StreamVideo } from '../core';\nimport {\n StreamTheme,\n BackgroundFiltersProvider,\n NoiseCancellationProvider,\n} from '../components';\nimport { ConfigurationProvider } from './context';\nimport { useEmbeddedClient } from './hooks';\nimport type { LogLevel, TokenProvider } from '@stream-io/video-client';\nimport type { EmbeddedUser, LayoutOption } from './types';\nimport { LoadingIndicator } from '../components';\n\nexport interface EmbeddedClientProviderProps {\n apiKey: string;\n user: EmbeddedUser;\n callId: string;\n callType: string;\n token?: string;\n tokenProvider?: TokenProvider;\n logLevel?: LogLevel;\n onError?: (error: any) => void;\n layout?: LayoutOption;\n theme?: Record<string, string>;\n children: ReactNode;\n}\n\nconst NoiseCancellationWrapper = ({\n noiseCancellation,\n children,\n}: {\n noiseCancellation?: INoiseCancellation;\n children: ReactNode;\n}) => {\n if (!noiseCancellation) {\n return <>{children}</>;\n }\n\n return (\n <NoiseCancellationProvider noiseCancellation={noiseCancellation}>\n {children}\n </NoiseCancellationProvider>\n );\n};\n\n/**\n * Shared provider wrapper for embedded components.\n * Handles client/call initialization and wraps children with all necessary providers.\n */\nexport const EmbeddedClientProvider = ({\n apiKey,\n user,\n callId,\n callType,\n token,\n tokenProvider,\n logLevel,\n onError,\n layout,\n theme,\n children,\n}: EmbeddedClientProviderProps) => {\n const [showError, setShowError] = useState<boolean>(false);\n\n const onErrorStable = useEffectEventShim(onError ?? console.error);\n const handleError = useCallback(\n (error: any) => {\n setShowError(true);\n onErrorStable(error);\n },\n [onErrorStable],\n );\n\n const { client, call, noiseCancellation, noiseCancellationReady } =\n useEmbeddedClient({\n apiKey,\n user,\n callId,\n callType,\n token,\n tokenProvider,\n logLevel,\n handleError,\n });\n\n if (showError) {\n return (\n <StreamTheme className=\"str-video__embedded\">\n <div className=\"str-video__embedded-error\">\n <p className=\"str-video__embedded-error__message\">\n An error occurred while initializing the client. Please try again\n later.\n </p>\n </div>\n </StreamTheme>\n );\n }\n\n if (!call || !client || !noiseCancellationReady) {\n return (\n <StreamTheme className=\"str-video__embedded\">\n <LoadingIndicator className=\"str-video__embedded-loading\" />\n </StreamTheme>\n );\n }\n\n return (\n <StreamVideo client={client}>\n <StreamCall call={call}>\n <ConfigurationProvider layout={layout} onError={onErrorStable}>\n <BackgroundFiltersProvider>\n <NoiseCancellationWrapper noiseCancellation={noiseCancellation}>\n <StreamTheme className=\"str-video__embedded\" style={theme}>\n {children}\n </StreamTheme>\n </NoiseCancellationWrapper>\n </BackgroundFiltersProvider>\n </ConfigurationProvider>\n </StreamCall>\n </StreamVideo>\n );\n};\n"],"names":["_jsx","_Fragment","useEffectEventShim"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,MAAM,wBAAwB,GAAG,CAAC,EAChC,iBAAiB,EACjB,QAAQ,GAIT,KAAI;IACH,IAAI,CAAC,iBAAiB,EAAE;QACtB,OAAOA,GAAA,CAAAC,QAAA,EAAA,EAAA,QAAA,EAAG,QAAQ,EAAA,CAAI;IACxB;IAEA,QACED,GAAA,CAAC,yBAAyB,EAAA,EAAC,iBAAiB,EAAE,iBAAiB,EAAA,QAAA,EAC5D,QAAQ,EAAA,CACiB;AAEhC,CAAC;AAED;;;AAGG;AACI,MAAM,sBAAsB,GAAG,CAAC,EACrC,MAAM,EACN,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,KAAK,EACL,aAAa,EACb,QAAQ,EACR,OAAO,EACP,MAAM,EACN,KAAK,EACL,QAAQ,GACoB,KAAI;IAChC,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAU,KAAK,CAAC;IAE1D,MAAM,aAAa,GAAGE,cAAkB,CAAC,OAAO,IAAI,OAAO,CAAC,KAAK,CAAC;AAClE,IAAA,MAAM,WAAW,GAAG,WAAW,CAC7B,CAAC,KAAU,KAAI;QACb,YAAY,CAAC,IAAI,CAAC;QAClB,aAAa,CAAC,KAAK,CAAC;AACtB,IAAA,CAAC,EACD,CAAC,aAAa,CAAC,CAChB;IAED,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,GAC/D,iBAAiB,CAAC;QAChB,MAAM;QACN,IAAI;QACJ,MAAM;QACN,QAAQ;QACR,KAAK;QACL,aAAa;QACb,QAAQ;QACR,WAAW;AACZ,KAAA,CAAC;IAEJ,IAAI,SAAS,EAAE;QACb,QACEF,IAAC,WAAW,EAAA,EAAC,SAAS,EAAC,qBAAqB,YAC1CA,GAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,2BAA2B,EAAA,QAAA,EACxCA,WAAG,SAAS,EAAC,oCAAoC,EAAA,QAAA,EAAA,0EAAA,EAAA,CAG7C,EAAA,CACA,EAAA,CACM;IAElB;IAEA,IAAI,CAAC,IAAI,IAAI,CAAC,MAAM,IAAI,CAAC,sBAAsB,EAAE;AAC/C,QAAA,QACEA,GAAA,CAAC,WAAW,EAAA,EAAC,SAAS,EAAC,qBAAqB,EAAA,QAAA,EAC1CA,GAAA,CAAC,gBAAgB,IAAC,SAAS,EAAC,6BAA6B,EAAA,CAAG,EAAA,CAChD;IAElB;IAEA,QACEA,GAAA,CAAC,WAAW,EAAA,EAAC,MAAM,EAAE,MAAM,EAAA,QAAA,EACzBA,GAAA,CAAC,UAAU,EAAA,EAAC,IAAI,EAAE,IAAI,EAAA,QAAA,EACpBA,GAAA,CAAC,qBAAqB,EAAA,EAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,EAAA,QAAA,EAC3DA,GAAA,CAAC,yBAAyB,EAAA,EAAA,QAAA,EACxBA,GAAA,CAAC,wBAAwB,EAAA,EAAC,iBAAiB,EAAE,iBAAiB,EAAA,QAAA,EAC5DA,GAAA,CAAC,WAAW,EAAA,EAAC,SAAS,EAAC,qBAAqB,EAAC,KAAK,EAAE,KAAK,EAAA,QAAA,EACtD,QAAQ,EAAA,CACG,EAAA,CACW,EAAA,CACD,EAAA,CACN,EAAA,CACb,EAAA,CACD;AAElB;;;;"}
@@ -0,0 +1,65 @@
1
+ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
2
+ import { OwnCapability } from '@stream-io/video-client';
3
+ import { useI18n, useCallStateHooks, Restricted } from '@stream-io/video-react-bindings';
4
+ import 'react';
5
+ import 'clsx';
6
+ import '../../components/BackgroundFilters/BackgroundFiltersProvider.js';
7
+ import { CompositeButton } from '../../components/Button/CompositeButton.js';
8
+ import '../../components/Button/IconButton.js';
9
+ import '@floating-ui/react';
10
+ import { MicCaptureErrorNotification } from '../../components/Notification/MicCaptureErrorNotification.js';
11
+ import { RecordCallConfirmationButton } from '../../components/CallControls/RecordCallButton.js';
12
+ import { ReactionsButton } from '../../components/CallControls/ReactionsButton.js';
13
+ import { ScreenShareButton } from '../../components/CallControls/ScreenShareButton.js';
14
+ import { ToggleAudioPublishingButton } from '../../components/CallControls/ToggleAudioButton.js';
15
+ import { ToggleVideoPublishingButton } from '../../components/CallControls/ToggleVideoButton.js';
16
+ import { CancelCallConfirmButton } from '../../components/CallControls/CancelCallButton.js';
17
+ import '../../components/CallControls/CallStatsButton.js';
18
+ import { Icon } from '../../components/Icon/Icon.js';
19
+ import '../../components/DeviceSettings/DeviceSettings.js';
20
+ import '../../components/DropdownSelect/DropdownSelect.js';
21
+ import '../../components/Menu/MenuToggle.js';
22
+ import { DeviceSelectorAudioInput, DeviceSelectorAudioOutput } from '../../components/DeviceSettings/DeviceSelectorAudio.js';
23
+ import { WithTooltip } from '../../components/Tooltip/WithTooltip.js';
24
+ import '../../components/CallParticipantsList/CallParticipantsList.js';
25
+ import '../../components/CallParticipantsList/CallParticipantListingItem.js';
26
+ import '../../components/CallStats/CallStats.js';
27
+ import '../../components/NoiseCancellation/NoiseCancellationProvider.js';
28
+ import '../../components/RingingCall/RingingCall.js';
29
+ import '../../components/Permissions/PermissionRequests.js';
30
+ import '../../core/components/Video/Video.js';
31
+ import '../../core/components/Video/BaseVideo.js';
32
+ import '../../core/components/Video/DefaultVideoPlaceholder.js';
33
+ import '../../core/components/Audio/Audio.js';
34
+ import '../../core/components/Audio/ParticipantsAudio.js';
35
+ import '../../core/components/ParticipantView/ParticipantViewContext.js';
36
+ import '../../core/components/ParticipantView/ParticipantView.js';
37
+ import '../../core/components/ParticipantView/DefaultParticipantViewUI.js';
38
+ import '../../core/components/StreamCall/StreamCall.js';
39
+ import '../../core/components/StreamVideo/StreamVideo.js';
40
+ import '../../core/components/CallLayout/LivestreamLayout.js';
41
+ import '../../core/components/CallLayout/PaginatedGridLayout.js';
42
+ import '../../core/components/CallLayout/SpeakerLayout.js';
43
+ import '../../core/components/CallLayout/PipLayout/Pip.js';
44
+ import '../../core/components/CallLayout/PipLayout/Host.js';
45
+ import '../../core/components/CallLayout/PipLayout/Grid.js';
46
+ import '../context/ConfigurationContext.js';
47
+ import { CameraMenuWithBlur } from '../shared/BlurToggleButton/BlurToggleButton.js';
48
+ import '../shared/Lobby/ToggleMicButton.js';
49
+ import '../shared/Lobby/ToggleCameraButton.js';
50
+ import { useCallDuration } from '../hooks/useCallDuration.js';
51
+
52
+ /**
53
+ * Renders the active call control bar
54
+ */
55
+ const CallControls = ({ showParticipants, onToggleParticipants, }) => {
56
+ const { t } = useI18n();
57
+ const { useCallSession } = useCallStateHooks();
58
+ const session = useCallSession();
59
+ const startedAt = session?.started_at;
60
+ const { elapsed } = useCallDuration(startedAt);
61
+ return (jsxs("div", { className: "str-video__embedded-call-controls str-video__call-controls", children: [jsxs("div", { className: "str-video__call-controls--group str-video__call-controls--options", children: [jsx(Restricted, { requiredGrants: [OwnCapability.CREATE_REACTION], children: jsx("div", { className: "str-video__embedded-mobile", children: jsx(ReactionsButton, {}) }) }), startedAt && (jsxs("div", { className: "str-video__embedded-call-duration str-video__embedded-desktop", children: [jsx(Icon, { icon: "verified", className: "str-video__embedded-call-duration__icon" }), jsx("span", { className: "str-video__embedded-call-duration__time", children: elapsed })] }))] }), jsxs("div", { className: "str-video__call-controls--group str-video__call-controls--media", children: [jsx(Restricted, { requiredGrants: [OwnCapability.SEND_AUDIO], hasPermissionsOnly: true, children: jsx(MicCaptureErrorNotification, { children: jsx(ToggleAudioPublishingButton, { Menu: jsxs(Fragment, { children: [jsx(DeviceSelectorAudioInput, { visualType: "list", title: t('Microphone') }), jsx(DeviceSelectorAudioOutput, { visualType: "list", title: t('Speaker') })] }), menuPlacement: "top" }) }) }), jsx(Restricted, { requiredGrants: [OwnCapability.SEND_VIDEO], hasPermissionsOnly: true, children: jsx(ToggleVideoPublishingButton, { Menu: jsx(CameraMenuWithBlur, {}), menuPlacement: "top" }) }), jsx(Restricted, { requiredGrants: [OwnCapability.CREATE_REACTION], children: jsx("div", { className: "str-video__embedded-desktop", children: jsx(ReactionsButton, {}) }) }), jsx(Restricted, { requiredGrants: [OwnCapability.SCREENSHARE], children: jsx("div", { className: "str-video__embedded-desktop", children: jsx(ScreenShareButton, {}) }) }), jsx(RecordCallConfirmationButton, {}), jsx("div", { className: "str-video__embedded-desktop", children: jsx(CancelCallConfirmButton, {}) })] }), jsx("div", { className: "str-video__call-controls--group str-video__call-controls--sidebar", children: jsx(WithTooltip, { title: t('Participants'), children: jsx(CompositeButton, { active: showParticipants, "aria-label": t('Participants'), "aria-pressed": showParticipants, onClick: onToggleParticipants, children: jsx(Icon, { icon: "participants" }) }) }) })] }));
62
+ };
63
+
64
+ export { CallControls };
65
+ //# sourceMappingURL=CallControls.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CallControls.js","sources":["../../../../../../../src/embedded/call/CallControls.tsx"],"sourcesContent":["import { OwnCapability } from '@stream-io/video-client';\nimport {\n Restricted,\n useCallStateHooks,\n useI18n,\n} from '@stream-io/video-react-bindings';\nimport {\n CancelCallConfirmButton,\n CompositeButton,\n DeviceSelectorAudioInput,\n DeviceSelectorAudioOutput,\n Icon,\n MicCaptureErrorNotification,\n ReactionsButton,\n RecordCallConfirmationButton,\n ScreenShareButton,\n ToggleAudioPublishingButton,\n ToggleVideoPublishingButton,\n WithTooltip,\n} from '../../components';\n\nimport { useCallDuration } from '../hooks';\nimport { CameraMenuWithBlur } from '../shared';\n\ninterface CallControlsProps {\n showParticipants: boolean;\n onToggleParticipants: () => void;\n}\n\n/**\n * Renders the active call control bar\n */\nexport const CallControls = ({\n showParticipants,\n onToggleParticipants,\n}: CallControlsProps) => {\n const { t } = useI18n();\n const { useCallSession } = useCallStateHooks();\n const session = useCallSession();\n const startedAt = session?.started_at;\n const { elapsed } = useCallDuration(startedAt);\n\n return (\n <div className=\"str-video__embedded-call-controls str-video__call-controls\">\n <div className=\"str-video__call-controls--group str-video__call-controls--options\">\n <Restricted requiredGrants={[OwnCapability.CREATE_REACTION]}>\n <div className=\"str-video__embedded-mobile\">\n <ReactionsButton />\n </div>\n </Restricted>\n {startedAt && (\n <div className=\"str-video__embedded-call-duration str-video__embedded-desktop\">\n <Icon\n icon=\"verified\"\n className=\"str-video__embedded-call-duration__icon\"\n />\n <span className=\"str-video__embedded-call-duration__time\">\n {elapsed}\n </span>\n </div>\n )}\n </div>\n <div className=\"str-video__call-controls--group str-video__call-controls--media\">\n <Restricted\n requiredGrants={[OwnCapability.SEND_AUDIO]}\n hasPermissionsOnly\n >\n <MicCaptureErrorNotification>\n <ToggleAudioPublishingButton\n Menu={\n <>\n <DeviceSelectorAudioInput\n visualType=\"list\"\n title={t('Microphone')}\n />\n <DeviceSelectorAudioOutput\n visualType=\"list\"\n title={t('Speaker')}\n />\n </>\n }\n menuPlacement=\"top\"\n />\n </MicCaptureErrorNotification>\n </Restricted>\n <Restricted\n requiredGrants={[OwnCapability.SEND_VIDEO]}\n hasPermissionsOnly\n >\n <ToggleVideoPublishingButton\n Menu={<CameraMenuWithBlur />}\n menuPlacement=\"top\"\n />\n </Restricted>\n <Restricted requiredGrants={[OwnCapability.CREATE_REACTION]}>\n <div className=\"str-video__embedded-desktop\">\n <ReactionsButton />\n </div>\n </Restricted>\n <Restricted requiredGrants={[OwnCapability.SCREENSHARE]}>\n <div className=\"str-video__embedded-desktop\">\n <ScreenShareButton />\n </div>\n </Restricted>\n <RecordCallConfirmationButton />\n <div className=\"str-video__embedded-desktop\">\n <CancelCallConfirmButton />\n </div>\n </div>\n <div className=\"str-video__call-controls--group str-video__call-controls--sidebar\">\n <WithTooltip title={t('Participants')}>\n <CompositeButton\n active={showParticipants}\n aria-label={t('Participants')}\n aria-pressed={showParticipants}\n onClick={onToggleParticipants}\n >\n <Icon icon=\"participants\" />\n </CompositeButton>\n </WithTooltip>\n </div>\n </div>\n );\n};\n"],"names":["_jsxs","_jsx","_Fragment"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA;;AAEG;AACI,MAAM,YAAY,GAAG,CAAC,EAC3B,gBAAgB,EAChB,oBAAoB,GACF,KAAI;AACtB,IAAA,MAAM,EAAE,CAAC,EAAE,GAAG,OAAO,EAAE;AACvB,IAAA,MAAM,EAAE,cAAc,EAAE,GAAG,iBAAiB,EAAE;AAC9C,IAAA,MAAM,OAAO,GAAG,cAAc,EAAE;AAChC,IAAA,MAAM,SAAS,GAAG,OAAO,EAAE,UAAU;IACrC,MAAM,EAAE,OAAO,EAAE,GAAG,eAAe,CAAC,SAAS,CAAC;AAE9C,IAAA,QACEA,IAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,4DAA4D,EAAA,QAAA,EAAA,CACzEA,IAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,mEAAmE,EAAA,QAAA,EAAA,CAChFC,GAAA,CAAC,UAAU,EAAA,EAAC,cAAc,EAAE,CAAC,aAAa,CAAC,eAAe,CAAC,EAAA,QAAA,EACzDA,GAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,4BAA4B,EAAA,QAAA,EACzCA,GAAA,CAAC,eAAe,EAAA,EAAA,CAAG,EAAA,CACf,EAAA,CACK,EACZ,SAAS,KACRD,IAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,+DAA+D,EAAA,QAAA,EAAA,CAC5EC,GAAA,CAAC,IAAI,EAAA,EACH,IAAI,EAAC,UAAU,EACf,SAAS,EAAC,yCAAyC,EAAA,CACnD,EACFA,GAAA,CAAA,MAAA,EAAA,EAAM,SAAS,EAAC,yCAAyC,EAAA,QAAA,EACtD,OAAO,EAAA,CACH,CAAA,EAAA,CACH,CACP,CAAA,EAAA,CACG,EACND,IAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,iEAAiE,EAAA,QAAA,EAAA,CAC9EC,GAAA,CAAC,UAAU,EAAA,EACT,cAAc,EAAE,CAAC,aAAa,CAAC,UAAU,CAAC,EAC1C,kBAAkB,EAAA,IAAA,EAAA,QAAA,EAElBA,GAAA,CAAC,2BAA2B,EAAA,EAAA,QAAA,EAC1BA,GAAA,CAAC,2BAA2B,EAAA,EAC1B,IAAI,EACFD,IAAA,CAAAE,QAAA,EAAA,EAAA,QAAA,EAAA,CACED,GAAA,CAAC,wBAAwB,EAAA,EACvB,UAAU,EAAC,MAAM,EACjB,KAAK,EAAE,CAAC,CAAC,YAAY,CAAC,EAAA,CACtB,EACFA,GAAA,CAAC,yBAAyB,EAAA,EACxB,UAAU,EAAC,MAAM,EACjB,KAAK,EAAE,CAAC,CAAC,SAAS,CAAC,EAAA,CACnB,CAAA,EAAA,CACD,EAEL,aAAa,EAAC,KAAK,EAAA,CACnB,EAAA,CAC0B,GACnB,EACbA,GAAA,CAAC,UAAU,EAAA,EACT,cAAc,EAAE,CAAC,aAAa,CAAC,UAAU,CAAC,EAC1C,kBAAkB,EAAA,IAAA,EAAA,QAAA,EAElBA,GAAA,CAAC,2BAA2B,EAAA,EAC1B,IAAI,EAAEA,GAAA,CAAC,kBAAkB,EAAA,EAAA,CAAG,EAC5B,aAAa,EAAC,KAAK,EAAA,CACnB,EAAA,CACS,EACbA,GAAA,CAAC,UAAU,EAAA,EAAC,cAAc,EAAE,CAAC,aAAa,CAAC,eAAe,CAAC,EAAA,QAAA,EACzDA,GAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,6BAA6B,EAAA,QAAA,EAC1CA,GAAA,CAAC,eAAe,EAAA,EAAA,CAAG,EAAA,CACf,EAAA,CACK,EACbA,GAAA,CAAC,UAAU,EAAA,EAAC,cAAc,EAAE,CAAC,aAAa,CAAC,WAAW,CAAC,EAAA,QAAA,EACrDA,GAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,6BAA6B,EAAA,QAAA,EAC1CA,GAAA,CAAC,iBAAiB,EAAA,EAAA,CAAG,EAAA,CACjB,EAAA,CACK,EACbA,GAAA,CAAC,4BAA4B,EAAA,EAAA,CAAG,EAChCA,GAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,6BAA6B,EAAA,QAAA,EAC1CA,GAAA,CAAC,uBAAuB,EAAA,EAAA,CAAG,EAAA,CACvB,CAAA,EAAA,CACF,EACNA,GAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,mEAAmE,EAAA,QAAA,EAChFA,GAAA,CAAC,WAAW,EAAA,EAAC,KAAK,EAAE,CAAC,CAAC,cAAc,CAAC,EAAA,QAAA,EACnCA,GAAA,CAAC,eAAe,EAAA,EACd,MAAM,EAAE,gBAAgB,EAAA,YAAA,EACZ,CAAC,CAAC,cAAc,CAAC,EAAA,cAAA,EACf,gBAAgB,EAC9B,OAAO,EAAE,oBAAoB,EAAA,QAAA,EAE7BA,GAAA,CAAC,IAAI,EAAA,EAAC,IAAI,EAAC,cAAc,EAAA,CAAG,EAAA,CACZ,EAAA,CACN,EAAA,CACV,CAAA,EAAA,CACF;AAEV;;;;"}
@@ -0,0 +1,57 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { useCallStateHooks } from '@stream-io/video-react-bindings';
3
+ import 'react';
4
+ import '@stream-io/video-client';
5
+ import '../../core/components/Audio/Audio.js';
6
+ import '../../core/components/Audio/ParticipantsAudio.js';
7
+ import '../../core/components/ParticipantView/ParticipantViewContext.js';
8
+ import '../../components/Menu/MenuToggle.js';
9
+ import { Icon } from '../../components/Icon/Icon.js';
10
+ import '../../core/components/ParticipantView/ParticipantView.js';
11
+ import '../../core/components/ParticipantView/DefaultParticipantViewUI.js';
12
+ import '../../core/components/StreamCall/StreamCall.js';
13
+ import '../../core/components/StreamVideo/StreamVideo.js';
14
+ import '../../core/components/Video/BaseVideo.js';
15
+ import '../../core/components/Video/Video.js';
16
+ import '../../core/components/CallLayout/LivestreamLayout.js';
17
+ import '../../core/components/CallLayout/PaginatedGridLayout.js';
18
+ import '../../core/components/CallLayout/SpeakerLayout.js';
19
+ import '../../core/components/CallLayout/PipLayout/Pip.js';
20
+ import '../../core/components/CallLayout/PipLayout/Host.js';
21
+ import '../../core/components/CallLayout/PipLayout/Grid.js';
22
+ import '../context/ConfigurationContext.js';
23
+ import 'clsx';
24
+ import '../../components/BackgroundFilters/BackgroundFiltersProvider.js';
25
+ import '../../components/Button/CompositeButton.js';
26
+ import '../../components/Button/IconButton.js';
27
+ import '@floating-ui/react';
28
+ import '../../components/CallControls/RecordCallButton.js';
29
+ import '../../components/CallControls/ReactionsButton.js';
30
+ import '../../components/DeviceSettings/DeviceSettings.js';
31
+ import '../../components/DropdownSelect/DropdownSelect.js';
32
+ import { CancelCallConfirmButton } from '../../components/CallControls/CancelCallButton.js';
33
+ import '../../components/CallControls/CallStatsButton.js';
34
+ import '../../components/CallParticipantsList/CallParticipantsList.js';
35
+ import '../../components/CallParticipantsList/CallParticipantListingItem.js';
36
+ import '../../components/CallStats/CallStats.js';
37
+ import '../../components/NoiseCancellation/NoiseCancellationProvider.js';
38
+ import '../../components/RingingCall/RingingCall.js';
39
+ import '../../components/Permissions/PermissionRequests.js';
40
+ import '../../core/components/Video/DefaultVideoPlaceholder.js';
41
+ import '../shared/Lobby/ToggleMicButton.js';
42
+ import '../shared/Lobby/ToggleCameraButton.js';
43
+ import { useCallDuration } from '../hooks/useCallDuration.js';
44
+
45
+ /**
46
+ * Renders the call header bar with elapsed time and leave/end call button.
47
+ */
48
+ const CallHeader = () => {
49
+ const { useCallSession } = useCallStateHooks();
50
+ const session = useCallSession();
51
+ const startedAt = session?.started_at;
52
+ const { elapsed } = useCallDuration(startedAt);
53
+ return (jsxs("div", { className: "str-video__embedded-call-header", children: [startedAt && (jsxs("div", { className: "str-video__embedded-call-duration", children: [jsx(Icon, { icon: "verified", className: "str-video__embedded-call-duration__icon" }), jsx("span", { className: "str-video__embedded-call-duration__time", children: elapsed })] })), jsx(CancelCallConfirmButton, {})] }));
54
+ };
55
+
56
+ export { CallHeader };
57
+ //# sourceMappingURL=CallHeader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CallHeader.js","sources":["../../../../../../../src/embedded/call/CallHeader.tsx"],"sourcesContent":["import { useCallStateHooks } from '@stream-io/video-react-bindings';\nimport { useCallDuration } from '../hooks';\nimport { CancelCallConfirmButton, Icon } from '../../components';\n\n/**\n * Renders the call header bar with elapsed time and leave/end call button.\n */\nexport const CallHeader = () => {\n const { useCallSession } = useCallStateHooks();\n const session = useCallSession();\n const startedAt = session?.started_at;\n const { elapsed } = useCallDuration(startedAt);\n\n return (\n <div className=\"str-video__embedded-call-header\">\n {startedAt && (\n <div className=\"str-video__embedded-call-duration\">\n <Icon\n icon=\"verified\"\n className=\"str-video__embedded-call-duration__icon\"\n />\n <span className=\"str-video__embedded-call-duration__time\">\n {elapsed}\n </span>\n </div>\n )}\n <CancelCallConfirmButton />\n </div>\n );\n};\n"],"names":["_jsxs","_jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA;;AAEG;AACI,MAAM,UAAU,GAAG,MAAK;AAC7B,IAAA,MAAM,EAAE,cAAc,EAAE,GAAG,iBAAiB,EAAE;AAC9C,IAAA,MAAM,OAAO,GAAG,cAAc,EAAE;AAChC,IAAA,MAAM,SAAS,GAAG,OAAO,EAAE,UAAU;IACrC,MAAM,EAAE,OAAO,EAAE,GAAG,eAAe,CAAC,SAAS,CAAC;AAE9C,IAAA,QACEA,IAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,iCAAiC,EAAA,QAAA,EAAA,CAC7C,SAAS,KACRA,IAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,mCAAmC,EAAA,QAAA,EAAA,CAChDC,IAAC,IAAI,EAAA,EACH,IAAI,EAAC,UAAU,EACf,SAAS,EAAC,yCAAyC,EAAA,CACnD,EACFA,GAAA,CAAA,MAAA,EAAA,EAAM,SAAS,EAAC,yCAAyC,EAAA,QAAA,EACtD,OAAO,EAAA,CACH,CAAA,EAAA,CACH,CACP,EACDA,GAAA,CAAC,uBAAuB,EAAA,EAAA,CAAG,CAAA,EAAA,CACvB;AAEV;;;;"}
@@ -0,0 +1,63 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { useState, useCallback } from 'react';
3
+ import clsx from 'clsx';
4
+ import { OwnCapability } from '@stream-io/video-client';
5
+ import { Restricted } from '@stream-io/video-react-bindings';
6
+ import '../../components/BackgroundFilters/BackgroundFiltersProvider.js';
7
+ import '../../components/Button/CompositeButton.js';
8
+ import '../../components/Button/IconButton.js';
9
+ import '@floating-ui/react';
10
+ import { SpeakingWhileMutedNotification } from '../../components/Notification/SpeakingWhileMutedNotification.js';
11
+ import '../../components/CallControls/RecordCallButton.js';
12
+ import '../../components/CallControls/ReactionsButton.js';
13
+ import '../../components/DeviceSettings/DeviceSettings.js';
14
+ import '../../components/DropdownSelect/DropdownSelect.js';
15
+ import '../../components/Menu/MenuToggle.js';
16
+ import '../../components/CallControls/CancelCallButton.js';
17
+ import '../../components/CallControls/CallStatsButton.js';
18
+ import { CallParticipantsList } from '../../components/CallParticipantsList/CallParticipantsList.js';
19
+ import '../../components/CallParticipantsList/CallParticipantListingItem.js';
20
+ import '../../components/CallStats/CallStats.js';
21
+ import '../../components/NoiseCancellation/NoiseCancellationProvider.js';
22
+ import '../../components/RingingCall/RingingCall.js';
23
+ import { PermissionRequests } from '../../components/Permissions/PermissionRequests.js';
24
+ import '../../core/components/Video/Video.js';
25
+ import '../../core/components/Video/BaseVideo.js';
26
+ import '../../core/components/Video/DefaultVideoPlaceholder.js';
27
+ import { useLayout } from '../hooks/useLayout.js';
28
+ import { useWakeLock } from '../hooks/useWakeLock.js';
29
+ import '../context/ConfigurationContext.js';
30
+ import { ConnectionNotification } from '../shared/ConnectionNotification/ConnectionNotification.js';
31
+ import '../../core/components/Audio/Audio.js';
32
+ import '../../core/components/Audio/ParticipantsAudio.js';
33
+ import '../../core/components/ParticipantView/ParticipantViewContext.js';
34
+ import '../../core/components/ParticipantView/ParticipantView.js';
35
+ import '../../core/components/ParticipantView/DefaultParticipantViewUI.js';
36
+ import '../../core/components/StreamCall/StreamCall.js';
37
+ import '../../core/components/StreamVideo/StreamVideo.js';
38
+ import '../../core/components/CallLayout/LivestreamLayout.js';
39
+ import '../../core/components/CallLayout/PaginatedGridLayout.js';
40
+ import '../../core/components/CallLayout/SpeakerLayout.js';
41
+ import '../../core/components/CallLayout/PipLayout/Pip.js';
42
+ import '../../core/components/CallLayout/PipLayout/Host.js';
43
+ import '../../core/components/CallLayout/PipLayout/Grid.js';
44
+ import '../shared/Lobby/ToggleMicButton.js';
45
+ import '../shared/Lobby/ToggleCameraButton.js';
46
+ import { CallControls } from './CallControls.js';
47
+ import { CallHeader } from './CallHeader.js';
48
+
49
+ /**
50
+ * CallLayout renders the active call experience with layout, controls and sidebar.
51
+ */
52
+ const CallLayout = () => {
53
+ useWakeLock();
54
+ const [showParticipants, setShowParticipants] = useState(false);
55
+ const { Component: LayoutComponent, props: layoutProps } = useLayout();
56
+ const handleToggleParticipants = useCallback(() => {
57
+ setShowParticipants((prev) => !prev);
58
+ }, []);
59
+ return (jsxs("div", { className: "str-video__embedded-call", children: [jsx(ConnectionNotification, {}), jsx(PermissionRequests, {}), jsx("div", { className: "str-video__embedded-notifications", children: jsx(Restricted, { requiredGrants: [OwnCapability.SEND_AUDIO], hasPermissionsOnly: true, children: jsx(SpeakingWhileMutedNotification, {}) }) }), jsx(CallHeader, {}), jsxs("div", { className: "str-video__embedded-layout", children: [jsx("div", { className: "str-video__embedded-layout__stage", children: jsx(LayoutComponent, { ...layoutProps }) }), jsx("div", { className: clsx('str-video__embedded-sidebar', showParticipants && 'str-video__embedded-sidebar--open'), children: showParticipants && (jsx("div", { className: "str-video__embedded-participants", children: jsx(CallParticipantsList, { onClose: handleToggleParticipants }) })) })] }), jsx(CallControls, { showParticipants: showParticipants, onToggleParticipants: handleToggleParticipants })] }));
60
+ };
61
+
62
+ export { CallLayout };
63
+ //# sourceMappingURL=CallLayout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CallLayout.js","sources":["../../../../../../../src/embedded/call/CallLayout.tsx"],"sourcesContent":["import { useCallback, useState } from 'react';\nimport clsx from 'clsx';\nimport { OwnCapability } from '@stream-io/video-client';\nimport { Restricted } from '@stream-io/video-react-bindings';\nimport {\n CallParticipantsList,\n PermissionRequests,\n SpeakingWhileMutedNotification,\n} from '../../components';\n\nimport { useLayout, useWakeLock } from '../hooks';\nimport { ConnectionNotification } from '../shared';\nimport { CallControls } from './CallControls';\nimport { CallHeader } from './CallHeader';\n\n/**\n * CallLayout renders the active call experience with layout, controls and sidebar.\n */\nexport const CallLayout = () => {\n useWakeLock();\n const [showParticipants, setShowParticipants] = useState(false);\n\n const { Component: LayoutComponent, props: layoutProps } = useLayout();\n\n const handleToggleParticipants = useCallback(() => {\n setShowParticipants((prev) => !prev);\n }, []);\n\n return (\n <div className=\"str-video__embedded-call\">\n <ConnectionNotification />\n <PermissionRequests />\n <div className=\"str-video__embedded-notifications\">\n <Restricted\n requiredGrants={[OwnCapability.SEND_AUDIO]}\n hasPermissionsOnly\n >\n <SpeakingWhileMutedNotification />\n </Restricted>\n </div>\n <CallHeader />\n <div className=\"str-video__embedded-layout\">\n <div className=\"str-video__embedded-layout__stage\">\n <LayoutComponent {...layoutProps} />\n </div>\n\n <div\n className={clsx(\n 'str-video__embedded-sidebar',\n showParticipants && 'str-video__embedded-sidebar--open',\n )}\n >\n {showParticipants && (\n <div className=\"str-video__embedded-participants\">\n <CallParticipantsList onClose={handleToggleParticipants} />\n </div>\n )}\n </div>\n </div>\n <CallControls\n showParticipants={showParticipants}\n onToggleParticipants={handleToggleParticipants}\n />\n </div>\n );\n};\n"],"names":["_jsxs","_jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeA;;AAEG;AACI,MAAM,UAAU,GAAG,MAAK;AAC7B,IAAA,WAAW,EAAE;IACb,MAAM,CAAC,gBAAgB,EAAE,mBAAmB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC;AAE/D,IAAA,MAAM,EAAE,SAAS,EAAE,eAAe,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,SAAS,EAAE;AAEtE,IAAA,MAAM,wBAAwB,GAAG,WAAW,CAAC,MAAK;QAChD,mBAAmB,CAAC,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC;IACtC,CAAC,EAAE,EAAE,CAAC;IAEN,QACEA,cAAK,SAAS,EAAC,0BAA0B,EAAA,QAAA,EAAA,CACvCC,GAAA,CAAC,sBAAsB,EAAA,EAAA,CAAG,EAC1BA,GAAA,CAAC,kBAAkB,EAAA,EAAA,CAAG,EACtBA,GAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,mCAAmC,YAChDA,GAAA,CAAC,UAAU,EAAA,EACT,cAAc,EAAE,CAAC,aAAa,CAAC,UAAU,CAAC,EAC1C,kBAAkB,kBAElBA,GAAA,CAAC,8BAA8B,EAAA,EAAA,CAAG,EAAA,CACvB,EAAA,CACT,EACNA,IAAC,UAAU,EAAA,EAAA,CAAG,EACdD,IAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,4BAA4B,EAAA,QAAA,EAAA,CACzCC,GAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,mCAAmC,EAAA,QAAA,EAChDA,IAAC,eAAe,EAAA,EAAA,GAAK,WAAW,EAAA,CAAI,EAAA,CAChC,EAENA,GAAA,CAAA,KAAA,EAAA,EACE,SAAS,EAAE,IAAI,CACb,6BAA6B,EAC7B,gBAAgB,IAAI,mCAAmC,CACxD,EAAA,QAAA,EAEA,gBAAgB,KACfA,GAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,kCAAkC,EAAA,QAAA,EAC/CA,IAAC,oBAAoB,EAAA,EAAC,OAAO,EAAE,wBAAwB,GAAI,EAAA,CACvD,CACP,EAAA,CACG,CAAA,EAAA,CACF,EACNA,GAAA,CAAC,YAAY,EAAA,EACX,gBAAgB,EAAE,gBAAgB,EAClC,oBAAoB,EAAE,wBAAwB,EAAA,CAC9C,CAAA,EAAA,CACE;AAEV;;;;"}
@@ -0,0 +1,87 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { CallingState } from '@stream-io/video-client';
3
+ import { useCall, useCallStateHooks } from '@stream-io/video-react-bindings';
4
+ import { useState, useCallback } from 'react';
5
+ import 'clsx';
6
+ import '../../components/BackgroundFilters/BackgroundFiltersProvider.js';
7
+ import '../../components/Button/CompositeButton.js';
8
+ import '../../components/Button/IconButton.js';
9
+ import '@floating-ui/react';
10
+ import '../../components/CallControls/RecordCallButton.js';
11
+ import '../../components/CallControls/ReactionsButton.js';
12
+ import '../../components/DeviceSettings/DeviceSettings.js';
13
+ import '../../components/DropdownSelect/DropdownSelect.js';
14
+ import '../../components/Menu/MenuToggle.js';
15
+ import '../../components/CallControls/CancelCallButton.js';
16
+ import '../../components/CallControls/CallStatsButton.js';
17
+ import '../../components/CallParticipantsList/CallParticipantsList.js';
18
+ import '../../components/CallParticipantsList/CallParticipantListingItem.js';
19
+ import { LoadingIndicator } from '../../components/LoadingIndicator/LoadingIndicator.js';
20
+ import '../../components/CallStats/CallStats.js';
21
+ import '../../components/NoiseCancellation/NoiseCancellationProvider.js';
22
+ import '../../components/RingingCall/RingingCall.js';
23
+ import '../../components/Permissions/PermissionRequests.js';
24
+ import '../../core/components/Video/Video.js';
25
+ import '../../core/components/Video/BaseVideo.js';
26
+ import '../../core/components/Video/DefaultVideoPlaceholder.js';
27
+ import { CallFeedback } from '../shared/CallFeedback/CallFeedback.js';
28
+ import '../../core/components/Audio/Audio.js';
29
+ import '../../core/components/Audio/ParticipantsAudio.js';
30
+ import '../../core/components/ParticipantView/ParticipantViewContext.js';
31
+ import '../../core/components/ParticipantView/ParticipantView.js';
32
+ import '../../core/components/ParticipantView/DefaultParticipantViewUI.js';
33
+ import '../../core/components/StreamCall/StreamCall.js';
34
+ import '../../core/components/StreamVideo/StreamVideo.js';
35
+ import '../../core/components/CallLayout/LivestreamLayout.js';
36
+ import '../../core/components/CallLayout/PaginatedGridLayout.js';
37
+ import '../../core/components/CallLayout/SpeakerLayout.js';
38
+ import '../../core/components/CallLayout/PipLayout/Pip.js';
39
+ import '../../core/components/CallLayout/PipLayout/Host.js';
40
+ import '../../core/components/CallLayout/PipLayout/Grid.js';
41
+ import { JoinError } from '../shared/JoinError/JoinError.js';
42
+ import { Lobby } from '../shared/Lobby/Lobby.js';
43
+ import { CallLayout } from './CallLayout.js';
44
+ import { useEmbeddedConfiguration } from '../context/ConfigurationContext.js';
45
+
46
+ /**
47
+ * CallStateRouter is the state decider component that manages view state transitions.
48
+ */
49
+ const CallStateRouter = () => {
50
+ const call = useCall();
51
+ const { useCallCallingState, useLocalParticipant } = useCallStateHooks();
52
+ const localParticipant = useLocalParticipant();
53
+ const callingState = useCallCallingState();
54
+ const { onError } = useEmbeddedConfiguration();
55
+ const [joinError, setJoinError] = useState(false);
56
+ const handleJoin = useCallback(async () => {
57
+ if (!call)
58
+ return;
59
+ setJoinError(false);
60
+ try {
61
+ if (call.state.callingState !== CallingState.JOINED) {
62
+ await call.join();
63
+ }
64
+ }
65
+ catch (e) {
66
+ onError?.(e);
67
+ setJoinError(true);
68
+ }
69
+ }, [call, onError]);
70
+ if (joinError) {
71
+ return jsx(JoinError, { onJoin: handleJoin });
72
+ }
73
+ if (callingState === CallingState.IDLE ||
74
+ callingState === CallingState.UNKNOWN) {
75
+ return jsx(Lobby, { onJoin: handleJoin });
76
+ }
77
+ if (callingState === CallingState.JOINING && !localParticipant) {
78
+ return jsx(LoadingIndicator, { className: "str-video__embedded-loading" });
79
+ }
80
+ if (callingState === CallingState.LEFT) {
81
+ return jsx(CallFeedback, { onJoin: handleJoin });
82
+ }
83
+ return jsx(CallLayout, {});
84
+ };
85
+
86
+ export { CallStateRouter };
87
+ //# sourceMappingURL=CallStateRouter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CallStateRouter.js","sources":["../../../../../../../src/embedded/call/CallStateRouter.tsx"],"sourcesContent":["import { CallingState } from '@stream-io/video-client';\nimport { useCall, useCallStateHooks } from '@stream-io/video-react-bindings';\n\nimport { LoadingIndicator } from '../../components';\nimport { CallFeedback, JoinError, Lobby } from '../shared';\nimport { CallLayout } from './CallLayout';\nimport { useCallback, useState } from 'react';\nimport { useEmbeddedConfiguration } from '../context';\n\n/**\n * CallStateRouter is the state decider component that manages view state transitions.\n */\nexport const CallStateRouter = () => {\n const call = useCall();\n\n const { useCallCallingState, useLocalParticipant } = useCallStateHooks();\n const localParticipant = useLocalParticipant();\n const callingState = useCallCallingState();\n const { onError } = useEmbeddedConfiguration();\n\n const [joinError, setJoinError] = useState(false);\n const handleJoin = useCallback(async () => {\n if (!call) return;\n\n setJoinError(false);\n try {\n if (call.state.callingState !== CallingState.JOINED) {\n await call.join();\n }\n } catch (e) {\n onError?.(e);\n setJoinError(true);\n }\n }, [call, onError]);\n\n if (joinError) {\n return <JoinError onJoin={handleJoin} />;\n }\n\n if (\n callingState === CallingState.IDLE ||\n callingState === CallingState.UNKNOWN\n ) {\n return <Lobby onJoin={handleJoin} />;\n }\n\n if (callingState === CallingState.JOINING && !localParticipant) {\n return <LoadingIndicator className=\"str-video__embedded-loading\" />;\n }\n\n if (callingState === CallingState.LEFT) {\n return <CallFeedback onJoin={handleJoin} />;\n }\n\n return <CallLayout />;\n};\n"],"names":["_jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA;;AAEG;AACI,MAAM,eAAe,GAAG,MAAK;AAClC,IAAA,MAAM,IAAI,GAAG,OAAO,EAAE;IAEtB,MAAM,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,GAAG,iBAAiB,EAAE;AACxE,IAAA,MAAM,gBAAgB,GAAG,mBAAmB,EAAE;AAC9C,IAAA,MAAM,YAAY,GAAG,mBAAmB,EAAE;AAC1C,IAAA,MAAM,EAAE,OAAO,EAAE,GAAG,wBAAwB,EAAE;IAE9C,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC;AACjD,IAAA,MAAM,UAAU,GAAG,WAAW,CAAC,YAAW;AACxC,QAAA,IAAI,CAAC,IAAI;YAAE;QAEX,YAAY,CAAC,KAAK,CAAC;AACnB,QAAA,IAAI;YACF,IAAI,IAAI,CAAC,KAAK,CAAC,YAAY,KAAK,YAAY,CAAC,MAAM,EAAE;AACnD,gBAAA,MAAM,IAAI,CAAC,IAAI,EAAE;YACnB;QACF;QAAE,OAAO,CAAC,EAAE;AACV,YAAA,OAAO,GAAG,CAAC,CAAC;YACZ,YAAY,CAAC,IAAI,CAAC;QACpB;AACF,IAAA,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAEnB,IAAI,SAAS,EAAE;AACb,QAAA,OAAOA,IAAC,SAAS,EAAA,EAAC,MAAM,EAAE,UAAU,GAAI;IAC1C;AAEA,IAAA,IACE,YAAY,KAAK,YAAY,CAAC,IAAI;AAClC,QAAA,YAAY,KAAK,YAAY,CAAC,OAAO,EACrC;AACA,QAAA,OAAOA,IAAC,KAAK,EAAA,EAAC,MAAM,EAAE,UAAU,GAAI;IACtC;IAEA,IAAI,YAAY,KAAK,YAAY,CAAC,OAAO,IAAI,CAAC,gBAAgB,EAAE;AAC9D,QAAA,OAAOA,IAAC,gBAAgB,EAAA,EAAC,SAAS,EAAC,6BAA6B,GAAG;IACrE;AAEA,IAAA,IAAI,YAAY,KAAK,YAAY,CAAC,IAAI,EAAE;AACtC,QAAA,OAAOA,IAAC,YAAY,EAAA,EAAC,MAAM,EAAE,UAAU,GAAI;IAC7C;IAEA,OAAOA,GAAA,CAAC,UAAU,EAAA,EAAA,CAAG;AACvB;;;;"}
@@ -0,0 +1,12 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { EmbeddedClientProvider } from '../EmbeddedClientProvider.js';
3
+ import { CallStateRouter } from './CallStateRouter.js';
4
+
5
+ /**
6
+ * Drop-in video call component that renders a lobby, active call,
7
+ * and post-call feedback screen. Handles client and call setup internally.
8
+ */
9
+ const EmbeddedCall = ({ children, ...props }) => (jsxs(EmbeddedClientProvider, { ...props, children: [jsx(CallStateRouter, {}), children] }));
10
+
11
+ export { EmbeddedCall };
12
+ //# sourceMappingURL=EmbeddedCall.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EmbeddedCall.js","sources":["../../../../../../../src/embedded/call/EmbeddedCall.tsx"],"sourcesContent":["import type { EmbeddedMeetingProps } from '../types';\nimport { EmbeddedClientProvider } from '../EmbeddedClientProvider';\nimport { CallStateRouter } from './CallStateRouter';\n\n/**\n * Drop-in video call component that renders a lobby, active call,\n * and post-call feedback screen. Handles client and call setup internally.\n */\nexport const EmbeddedCall = ({ children, ...props }: EmbeddedMeetingProps) => (\n <EmbeddedClientProvider {...props}>\n <CallStateRouter />\n {children}\n </EmbeddedClientProvider>\n);\n"],"names":["_jsxs","_jsx"],"mappings":";;;;AAIA;;;AAGG;AACI,MAAM,YAAY,GAAG,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAwB,MACvEA,IAAA,CAAC,sBAAsB,EAAA,EAAA,GAAK,KAAK,EAAA,QAAA,EAAA,CAC/BC,GAAA,CAAC,eAAe,EAAA,EAAA,CAAG,EAClB,QAAQ,CAAA,EAAA,CACc;;;;"}
@@ -0,0 +1,21 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { createContext, useMemo, useContext } from 'react';
3
+
4
+ const defaultConfiguration = {
5
+ layout: 'SpeakerTop',
6
+ onError: undefined,
7
+ };
8
+ const ConfigurationContext = createContext(defaultConfiguration);
9
+ const ConfigurationProvider = ({ children, layout = 'SpeakerTop', onError, }) => {
10
+ const value = useMemo(() => ({ layout, onError }), [layout, onError]);
11
+ return (jsx(ConfigurationContext.Provider, { value: value, children: children }));
12
+ };
13
+ /**
14
+ * Hook to access embedded configuration settings.
15
+ */
16
+ const useEmbeddedConfiguration = () => {
17
+ return useContext(ConfigurationContext);
18
+ };
19
+
20
+ export { ConfigurationProvider, useEmbeddedConfiguration };
21
+ //# sourceMappingURL=ConfigurationContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConfigurationContext.js","sources":["../../../../../../../src/embedded/context/ConfigurationContext.tsx"],"sourcesContent":["import { createContext, useContext, useMemo, PropsWithChildren } from 'react';\nimport type { LayoutOption } from '../types';\n\nexport interface EmbeddedConfiguration {\n layout?: LayoutOption;\n onError?: (error: any) => void;\n}\n\nconst defaultConfiguration: EmbeddedConfiguration = {\n layout: 'SpeakerTop',\n onError: undefined,\n};\n\nconst ConfigurationContext =\n createContext<EmbeddedConfiguration>(defaultConfiguration);\n\nexport const ConfigurationProvider = ({\n children,\n layout = 'SpeakerTop',\n onError,\n}: PropsWithChildren<EmbeddedConfiguration>) => {\n const value = useMemo(() => ({ layout, onError }), [layout, onError]);\n\n return (\n <ConfigurationContext.Provider value={value}>\n {children}\n </ConfigurationContext.Provider>\n );\n};\n\n/**\n * Hook to access embedded configuration settings.\n */\nexport const useEmbeddedConfiguration = () => {\n return useContext(ConfigurationContext);\n};\n"],"names":["_jsx"],"mappings":";;;AAQA,MAAM,oBAAoB,GAA0B;AAClD,IAAA,MAAM,EAAE,YAAY;AACpB,IAAA,OAAO,EAAE,SAAS;CACnB;AAED,MAAM,oBAAoB,GACxB,aAAa,CAAwB,oBAAoB,CAAC;AAErD,MAAM,qBAAqB,GAAG,CAAC,EACpC,QAAQ,EACR,MAAM,GAAG,YAAY,EACrB,OAAO,GACkC,KAAI;IAC7C,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAErE,IAAA,QACEA,GAAA,CAAC,oBAAoB,CAAC,QAAQ,EAAA,EAAC,KAAK,EAAE,KAAK,EAAA,QAAA,EACxC,QAAQ,EAAA,CACqB;AAEpC;AAEA;;AAEG;AACI,MAAM,wBAAwB,GAAG,MAAK;AAC3C,IAAA,OAAO,UAAU,CAAC,oBAAoB,CAAC;AACzC;;;;"}
@@ -0,0 +1,32 @@
1
+ import { useMemo, useState, useEffect } from 'react';
2
+
3
+ const formatElapsed = (seconds) => {
4
+ const h = Math.floor(seconds / 3600);
5
+ const m = Math.floor((seconds % 3600) / 60);
6
+ const s = seconds % 60;
7
+ const pad = (n) => String(n).padStart(2, '0');
8
+ return h > 0 ? `${pad(h)}:${pad(m)}:${pad(s)}` : `${pad(m)}:${pad(s)}`;
9
+ };
10
+ /**
11
+ * Returns a live-updating formatted elapsed duration string
12
+ * computed from the given start date.
13
+ */
14
+ const useCallDuration = (startedAt) => {
15
+ const startedAtDate = useMemo(() => (startedAt ? new Date(startedAt).getTime() : undefined), [startedAt]);
16
+ const [elapsed, setElapsed] = useState('');
17
+ useEffect(() => {
18
+ if (!startedAtDate)
19
+ return;
20
+ const update = () => {
21
+ const seconds = Math.max(0, Math.floor((Date.now() - startedAtDate) / 1000));
22
+ setElapsed(formatElapsed(seconds));
23
+ };
24
+ update();
25
+ const interval = setInterval(update, 1000);
26
+ return () => clearInterval(interval);
27
+ }, [startedAtDate]);
28
+ return { elapsed };
29
+ };
30
+
31
+ export { useCallDuration };
32
+ //# sourceMappingURL=useCallDuration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCallDuration.js","sources":["../../../../../../../src/embedded/hooks/useCallDuration.ts"],"sourcesContent":["import { useEffect, useMemo, useState } from 'react';\n\nconst formatElapsed = (seconds: number) => {\n const h = Math.floor(seconds / 3600);\n const m = Math.floor((seconds % 3600) / 60);\n const s = seconds % 60;\n const pad = (n: number) => String(n).padStart(2, '0');\n return h > 0 ? `${pad(h)}:${pad(m)}:${pad(s)}` : `${pad(m)}:${pad(s)}`;\n};\n\n/**\n * Returns a live-updating formatted elapsed duration string\n * computed from the given start date.\n */\nexport const useCallDuration = (startedAt?: string) => {\n const startedAtDate = useMemo(\n () => (startedAt ? new Date(startedAt).getTime() : undefined),\n [startedAt],\n );\n\n const [elapsed, setElapsed] = useState('');\n\n useEffect(() => {\n if (!startedAtDate) return;\n\n const update = () => {\n const seconds = Math.max(\n 0,\n Math.floor((Date.now() - startedAtDate) / 1000),\n );\n setElapsed(formatElapsed(seconds));\n };\n\n update();\n const interval = setInterval(update, 1000);\n return () => clearInterval(interval);\n }, [startedAtDate]);\n\n return { elapsed };\n};\n"],"names":[],"mappings":";;AAEA,MAAM,aAAa,GAAG,CAAC,OAAe,KAAI;IACxC,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC;AACpC,IAAA,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,GAAG,IAAI,IAAI,EAAE,CAAC;AAC3C,IAAA,MAAM,CAAC,GAAG,OAAO,GAAG,EAAE;AACtB,IAAA,MAAM,GAAG,GAAG,CAAC,CAAS,KAAK,MAAM,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC;AACrD,IAAA,OAAO,CAAC,GAAG,CAAC,GAAG,CAAA,EAAG,GAAG,CAAC,CAAC,CAAC,CAAA,CAAA,EAAI,GAAG,CAAC,CAAC,CAAC,CAAA,CAAA,EAAI,GAAG,CAAC,CAAC,CAAC,CAAA,CAAE,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,EAAE;AACxE,CAAC;AAED;;;AAGG;AACI,MAAM,eAAe,GAAG,CAAC,SAAkB,KAAI;AACpD,IAAA,MAAM,aAAa,GAAG,OAAO,CAC3B,OAAO,SAAS,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC,OAAO,EAAE,GAAG,SAAS,CAAC,EAC7D,CAAC,SAAS,CAAC,CACZ;IAED,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC;IAE1C,SAAS,CAAC,MAAK;AACb,QAAA,IAAI,CAAC,aAAa;YAAE;QAEpB,MAAM,MAAM,GAAG,MAAK;YAClB,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CACtB,CAAC,EACD,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,aAAa,IAAI,IAAI,CAAC,CAChD;AACD,YAAA,UAAU,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;AACpC,QAAA,CAAC;AAED,QAAA,MAAM,EAAE;QACR,MAAM,QAAQ,GAAG,WAAW,CAAC,MAAM,EAAE,IAAI,CAAC;AAC1C,QAAA,OAAO,MAAM,aAAa,CAAC,QAAQ,CAAC;AACtC,IAAA,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC;IAEnB,OAAO,EAAE,OAAO,EAAE;AACpB;;;;"}
@@ -0,0 +1,40 @@
1
+ import { useEffect } from 'react';
2
+ import { useInitializeVideoClient } from './useInitializeVideoClient.js';
3
+ import { useInitializeCall } from './useInitializeCall.js';
4
+ import { useNoiseCancellationLoader } from './useNoiseCancellationLoader.js';
5
+
6
+ /**
7
+ * Hook that initializes the Stream Video client and call.
8
+ * Combines useInitializeVideoClient, useInitializeCall, and useNoiseCancellationLoader.
9
+ */
10
+ const useEmbeddedClient = ({ apiKey, user, callId, callType, token, tokenProvider, logLevel, handleError, }) => {
11
+ const client = useInitializeVideoClient({
12
+ apiKey,
13
+ user,
14
+ token,
15
+ tokenProvider,
16
+ logLevel,
17
+ handleError,
18
+ });
19
+ const call = useInitializeCall({
20
+ client,
21
+ callType,
22
+ callId,
23
+ handleError,
24
+ });
25
+ useEffect(() => {
26
+ if (!call)
27
+ return;
28
+ call.tracer.trace('embedded.initialized', { callType });
29
+ }, [call, callType]);
30
+ const { noiseCancellation, ready: noiseCancellationReady } = useNoiseCancellationLoader(call);
31
+ return {
32
+ client,
33
+ call,
34
+ noiseCancellation,
35
+ noiseCancellationReady,
36
+ };
37
+ };
38
+
39
+ export { useEmbeddedClient };
40
+ //# sourceMappingURL=useEmbeddedClient.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useEmbeddedClient.js","sources":["../../../../../../../src/embedded/hooks/useEmbeddedClient.ts"],"sourcesContent":["import { useEffect } from 'react';\nimport { useInitializeVideoClient } from './useInitializeVideoClient';\nimport { useInitializeCall } from './useInitializeCall';\nimport { useNoiseCancellationLoader } from './useNoiseCancellationLoader';\nimport type { EmbeddedUser } from '../types';\nimport { LogLevel, TokenProvider } from '@stream-io/video-client';\n\nexport interface UseEmbeddedClientProps {\n apiKey: string;\n user: EmbeddedUser;\n callId: string;\n callType: string;\n token?: string;\n tokenProvider?: TokenProvider;\n logLevel?: LogLevel;\n handleError: (error: any) => void;\n}\n\n/**\n * Hook that initializes the Stream Video client and call.\n * Combines useInitializeVideoClient, useInitializeCall, and useNoiseCancellationLoader.\n */\nexport const useEmbeddedClient = ({\n apiKey,\n user,\n callId,\n callType,\n token,\n tokenProvider,\n logLevel,\n handleError,\n}: UseEmbeddedClientProps) => {\n const client = useInitializeVideoClient({\n apiKey,\n user,\n token,\n tokenProvider,\n logLevel,\n handleError,\n });\n\n const call = useInitializeCall({\n client,\n callType,\n callId,\n handleError,\n });\n\n useEffect(() => {\n if (!call) return;\n\n call.tracer.trace('embedded.initialized', { callType });\n }, [call, callType]);\n\n const { noiseCancellation, ready: noiseCancellationReady } =\n useNoiseCancellationLoader(call);\n\n return {\n client,\n call,\n noiseCancellation,\n noiseCancellationReady,\n };\n};\n"],"names":[],"mappings":";;;;;AAkBA;;;AAGG;MACU,iBAAiB,GAAG,CAAC,EAChC,MAAM,EACN,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,KAAK,EACL,aAAa,EACb,QAAQ,EACR,WAAW,GACY,KAAI;IAC3B,MAAM,MAAM,GAAG,wBAAwB,CAAC;QACtC,MAAM;QACN,IAAI;QACJ,KAAK;QACL,aAAa;QACb,QAAQ;QACR,WAAW;AACZ,KAAA,CAAC;IAEF,MAAM,IAAI,GAAG,iBAAiB,CAAC;QAC7B,MAAM;QACN,QAAQ;QACR,MAAM;QACN,WAAW;AACZ,KAAA,CAAC;IAEF,SAAS,CAAC,MAAK;AACb,QAAA,IAAI,CAAC,IAAI;YAAE;QAEX,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,sBAAsB,EAAE,EAAE,QAAQ,EAAE,CAAC;AACzD,IAAA,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AAEpB,IAAA,MAAM,EAAE,iBAAiB,EAAE,KAAK,EAAE,sBAAsB,EAAE,GACxD,0BAA0B,CAAC,IAAI,CAAC;IAElC,OAAO;QACL,MAAM;QACN,IAAI;QACJ,iBAAiB;QACjB,sBAAsB;KACvB;AACH;;;;"}