@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.
- package/CHANGELOG.md +183 -0
- package/LICENSE +219 -0
- package/README.md +5 -0
- package/dist/css/styles.css +2351 -0
- package/dist/css/styles.css.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +15 -0
- package/dist/index.js.map +1 -0
- package/dist/src/components/Avatar/Avatar.d.ts +14 -0
- package/dist/src/components/Avatar/Avatar.js +11 -0
- package/dist/src/components/Avatar/Avatar.js.map +1 -0
- package/dist/src/components/Avatar/index.d.ts +1 -0
- package/dist/src/components/Avatar/index.js +2 -0
- package/dist/src/components/Avatar/index.js.map +1 -0
- package/dist/src/components/Button/CompositeButton.d.ts +16 -0
- package/dist/src/components/Button/CompositeButton.js +15 -0
- package/dist/src/components/Button/CompositeButton.js.map +1 -0
- package/dist/src/components/Button/CopyToClipboardButton.d.ts +27 -0
- package/dist/src/components/Button/CopyToClipboardButton.js +54 -0
- package/dist/src/components/Button/CopyToClipboardButton.js.map +1 -0
- package/dist/src/components/Button/IconButton.d.ts +7 -0
- package/dist/src/components/Button/IconButton.js +26 -0
- package/dist/src/components/Button/IconButton.js.map +1 -0
- package/dist/src/components/Button/TextButton.d.ts +2 -0
- package/dist/src/components/Button/TextButton.js +17 -0
- package/dist/src/components/Button/TextButton.js.map +1 -0
- package/dist/src/components/Button/index.d.ts +4 -0
- package/dist/src/components/Button/index.js +5 -0
- package/dist/src/components/Button/index.js.map +1 -0
- package/dist/src/components/CallControls/CallControls.d.ts +7 -0
- package/dist/src/components/CallControls/CallControls.js +8 -0
- package/dist/src/components/CallControls/CallControls.js.map +1 -0
- package/dist/src/components/CallControls/CallStatsButton.d.ts +6 -0
- package/dist/src/components/CallControls/CallStatsButton.js +10 -0
- package/dist/src/components/CallControls/CallStatsButton.js.map +1 -0
- package/dist/src/components/CallControls/CancelCallButton.d.ts +8 -0
- package/dist/src/components/CallControls/CancelCallButton.js +25 -0
- package/dist/src/components/CallControls/CancelCallButton.js.map +1 -0
- package/dist/src/components/CallControls/ReactionsButton.d.ts +11 -0
- package/dist/src/components/CallControls/ReactionsButton.js +33 -0
- package/dist/src/components/CallControls/ReactionsButton.js.map +1 -0
- package/dist/src/components/CallControls/RecordCallButton.d.ts +7 -0
- package/dist/src/components/CallControls/RecordCallButton.js +51 -0
- package/dist/src/components/CallControls/RecordCallButton.js.map +1 -0
- package/dist/src/components/CallControls/ScreenShareButton.d.ts +7 -0
- package/dist/src/components/CallControls/ScreenShareButton.js +54 -0
- package/dist/src/components/CallControls/ScreenShareButton.js.map +1 -0
- package/dist/src/components/CallControls/ToggleAudioButton.d.ts +9 -0
- package/dist/src/components/CallControls/ToggleAudioButton.js +66 -0
- package/dist/src/components/CallControls/ToggleAudioButton.js.map +1 -0
- package/dist/src/components/CallControls/ToggleAudioOutputButton.d.ts +5 -0
- package/dist/src/components/CallControls/ToggleAudioOutputButton.js +9 -0
- package/dist/src/components/CallControls/ToggleAudioOutputButton.js.map +1 -0
- package/dist/src/components/CallControls/ToggleCameraButton.d.ts +10 -0
- package/dist/src/components/CallControls/ToggleCameraButton.js +64 -0
- package/dist/src/components/CallControls/ToggleCameraButton.js.map +1 -0
- package/dist/src/components/CallControls/ToggleParticipantListButton.d.ts +6 -0
- package/dist/src/components/CallControls/ToggleParticipantListButton.js +7 -0
- package/dist/src/components/CallControls/ToggleParticipantListButton.js.map +1 -0
- package/dist/src/components/CallControls/index.d.ts +10 -0
- package/dist/src/components/CallControls/index.js +11 -0
- package/dist/src/components/CallControls/index.js.map +1 -0
- package/dist/src/components/CallParticipantsList/BlockedUserListing.d.ts +4 -0
- package/dist/src/components/CallParticipantsList/BlockedUserListing.js +19 -0
- package/dist/src/components/CallParticipantsList/BlockedUserListing.js.map +1 -0
- package/dist/src/components/CallParticipantsList/CallParticipantListHeader.d.ts +6 -0
- package/dist/src/components/CallParticipantsList/CallParticipantListHeader.js +7 -0
- package/dist/src/components/CallParticipantsList/CallParticipantListHeader.js.map +1 -0
- package/dist/src/components/CallParticipantsList/CallParticipantListing.d.ts +8 -0
- package/dist/src/components/CallParticipantsList/CallParticipantListing.js +4 -0
- package/dist/src/components/CallParticipantsList/CallParticipantListing.js.map +1 -0
- package/dist/src/components/CallParticipantsList/CallParticipantListingItem.d.ts +15 -0
- package/dist/src/components/CallParticipantsList/CallParticipantListingItem.js +77 -0
- package/dist/src/components/CallParticipantsList/CallParticipantListingItem.js.map +1 -0
- package/dist/src/components/CallParticipantsList/CallParticipantsList.d.ts +15 -0
- package/dist/src/components/CallParticipantsList/CallParticipantsList.js +82 -0
- package/dist/src/components/CallParticipantsList/CallParticipantsList.js.map +1 -0
- package/dist/src/components/CallParticipantsList/EmptyParticipantSearchList.d.ts +2 -0
- package/dist/src/components/CallParticipantsList/EmptyParticipantSearchList.js +5 -0
- package/dist/src/components/CallParticipantsList/EmptyParticipantSearchList.js.map +1 -0
- package/dist/src/components/CallParticipantsList/index.d.ts +3 -0
- package/dist/src/components/CallParticipantsList/index.js +4 -0
- package/dist/src/components/CallParticipantsList/index.js.map +1 -0
- package/dist/src/components/CallRecordingList/CallRecordingList.d.ts +20 -0
- package/dist/src/components/CallRecordingList/CallRecordingList.js +9 -0
- package/dist/src/components/CallRecordingList/CallRecordingList.js.map +1 -0
- package/dist/src/components/CallRecordingList/CallRecordingListHeader.d.ts +7 -0
- package/dist/src/components/CallRecordingList/CallRecordingListHeader.js +8 -0
- package/dist/src/components/CallRecordingList/CallRecordingListHeader.js.map +1 -0
- package/dist/src/components/CallRecordingList/CallRecordingListItem.d.ts +7 -0
- package/dist/src/components/CallRecordingList/CallRecordingListItem.js +11 -0
- package/dist/src/components/CallRecordingList/CallRecordingListItem.js.map +1 -0
- package/dist/src/components/CallRecordingList/EmptyCallRecordingListing.d.ts +2 -0
- package/dist/src/components/CallRecordingList/EmptyCallRecordingListing.js +5 -0
- package/dist/src/components/CallRecordingList/EmptyCallRecordingListing.js.map +1 -0
- package/dist/src/components/CallRecordingList/LoadingCallRecordingListing.d.ts +7 -0
- package/dist/src/components/CallRecordingList/LoadingCallRecordingListing.js +7 -0
- package/dist/src/components/CallRecordingList/LoadingCallRecordingListing.js.map +1 -0
- package/dist/src/components/CallRecordingList/index.d.ts +5 -0
- package/dist/src/components/CallRecordingList/index.js +6 -0
- package/dist/src/components/CallRecordingList/index.js.map +1 -0
- package/dist/src/components/Debug/DebugParticipantPublishQuality.d.ts +6 -0
- package/dist/src/components/Debug/DebugParticipantPublishQuality.js +46 -0
- package/dist/src/components/Debug/DebugParticipantPublishQuality.js.map +1 -0
- package/dist/src/components/Debug/DebugStatsView.d.ts +7 -0
- package/dist/src/components/Debug/DebugStatsView.js +26 -0
- package/dist/src/components/Debug/DebugStatsView.js.map +1 -0
- package/dist/src/components/Debug/useIsDebugMode.d.ts +5 -0
- package/dist/src/components/Debug/useIsDebugMode.js +18 -0
- package/dist/src/components/Debug/useIsDebugMode.js.map +1 -0
- package/dist/src/components/DeviceSettings/DeviceSelector.d.ts +7 -0
- package/dist/src/components/DeviceSettings/DeviceSelector.js +26 -0
- package/dist/src/components/DeviceSettings/DeviceSelector.js.map +1 -0
- package/dist/src/components/DeviceSettings/DeviceSelectorAudio.d.ts +9 -0
- package/dist/src/components/DeviceSettings/DeviceSelectorAudio.js +18 -0
- package/dist/src/components/DeviceSettings/DeviceSelectorAudio.js.map +1 -0
- package/dist/src/components/DeviceSettings/DeviceSelectorVideo.d.ts +5 -0
- package/dist/src/components/DeviceSettings/DeviceSelectorVideo.js +10 -0
- package/dist/src/components/DeviceSettings/DeviceSelectorVideo.js.map +1 -0
- package/dist/src/components/DeviceSettings/DeviceSettings.d.ts +2 -0
- package/dist/src/components/DeviceSettings/DeviceSettings.js +15 -0
- package/dist/src/components/DeviceSettings/DeviceSettings.js.map +1 -0
- package/dist/src/components/DeviceSettings/index.d.ts +4 -0
- package/dist/src/components/DeviceSettings/index.js +5 -0
- package/dist/src/components/DeviceSettings/index.js.map +1 -0
- package/dist/src/components/Icon/Icon.d.ts +5 -0
- package/dist/src/components/Icon/Icon.js +4 -0
- package/dist/src/components/Icon/Icon.js.map +1 -0
- package/dist/src/components/Icon/index.d.ts +1 -0
- package/dist/src/components/Icon/index.js +2 -0
- package/dist/src/components/Icon/index.js.map +1 -0
- package/dist/src/components/LoadingIndicator/LoadingIndicator.d.ts +11 -0
- package/dist/src/components/LoadingIndicator/LoadingIndicator.js +6 -0
- package/dist/src/components/LoadingIndicator/LoadingIndicator.js.map +1 -0
- package/dist/src/components/LoadingIndicator/index.d.ts +1 -0
- package/dist/src/components/LoadingIndicator/index.js +2 -0
- package/dist/src/components/LoadingIndicator/index.js.map +1 -0
- package/dist/src/components/Menu/GenericMenu.d.ts +3 -0
- package/dist/src/components/Menu/GenericMenu.js +20 -0
- package/dist/src/components/Menu/GenericMenu.js.map +1 -0
- package/dist/src/components/Menu/MenuToggle.d.ts +12 -0
- package/dist/src/components/Menu/MenuToggle.js +40 -0
- package/dist/src/components/Menu/MenuToggle.js.map +1 -0
- package/dist/src/components/Menu/index.d.ts +2 -0
- package/dist/src/components/Menu/index.js +3 -0
- package/dist/src/components/Menu/index.js.map +1 -0
- package/dist/src/components/Moderation/Restricted.d.ts +19 -0
- package/dist/src/components/Moderation/Restricted.js +13 -0
- package/dist/src/components/Moderation/Restricted.js.map +1 -0
- package/dist/src/components/Moderation/index.d.ts +1 -0
- package/dist/src/components/Moderation/index.js +2 -0
- package/dist/src/components/Moderation/index.js.map +1 -0
- package/dist/src/components/Notification/Notification.d.ts +11 -0
- package/dist/src/components/Notification/Notification.js +25 -0
- package/dist/src/components/Notification/Notification.js.map +1 -0
- package/dist/src/components/Notification/PermissionNotification.d.ts +33 -0
- package/dist/src/components/Notification/PermissionNotification.js +26 -0
- package/dist/src/components/Notification/PermissionNotification.js.map +1 -0
- package/dist/src/components/Notification/SpeakingWhileMutedNotification.d.ts +3 -0
- package/dist/src/components/Notification/SpeakingWhileMutedNotification.js +45 -0
- package/dist/src/components/Notification/SpeakingWhileMutedNotification.js.map +1 -0
- package/dist/src/components/Notification/index.d.ts +3 -0
- package/dist/src/components/Notification/index.js +4 -0
- package/dist/src/components/Notification/index.js.map +1 -0
- package/dist/src/components/Permissions/PermissionRequests.d.ts +8 -0
- package/dist/src/components/Permissions/PermissionRequests.js +109 -0
- package/dist/src/components/Permissions/PermissionRequests.js.map +1 -0
- package/dist/src/components/Permissions/index.d.ts +1 -0
- package/dist/src/components/Permissions/index.js +2 -0
- package/dist/src/components/Permissions/index.js.map +1 -0
- package/dist/src/components/Reaction/Reaction.d.ts +10 -0
- package/dist/src/components/Reaction/Reaction.js +28 -0
- package/dist/src/components/Reaction/Reaction.js.map +1 -0
- package/dist/src/components/Reaction/index.d.ts +1 -0
- package/dist/src/components/Reaction/index.js +2 -0
- package/dist/src/components/Reaction/index.js.map +1 -0
- package/dist/src/components/Search/SearchInput.d.ts +14 -0
- package/dist/src/components/Search/SearchInput.js +34 -0
- package/dist/src/components/Search/SearchInput.js.map +1 -0
- package/dist/src/components/Search/SearchResults.d.ts +14 -0
- package/dist/src/components/Search/SearchResults.js +12 -0
- package/dist/src/components/Search/SearchResults.js.map +1 -0
- package/dist/src/components/Search/hooks/index.d.ts +1 -0
- package/dist/src/components/Search/hooks/index.js +2 -0
- package/dist/src/components/Search/hooks/index.js.map +1 -0
- package/dist/src/components/Search/hooks/useSearch.d.ts +15 -0
- package/dist/src/components/Search/hooks/useSearch.js +39 -0
- package/dist/src/components/Search/hooks/useSearch.js.map +1 -0
- package/dist/src/components/Search/index.d.ts +2 -0
- package/dist/src/components/Search/index.js +3 -0
- package/dist/src/components/Search/index.js.map +1 -0
- package/dist/src/components/StreamCall/CallParticipantsScreenView.d.ts +5 -0
- package/dist/src/components/StreamCall/CallParticipantsScreenView.js +34 -0
- package/dist/src/components/StreamCall/CallParticipantsScreenView.js.map +1 -0
- package/dist/src/components/StreamCall/CallParticipantsView.d.ts +5 -0
- package/dist/src/components/StreamCall/CallParticipantsView.js +11 -0
- package/dist/src/components/StreamCall/CallParticipantsView.js.map +1 -0
- package/dist/src/components/StreamCall/CallStats.d.ts +2 -0
- package/dist/src/components/StreamCall/CallStats.js +69 -0
- package/dist/src/components/StreamCall/CallStats.js.map +1 -0
- package/dist/src/components/StreamCall/CallStatsLatencyChart.d.ts +7 -0
- package/dist/src/components/StreamCall/CallStatsLatencyChart.js +39 -0
- package/dist/src/components/StreamCall/CallStatsLatencyChart.js.map +1 -0
- package/dist/src/components/StreamCall/Stage.d.ts +8 -0
- package/dist/src/components/StreamCall/Stage.js +13 -0
- package/dist/src/components/StreamCall/Stage.js.map +1 -0
- package/dist/src/components/StreamCall/hooks/index.d.ts +1 -0
- package/dist/src/components/StreamCall/hooks/index.js +2 -0
- package/dist/src/components/StreamCall/hooks/index.js.map +1 -0
- package/dist/src/components/StreamCall/hooks/useScrollPosition.d.ts +6 -0
- package/dist/src/components/StreamCall/hooks/useScrollPosition.js +63 -0
- package/dist/src/components/StreamCall/hooks/useScrollPosition.js.map +1 -0
- package/dist/src/components/StreamCall/index.d.ts +3 -0
- package/dist/src/components/StreamCall/index.js +4 -0
- package/dist/src/components/StreamCall/index.js.map +1 -0
- package/dist/src/components/StreamMeeting/StreamMeeting.d.ts +34 -0
- package/dist/src/components/StreamMeeting/StreamMeeting.js +26 -0
- package/dist/src/components/StreamMeeting/StreamMeeting.js.map +1 -0
- package/dist/src/components/StreamMeeting/index.d.ts +1 -0
- package/dist/src/components/StreamMeeting/index.js +2 -0
- package/dist/src/components/StreamMeeting/index.js.map +1 -0
- package/dist/src/components/Tooltip/Tooltip.d.ts +15 -0
- package/dist/src/components/Tooltip/Tooltip.js +22 -0
- package/dist/src/components/Tooltip/Tooltip.js.map +1 -0
- package/dist/src/components/Tooltip/WithTooltip.d.ts +5 -0
- package/dist/src/components/Tooltip/WithTooltip.js +23 -0
- package/dist/src/components/Tooltip/WithTooltip.js.map +1 -0
- package/dist/src/components/Tooltip/hooks/index.d.ts +1 -0
- package/dist/src/components/Tooltip/hooks/index.js +2 -0
- package/dist/src/components/Tooltip/hooks/index.js.map +1 -0
- package/dist/src/components/Tooltip/hooks/useEnterLeaveHandlers.d.ts +6 -0
- package/dist/src/components/Tooltip/hooks/useEnterLeaveHandlers.js +14 -0
- package/dist/src/components/Tooltip/hooks/useEnterLeaveHandlers.js.map +1 -0
- package/dist/src/components/Tooltip/index.d.ts +2 -0
- package/dist/src/components/Tooltip/index.js +3 -0
- package/dist/src/components/Tooltip/index.js.map +1 -0
- package/dist/src/components/Video/VideoPreview.d.ts +13 -0
- package/dist/src/components/Video/VideoPreview.js +70 -0
- package/dist/src/components/Video/VideoPreview.js.map +1 -0
- package/dist/src/components/Video/index.d.ts +4 -0
- package/dist/src/components/Video/index.js +5 -0
- package/dist/src/components/Video/index.js.map +1 -0
- package/dist/src/components/index.d.ts +16 -0
- package/dist/src/components/index.js +17 -0
- package/dist/src/components/index.js.map +1 -0
- package/dist/src/core/components/Audio/Audio.d.ts +6 -0
- package/dist/src/core/components/Audio/Audio.js +39 -0
- package/dist/src/core/components/Audio/Audio.js.map +1 -0
- package/dist/src/core/components/Audio/index.d.ts +1 -0
- package/dist/src/core/components/Audio/index.js +2 -0
- package/dist/src/core/components/Audio/index.js.map +1 -0
- package/dist/src/core/components/CallLayout/PaginatedGridLayout.d.ts +21 -0
- package/dist/src/core/components/CallLayout/PaginatedGridLayout.js +39 -0
- package/dist/src/core/components/CallLayout/PaginatedGridLayout.js.map +1 -0
- package/dist/src/core/components/CallLayout/SpeakerLayout.d.ts +2 -0
- package/dist/src/core/components/CallLayout/SpeakerLayout.js +52 -0
- package/dist/src/core/components/CallLayout/SpeakerLayout.js.map +1 -0
- package/dist/src/core/components/CallLayout/index.d.ts +2 -0
- package/dist/src/core/components/CallLayout/index.js +3 -0
- package/dist/src/core/components/CallLayout/index.js.map +1 -0
- package/dist/src/core/components/ParticipantBox/ParticipantBox.d.ts +48 -0
- package/dist/src/core/components/ParticipantBox/ParticipantBox.js +58 -0
- package/dist/src/core/components/ParticipantBox/ParticipantBox.js.map +1 -0
- package/dist/src/core/components/ParticipantBox/index.d.ts +1 -0
- package/dist/src/core/components/ParticipantBox/index.js +2 -0
- package/dist/src/core/components/ParticipantBox/index.js.map +1 -0
- package/dist/src/core/components/Video/BaseVideo.d.ts +9 -0
- package/dist/src/core/components/Video/BaseVideo.js +54 -0
- package/dist/src/core/components/Video/BaseVideo.js.map +1 -0
- package/dist/src/core/components/Video/Video.d.ts +8 -0
- package/dist/src/core/components/Video/Video.js +151 -0
- package/dist/src/core/components/Video/Video.js.map +1 -0
- package/dist/src/core/components/Video/VideoPlaceholder.d.ts +6 -0
- package/dist/src/core/components/Video/VideoPlaceholder.js +12 -0
- package/dist/src/core/components/Video/VideoPlaceholder.js.map +1 -0
- package/dist/src/core/components/Video/index.d.ts +2 -0
- package/dist/src/core/components/Video/index.js +3 -0
- package/dist/src/core/components/Video/index.js.map +1 -0
- package/dist/src/core/components/index.d.ts +5 -0
- package/dist/src/core/components/index.js +5 -0
- package/dist/src/core/components/index.js.map +1 -0
- package/dist/src/core/contexts/MediaDevicesContext.d.ts +82 -0
- package/dist/src/core/contexts/MediaDevicesContext.js +215 -0
- package/dist/src/core/contexts/MediaDevicesContext.js.map +1 -0
- package/dist/src/core/contexts/index.d.ts +1 -0
- package/dist/src/core/contexts/index.js +2 -0
- package/dist/src/core/contexts/index.js.map +1 -0
- package/dist/src/core/hooks/index.d.ts +2 -0
- package/dist/src/core/hooks/index.js +3 -0
- package/dist/src/core/hooks/index.js.map +1 -0
- package/dist/src/core/hooks/useAudioPublisher.d.ts +12 -0
- package/dist/src/core/hooks/useAudioPublisher.js +89 -0
- package/dist/src/core/hooks/useAudioPublisher.js.map +1 -0
- package/dist/src/core/hooks/useVideoPublisher.d.ts +12 -0
- package/dist/src/core/hooks/useVideoPublisher.js +91 -0
- package/dist/src/core/hooks/useVideoPublisher.js.map +1 -0
- package/dist/src/core/index.d.ts +3 -0
- package/dist/src/core/index.js +4 -0
- package/dist/src/core/index.js.map +1 -0
- package/dist/src/hooks/index.d.ts +2 -0
- package/dist/src/hooks/index.js +3 -0
- package/dist/src/hooks/index.js.map +1 -0
- package/dist/src/hooks/useFloatingUIPreset.d.ts +9 -0
- package/dist/src/hooks/useFloatingUIPreset.js +29 -0
- package/dist/src/hooks/useFloatingUIPreset.js.map +1 -0
- package/dist/src/hooks/useRtcStats.d.ts +11 -0
- package/dist/src/hooks/useRtcStats.js +39 -0
- package/dist/src/hooks/useRtcStats.js.map +1 -0
- package/dist/src/types/components.d.ts +7 -0
- package/dist/src/types/components.js +2 -0
- package/dist/src/types/components.js.map +1 -0
- package/dist/src/types/index.d.ts +1 -0
- package/dist/src/types/index.js +2 -0
- package/dist/src/types/index.js.map +1 -0
- package/index.ts +18 -0
- package/package.json +49 -0
- package/src/components/Avatar/Avatar.tsx +45 -0
- package/src/components/Avatar/index.ts +1 -0
- package/src/components/Button/CompositeButton.tsx +59 -0
- package/src/components/Button/CopyToClipboardButton.tsx +129 -0
- package/src/components/Button/IconButton.tsx +32 -0
- package/src/components/Button/TextButton.tsx +12 -0
- package/src/components/Button/index.ts +4 -0
- package/src/components/CallControls/CallControls.tsx +32 -0
- package/src/components/CallControls/CallStatsButton.tsx +28 -0
- package/src/components/CallControls/CancelCallButton.tsx +28 -0
- package/src/components/CallControls/ReactionsButton.tsx +75 -0
- package/src/components/CallControls/RecordCallButton.tsx +68 -0
- package/src/components/CallControls/ScreenShareButton.tsx +85 -0
- package/src/components/CallControls/ToggleAudioButton.tsx +112 -0
- package/src/components/CallControls/ToggleAudioOutputButton.tsx +21 -0
- package/src/components/CallControls/ToggleCameraButton.tsx +109 -0
- package/src/components/CallControls/ToggleParticipantListButton.tsx +17 -0
- package/src/components/CallControls/index.ts +10 -0
- package/src/components/CallParticipantsList/BlockedUserListing.tsx +38 -0
- package/src/components/CallParticipantsList/CallParticipantListHeader.tsx +29 -0
- package/src/components/CallParticipantsList/CallParticipantListing.tsx +22 -0
- package/src/components/CallParticipantsList/CallParticipantListingItem.tsx +249 -0
- package/src/components/CallParticipantsList/CallParticipantsList.tsx +255 -0
- package/src/components/CallParticipantsList/EmptyParticipantSearchList.tsx +7 -0
- package/src/components/CallParticipantsList/index.ts +3 -0
- package/src/components/CallRecordingList/CallRecordingList.tsx +60 -0
- package/src/components/CallRecordingList/CallRecordingListHeader.tsx +29 -0
- package/src/components/CallRecordingList/CallRecordingListItem.tsx +67 -0
- package/src/components/CallRecordingList/EmptyCallRecordingListing.tsx +11 -0
- package/src/components/CallRecordingList/LoadingCallRecordingListing.tsx +21 -0
- package/src/components/CallRecordingList/index.ts +5 -0
- package/src/components/Debug/DebugParticipantPublishQuality.tsx +62 -0
- package/src/components/Debug/DebugStatsView.tsx +55 -0
- package/src/components/Debug/useIsDebugMode.ts +24 -0
- package/src/components/DeviceSettings/DeviceSelector.tsx +106 -0
- package/src/components/DeviceSettings/DeviceSelectorAudio.tsx +52 -0
- package/src/components/DeviceSettings/DeviceSelectorVideo.tsx +22 -0
- package/src/components/DeviceSettings/DeviceSettings.tsx +39 -0
- package/src/components/DeviceSettings/index.ts +4 -0
- package/src/components/Icon/Icon.tsx +11 -0
- package/src/components/Icon/index.ts +1 -0
- package/src/components/LoadingIndicator/LoadingIndicator.tsx +28 -0
- package/src/components/LoadingIndicator/index.ts +1 -0
- package/src/components/Menu/GenericMenu.tsx +16 -0
- package/src/components/Menu/MenuToggle.tsx +81 -0
- package/src/components/Menu/index.ts +2 -0
- package/src/components/Moderation/Restricted.tsx +38 -0
- package/src/components/Moderation/index.ts +1 -0
- package/src/components/Notification/Notification.tsx +61 -0
- package/src/components/Notification/PermissionNotification.tsx +97 -0
- package/src/components/Notification/SpeakingWhileMutedNotification.tsx +60 -0
- package/src/components/Notification/index.ts +3 -0
- package/src/components/Permissions/PermissionRequests.tsx +182 -0
- package/src/components/Permissions/index.ts +1 -0
- package/src/components/Reaction/Reaction.tsx +48 -0
- package/src/components/Reaction/index.ts +1 -0
- package/src/components/Search/SearchInput.tsx +56 -0
- package/src/components/Search/SearchResults.tsx +40 -0
- package/src/components/Search/hooks/index.ts +1 -0
- package/src/components/Search/hooks/useSearch.ts +52 -0
- package/src/components/Search/index.ts +2 -0
- package/src/components/StreamCall/CallParticipantsScreenView.tsx +126 -0
- package/src/components/StreamCall/CallParticipantsView.tsx +25 -0
- package/src/components/StreamCall/CallStats.tsx +162 -0
- package/src/components/StreamCall/CallStatsLatencyChart.tsx +58 -0
- package/src/components/StreamCall/Stage.tsx +22 -0
- package/src/components/StreamCall/hooks/index.ts +1 -0
- package/src/components/StreamCall/hooks/useScrollPosition.ts +95 -0
- package/src/components/StreamCall/index.ts +4 -0
- package/src/components/StreamMeeting/StreamMeeting.tsx +80 -0
- package/src/components/StreamMeeting/index.ts +1 -0
- package/src/components/Tooltip/Tooltip.tsx +51 -0
- package/src/components/Tooltip/WithTooltip.tsx +39 -0
- package/src/components/Tooltip/hooks/index.ts +1 -0
- package/src/components/Tooltip/hooks/useEnterLeaveHandlers.ts +28 -0
- package/src/components/Tooltip/index.ts +2 -0
- package/src/components/Video/VideoPreview.tsx +127 -0
- package/src/components/Video/index.ts +4 -0
- package/src/components/index.ts +16 -0
- package/src/core/components/Audio/Audio.tsx +42 -0
- package/src/core/components/Audio/index.ts +1 -0
- package/src/core/components/CallLayout/PaginatedGridLayout.tsx +163 -0
- package/src/core/components/CallLayout/SpeakerLayout.tsx +145 -0
- package/src/core/components/CallLayout/index.ts +2 -0
- package/src/core/components/ParticipantBox/ParticipantBox.tsx +248 -0
- package/src/core/components/ParticipantBox/index.ts +1 -0
- package/src/core/components/Video/BaseVideo.tsx +68 -0
- package/src/core/components/Video/Video.tsx +238 -0
- package/src/core/components/Video/VideoPlaceholder.tsx +40 -0
- package/src/core/components/Video/index.ts +2 -0
- package/src/core/components/index.ts +7 -0
- package/src/core/contexts/MediaDevicesContext.tsx +373 -0
- package/src/core/contexts/index.ts +1 -0
- package/src/core/hooks/index.ts +2 -0
- package/src/core/hooks/useAudioPublisher.ts +118 -0
- package/src/core/hooks/useVideoPublisher.ts +120 -0
- package/src/core/index.ts +3 -0
- package/src/hooks/index.ts +2 -0
- package/src/hooks/useFloatingUIPreset.ts +48 -0
- package/src/hooks/useRtcStats.ts +36 -0
- package/src/types/components.ts +7 -0
- package/src/types/index.ts +1 -0
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ForwardedRef,
|
|
3
|
+
forwardRef,
|
|
4
|
+
useCallback,
|
|
5
|
+
useState,
|
|
6
|
+
ComponentProps,
|
|
7
|
+
} from 'react';
|
|
8
|
+
import {
|
|
9
|
+
useCall,
|
|
10
|
+
useCallMetadata,
|
|
11
|
+
useOwnCapabilities,
|
|
12
|
+
useParticipants,
|
|
13
|
+
} from '@stream-io/video-react-bindings';
|
|
14
|
+
import {
|
|
15
|
+
name,
|
|
16
|
+
OwnCapability,
|
|
17
|
+
StreamVideoParticipant,
|
|
18
|
+
} from '@stream-io/video-client';
|
|
19
|
+
import { clsx } from 'clsx';
|
|
20
|
+
|
|
21
|
+
import { BlockedUserListing } from './BlockedUserListing';
|
|
22
|
+
import {
|
|
23
|
+
CopyToClipboardButtonWithPopup,
|
|
24
|
+
IconButton,
|
|
25
|
+
TextButton,
|
|
26
|
+
} from '../Button';
|
|
27
|
+
import { CallParticipantListHeader } from './CallParticipantListHeader';
|
|
28
|
+
import { CallParticipantListing } from './CallParticipantListing';
|
|
29
|
+
import { EmptyParticipantSearchList } from './EmptyParticipantSearchList';
|
|
30
|
+
import { LoadingIndicator } from '../LoadingIndicator';
|
|
31
|
+
import { SearchInput, SearchResults } from '../Search';
|
|
32
|
+
import { useSearch, UseSearchParams } from '../Search/hooks';
|
|
33
|
+
import { Restricted } from '../Moderation';
|
|
34
|
+
import {
|
|
35
|
+
GenericMenu,
|
|
36
|
+
GenericMenuButtonItem,
|
|
37
|
+
MenuToggle,
|
|
38
|
+
ToggleMenuButtonProps,
|
|
39
|
+
} from '../Menu';
|
|
40
|
+
|
|
41
|
+
type CallParticipantListProps = {
|
|
42
|
+
/** Click event listener function to be invoked in order to dismiss/hide the CallParticipantsList from the UI */
|
|
43
|
+
onClose: () => void;
|
|
44
|
+
/** Custom function to override the searching logic of active participants */
|
|
45
|
+
activeUsersSearchFn?: UseSearchParams<StreamVideoParticipant>['searchFn'];
|
|
46
|
+
/** Custom function to override the searching logic of blocked users */
|
|
47
|
+
blockedUsersSearchFn?: UseSearchParams<string>['searchFn'];
|
|
48
|
+
/** Interval in ms, during which the participant search calls will be throttled. The default value is 200ms. */
|
|
49
|
+
debounceSearchInterval?: number;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
const UserListTypes = {
|
|
53
|
+
active: 'Active users',
|
|
54
|
+
blocked: 'Blocked users',
|
|
55
|
+
} as const;
|
|
56
|
+
|
|
57
|
+
export const CallParticipantsList = ({
|
|
58
|
+
onClose,
|
|
59
|
+
activeUsersSearchFn,
|
|
60
|
+
blockedUsersSearchFn,
|
|
61
|
+
debounceSearchInterval,
|
|
62
|
+
}: CallParticipantListProps) => {
|
|
63
|
+
const [searchQuery, setSearchQuery] = useState('');
|
|
64
|
+
const [userListType, setUserListType] =
|
|
65
|
+
useState<keyof typeof UserListTypes>('active');
|
|
66
|
+
|
|
67
|
+
const exitSearch = useCallback(() => setSearchQuery(''), []);
|
|
68
|
+
|
|
69
|
+
return (
|
|
70
|
+
<div className="str-video__participant-list">
|
|
71
|
+
<CallParticipantListHeader onClose={onClose} />
|
|
72
|
+
<SearchInput
|
|
73
|
+
value={searchQuery}
|
|
74
|
+
onChange={({ currentTarget }) => setSearchQuery(currentTarget.value)}
|
|
75
|
+
exitSearch={exitSearch}
|
|
76
|
+
isActive={!!searchQuery}
|
|
77
|
+
/>
|
|
78
|
+
<CallParticipantListContentHeader
|
|
79
|
+
userListType={userListType}
|
|
80
|
+
setUserListType={setUserListType}
|
|
81
|
+
/>
|
|
82
|
+
<div className="str-video__participant-list__content">
|
|
83
|
+
{userListType === 'active' && (
|
|
84
|
+
<ActiveUsersSearchResults
|
|
85
|
+
searchQuery={searchQuery}
|
|
86
|
+
activeUsersSearchFn={activeUsersSearchFn}
|
|
87
|
+
debounceSearchInterval={debounceSearchInterval}
|
|
88
|
+
/>
|
|
89
|
+
)}
|
|
90
|
+
{userListType === 'blocked' && (
|
|
91
|
+
<BlockedUsersSearchResults
|
|
92
|
+
searchQuery={searchQuery}
|
|
93
|
+
blockedUsersSearchFn={blockedUsersSearchFn}
|
|
94
|
+
debounceSearchInterval={debounceSearchInterval}
|
|
95
|
+
/>
|
|
96
|
+
)}
|
|
97
|
+
</div>
|
|
98
|
+
<div className="str-video__participant-list__footer">
|
|
99
|
+
<CopyToClipboardButtonWithPopup
|
|
100
|
+
Button={InviteLinkButton}
|
|
101
|
+
copyValue={typeof window !== 'undefined' ? window.location.href : ''}
|
|
102
|
+
/>
|
|
103
|
+
</div>
|
|
104
|
+
</div>
|
|
105
|
+
);
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
const CallParticipantListContentHeader = ({
|
|
109
|
+
userListType,
|
|
110
|
+
setUserListType,
|
|
111
|
+
}: {
|
|
112
|
+
userListType: keyof typeof UserListTypes;
|
|
113
|
+
setUserListType: React.Dispatch<
|
|
114
|
+
React.SetStateAction<keyof typeof UserListTypes>
|
|
115
|
+
>;
|
|
116
|
+
}) => {
|
|
117
|
+
const ownCapabilities = useOwnCapabilities();
|
|
118
|
+
const call = useCall();
|
|
119
|
+
|
|
120
|
+
const muteAll = () => {
|
|
121
|
+
call?.muteAllUsers('audio');
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
return (
|
|
125
|
+
<div className="str-video__participant-list__content-header">
|
|
126
|
+
<MenuToggle placement="bottom-end" ToggleButton={ToggleButton}>
|
|
127
|
+
<GenericMenu>
|
|
128
|
+
{(
|
|
129
|
+
Object.keys(UserListTypes) as Array<keyof typeof UserListTypes>
|
|
130
|
+
).map((lt) => (
|
|
131
|
+
<GenericMenuButtonItem
|
|
132
|
+
key={lt}
|
|
133
|
+
aria-selected={lt === userListType}
|
|
134
|
+
onClick={() => setUserListType(lt)}
|
|
135
|
+
>
|
|
136
|
+
{UserListTypes[lt]}
|
|
137
|
+
</GenericMenuButtonItem>
|
|
138
|
+
))}
|
|
139
|
+
</GenericMenu>
|
|
140
|
+
</MenuToggle>
|
|
141
|
+
<div className="str-video__participant-list__content-header-title">
|
|
142
|
+
<span>{UserListTypes[userListType]}</span>
|
|
143
|
+
{userListType === 'active' && (
|
|
144
|
+
<Restricted
|
|
145
|
+
availableGrants={ownCapabilities} // TODO: remove this line once Oliver's PR lands
|
|
146
|
+
requiredGrants={[OwnCapability.MUTE_USERS]}
|
|
147
|
+
>
|
|
148
|
+
<TextButton onClick={muteAll}>Mute all</TextButton>
|
|
149
|
+
</Restricted>
|
|
150
|
+
)}
|
|
151
|
+
</div>
|
|
152
|
+
</div>
|
|
153
|
+
);
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
const ActiveUsersSearchResults = ({
|
|
157
|
+
searchQuery,
|
|
158
|
+
activeUsersSearchFn: activeUsersSearchFnFromProps,
|
|
159
|
+
debounceSearchInterval = 200,
|
|
160
|
+
}: Pick<
|
|
161
|
+
CallParticipantListProps,
|
|
162
|
+
'activeUsersSearchFn' | 'debounceSearchInterval'
|
|
163
|
+
> & { searchQuery: string }) => {
|
|
164
|
+
const participants = useParticipants({ sortBy: name });
|
|
165
|
+
|
|
166
|
+
const activeUsersSearchFn = useCallback(
|
|
167
|
+
(queryString: string) => {
|
|
168
|
+
const queryRegExp = new RegExp(queryString, 'i');
|
|
169
|
+
return Promise.resolve(
|
|
170
|
+
participants.filter((participant) => {
|
|
171
|
+
return participant.name.match(queryRegExp);
|
|
172
|
+
}),
|
|
173
|
+
);
|
|
174
|
+
},
|
|
175
|
+
[participants],
|
|
176
|
+
);
|
|
177
|
+
|
|
178
|
+
const { searchQueryInProgress, searchResults } =
|
|
179
|
+
useSearch<StreamVideoParticipant>({
|
|
180
|
+
searchFn: activeUsersSearchFnFromProps ?? activeUsersSearchFn,
|
|
181
|
+
debounceInterval: debounceSearchInterval,
|
|
182
|
+
searchQuery,
|
|
183
|
+
});
|
|
184
|
+
|
|
185
|
+
return (
|
|
186
|
+
<SearchResults<StreamVideoParticipant>
|
|
187
|
+
EmptySearchResultComponent={EmptyParticipantSearchList}
|
|
188
|
+
LoadingIndicator={LoadingIndicator}
|
|
189
|
+
searchQueryInProgress={searchQueryInProgress}
|
|
190
|
+
searchResults={searchQuery ? searchResults : participants}
|
|
191
|
+
SearchResultList={CallParticipantListing}
|
|
192
|
+
/>
|
|
193
|
+
);
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
const BlockedUsersSearchResults = ({
|
|
197
|
+
blockedUsersSearchFn: blockedUsersSearchFnFromProps,
|
|
198
|
+
debounceSearchInterval = 200,
|
|
199
|
+
searchQuery,
|
|
200
|
+
}: Pick<
|
|
201
|
+
CallParticipantListProps,
|
|
202
|
+
'blockedUsersSearchFn' | 'debounceSearchInterval'
|
|
203
|
+
> & { searchQuery: string }) => {
|
|
204
|
+
const { blocked_user_ids: blockedUsers = [] } = useCallMetadata()!;
|
|
205
|
+
|
|
206
|
+
const blockedUsersSearchFn = useCallback(
|
|
207
|
+
(queryString: string) => {
|
|
208
|
+
const queryRegExp = new RegExp(queryString, 'i');
|
|
209
|
+
return Promise.resolve(
|
|
210
|
+
blockedUsers.filter((blockedUser) => {
|
|
211
|
+
return blockedUser.match(queryRegExp);
|
|
212
|
+
}),
|
|
213
|
+
);
|
|
214
|
+
},
|
|
215
|
+
[blockedUsers],
|
|
216
|
+
);
|
|
217
|
+
|
|
218
|
+
const { searchQueryInProgress, searchResults } = useSearch<string>({
|
|
219
|
+
searchFn: blockedUsersSearchFnFromProps ?? blockedUsersSearchFn,
|
|
220
|
+
debounceInterval: debounceSearchInterval,
|
|
221
|
+
searchQuery,
|
|
222
|
+
});
|
|
223
|
+
|
|
224
|
+
return (
|
|
225
|
+
<SearchResults<string>
|
|
226
|
+
EmptySearchResultComponent={EmptyParticipantSearchList}
|
|
227
|
+
LoadingIndicator={LoadingIndicator}
|
|
228
|
+
searchQueryInProgress={searchQueryInProgress}
|
|
229
|
+
searchResults={searchQuery ? searchResults : blockedUsers}
|
|
230
|
+
SearchResultList={BlockedUserListing}
|
|
231
|
+
/>
|
|
232
|
+
);
|
|
233
|
+
};
|
|
234
|
+
|
|
235
|
+
const ToggleButton = forwardRef<HTMLButtonElement, ToggleMenuButtonProps>(
|
|
236
|
+
(props, ref) => {
|
|
237
|
+
return <IconButton enabled={props.menuShown} icon="caret-down" ref={ref} />;
|
|
238
|
+
},
|
|
239
|
+
);
|
|
240
|
+
|
|
241
|
+
const InviteLinkButton = forwardRef(
|
|
242
|
+
(
|
|
243
|
+
{ className, ...props }: ComponentProps<'button'>,
|
|
244
|
+
ref: ForwardedRef<HTMLButtonElement>,
|
|
245
|
+
) => (
|
|
246
|
+
<button
|
|
247
|
+
{...props}
|
|
248
|
+
className={clsx('str-video__invite-link-button', className)}
|
|
249
|
+
ref={ref}
|
|
250
|
+
>
|
|
251
|
+
<div className="str-video__invite-participant-icon" />
|
|
252
|
+
<div className="str-video__invite-link-button__text">Invite Link</div>
|
|
253
|
+
</button>
|
|
254
|
+
),
|
|
255
|
+
);
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
import { CallRecording } from '@stream-io/video-client';
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
CallRecordingListHeader as DefaultCallRecordingListHeader,
|
|
6
|
+
CallRecordingListHeaderProps,
|
|
7
|
+
} from './CallRecordingListHeader';
|
|
8
|
+
import {
|
|
9
|
+
CallRecordingListItem as DefaultCallRecordingListItem,
|
|
10
|
+
CallRecordingListItemProps,
|
|
11
|
+
} from './CallRecordingListItem';
|
|
12
|
+
import { EmptyCallRecordingListing as DefaultEmptyCallRecordingList } from './EmptyCallRecordingListing';
|
|
13
|
+
import {
|
|
14
|
+
LoadingCallRecordingListing as DefaultLoadingCallRecordingList,
|
|
15
|
+
LoadingCallRecordingListProps,
|
|
16
|
+
} from './LoadingCallRecordingListing';
|
|
17
|
+
|
|
18
|
+
export type CallRecordingListProps = {
|
|
19
|
+
/** Array of CallRecording objects */
|
|
20
|
+
callRecordings: CallRecording[];
|
|
21
|
+
/** Custom component to replace the default header implementation */
|
|
22
|
+
CallRecordingListHeader?: ComponentType<CallRecordingListHeaderProps>;
|
|
23
|
+
/** Custom component to replace the default list item implementation */
|
|
24
|
+
CallRecordingListItem?: ComponentType<CallRecordingListItemProps>;
|
|
25
|
+
/** Custom component to replace the default empty list component implementation */
|
|
26
|
+
EmptyCallRecordingList?: ComponentType;
|
|
27
|
+
/** Indicator that a request for new list of CallRecording object has been initiated */
|
|
28
|
+
loading?: boolean;
|
|
29
|
+
/** */
|
|
30
|
+
LoadingCallRecordingList?: ComponentType<LoadingCallRecordingListProps>;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export const CallRecordingList = ({
|
|
34
|
+
callRecordings,
|
|
35
|
+
CallRecordingListHeader = DefaultCallRecordingListHeader,
|
|
36
|
+
CallRecordingListItem = DefaultCallRecordingListItem,
|
|
37
|
+
EmptyCallRecordingList = DefaultEmptyCallRecordingList,
|
|
38
|
+
loading,
|
|
39
|
+
LoadingCallRecordingList = DefaultLoadingCallRecordingList,
|
|
40
|
+
}: CallRecordingListProps) => {
|
|
41
|
+
return (
|
|
42
|
+
<div className="str-video__call-recording-list">
|
|
43
|
+
<CallRecordingListHeader callRecordings={callRecordings} />
|
|
44
|
+
<div className="str-video__call-recording-list__listing">
|
|
45
|
+
{loading ? (
|
|
46
|
+
<LoadingCallRecordingList callRecordings={callRecordings} />
|
|
47
|
+
) : callRecordings.length ? (
|
|
48
|
+
callRecordings.map((recording) => (
|
|
49
|
+
<CallRecordingListItem
|
|
50
|
+
recording={recording}
|
|
51
|
+
key={recording.filename}
|
|
52
|
+
/>
|
|
53
|
+
))
|
|
54
|
+
) : (
|
|
55
|
+
<EmptyCallRecordingList />
|
|
56
|
+
)}
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
);
|
|
60
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CallRecording } from '@stream-io/video-client';
|
|
3
|
+
import { useCall } from '@stream-io/video-react-bindings';
|
|
4
|
+
import { IconButton } from '../Button';
|
|
5
|
+
|
|
6
|
+
export type CallRecordingListHeaderProps = {
|
|
7
|
+
/** Array of CallRecording objects */
|
|
8
|
+
callRecordings: CallRecording[];
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export const CallRecordingListHeader = ({
|
|
12
|
+
callRecordings,
|
|
13
|
+
}: CallRecordingListHeaderProps) => {
|
|
14
|
+
const activeCall = useCall();
|
|
15
|
+
|
|
16
|
+
return (
|
|
17
|
+
<div className="str-video__call-recording-list__header">
|
|
18
|
+
<div className="str-video__call-recording-list__title">
|
|
19
|
+
<span>Call Recordings</span>
|
|
20
|
+
{callRecordings.length ? <span>({callRecordings.length})</span> : null}
|
|
21
|
+
</div>
|
|
22
|
+
<IconButton
|
|
23
|
+
icon="refresh"
|
|
24
|
+
title="Refresh"
|
|
25
|
+
onClick={() => activeCall?.queryRecordings()}
|
|
26
|
+
/>
|
|
27
|
+
</div>
|
|
28
|
+
);
|
|
29
|
+
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import clsx from 'clsx';
|
|
2
|
+
import React, { ComponentProps, ForwardedRef, forwardRef } from 'react';
|
|
3
|
+
import { CallRecording } from '@stream-io/video-client';
|
|
4
|
+
import { CopyToClipboardButtonWithPopup } from '../Button';
|
|
5
|
+
|
|
6
|
+
export type CallRecordingListItemProps = {
|
|
7
|
+
/** Array of CallRecording objects */
|
|
8
|
+
recording: CallRecording;
|
|
9
|
+
};
|
|
10
|
+
export const CallRecordingListItem = ({
|
|
11
|
+
recording,
|
|
12
|
+
}: CallRecordingListItemProps) => {
|
|
13
|
+
return (
|
|
14
|
+
<div className="str-video__call-recording-list-item">
|
|
15
|
+
<div className="str-video__call-recording-list-item__info">
|
|
16
|
+
<div className="str-video__call-recording-list-item__created">
|
|
17
|
+
{new Date(recording.end_time).toLocaleString()}
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
<div className="str-video__call-recording-list-item__actions">
|
|
21
|
+
<a
|
|
22
|
+
className={clsx(
|
|
23
|
+
'str-video__call-recording-list-item__action-button',
|
|
24
|
+
'str-video__call-recording-list-item__action-button--download',
|
|
25
|
+
)}
|
|
26
|
+
role="button"
|
|
27
|
+
href={recording.url}
|
|
28
|
+
download={recording.filename}
|
|
29
|
+
title="Download the recording"
|
|
30
|
+
>
|
|
31
|
+
<span
|
|
32
|
+
className={clsx(
|
|
33
|
+
'str-video__call-recording-list-item__action-button-icon',
|
|
34
|
+
'str-video__download-button--icon',
|
|
35
|
+
)}
|
|
36
|
+
/>
|
|
37
|
+
</a>
|
|
38
|
+
<CopyToClipboardButtonWithPopup
|
|
39
|
+
Button={CopyUrlButton}
|
|
40
|
+
copyValue={recording.url}
|
|
41
|
+
/>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
);
|
|
45
|
+
};
|
|
46
|
+
const CopyUrlButton = forwardRef(
|
|
47
|
+
(props: ComponentProps<'button'>, ref: ForwardedRef<HTMLButtonElement>) => {
|
|
48
|
+
return (
|
|
49
|
+
<button
|
|
50
|
+
{...props}
|
|
51
|
+
className={clsx(
|
|
52
|
+
'str-video__call-recording-list-item__action-button',
|
|
53
|
+
'str-video__call-recording-list-item__action-button--copy-link',
|
|
54
|
+
)}
|
|
55
|
+
ref={ref}
|
|
56
|
+
title="Copy the recording link"
|
|
57
|
+
>
|
|
58
|
+
<span
|
|
59
|
+
className={clsx(
|
|
60
|
+
'str-video__call-recording-list-item__action-button-icon',
|
|
61
|
+
'str-video__copy-button--icon',
|
|
62
|
+
)}
|
|
63
|
+
/>
|
|
64
|
+
</button>
|
|
65
|
+
);
|
|
66
|
+
},
|
|
67
|
+
);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export const EmptyCallRecordingListing = () => {
|
|
2
|
+
return (
|
|
3
|
+
<div className="str-video__call-recording-list__listing str-video__call-recording-list__listing--empty">
|
|
4
|
+
<div className="str-video__call-recording-list__listing--icon-empty" />
|
|
5
|
+
<p className="str-video__call-recording-list__listing--text-empty">
|
|
6
|
+
{/* todo: introduce i18n to enable text customization */}
|
|
7
|
+
No recordings available
|
|
8
|
+
</p>
|
|
9
|
+
</div>
|
|
10
|
+
);
|
|
11
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { CallRecording } from '@stream-io/video-client';
|
|
2
|
+
import { CallRecordingListItem } from './CallRecordingListItem';
|
|
3
|
+
import { LoadingIndicator } from '../LoadingIndicator';
|
|
4
|
+
|
|
5
|
+
export type LoadingCallRecordingListProps = {
|
|
6
|
+
/** Array of CallRecording objects */
|
|
7
|
+
callRecordings: CallRecording[];
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export const LoadingCallRecordingListing = ({
|
|
11
|
+
callRecordings,
|
|
12
|
+
}: LoadingCallRecordingListProps) => {
|
|
13
|
+
return (
|
|
14
|
+
<>
|
|
15
|
+
{callRecordings.map((recording) => (
|
|
16
|
+
<CallRecordingListItem recording={recording} key={recording.filename} />
|
|
17
|
+
))}
|
|
18
|
+
<LoadingIndicator text="Recording getting ready" />
|
|
19
|
+
</>
|
|
20
|
+
);
|
|
21
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { useEffect, useState } from 'react';
|
|
2
|
+
import { Call, StreamVideoParticipant } from '@stream-io/video-client';
|
|
3
|
+
|
|
4
|
+
export const DebugParticipantPublishQuality = (props: {
|
|
5
|
+
participant: StreamVideoParticipant;
|
|
6
|
+
call: Call;
|
|
7
|
+
}) => {
|
|
8
|
+
const { call, participant } = props;
|
|
9
|
+
const [quality, setQuality] = useState<string>();
|
|
10
|
+
const [publishStats, setPublishStats] = useState(() => ({
|
|
11
|
+
f: true,
|
|
12
|
+
h: true,
|
|
13
|
+
q: true,
|
|
14
|
+
}));
|
|
15
|
+
|
|
16
|
+
useEffect(() => {
|
|
17
|
+
return call.on('changePublishQuality', (event) => {
|
|
18
|
+
if (event.eventPayload.oneofKind !== 'changePublishQuality') return;
|
|
19
|
+
const { videoSenders } = event.eventPayload.changePublishQuality;
|
|
20
|
+
// FIXME OL: support additional layers (like screenshare)
|
|
21
|
+
const [videoLayer] = videoSenders.map(({ layers }) => {
|
|
22
|
+
return layers.map((l) => ({ [l.name]: l.active }));
|
|
23
|
+
});
|
|
24
|
+
setPublishStats((s) => ({
|
|
25
|
+
...s,
|
|
26
|
+
...videoLayer,
|
|
27
|
+
}));
|
|
28
|
+
});
|
|
29
|
+
}, [call]);
|
|
30
|
+
|
|
31
|
+
return (
|
|
32
|
+
<select
|
|
33
|
+
title={`Published tracks: ${JSON.stringify(publishStats)}`}
|
|
34
|
+
value={quality}
|
|
35
|
+
onChange={(e) => {
|
|
36
|
+
const value = e.target.value;
|
|
37
|
+
setQuality(value);
|
|
38
|
+
let w = 960;
|
|
39
|
+
let h = 540;
|
|
40
|
+
if (value === 'h') {
|
|
41
|
+
w = w / 2; // 480
|
|
42
|
+
h = h / 2; // 270
|
|
43
|
+
} else if (value === 'q') {
|
|
44
|
+
w = w / 4; // 240
|
|
45
|
+
h = h / 4; // 135
|
|
46
|
+
}
|
|
47
|
+
call.updateSubscriptionsPartial('video', {
|
|
48
|
+
[participant.sessionId]: {
|
|
49
|
+
dimension: {
|
|
50
|
+
width: w,
|
|
51
|
+
height: h,
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
});
|
|
55
|
+
}}
|
|
56
|
+
>
|
|
57
|
+
<option value="f">High (f)</option>
|
|
58
|
+
<option value="h">Medium (h)</option>
|
|
59
|
+
<option value="q">Low (q)</option>
|
|
60
|
+
</select>
|
|
61
|
+
);
|
|
62
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import { Call } from '@stream-io/video-client';
|
|
3
|
+
import { useRtcStats } from '../../hooks/useRtcStats';
|
|
4
|
+
import { useFloatingUIPreset } from '../../hooks';
|
|
5
|
+
|
|
6
|
+
export const DebugStatsView = (props: {
|
|
7
|
+
call: Call;
|
|
8
|
+
kind: 'subscriber' | 'publisher';
|
|
9
|
+
mediaStream?: MediaStream;
|
|
10
|
+
}) => {
|
|
11
|
+
const { call, kind, mediaStream } = props;
|
|
12
|
+
const stats = useRtcStats(call, kind, mediaStream);
|
|
13
|
+
|
|
14
|
+
const { refs, strategy, y, x } = useFloatingUIPreset({
|
|
15
|
+
placement: 'top',
|
|
16
|
+
strategy: 'absolute',
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
const [isPopperOpen, setIsPopperOpen] = useState(false);
|
|
20
|
+
|
|
21
|
+
const [videoTrack] = mediaStream?.getVideoTracks() ?? [];
|
|
22
|
+
const settings = videoTrack?.getSettings();
|
|
23
|
+
return (
|
|
24
|
+
<>
|
|
25
|
+
<span
|
|
26
|
+
className="str-video__debug__track-stats-icon"
|
|
27
|
+
tabIndex={0}
|
|
28
|
+
ref={refs.setReference}
|
|
29
|
+
title={
|
|
30
|
+
settings &&
|
|
31
|
+
`${settings.width}x${settings.height}@${Math.round(
|
|
32
|
+
settings.frameRate || 0,
|
|
33
|
+
)}`
|
|
34
|
+
}
|
|
35
|
+
onClick={() => {
|
|
36
|
+
setIsPopperOpen((v) => !v);
|
|
37
|
+
}}
|
|
38
|
+
/>
|
|
39
|
+
{isPopperOpen && (
|
|
40
|
+
<div
|
|
41
|
+
className="str-video__debug__track-stats"
|
|
42
|
+
ref={refs.setFloating}
|
|
43
|
+
style={{
|
|
44
|
+
position: strategy,
|
|
45
|
+
top: y ?? 0,
|
|
46
|
+
left: x ?? 0,
|
|
47
|
+
overflowY: 'auto',
|
|
48
|
+
}}
|
|
49
|
+
>
|
|
50
|
+
<pre>{JSON.stringify(stats, null, 2)}</pre>
|
|
51
|
+
</div>
|
|
52
|
+
)}
|
|
53
|
+
</>
|
|
54
|
+
);
|
|
55
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
|
+
|
|
3
|
+
const useQueryParams = () => {
|
|
4
|
+
return useMemo(
|
|
5
|
+
() =>
|
|
6
|
+
typeof window === 'undefined'
|
|
7
|
+
? null
|
|
8
|
+
: new URLSearchParams(window.location.search),
|
|
9
|
+
[],
|
|
10
|
+
);
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Internal purpose hook. Enables certain development mode tools.
|
|
15
|
+
*/
|
|
16
|
+
export const useIsDebugMode = () => {
|
|
17
|
+
const params = useQueryParams();
|
|
18
|
+
return !!params?.get('debug');
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export const useDebugPreferredVideoCodec = () => {
|
|
22
|
+
const params = useQueryParams();
|
|
23
|
+
return params?.get('video_codec');
|
|
24
|
+
};
|