@stream-io/video-react-sdk 0.0.1-alpha.100
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 +101 -0
- package/LICENSE +219 -0
- package/README.md +5 -0
- package/dist/css/styles.css +2244 -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 +13 -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/AcceptCallButton.d.ts +7 -0
- package/dist/src/components/CallControls/AcceptCallButton.js +27 -0
- package/dist/src/components/CallControls/AcceptCallButton.js.map +1 -0
- package/dist/src/components/CallControls/CallControls.d.ts +5 -0
- package/dist/src/components/CallControls/CallControls.js +5 -0
- package/dist/src/components/CallControls/CallControls.js.map +1 -0
- package/dist/src/components/CallControls/CallStatsButton.d.ts +2 -0
- package/dist/src/components/CallControls/CallStatsButton.js +8 -0
- package/dist/src/components/CallControls/CallStatsButton.js.map +1 -0
- package/dist/src/components/CallControls/CancelCallButton.d.ts +7 -0
- package/dist/src/components/CallControls/CancelCallButton.js +27 -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 +32 -0
- package/dist/src/components/CallControls/ReactionsButton.js.map +1 -0
- package/dist/src/components/CallControls/RecordCallButton.d.ts +5 -0
- package/dist/src/components/CallControls/RecordCallButton.js +55 -0
- package/dist/src/components/CallControls/RecordCallButton.js.map +1 -0
- package/dist/src/components/CallControls/ScreenShareButton.d.ts +5 -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 +73 -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/ToggleVideoButton.d.ts +10 -0
- package/dist/src/components/CallControls/ToggleVideoButton.js +70 -0
- package/dist/src/components/CallControls/ToggleVideoButton.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 +18 -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 +16 -0
- package/dist/src/components/CallParticipantsList/CallParticipantListingItem.js +85 -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 +81 -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/CallStats/CallStats.d.ts +6 -0
- package/dist/src/components/CallStats/CallStats.js +69 -0
- package/dist/src/components/CallStats/CallStats.js.map +1 -0
- package/dist/src/components/CallStats/CallStatsLatencyChart.d.ts +7 -0
- package/dist/src/components/CallStats/CallStatsLatencyChart.js +39 -0
- package/dist/src/components/CallStats/CallStatsLatencyChart.js.map +1 -0
- package/dist/src/components/CallStats/index.d.ts +2 -0
- package/dist/src/components/CallStats/index.js +3 -0
- package/dist/src/components/CallStats/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 +51 -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 +20 -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 +11 -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/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 +47 -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/PendingCallPanel/PendingCallControls.d.ts +2 -0
- package/dist/src/components/PendingCallPanel/PendingCallControls.js +13 -0
- package/dist/src/components/PendingCallPanel/PendingCallControls.js.map +1 -0
- package/dist/src/components/PendingCallPanel/PendingCallPanel.d.ts +14 -0
- package/dist/src/components/PendingCallPanel/PendingCallPanel.js +43 -0
- package/dist/src/components/PendingCallPanel/PendingCallPanel.js.map +1 -0
- package/dist/src/components/PendingCallPanel/index.d.ts +2 -0
- package/dist/src/components/PendingCallPanel/index.js +3 -0
- package/dist/src/components/PendingCallPanel/index.js.map +1 -0
- package/dist/src/components/Permissions/PermissionRequests.d.ts +8 -0
- package/dist/src/components/Permissions/PermissionRequests.js +103 -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 +10 -0
- package/dist/src/components/StreamCall/CallParticipantsView.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/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/StreamTheme/StreamTheme.d.ts +5 -0
- package/dist/src/components/StreamTheme/StreamTheme.js +18 -0
- package/dist/src/components/StreamTheme/StreamTheme.js.map +1 -0
- package/dist/src/components/StreamTheme/index.d.ts +1 -0
- package/dist/src/components/StreamTheme/index.js +2 -0
- package/dist/src/components/StreamTheme/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 +28 -0
- package/dist/src/components/Video/VideoPreview.js +75 -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 +17 -0
- package/dist/src/core/components/CallLayout/PaginatedGridLayout.js +38 -0
- package/dist/src/core/components/CallLayout/PaginatedGridLayout.js.map +1 -0
- package/dist/src/core/components/CallLayout/SpeakerLayout.d.ts +8 -0
- package/dist/src/core/components/CallLayout/SpeakerLayout.js +74 -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/ParticipantView/DefaultParticipantViewUI.d.ts +18 -0
- package/dist/src/core/components/ParticipantView/DefaultParticipantViewUI.js +36 -0
- package/dist/src/core/components/ParticipantView/DefaultParticipantViewUI.js.map +1 -0
- package/dist/src/core/components/ParticipantView/ParticipantView.d.ts +79 -0
- package/dist/src/core/components/ParticipantView/ParticipantView.js +33 -0
- package/dist/src/core/components/ParticipantView/ParticipantView.js.map +1 -0
- package/dist/src/core/components/ParticipantView/index.d.ts +2 -0
- package/dist/src/core/components/ParticipantView/index.js +3 -0
- package/dist/src/core/components/ParticipantView/index.js.map +1 -0
- package/dist/src/core/components/StreamCall/StreamCall.d.ts +73 -0
- package/dist/src/core/components/StreamCall/StreamCall.js +60 -0
- package/dist/src/core/components/StreamCall/StreamCall.js.map +1 -0
- package/dist/src/core/components/StreamCall/index.d.ts +1 -0
- package/dist/src/core/components/StreamCall/index.js +2 -0
- package/dist/src/core/components/StreamCall/index.js.map +1 -0
- package/dist/src/core/components/Video/BaseVideo.d.ts +9 -0
- package/dist/src/core/components/Video/BaseVideo.js +48 -0
- package/dist/src/core/components/Video/BaseVideo.js.map +1 -0
- package/dist/src/core/components/Video/DefaultVideoPlaceholder.d.ts +6 -0
- package/dist/src/core/components/Video/DefaultVideoPlaceholder.js +9 -0
- package/dist/src/core/components/Video/DefaultVideoPlaceholder.js.map +1 -0
- package/dist/src/core/components/Video/Video.d.ts +13 -0
- package/dist/src/core/components/Video/Video.js +154 -0
- package/dist/src/core/components/Video/Video.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 +6 -0
- package/dist/src/core/components/index.js +6 -0
- package/dist/src/core/components/index.js.map +1 -0
- package/dist/src/core/contexts/MediaDevicesContext.d.ts +180 -0
- package/dist/src/core/contexts/MediaDevicesContext.js +177 -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 +4 -0
- package/dist/src/core/hooks/index.js +5 -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 +95 -0
- package/dist/src/core/hooks/useAudioPublisher.js.map +1 -0
- package/dist/src/core/hooks/useDevices.d.ts +80 -0
- package/dist/src/core/hooks/useDevices.js +113 -0
- package/dist/src/core/hooks/useDevices.js.map +1 -0
- package/dist/src/core/hooks/useTrackElementVisibility.d.ts +6 -0
- package/dist/src/core/hooks/useTrackElementVisibility.js +27 -0
- package/dist/src/core/hooks/useTrackElementVisibility.js.map +1 -0
- package/dist/src/core/hooks/useVideoPublisher.d.ts +12 -0
- package/dist/src/core/hooks/useVideoPublisher.js +120 -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 +30 -0
- package/dist/src/hooks/useFloatingUIPreset.js.map +1 -0
- package/dist/src/hooks/useScrollPosition.d.ts +6 -0
- package/dist/src/hooks/useScrollPosition.js +63 -0
- package/dist/src/hooks/useScrollPosition.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/dist/src/utilities/applyElementToRef.d.ts +2 -0
- package/dist/src/utilities/applyElementToRef.js +8 -0
- package/dist/src/utilities/applyElementToRef.js.map +1 -0
- package/dist/src/utilities/chunk.d.ts +1 -0
- package/dist/src/utilities/chunk.js +5 -0
- package/dist/src/utilities/chunk.js.map +1 -0
- package/dist/src/utilities/index.d.ts +3 -0
- package/dist/src/utilities/index.js +4 -0
- package/dist/src/utilities/index.js.map +1 -0
- package/dist/src/utilities/isComponentType.d.ts +2 -0
- package/dist/src/utilities/isComponentType.js +7 -0
- package/dist/src/utilities/isComponentType.js.map +1 -0
- package/index.ts +18 -0
- package/package.json +51 -0
- package/src/components/Avatar/Avatar.tsx +45 -0
- package/src/components/Avatar/index.ts +1 -0
- package/src/components/Button/CompositeButton.tsx +50 -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/AcceptCallButton.tsx +36 -0
- package/src/components/CallControls/CallControls.tsx +26 -0
- package/src/components/CallControls/CallStatsButton.tsx +20 -0
- package/src/components/CallControls/CancelCallButton.tsx +36 -0
- package/src/components/CallControls/ReactionsButton.tsx +74 -0
- package/src/components/CallControls/RecordCallButton.tsx +73 -0
- package/src/components/CallControls/ScreenShareButton.tsx +84 -0
- package/src/components/CallControls/ToggleAudioButton.tsx +123 -0
- package/src/components/CallControls/ToggleAudioOutputButton.tsx +21 -0
- package/src/components/CallControls/ToggleVideoButton.tsx +116 -0
- package/src/components/CallControls/index.ts +10 -0
- package/src/components/CallParticipantsList/BlockedUserListing.tsx +37 -0
- package/src/components/CallParticipantsList/CallParticipantListHeader.tsx +29 -0
- package/src/components/CallParticipantsList/CallParticipantListing.tsx +22 -0
- package/src/components/CallParticipantsList/CallParticipantListingItem.tsx +273 -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/CallStats/CallStats.tsx +162 -0
- package/src/components/CallStats/CallStatsLatencyChart.tsx +58 -0
- package/src/components/CallStats/index.ts +2 -0
- package/src/components/Debug/DebugParticipantPublishQuality.tsx +62 -0
- package/src/components/Debug/DebugStatsView.tsx +108 -0
- package/src/components/Debug/useIsDebugMode.ts +24 -0
- package/src/components/DeviceSettings/DeviceSelector.tsx +106 -0
- package/src/components/DeviceSettings/DeviceSelectorAudio.tsx +57 -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/Notification/Notification.tsx +61 -0
- package/src/components/Notification/PermissionNotification.tsx +97 -0
- package/src/components/Notification/SpeakingWhileMutedNotification.tsx +61 -0
- package/src/components/Notification/index.ts +3 -0
- package/src/components/PendingCallPanel/PendingCallControls.tsx +27 -0
- package/src/components/PendingCallPanel/PendingCallPanel.tsx +93 -0
- package/src/components/PendingCallPanel/index.ts +2 -0
- package/src/components/Permissions/PermissionRequests.tsx +176 -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 +125 -0
- package/src/components/StreamCall/CallParticipantsView.tsx +24 -0
- package/src/components/StreamCall/Stage.tsx +22 -0
- package/src/components/StreamCall/index.ts +4 -0
- package/src/components/StreamTheme/StreamTheme.tsx +19 -0
- package/src/components/StreamTheme/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 +152 -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 +159 -0
- package/src/core/components/CallLayout/SpeakerLayout.tsx +231 -0
- package/src/core/components/CallLayout/index.ts +2 -0
- package/src/core/components/ParticipantView/DefaultParticipantViewUI.tsx +160 -0
- package/src/core/components/ParticipantView/ParticipantView.tsx +156 -0
- package/src/core/components/ParticipantView/index.ts +2 -0
- package/src/core/components/StreamCall/StreamCall.tsx +157 -0
- package/src/core/components/StreamCall/index.ts +1 -0
- package/src/core/components/Video/BaseVideo.tsx +53 -0
- package/src/core/components/Video/DefaultVideoPlaceholder.tsx +36 -0
- package/src/core/components/Video/Video.tsx +252 -0
- package/src/core/components/Video/index.ts +2 -0
- package/src/core/components/index.ts +8 -0
- package/src/core/contexts/MediaDevicesContext.tsx +416 -0
- package/src/core/contexts/index.ts +1 -0
- package/src/core/hooks/index.ts +4 -0
- package/src/core/hooks/useAudioPublisher.ts +124 -0
- package/src/core/hooks/useDevices.ts +161 -0
- package/src/core/hooks/useTrackElementVisibility.ts +44 -0
- package/src/core/hooks/useVideoPublisher.ts +152 -0
- package/src/core/index.ts +3 -0
- package/src/hooks/index.ts +2 -0
- package/src/hooks/useFloatingUIPreset.ts +50 -0
- package/src/hooks/useScrollPosition.ts +95 -0
- package/src/types/components.ts +7 -0
- package/src/types/index.ts +1 -0
- package/src/utilities/applyElementToRef.ts +12 -0
- package/src/utilities/chunk.ts +8 -0
- package/src/utilities/index.ts +3 -0
- package/src/utilities/isComponentType.ts +9 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/Tooltip/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { MouseEventHandler } from 'react';
|
|
2
|
+
export declare const useEnterLeaveHandlers: <T extends HTMLElement>({ onMouseEnter, onMouseLeave, }?: Partial<Record<"onMouseEnter" | "onMouseLeave", MouseEventHandler<T>>>) => {
|
|
3
|
+
handleMouseEnter: MouseEventHandler<T>;
|
|
4
|
+
handleMouseLeave: MouseEventHandler<T>;
|
|
5
|
+
tooltipVisible: boolean;
|
|
6
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { useCallback, useState } from 'react';
|
|
2
|
+
export const useEnterLeaveHandlers = ({ onMouseEnter, onMouseLeave, } = {}) => {
|
|
3
|
+
const [tooltipVisible, setTooltipVisible] = useState(false);
|
|
4
|
+
const handleMouseEnter = useCallback((e) => {
|
|
5
|
+
setTooltipVisible(true);
|
|
6
|
+
onMouseEnter === null || onMouseEnter === void 0 ? void 0 : onMouseEnter(e);
|
|
7
|
+
}, [onMouseEnter]);
|
|
8
|
+
const handleMouseLeave = useCallback((e) => {
|
|
9
|
+
setTooltipVisible(false);
|
|
10
|
+
onMouseLeave === null || onMouseLeave === void 0 ? void 0 : onMouseLeave(e);
|
|
11
|
+
}, [onMouseLeave]);
|
|
12
|
+
return { handleMouseEnter, handleMouseLeave, tooltipVisible };
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=useEnterLeaveHandlers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useEnterLeaveHandlers.js","sourceRoot":"","sources":["../../../../../src/components/Tooltip/hooks/useEnterLeaveHandlers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjE,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAwB,EAC3D,YAAY,EACZ,YAAY,MAGV,EAAE,EAAE,EAAE;IACR,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE5D,MAAM,gBAAgB,GAAyB,WAAW,CACxD,CAAC,CAAC,EAAE,EAAE;QACJ,iBAAiB,CAAC,IAAI,CAAC,CAAC;QACxB,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAG,CAAC,CAAC,CAAC;IACpB,CAAC,EACD,CAAC,YAAY,CAAC,CACf,CAAC;IAEF,MAAM,gBAAgB,GAAyB,WAAW,CACxD,CAAC,CAAC,EAAE,EAAE;QACJ,iBAAiB,CAAC,KAAK,CAAC,CAAC;QACzB,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAG,CAAC,CAAC,CAAC;IACpB,CAAC,EACD,CAAC,YAAY,CAAC,CACf,CAAC;IAEF,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,cAAc,EAAE,CAAC;AAChE,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/Tooltip/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
type VideoErrorPreviewProps = {
|
|
3
|
+
message?: string;
|
|
4
|
+
};
|
|
5
|
+
export type VideoPreviewProps = {
|
|
6
|
+
/**
|
|
7
|
+
* Enforces mirroring of the video on the X axis. Defaults to true.
|
|
8
|
+
*/
|
|
9
|
+
mirror?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Component rendered when user turns off the video.
|
|
12
|
+
*/
|
|
13
|
+
DisabledVideoPreview?: ComponentType;
|
|
14
|
+
/**
|
|
15
|
+
* Component rendered when no camera devices are available.
|
|
16
|
+
*/
|
|
17
|
+
NoCameraPreview?: ComponentType;
|
|
18
|
+
/**
|
|
19
|
+
* Component rendered above the BaseVideo until the video is ready (meaning until the play event is emitted).
|
|
20
|
+
*/
|
|
21
|
+
StartingCameraPreview?: ComponentType;
|
|
22
|
+
/**
|
|
23
|
+
* Component rendered when the video stream could not be retrieved.
|
|
24
|
+
*/
|
|
25
|
+
VideoErrorPreview?: ComponentType<VideoErrorPreviewProps>;
|
|
26
|
+
};
|
|
27
|
+
export declare const VideoPreview: ({ mirror, DisabledVideoPreview, NoCameraPreview, StartingCameraPreview, VideoErrorPreview, }: VideoPreviewProps) => JSX.Element;
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useEffect, useState, } from 'react';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
import { disposeOfMediaStream } from '@stream-io/video-client';
|
|
5
|
+
import { BaseVideo } from '../../core/components/Video';
|
|
6
|
+
import { DEVICE_STATE, useMediaDevices, useOnUnavailableVideoDevices, useVideoDevices, } from '../../core';
|
|
7
|
+
import { LoadingIndicator } from '../LoadingIndicator';
|
|
8
|
+
const DefaultDisabledVideoPreview = () => {
|
|
9
|
+
return _jsx("div", { children: "Video is disabled" });
|
|
10
|
+
};
|
|
11
|
+
const DefaultNoCameraPreview = () => {
|
|
12
|
+
return _jsx("div", { children: "No camera found" });
|
|
13
|
+
};
|
|
14
|
+
const DefaultVideoErrorPreview = ({ message }) => {
|
|
15
|
+
return (_jsxs(_Fragment, { children: [_jsx("div", { children: "Error:" }), _jsx("p", { children: message || 'Unexpected error happened' })] }));
|
|
16
|
+
};
|
|
17
|
+
export const VideoPreview = ({ mirror = true, DisabledVideoPreview = DefaultDisabledVideoPreview, NoCameraPreview = DefaultNoCameraPreview, StartingCameraPreview = LoadingIndicator, VideoErrorPreview = DefaultVideoErrorPreview, }) => {
|
|
18
|
+
const [stream, setStream] = useState();
|
|
19
|
+
const { selectedVideoDeviceId, getVideoStream, initialVideoState, setInitialVideoState, } = useMediaDevices();
|
|
20
|
+
// When there are 0 video devices (e.g. when laptop lid closed),
|
|
21
|
+
// we do not restart the video automatically when the device is again available,
|
|
22
|
+
// but rather leave turning the video on manually to the user.
|
|
23
|
+
useOnUnavailableVideoDevices(() => setInitialVideoState(DEVICE_STATE.stopped));
|
|
24
|
+
const videoDevices = useVideoDevices();
|
|
25
|
+
useEffect(() => {
|
|
26
|
+
if (!initialVideoState.enabled)
|
|
27
|
+
return;
|
|
28
|
+
getVideoStream({ deviceId: selectedVideoDeviceId })
|
|
29
|
+
.then((s) => {
|
|
30
|
+
setStream((previousStream) => {
|
|
31
|
+
if (previousStream) {
|
|
32
|
+
disposeOfMediaStream(previousStream);
|
|
33
|
+
}
|
|
34
|
+
return s;
|
|
35
|
+
});
|
|
36
|
+
})
|
|
37
|
+
.catch((e) => setInitialVideoState(Object.assign(Object.assign({}, DEVICE_STATE.error), { message: e.message })));
|
|
38
|
+
return () => {
|
|
39
|
+
setStream(undefined);
|
|
40
|
+
};
|
|
41
|
+
}, [
|
|
42
|
+
initialVideoState,
|
|
43
|
+
getVideoStream,
|
|
44
|
+
selectedVideoDeviceId,
|
|
45
|
+
setInitialVideoState,
|
|
46
|
+
videoDevices.length,
|
|
47
|
+
]);
|
|
48
|
+
useEffect(() => {
|
|
49
|
+
if (initialVideoState.type === 'stopped') {
|
|
50
|
+
setStream(undefined);
|
|
51
|
+
}
|
|
52
|
+
}, [initialVideoState]);
|
|
53
|
+
const handleOnPlay = useCallback(() => {
|
|
54
|
+
setInitialVideoState(DEVICE_STATE.playing);
|
|
55
|
+
}, [setInitialVideoState]);
|
|
56
|
+
let contents;
|
|
57
|
+
if (initialVideoState.type === 'error') {
|
|
58
|
+
contents = _jsx(VideoErrorPreview, {});
|
|
59
|
+
}
|
|
60
|
+
else if (initialVideoState.type === 'stopped' && !videoDevices.length) {
|
|
61
|
+
contents = _jsx(NoCameraPreview, {});
|
|
62
|
+
}
|
|
63
|
+
else if (initialVideoState.enabled) {
|
|
64
|
+
const loading = initialVideoState.type === 'starting';
|
|
65
|
+
contents = (_jsxs(_Fragment, { children: [stream && (_jsx(BaseVideo, { stream: stream, className: clsx('str-video__video-preview', {
|
|
66
|
+
'str-video__video-preview--mirror': mirror,
|
|
67
|
+
'str-video__video-preview--loading': loading,
|
|
68
|
+
}), onPlay: handleOnPlay })), loading && _jsx(StartingCameraPreview, {})] }));
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
contents = _jsx(DisabledVideoPreview, {});
|
|
72
|
+
}
|
|
73
|
+
return (_jsx("div", Object.assign({ className: clsx('str-video__video-preview-container') }, { children: contents })));
|
|
74
|
+
};
|
|
75
|
+
//# sourceMappingURL=VideoPreview.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VideoPreview.js","sourceRoot":"","sources":["../../../../src/components/Video/VideoPreview.tsx"],"names":[],"mappings":";AAAA,OAAO,EAGL,WAAW,EACX,SAAS,EACT,QAAQ,GACT,MAAM,OAAO,CAAC;AACf,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EACL,YAAY,EACZ,eAAe,EACf,4BAA4B,EAC5B,eAAe,GAChB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,MAAM,2BAA2B,GAAG,GAAG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BAAqB,KAAG,IACpC,CACJ,CAAC;KACH;SAAM;QACL,QAAQ,GAAG,KAAC,oBAAoB,KAAG,CAAC;KACrC;IAED,OAAO,CACL,4BAAK,SAAS,EAAE,IAAI,CAAC,oCAAoC,CAAC,gBAAG,QAAQ,IAAO,CAC7E,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/Video/index.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC;AAClD,cAAc,uCAAuC,CAAC;AACtD,cAAc,qDAAqD,CAAC;AACpE,cAAc,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export * from './Avatar';
|
|
2
|
+
export * from './Button';
|
|
3
|
+
export * from './CallControls';
|
|
4
|
+
export * from './CallParticipantsList';
|
|
5
|
+
export * from './CallRecordingList';
|
|
6
|
+
export * from './DeviceSettings';
|
|
7
|
+
export * from './LoadingIndicator';
|
|
8
|
+
export * from './Menu';
|
|
9
|
+
export * from './Notification';
|
|
10
|
+
export * from './PendingCallPanel';
|
|
11
|
+
export * from './Permissions';
|
|
12
|
+
export * from './StreamCall';
|
|
13
|
+
export * from './StreamTheme';
|
|
14
|
+
export * from './Search';
|
|
15
|
+
export * from './Tooltip';
|
|
16
|
+
export * from './Video';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export * from './Avatar';
|
|
2
|
+
export * from './Button';
|
|
3
|
+
export * from './CallControls';
|
|
4
|
+
export * from './CallParticipantsList';
|
|
5
|
+
export * from './CallRecordingList';
|
|
6
|
+
export * from './DeviceSettings';
|
|
7
|
+
export * from './LoadingIndicator';
|
|
8
|
+
export * from './Menu';
|
|
9
|
+
export * from './Notification';
|
|
10
|
+
export * from './PendingCallPanel';
|
|
11
|
+
export * from './Permissions';
|
|
12
|
+
export * from './StreamCall';
|
|
13
|
+
export * from './StreamTheme';
|
|
14
|
+
export * from './Search';
|
|
15
|
+
export * from './Tooltip';
|
|
16
|
+
export * from './Video';
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { AudioHTMLAttributes, DetailedHTMLProps } from 'react';
|
|
2
|
+
import { StreamVideoParticipant } from '@stream-io/video-client';
|
|
3
|
+
export type AudioProps = DetailedHTMLProps<AudioHTMLAttributes<HTMLAudioElement>, HTMLAudioElement> & Pick<StreamVideoParticipant, 'audioStream'> & {
|
|
4
|
+
sinkId?: string;
|
|
5
|
+
};
|
|
6
|
+
export declare const Audio: ({ audioStream, sinkId, ...rest }: AudioProps) => JSX.Element;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import { useEffect, useRef, } from 'react';
|
|
14
|
+
// TODO: rename to BaseAudio
|
|
15
|
+
export const Audio = (_a) => {
|
|
16
|
+
var { audioStream, sinkId } = _a, rest = __rest(_a, ["audioStream", "sinkId"]);
|
|
17
|
+
const audioRef = useRef(null);
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
const $el = audioRef.current;
|
|
20
|
+
if (!($el && audioStream))
|
|
21
|
+
return;
|
|
22
|
+
console.log(`Attaching audio stream`, $el, audioStream);
|
|
23
|
+
$el.srcObject = audioStream;
|
|
24
|
+
return () => {
|
|
25
|
+
$el.srcObject = null;
|
|
26
|
+
};
|
|
27
|
+
}, [audioStream]);
|
|
28
|
+
useEffect(() => {
|
|
29
|
+
const $el = audioRef.current;
|
|
30
|
+
if (!$el || !sinkId)
|
|
31
|
+
return;
|
|
32
|
+
console.log(`Setting sinkId`, $el, sinkId);
|
|
33
|
+
if ($el.setSinkId) {
|
|
34
|
+
$el.setSinkId(sinkId);
|
|
35
|
+
}
|
|
36
|
+
}, [sinkId]);
|
|
37
|
+
return _jsx("audio", Object.assign({ autoPlay: true, ref: audioRef }, rest));
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=Audio.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Audio.js","sourceRoot":"","sources":["../../../../../src/core/components/Audio/Audio.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAGL,SAAS,EACT,MAAM,GACP,MAAM,OAAO,CAAC;AAWf,4BAA4B;AAC5B,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,EAA4C,EAAE,EAAE;QAAhD,EAAE,WAAW,EAAE,MAAM,OAAuB,EAAlB,IAAI,cAA9B,yBAAgC,CAAF;IAClD,MAAM,QAAQ,GAAG,MAAM,CAAmB,IAAI,CAAC,CAAC;IAChD,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,GAAG,GAAG,QAAQ,CAAC,OAAO,CAAC;QAC7B,IAAI,CAAC,CAAC,GAAG,IAAI,WAAW,CAAC;YAAE,OAAO;QAElC,OAAO,CAAC,GAAG,CAAC,wBAAwB,EAAE,GAAG,EAAE,WAAW,CAAC,CAAC;QACxD,GAAG,CAAC,SAAS,GAAG,WAAW,CAAC;QAC5B,OAAO,GAAG,EAAE;YACV,GAAG,CAAC,SAAS,GAAG,IAAI,CAAC;QACvB,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC;IAElB,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,GAAG,GAAG,QAAQ,CAAC,OAAO,CAAC;QAC7B,IAAI,CAAC,GAAG,IAAI,CAAC,MAAM;YAAE,OAAO;QAE5B,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC;QAC3C,IAAK,GAAW,CAAC,SAAS,EAAE;YACzB,GAAW,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;SAChC;IACH,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IAEb,OAAO,8BAAO,QAAQ,QAAC,GAAG,EAAE,QAAQ,IAAM,IAAI,EAAI,CAAC;AACrD,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Audio';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/core/components/Audio/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ParticipantViewProps } from '../ParticipantView';
|
|
3
|
+
export type PaginatedGridLayoutProps = {
|
|
4
|
+
/**
|
|
5
|
+
* The number of participants to display per page.
|
|
6
|
+
*/
|
|
7
|
+
groupSize?: number;
|
|
8
|
+
/**
|
|
9
|
+
* Whether to exclude the local participant from the grid.
|
|
10
|
+
*/
|
|
11
|
+
excludeLocalParticipant?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Turns on/off the pagination arrows.
|
|
14
|
+
*/
|
|
15
|
+
pageArrowsVisible?: boolean;
|
|
16
|
+
} & Pick<ParticipantViewProps, 'ParticipantViewUI' | 'VideoPlaceholder'>;
|
|
17
|
+
export declare const PaginatedGridLayout: ({ groupSize, excludeLocalParticipant, pageArrowsVisible, VideoPlaceholder, ParticipantViewUI, }: PaginatedGridLayoutProps) => JSX.Element | null;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useMemo, useState } from 'react';
|
|
3
|
+
import { useCall, useLocalParticipant, useParticipants, useRemoteParticipants, } from '@stream-io/video-react-bindings';
|
|
4
|
+
import clsx from 'clsx';
|
|
5
|
+
import { ParticipantView, DefaultParticipantViewUI, } from '../ParticipantView';
|
|
6
|
+
import { Audio } from '../Audio';
|
|
7
|
+
import { IconButton } from '../../../components';
|
|
8
|
+
import { chunk } from '../../../utilities';
|
|
9
|
+
const GROUP_SIZE = 16;
|
|
10
|
+
const PaginatedGridLayoutGroup = ({ group, VideoPlaceholder, ParticipantViewUI, }) => {
|
|
11
|
+
return (_jsx("div", Object.assign({ className: clsx('str-video__paginated-grid-layout__group', {
|
|
12
|
+
'str-video__paginated-grid-layout--one': group.length === 1,
|
|
13
|
+
'str-video__paginated-grid-layout--two-four': group.length >= 2 && group.length <= 4,
|
|
14
|
+
'str-video__paginated-grid-layout--five-nine': group.length >= 5 && group.length <= 9,
|
|
15
|
+
}) }, { children: group.map((participant) => (_jsx(ParticipantView, { participant: participant, muteAudio: true, VideoPlaceholder: VideoPlaceholder, ParticipantViewUI: ParticipantViewUI }, participant.sessionId))) })));
|
|
16
|
+
};
|
|
17
|
+
export const PaginatedGridLayout = ({ groupSize = GROUP_SIZE, excludeLocalParticipant = false, pageArrowsVisible = true, VideoPlaceholder, ParticipantViewUI = DefaultParticipantViewUI, }) => {
|
|
18
|
+
const [page, setPage] = useState(0);
|
|
19
|
+
const call = useCall();
|
|
20
|
+
const localParticipant = useLocalParticipant();
|
|
21
|
+
const participants = useParticipants();
|
|
22
|
+
// used to render audio elements
|
|
23
|
+
const remoteParticipants = useRemoteParticipants();
|
|
24
|
+
// only used to render video elements
|
|
25
|
+
const participantGroups = useMemo(() => chunk(excludeLocalParticipant ? remoteParticipants : participants, groupSize), [excludeLocalParticipant, remoteParticipants, participants, groupSize]);
|
|
26
|
+
const pageCount = participantGroups.length;
|
|
27
|
+
// update page when page count is reduced and selected page no longer exists
|
|
28
|
+
useEffect(() => {
|
|
29
|
+
if (page > pageCount - 1) {
|
|
30
|
+
setPage(Math.max(0, pageCount - 1));
|
|
31
|
+
}
|
|
32
|
+
}, [page, pageCount]);
|
|
33
|
+
const selectedGroup = participantGroups[page];
|
|
34
|
+
if (!call)
|
|
35
|
+
return null;
|
|
36
|
+
return (_jsxs(_Fragment, { children: [remoteParticipants.map((participant) => (_jsx(Audio, { muted: false, audioStream: participant.audioStream, sinkId: localParticipant === null || localParticipant === void 0 ? void 0 : localParticipant.audioOutputDeviceId }, participant.sessionId))), _jsx("div", Object.assign({ className: "str-video__paginated-grid-layout__wrapper" }, { children: _jsxs("div", Object.assign({ className: "str-video__paginated-grid-layout" }, { children: [pageArrowsVisible && pageCount > 1 && (_jsx(IconButton, { icon: "caret-left", disabled: page === 0, onClick: () => setPage((currentPage) => Math.max(0, currentPage - 1)) })), selectedGroup && (_jsx(PaginatedGridLayoutGroup, { group: participantGroups[page], VideoPlaceholder: VideoPlaceholder, ParticipantViewUI: ParticipantViewUI })), pageArrowsVisible && pageCount > 1 && (_jsx(IconButton, { disabled: page === pageCount - 1, icon: "caret-right", onClick: () => setPage((currentPage) => Math.min(pageCount - 1, currentPage + 1)) }))] })) }))] }));
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=PaginatedGridLayout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PaginatedGridLayout.js","sourceRoot":"","sources":["../../../../../src/core/components/CallLayout/PaginatedGridLayout.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EACL,OAAO,EACP,mBAAmB,EACnB,eAAe,EACf,qBAAqB,GACtB,MAAM,iCAAiC,CAAC;AAKzC,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EACL,eAAe,EACf,wBAAwB,GAEzB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,MAAM,UAAU,GAAG,EAAE,CAAC;AAUtB,MAAM,wBAAwB,GAAG,CAAC,EAChC,KAAK,EACL,gBAAgB,EAChB,iBAAiB,GACa,EAAE,EAAE;IAClC,OAAO,CACL,4BACE,SAAS,EAAE,IAAI,CAAC,yCAAyC,EAAE;YACzD,uCAAuC,EAAE,KAAK,CAAC,MAAM,KAAK,CAAC;YAC3D,4CAA4C,EAC1C,KAAK,CAAC,MAAM,IAAI,CAAC,IAAI,KAAK,CAAC,MAAM,IAAI,CAAC;YACxC,6CAA6C,EAC3C,KAAK,CAAC,MAAM,IAAI,CAAC,IAAI,KAAK,CAAC,MAAM,IAAI,CAAC;SACzC,CAAC,gBAED,KAAK,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,CAC1B,KAAC,eAAe,IAEd,WAAW,EAAE,WAAW,EACxB,SAAS,QACT,gBAAgB,EAAE,gBAAgB,EAClC,iBAAi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AAC,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,CACvC,KAAC,KAAK,IACJ,KAAK,EAAE,KAAK,EAEZ,WAAW,EAAE,WAAW,CAAC,WAAW,EACpC,MAAM,EAAE,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,mBAAmB,IAFxC,WAAW,CAAC,SAAS,CAG1B,CACH,CAAC,EACF,4BAAK,SAAS,EAAC,2CAA2C,gBACxD,6BAAK,SAAS,EAAC,kCAAkC,iBAC9C,iBAAiB,IAAI,SAAS,GAAG,CAAC,IAAI,CACrC,KAAC,UAAU,IACT,IAAI,EAAC,YAAY,EACjB,QAAQ,EAAE,IAAI,KAAK,CAAC,EACpB,OAAO,EAAE,GAAG,EAAE,CACZ,OAAO,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,WAAW,GAAG,CAAC,CAAC,CAAC,GAExD,CACH,EACA,aAAa,IAAI,CAChB,KAAC,wBAAwB,IACvB,KAAK,EAAE,iBAAiB,CAAC,IAAI,CAAC,EAC9B,gBAAgB,EAAE,gBAAgB,EAClC,iBAAiB,EAAE,iBAAiB,GACpC,CACH,EACA,iBAAiB,IAAI,SAAS,GAAG,CAAC,IAAI,CACrC,KAAC,UAAU,IACT,QAAQ,EAAE,IAAI,KAAK,SAAS,GAAG,CAAC,EAChC,IAAI,EAAC,aAAa,EAClB,OAAO,EAAE,GAAG,EAAE,CACZ,OAAO,CAAC,CAAC,WAAW,EAAE,EAAE,CACtB,IAAI,CAAC,GAAG,CAAC,SAAS,GAAG,CAAC,EAAE,WAAW,GAAG,CAAC,CAAC,CACzC,GAEH,CACH,KACG,IACF,IACL,CACJ,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ParticipantViewProps } from '../ParticipantView';
|
|
3
|
+
export type SpeakerLayoutProps = {
|
|
4
|
+
ParticipantViewUISpotlight?: ParticipantViewProps['ParticipantViewUI'];
|
|
5
|
+
ParticipantViewUIBar?: ParticipantViewProps['ParticipantViewUI'];
|
|
6
|
+
participantsBarPosition?: 'top' | 'bottom' | 'left' | 'right';
|
|
7
|
+
} & Pick<ParticipantViewProps, 'VideoPlaceholder'>;
|
|
8
|
+
export declare const SpeakerLayout: ({ ParticipantViewUIBar, ParticipantViewUISpotlight, VideoPlaceholder, participantsBarPosition, }: SpeakerLayoutProps) => JSX.Element | null;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useState } from 'react';
|
|
3
|
+
import { CallTypes, combineComparators, defaultSortPreset, screenSharing, SfuModels, speakerLayoutSortPreset, } from '@stream-io/video-client';
|
|
4
|
+
import { useCall, useLocalParticipant, useParticipants, } from '@stream-io/video-react-bindings';
|
|
5
|
+
import { DefaultParticipantViewUI, ParticipantView, } from '../ParticipantView';
|
|
6
|
+
import { IconButton } from '../../../components';
|
|
7
|
+
import { useHorizontalScrollPosition, useVerticalScrollPosition, } from '../../../hooks';
|
|
8
|
+
import clsx from 'clsx';
|
|
9
|
+
const DefaultParticipantViewUIBar = () => (_jsx(DefaultParticipantViewUI, { menuPlacement: "top-end" }));
|
|
10
|
+
const DefaultParticipantViewUISpotlight = () => _jsx(DefaultParticipantViewUI, {});
|
|
11
|
+
export const SpeakerLayout = ({ ParticipantViewUIBar = DefaultParticipantViewUIBar, ParticipantViewUISpotlight = DefaultParticipantViewUISpotlight, VideoPlaceholder, participantsBarPosition = 'bottom', }) => {
|
|
12
|
+
const call = useCall();
|
|
13
|
+
const [participantInSpotlight, ...otherParticipants] = useParticipants();
|
|
14
|
+
const [scrollWrapper, setScrollWrapper] = useState(null);
|
|
15
|
+
const isOneOnOneCall = otherParticipants.length === 1;
|
|
16
|
+
const localParticipant = useLocalParticipant();
|
|
17
|
+
useEffect(() => {
|
|
18
|
+
if (!scrollWrapper || !call)
|
|
19
|
+
return;
|
|
20
|
+
const cleanup = call.viewportTracker.setViewport(scrollWrapper);
|
|
21
|
+
return () => cleanup();
|
|
22
|
+
}, [scrollWrapper, call]);
|
|
23
|
+
useEffect(() => {
|
|
24
|
+
if (!call)
|
|
25
|
+
return;
|
|
26
|
+
// always show the remote participant in the spotlight
|
|
27
|
+
if (isOneOnOneCall) {
|
|
28
|
+
call.setSortParticipantsBy(combineComparators(screenSharing, loggedIn));
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
call.setSortParticipantsBy(speakerLayoutSortPreset);
|
|
32
|
+
}
|
|
33
|
+
return () => {
|
|
34
|
+
// reset the sorting to the default for the call type
|
|
35
|
+
const callConfig = CallTypes.get(call.type);
|
|
36
|
+
call.setSortParticipantsBy(callConfig.options.sortParticipantsBy || defaultSortPreset);
|
|
37
|
+
};
|
|
38
|
+
}, [call, isOneOnOneCall]);
|
|
39
|
+
if (!call)
|
|
40
|
+
return null;
|
|
41
|
+
const isSpeakerScreenSharing = hasScreenShare(participantInSpotlight);
|
|
42
|
+
return (_jsx("div", Object.assign({ className: "str-video__speaker-layout__wrapper" }, { children: _jsxs("div", Object.assign({ className: clsx('str-video__speaker-layout', `str-video__speaker-layout--variant-${participantsBarPosition}`) }, { children: [_jsx("div", Object.assign({ className: "str-video__speaker-layout__spotlight" }, { children: participantInSpotlight && (_jsx(ParticipantView, { participant: participantInSpotlight, muteAudio: isSpeakerScreenSharing, videoKind: isSpeakerScreenSharing ? 'screen' : 'video', sinkId: localParticipant === null || localParticipant === void 0 ? void 0 : localParticipant.audioOutputDeviceId, ParticipantViewUI: ParticipantViewUISpotlight, VideoPlaceholder: VideoPlaceholder })) })), otherParticipants.length > 0 && (_jsxs("div", Object.assign({ className: "str-video__speaker-layout__participants-bar-buttons-wrapper" }, { children: [_jsx("div", Object.assign({ className: "str-video__speaker-layout__participants-bar-wrapper", ref: setScrollWrapper }, { children: _jsxs("div", Object.assign({ className: "str-video__speaker-layout__participants-bar" }, { children: [isSpeakerScreenSharing && (_jsx("div", Object.assign({ className: "str-video__speaker-layout__participant-tile" }, { children: _jsx(ParticipantView, { participant: participantInSpotlight, sinkId: localParticipant === null || localParticipant === void 0 ? void 0 : localParticipant.audioOutputDeviceId, ParticipantViewUI: ParticipantViewUIBar, VideoPlaceholder: VideoPlaceholder }) }), participantInSpotlight.sessionId)), otherParticipants.map((participant) => (_jsx("div", Object.assign({ className: "str-video__speaker-layout__participant-tile" }, { children: _jsx(ParticipantView, { participant: participant, sinkId: localParticipant === null || localParticipant === void 0 ? void 0 : localParticipant.audioOutputDeviceId, ParticipantViewUI: ParticipantViewUIBar, VideoPlaceholder: VideoPlaceholder }) }), participant.sessionId)))] })) })), (participantsBarPosition === 'left' ||
|
|
43
|
+
participantsBarPosition === 'right') && (_jsx(VerticalScrollButtons, { scrollWrapper: scrollWrapper })), (participantsBarPosition === 'top' ||
|
|
44
|
+
participantsBarPosition === 'bottom') && (_jsx(HorizontalScrollButtons, { scrollWrapper: scrollWrapper }))] })))] })) })));
|
|
45
|
+
};
|
|
46
|
+
const HorizontalScrollButtons = ({ scrollWrapper, }) => {
|
|
47
|
+
const scrollPosition = useHorizontalScrollPosition(scrollWrapper);
|
|
48
|
+
const scrollStartClickHandler = () => {
|
|
49
|
+
scrollWrapper === null || scrollWrapper === void 0 ? void 0 : scrollWrapper.scrollBy({ left: -150, behavior: 'smooth' });
|
|
50
|
+
};
|
|
51
|
+
const scrollEndClickHandler = () => {
|
|
52
|
+
scrollWrapper === null || scrollWrapper === void 0 ? void 0 : scrollWrapper.scrollBy({ left: 150, behavior: 'smooth' });
|
|
53
|
+
};
|
|
54
|
+
return (_jsxs(_Fragment, { children: [scrollPosition && scrollPosition !== 'start' && (_jsx(IconButton, { onClick: scrollStartClickHandler, icon: "caret-left", className: "str-video__speaker-layout__participants-bar--button-left" })), scrollPosition && scrollPosition !== 'end' && (_jsx(IconButton, { onClick: scrollEndClickHandler, icon: "caret-right", className: "str-video__speaker-layout__participants-bar--button-right" }))] }));
|
|
55
|
+
};
|
|
56
|
+
const VerticalScrollButtons = ({ scrollWrapper, }) => {
|
|
57
|
+
const scrollPosition = useVerticalScrollPosition(scrollWrapper);
|
|
58
|
+
const scrollTopClickHandler = () => {
|
|
59
|
+
scrollWrapper === null || scrollWrapper === void 0 ? void 0 : scrollWrapper.scrollBy({ top: -150, behavior: 'smooth' });
|
|
60
|
+
};
|
|
61
|
+
const scrollBottomClickHandler = () => {
|
|
62
|
+
scrollWrapper === null || scrollWrapper === void 0 ? void 0 : scrollWrapper.scrollBy({ top: 150, behavior: 'smooth' });
|
|
63
|
+
};
|
|
64
|
+
return (_jsxs(_Fragment, { children: [scrollPosition && scrollPosition !== 'top' && (_jsx(IconButton, { onClick: scrollTopClickHandler, icon: "caret-up", className: "str-video__speaker-layout__participants-bar--button-top" })), scrollPosition && scrollPosition !== 'bottom' && (_jsx(IconButton, { onClick: scrollBottomClickHandler, icon: "caret-down", className: "str-video__speaker-layout__participants-bar--button-bottom" }))] }));
|
|
65
|
+
};
|
|
66
|
+
const hasScreenShare = (p) => !!(p === null || p === void 0 ? void 0 : p.publishedTracks.includes(SfuModels.TrackType.SCREEN_SHARE));
|
|
67
|
+
const loggedIn = (a, b) => {
|
|
68
|
+
if (a.isLoggedInUser)
|
|
69
|
+
return 1;
|
|
70
|
+
if (b.isLoggedInUser)
|
|
71
|
+
return -1;
|
|
72
|
+
return 0;
|
|
73
|
+
};
|
|
74
|
+
//# sourceMappingURL=SpeakerLayout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SpeakerLayout.js","sourceRoot":"","sources":["../../../../../src/core/components/CallLayout/SpeakerLayout.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,EACL,SAAS,EACT,kBAAkB,EAElB,iBAAiB,EACjB,aAAa,EACb,SAAS,EACT,uBAAuB,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AS,EAAC,yDAAyD,GACnE,CACH,EACA,cAAc,IAAI,cAAc,KAAK,QAAQ,IAAI,CAChD,KAAC,UAAU,IACT,OAAO,EAAE,wBAAwB,EACjC,IAAI,EAAC,YAAY,EACjB,SAAS,EAAC,4DAA4D,GACtE,CACH,IACA,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,cAAc,GAAG,CAAC,CAA0B,EAAE,EAAE,CACpD,CAAC,CAAC,CAAA,CAAC,aAAD,CAAC,uBAAD,CAAC,CAAE,eAAe,CAAC,QAAQ,CAAC,SAAS,CAAC,SAAS,CAAC,YAAY,CAAC,CAAA,CAAC;AAElE,MAAM,QAAQ,GAAuC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;IAC5D,IAAI,CAAC,CAAC,cAAc;QAAE,OAAO,CAAC,CAAC;IAC/B,IAAI,CAAC,CAAC,cAAc;QAAE,OAAO,CAAC,CAAC,CAAC;IAChC,OAAO,CAAC,CAAC;AACX,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/core/components/CallLayout/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Placement } from '@floating-ui/react';
|
|
3
|
+
export type DefaultParticipantViewUIProps = {
|
|
4
|
+
/**
|
|
5
|
+
* Turns on/off the status indicator icons (mute, connection quality, etc...).
|
|
6
|
+
*/
|
|
7
|
+
indicatorsVisible?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Placement of the context menu component when opened
|
|
10
|
+
*/
|
|
11
|
+
menuPlacement?: Placement;
|
|
12
|
+
/**
|
|
13
|
+
* Option to show/hide menu button component
|
|
14
|
+
*/
|
|
15
|
+
showMenuButton?: boolean;
|
|
16
|
+
};
|
|
17
|
+
export declare const DefaultParticipantViewUI: ({ indicatorsVisible, menuPlacement, showMenuButton, }: DefaultParticipantViewUIProps) => JSX.Element;
|
|
18
|
+
export declare const ParticipantDetails: ({ indicatorsVisible, }: Pick<DefaultParticipantViewUIProps, 'indicatorsVisible'>) => JSX.Element;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import { SfuModels } from '@stream-io/video-client';
|
|
4
|
+
import { useCall } from '@stream-io/video-react-bindings';
|
|
5
|
+
import { clsx } from 'clsx';
|
|
6
|
+
import { IconButton, MenuToggle, Notification, ParticipantActionsContextMenu, } from '../../../components';
|
|
7
|
+
import { Reaction } from '../../../components/Reaction';
|
|
8
|
+
import { DebugParticipantPublishQuality } from '../../../components/Debug/DebugParticipantPublishQuality';
|
|
9
|
+
import { DebugStatsView } from '../../../components/Debug/DebugStatsView';
|
|
10
|
+
import { useIsDebugMode } from '../../../components/Debug/useIsDebugMode';
|
|
11
|
+
import { useParticipantViewContext } from './ParticipantView';
|
|
12
|
+
const ToggleButton = forwardRef((props, ref) => {
|
|
13
|
+
return _jsx(IconButton, { enabled: props.menuShown, icon: "ellipsis", ref: ref });
|
|
14
|
+
});
|
|
15
|
+
export const DefaultParticipantViewUI = ({ indicatorsVisible = true, menuPlacement = 'bottom-end', showMenuButton = true, }) => {
|
|
16
|
+
const call = useCall();
|
|
17
|
+
const { participant, participantViewElement } = useParticipantViewContext();
|
|
18
|
+
const { reaction, sessionId } = participant;
|
|
19
|
+
return (_jsxs(_Fragment, { children: [showMenuButton && (_jsx(MenuToggle, Object.assign({ strategy: "fixed", placement: menuPlacement, ToggleButton: ToggleButton }, { children: _jsx(ParticipantActionsContextMenu, { participantViewElement: participantViewElement, participant: participant }) }))), reaction && (_jsx(Reaction, { reaction: reaction, sessionId: sessionId, call: call })), _jsx(ParticipantDetails, { indicatorsVisible: indicatorsVisible })] }));
|
|
20
|
+
};
|
|
21
|
+
export const ParticipantDetails = ({ indicatorsVisible = true, }) => {
|
|
22
|
+
const { participant } = useParticipantViewContext();
|
|
23
|
+
const { isDominantSpeaker, isLoggedInUser, connectionQuality, publishedTracks, pinnedAt, sessionId, name, userId, videoStream, } = participant;
|
|
24
|
+
const call = useCall();
|
|
25
|
+
const connectionQualityAsString = !!connectionQuality &&
|
|
26
|
+
SfuModels.ConnectionQuality[connectionQuality].toLowerCase();
|
|
27
|
+
const hasAudio = publishedTracks.includes(SfuModels.TrackType.AUDIO);
|
|
28
|
+
const hasVideo = publishedTracks.includes(SfuModels.TrackType.VIDEO);
|
|
29
|
+
const isPinned = !!pinnedAt;
|
|
30
|
+
const isDebugMode = useIsDebugMode();
|
|
31
|
+
return (_jsxs("div", Object.assign({ className: "str-video__participant-details" }, { children: [_jsxs("span", Object.assign({ className: "str-video__participant-details__name" }, { children: [name || userId, indicatorsVisible && isDominantSpeaker && (_jsx("span", { className: "str-video__participant-details__name--dominant_speaker", title: "Dominant speaker" })), indicatorsVisible && (_jsx(Notification, Object.assign({ isVisible: isLoggedInUser &&
|
|
32
|
+
connectionQuality === SfuModels.ConnectionQuality.POOR, message: "Poor connection quality. Please check your internet connection." }, { children: connectionQualityAsString && (_jsx("span", { className: clsx('str-video__participant-details__connection-quality', `str-video__participant-details__connection-quality--${connectionQualityAsString}`), title: connectionQualityAsString })) }))), indicatorsVisible && !hasAudio && (_jsx("span", { className: "str-video__participant-details__name--audio-muted" })), indicatorsVisible && !hasVideo && (_jsx("span", { className: "str-video__participant-details__name--video-muted" })), indicatorsVisible && isPinned && (
|
|
33
|
+
// TODO: remove this monstrosity once we have a proper design
|
|
34
|
+
_jsx("span", { title: "Unpin", onClick: () => call === null || call === void 0 ? void 0 : call.setParticipantPinnedAt(sessionId), style: { cursor: 'pointer' }, className: "str-video__participant-details__name--pinned" }))] })), isDebugMode && (_jsxs(_Fragment, { children: [_jsx(DebugParticipantPublishQuality, { participant: participant, call: call }), _jsx(DebugStatsView, { call: call, sessionId: sessionId, mediaStream: videoStream })] }))] })));
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=DefaultParticipantViewUI.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DefaultParticipantViewUI.js","sourceRoot":"","sources":["../../../../../src/core/components/ParticipantView/DefaultParticipantViewUI.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,iCAAiC,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAE5B,OAAO,EACL,UAAU,EACV,UAAU,EACV,YAAY,EACZ,6BAA6B,GAE9B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAExD,OAAO,EAAE,8BAA8B,EAAE,MAAM,0DAA0D,CAAC;AAC1G,OAAO,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAC1E,OAAO,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAiB9D,MAAM,YAAY,GAAG,UAAU,CAC7B,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IACb,OAAO,KAAC,UAAU,IAAC,OAAO,EAAE,KAAK,CAAC,SAAS,EAAE,IAAI,EAAC,UAAU,EAAC,GAAG,EAAE,GAAG,GAAI,CAAC;AAC5E,CAAC,CACF,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,EACvC,iBAAiB,GAAG,IAAI,EACxB,aAAa,GAAG,YAAY,EAC5B,cAAc,GAAG,IAAI,GACS,EAAE,EAAE;IAClC,MAAM,IAAI,GAAG,OAAO,EAAG,CAAC;IACxB,MAAM,EAAE,WAAW,EAAE,sBAAsB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1
|
+
import { ComponentType, ReactElement } from 'react';
|
|
2
|
+
import { StreamVideoLocalParticipant, StreamVideoParticipant } from '@stream-io/video-client';
|
|
3
|
+
import { VideoProps } from '../Video';
|
|
4
|
+
export type ParticipantViewContextValue = Pick<ParticipantViewProps, 'participant'> & {
|
|
5
|
+
participantViewElement: HTMLDivElement | null;
|
|
6
|
+
};
|
|
7
|
+
export declare const useParticipantViewContext: () => ParticipantViewContextValue;
|
|
8
|
+
export type ParticipantViewProps = {
|
|
9
|
+
/**
|
|
10
|
+
* The participant bound to this component.
|
|
11
|
+
*/
|
|
12
|
+
participant: StreamVideoParticipant | StreamVideoLocalParticipant;
|
|
13
|
+
/**
|
|
14
|
+
* Component used to render user interface elements (details, network status...),
|
|
15
|
+
* pass `null` if you wish to not render anything
|
|
16
|
+
* @default DefaultParticipantViewUI
|
|
17
|
+
*/
|
|
18
|
+
ParticipantViewUI?: ComponentType | ReactElement | null;
|
|
19
|
+
/**
|
|
20
|
+
* In supported browsers, this sets the default audio output.
|
|
21
|
+
* The value of this prop should be a valid Audio Output `deviceId`.
|
|
22
|
+
*/
|
|
23
|
+
sinkId?: string;
|
|
24
|
+
/**
|
|
25
|
+
* The kind of video stream to play for the given participant.
|
|
26
|
+
*/
|
|
27
|
+
videoKind?: 'video' | 'screen';
|
|
28
|
+
/**
|
|
29
|
+
* Turns on/off the audio for the participant.
|
|
30
|
+
*/
|
|
31
|
+
muteAudio?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* An object with set functions meant for exposing the "native" video
|
|
34
|
+
* and video placeholder elements to the integrators.
|
|
35
|
+
* - `refs.setVideoElement`
|
|
36
|
+
* - `refs.setVideoPlaceholderElement`
|
|
37
|
+
*/
|
|
38
|
+
refs?: VideoProps['refs'];
|
|
39
|
+
/**
|
|
40
|
+
* Custom class applied to the root DOM element.
|
|
41
|
+
*/
|
|
42
|
+
className?: string;
|
|
43
|
+
} & Pick<VideoProps, 'VideoPlaceholder'>;
|
|
44
|
+
export declare const ParticipantView: import("react").ForwardRefExoticComponent<{
|
|
45
|
+
/**
|
|
46
|
+
* The participant bound to this component.
|
|
47
|
+
*/
|
|
48
|
+
participant: StreamVideoParticipant | StreamVideoLocalParticipant;
|
|
49
|
+
/**
|
|
50
|
+
* Component used to render user interface elements (details, network status...),
|
|
51
|
+
* pass `null` if you wish to not render anything
|
|
52
|
+
* @default DefaultParticipantViewUI
|
|
53
|
+
*/
|
|
54
|
+
ParticipantViewUI?: ReactElement<any, string | import("react").JSXElementConstructor<any>> | ComponentType<{}> | null | undefined;
|
|
55
|
+
/**
|
|
56
|
+
* In supported browsers, this sets the default audio output.
|
|
57
|
+
* The value of this prop should be a valid Audio Output `deviceId`.
|
|
58
|
+
*/
|
|
59
|
+
sinkId?: string | undefined;
|
|
60
|
+
/**
|
|
61
|
+
* The kind of video stream to play for the given participant.
|
|
62
|
+
*/
|
|
63
|
+
videoKind?: "video" | "screen" | undefined;
|
|
64
|
+
/**
|
|
65
|
+
* Turns on/off the audio for the participant.
|
|
66
|
+
*/
|
|
67
|
+
muteAudio?: boolean | undefined;
|
|
68
|
+
/**
|
|
69
|
+
* An object with set functions meant for exposing the "native" video
|
|
70
|
+
* and video placeholder elements to the integrators.
|
|
71
|
+
* - `refs.setVideoElement`
|
|
72
|
+
* - `refs.setVideoPlaceholderElement`
|
|
73
|
+
*/
|
|
74
|
+
refs?: VideoProps['refs'];
|
|
75
|
+
/**
|
|
76
|
+
* Custom class applied to the root DOM element.
|
|
77
|
+
*/
|
|
78
|
+
className?: string | undefined;
|
|
79
|
+
} & Pick<VideoProps, "VideoPlaceholder"> & import("react").RefAttributes<HTMLDivElement>>;
|