@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,9 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { CallRecordingListHeader as DefaultCallRecordingListHeader, } from './CallRecordingListHeader';
|
|
3
|
+
import { CallRecordingListItem as DefaultCallRecordingListItem, } from './CallRecordingListItem';
|
|
4
|
+
import { EmptyCallRecordingListing as DefaultEmptyCallRecordingList } from './EmptyCallRecordingListing';
|
|
5
|
+
import { LoadingCallRecordingListing as DefaultLoadingCallRecordingList, } from './LoadingCallRecordingListing';
|
|
6
|
+
export const CallRecordingList = ({ callRecordings, CallRecordingListHeader = DefaultCallRecordingListHeader, CallRecordingListItem = DefaultCallRecordingListItem, EmptyCallRecordingList = DefaultEmptyCallRecordingList, loading, LoadingCallRecordingList = DefaultLoadingCallRecordingList, }) => {
|
|
7
|
+
return (_jsxs("div", Object.assign({ className: "str-video__call-recording-list" }, { children: [_jsx(CallRecordingListHeader, { callRecordings: callRecordings }), _jsx("div", Object.assign({ className: "str-video__call-recording-list__listing" }, { children: loading ? (_jsx(LoadingCallRecordingList, { callRecordings: callRecordings })) : callRecordings.length ? (callRecordings.map((recording) => (_jsx(CallRecordingListItem, { recording: recording }, recording.filename)))) : (_jsx(EmptyCallRecordingList, {})) }))] })));
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=CallRecordingList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CallRecordingList.js","sourceRoot":"","sources":["../../../../src/components/CallRecordingList/CallRecordingList.tsx"],"names":[],"mappings":";AAGA,OAAO,EACL,uBAAuB,IAAI,8BAA8B,GAE1D,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,qBAAqB,IAAI,4BAA4B,GAEtD,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,yBAAyB,IAAI,6BAA6B,EAAE,MAAM,6BAA6B,CAAC;AACzG,OAAO,EACL,2BAA2B,IAAI,+BAA+B,GAE/D,MAAM,+BAA+B,CAAC;AAiBvC,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,EAChC,cAAc,EACd,uBAAuB,GAAG,8BAA8B,EACxD,qBAAqB,GAAG,4BAA4B,EACpD,sBAAsB,GAAG,6BAA6B,EACtD,OAAO,EACP,wBAAwB,GAAG,+BAA+B,GACnC,EAAE,EAAE;IAC3B,OAAO,CACL,6BAAK,SAAS,EAAC,gCAAgC,iBAC7C,KAAC,uBAAuB,IAAC,cAAc,EAAE,cAAc,GAAI,EAC3D,4BAAK,SAAS,EAAC,yCAAyC,gBACrD,OAAO,CAAC,CAAC,CAAC,CACT,KAAC,wBAAwB,IAAC,cAAc,EAAE,cAAc,GAAI,CAC7D,CAAC,CAAC,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,CAC1B,cAAc,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,CAChC,KAAC,qBAAqB,IACpB,SAAS,EAAE,SAAS,IACf,SAAS,CAAC,QAAQ,CACvB,CACH,CAAC,CACH,CAAC,CAAC,CAAC,CACF,KAAC,sBAAsB,KAAG,CAC3B,IACG,KACF,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CallRecording } from '@stream-io/video-client';
|
|
3
|
+
export type CallRecordingListHeaderProps = {
|
|
4
|
+
/** Array of CallRecording objects */
|
|
5
|
+
callRecordings: CallRecording[];
|
|
6
|
+
};
|
|
7
|
+
export declare const CallRecordingListHeader: ({ callRecordings, }: CallRecordingListHeaderProps) => JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useCall } from '@stream-io/video-react-bindings';
|
|
3
|
+
import { IconButton } from '../Button';
|
|
4
|
+
export const CallRecordingListHeader = ({ callRecordings, }) => {
|
|
5
|
+
const activeCall = useCall();
|
|
6
|
+
return (_jsxs("div", Object.assign({ className: "str-video__call-recording-list__header" }, { children: [_jsxs("div", Object.assign({ className: "str-video__call-recording-list__title" }, { children: [_jsx("span", { children: "Call Recordings" }), callRecordings.length ? _jsxs("span", { children: ["(", callRecordings.length, ")"] }) : null] })), _jsx(IconButton, { icon: "refresh", title: "Refresh", onClick: () => activeCall === null || activeCall === void 0 ? void 0 : activeCall.queryRecordings() })] })));
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=CallRecordingListHeader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CallRecordingListHeader.js","sourceRoot":"","sources":["../../../../src/components/CallRecordingList/CallRecordingListHeader.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,iCAAiC,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAOvC,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,EACtC,cAAc,GACe,EAAE,EAAE;IACjC,MAAM,UAAU,GAAG,OAAO,EAAE,CAAC;IAE7B,OAAO,CACL,6BAAK,SAAS,EAAC,wCAAwC,iBACrD,6BAAK,SAAS,EAAC,uCAAuC,iBACpD,6CAA4B,EAC3B,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,gCAAQ,cAAc,CAAC,MAAM,SAAS,CAAC,CAAC,CAAC,IAAI,KAClE,EACN,KAAC,UAAU,IACT,IAAI,EAAC,SAAS,EACd,KAAK,EAAC,SAAS,EACf,OAAO,EAAE,GAAG,EAAE,CAAC,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,eAAe,EAAE,GAC5C,KACE,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CallRecording } from '@stream-io/video-client';
|
|
3
|
+
export type CallRecordingListItemProps = {
|
|
4
|
+
/** Array of CallRecording objects */
|
|
5
|
+
recording: CallRecording;
|
|
6
|
+
};
|
|
7
|
+
export declare const CallRecordingListItem: ({ recording, }: CallRecordingListItemProps) => JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { CopyToClipboardButtonWithPopup } from '../Button';
|
|
5
|
+
export const CallRecordingListItem = ({ recording, }) => {
|
|
6
|
+
return (_jsxs("div", Object.assign({ className: "str-video__call-recording-list-item" }, { children: [_jsx("div", Object.assign({ className: "str-video__call-recording-list-item__info" }, { children: _jsx("div", Object.assign({ className: "str-video__call-recording-list-item__created" }, { children: new Date(recording.end_time).toLocaleString() })) })), _jsxs("div", Object.assign({ className: "str-video__call-recording-list-item__actions" }, { children: [_jsx("a", Object.assign({ className: clsx('str-video__call-recording-list-item__action-button', 'str-video__call-recording-list-item__action-button--download'), role: "button", href: recording.url, download: recording.filename, title: "Download the recording" }, { children: _jsx("span", { className: clsx('str-video__call-recording-list-item__action-button-icon', 'str-video__download-button--icon') }) })), _jsx(CopyToClipboardButtonWithPopup, { Button: CopyUrlButton, copyValue: recording.url })] }))] })));
|
|
7
|
+
};
|
|
8
|
+
const CopyUrlButton = forwardRef((props, ref) => {
|
|
9
|
+
return (_jsx("button", Object.assign({}, props, { className: clsx('str-video__call-recording-list-item__action-button', 'str-video__call-recording-list-item__action-button--copy-link'), ref: ref, title: "Copy the recording link" }, { children: _jsx("span", { className: clsx('str-video__call-recording-list-item__action-button-icon', 'str-video__copy-button--icon') }) })));
|
|
10
|
+
});
|
|
11
|
+
//# sourceMappingURL=CallRecordingListItem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CallRecordingListItem.js","sourceRoot":"","sources":["../../../../src/components/CallRecordingList/CallRecordingListItem.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAc,EAAgC,UAAU,EAAE,MAAM,OAAO,CAAC;AAExE,OAAO,EAAE,8BAA8B,EAAE,MAAM,WAAW,CAAC;AAM3D,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,EACpC,SAAS,GACkB,EAAE,EAAE;IAC/B,OAAO,CACL,6BAAK,SAAS,EAAC,qCAAqC,iBAClD,4BAAK,SAAS,EAAC,2CAA2C,gBACxD,4BAAK,SAAS,EAAC,8CAA8C,gBAC1D,IAAI,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,cAAc,EAAE,IAC1C,IACF,EACN,6BAAK,SAAS,EAAC,8CAA8C,iBAC3D,0BACE,SAAS,EAAE,IAAI,CACb,oDAAoD,EACpD,8DAA8D,CAC/D,EACD,IAAI,EAAC,QAAQ,EACb,IAAI,EAAE,SAAS,CAAC,GAAG,EACnB,QAAQ,EAAE,SAAS,CAAC,QAAQ,EAC5B,KAAK,EAAC,wBAAwB,gBAE9B,eACE,SAAS,EAAE,IAAI,CACb,yDAAyD,EACzD,kCAAkC,CACnC,GACD,IACA,EACJ,KAAC,8BAA8B,IAC7B,MAAM,EAAE,aAAa,EACrB,SAAS,EAAE,SAAS,CAAC,GAAG,GACxB,KACE,KACF,CACP,CAAC;AACJ,CAAC,CAAC;AACF,MAAM,aAAa,GAAG,UAAU,CAC9B,CAAC,KAA+B,EAAE,GAAoC,EAAE,EAAE;IACxE,OAAO,CACL,iCACM,KAAK,IACT,SAAS,EAAE,IAAI,CACb,oDAAoD,EACpD,+DAA+D,CAChE,EACD,GAAG,EAAE,GAAG,EACR,KAAK,EAAC,yBAAyB,gBAE/B,eACE,SAAS,EAAE,IAAI,CACb,yDAAyD,EACzD,8BAA8B,CAC/B,GACD,IACK,CACV,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
export const EmptyCallRecordingListing = () => {
|
|
3
|
+
return (_jsxs("div", Object.assign({ className: "str-video__call-recording-list__listing str-video__call-recording-list__listing--empty" }, { children: [_jsx("div", { className: "str-video__call-recording-list__listing--icon-empty" }), _jsx("p", Object.assign({ className: "str-video__call-recording-list__listing--text-empty" }, { children: "No recordings available" }))] })));
|
|
4
|
+
};
|
|
5
|
+
//# sourceMappingURL=EmptyCallRecordingListing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmptyCallRecordingListing.js","sourceRoot":"","sources":["../../../../src/components/CallRecordingList/EmptyCallRecordingListing.tsx"],"names":[],"mappings":";AAAA,MAAM,CAAC,MAAM,yBAAyB,GAAG,GAAG,EAAE;IAC5C,OAAO,CACL,6BAAK,SAAS,EAAC,wFAAwF,iBACrG,cAAK,SAAS,EAAC,qDAAqD,GAAG,EACvE,0BAAG,SAAS,EAAC,qDAAqD,6CAG9D,KACA,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CallRecording } from '@stream-io/video-client';
|
|
3
|
+
export type LoadingCallRecordingListProps = {
|
|
4
|
+
/** Array of CallRecording objects */
|
|
5
|
+
callRecordings: CallRecording[];
|
|
6
|
+
};
|
|
7
|
+
export declare const LoadingCallRecordingListing: ({ callRecordings, }: LoadingCallRecordingListProps) => JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { CallRecordingListItem } from './CallRecordingListItem';
|
|
3
|
+
import { LoadingIndicator } from '../LoadingIndicator';
|
|
4
|
+
export const LoadingCallRecordingListing = ({ callRecordings, }) => {
|
|
5
|
+
return (_jsxs(_Fragment, { children: [callRecordings.map((recording) => (_jsx(CallRecordingListItem, { recording: recording }, recording.filename))), _jsx(LoadingIndicator, { text: "Recording getting ready" })] }));
|
|
6
|
+
};
|
|
7
|
+
//# sourceMappingURL=LoadingCallRecordingListing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LoadingCallRecordingListing.js","sourceRoot":"","sources":["../../../../src/components/CallRecordingList/LoadingCallRecordingListing.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAOvD,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,EAC1C,cAAc,GACgB,EAAE,EAAE;IAClC,OAAO,CACL,8BACG,cAAc,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,CACjC,KAAC,qBAAqB,IAAC,SAAS,EAAE,SAAS,IAAO,SAAS,CAAC,QAAQ,CAAI,CACzE,CAAC,EACF,KAAC,gBAAgB,IAAC,IAAI,EAAC,yBAAyB,GAAG,IAClD,CACJ,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/CallRecordingList/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useState } from 'react';
|
|
3
|
+
export const DebugParticipantPublishQuality = (props) => {
|
|
4
|
+
const { call, participant } = props;
|
|
5
|
+
const [quality, setQuality] = useState();
|
|
6
|
+
const [publishStats, setPublishStats] = useState(() => ({
|
|
7
|
+
f: true,
|
|
8
|
+
h: true,
|
|
9
|
+
q: true,
|
|
10
|
+
}));
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
return call.on('changePublishQuality', (event) => {
|
|
13
|
+
if (event.eventPayload.oneofKind !== 'changePublishQuality')
|
|
14
|
+
return;
|
|
15
|
+
const { videoSenders } = event.eventPayload.changePublishQuality;
|
|
16
|
+
// FIXME OL: support additional layers (like screenshare)
|
|
17
|
+
const [videoLayer] = videoSenders.map(({ layers }) => {
|
|
18
|
+
return layers.map((l) => ({ [l.name]: l.active }));
|
|
19
|
+
});
|
|
20
|
+
setPublishStats((s) => (Object.assign(Object.assign({}, s), videoLayer)));
|
|
21
|
+
});
|
|
22
|
+
}, [call]);
|
|
23
|
+
return (_jsxs("select", Object.assign({ title: `Published tracks: ${JSON.stringify(publishStats)}`, value: quality, onChange: (e) => {
|
|
24
|
+
const value = e.target.value;
|
|
25
|
+
setQuality(value);
|
|
26
|
+
let w = 960;
|
|
27
|
+
let h = 540;
|
|
28
|
+
if (value === 'h') {
|
|
29
|
+
w = w / 2; // 480
|
|
30
|
+
h = h / 2; // 270
|
|
31
|
+
}
|
|
32
|
+
else if (value === 'q') {
|
|
33
|
+
w = w / 4; // 240
|
|
34
|
+
h = h / 4; // 135
|
|
35
|
+
}
|
|
36
|
+
call.updateSubscriptionsPartial('video', {
|
|
37
|
+
[participant.sessionId]: {
|
|
38
|
+
dimension: {
|
|
39
|
+
width: w,
|
|
40
|
+
height: h,
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
} }, { children: [_jsx("option", Object.assign({ value: "f" }, { children: "High (f)" })), _jsx("option", Object.assign({ value: "h" }, { children: "Medium (h)" })), _jsx("option", Object.assign({ value: "q" }, { children: "Low (q)" }))] })));
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=DebugParticipantPublishQuality.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DebugParticipantPublishQuality.js","sourceRoot":"","sources":["../../../../src/components/Debug/DebugParticipantPublishQuality.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAG5C,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,KAG9C,EAAE,EAAE;IACH,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,GAAG,KAAK,CAAC;IACpC,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,EAAU,CAAC;IACjD,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC,CAAC;QACtD,CAAC,EAAE,IAAI;QACP,CAAC,EAAE,IAAI;QACP,CAAC,EAAE,IAAI;KACR,CAAC,CAAC,CAAC;IAEJ,SAAS,CAAC,GAAG,EAAE;QACb,OAAO,IAAI,CAAC,EAAE,CAAC,sBAAsB,EAAE,CAAC,KAAK,EAAE,EAAE;YAC/C,IAAI,KAAK,CAAC,YAAY,CAAC,SAAS,KAAK,sBAAsB;gBAAE,OAAO;YACpE,MAAM,EAAE,YAAY,EAAE,GAAG,KAAK,CAAC,YAAY,CAAC,oBAAoB,CAAC;YACjE,yDAAyD;YACzD,MAAM,CAAC,UAAU,CAAC,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE;gBACnD,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;YACrD,CAAC,CAAC,CAAC;YACH,eAAe,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,iCAClB,CAAC,GACD,UAAU,EACb,CAAC,CAAC;QACN,CAAC,CAAC,CAAC;IACL,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;IAEX,OAAO,CACL,gCACE,KAAK,EAAE,qBAAqB,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,EAAE,EAC1D,KAAK,EAAE,OAAO,EACd,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE;YACd,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;YAC7B,UAAU,CAAC,KAAK,CAAC,CAAC;YAClB,IAAI,CAAC,GAAG,GAAG,CAAC;YACZ,IAAI,CAAC,GAAG,GAAG,CAAC;YACZ,IAAI,KAAK,KAAK,GAAG,EAAE;gBACjB,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM;gBACjB,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM;aAClB;iBAAM,IAAI,KAAK,KAAK,GAAG,EAAE;gBACxB,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM;gBACjB,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM;aAClB;YACD,IAAI,CAAC,0BAA0B,CAAC,OAAO,EAAE;gBACvC,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE;oBACvB,SAAS,EAAE;wBACT,KAAK,EAAE,CAAC;wBACR,MAAM,EAAE,CAAC;qBACV;iBACF;aACF,CAAC,CAAC;QACL,CAAC,iBAED,+BAAQ,KAAK,EAAC,GAAG,8BAAkB,EACnC,+BAAQ,KAAK,EAAC,GAAG,gCAAoB,EACrC,+BAAQ,KAAK,EAAC,GAAG,6BAAiB,KAC3B,CACV,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { useRtcStats } from '../../hooks/useRtcStats';
|
|
4
|
+
import { useFloatingUIPreset } from '../../hooks';
|
|
5
|
+
export const DebugStatsView = (props) => {
|
|
6
|
+
var _a;
|
|
7
|
+
const { call, kind, mediaStream } = props;
|
|
8
|
+
const stats = useRtcStats(call, kind, mediaStream);
|
|
9
|
+
const { refs, strategy, y, x } = useFloatingUIPreset({
|
|
10
|
+
placement: 'top',
|
|
11
|
+
strategy: 'absolute',
|
|
12
|
+
});
|
|
13
|
+
const [isPopperOpen, setIsPopperOpen] = useState(false);
|
|
14
|
+
const [videoTrack] = (_a = mediaStream === null || mediaStream === void 0 ? void 0 : mediaStream.getVideoTracks()) !== null && _a !== void 0 ? _a : [];
|
|
15
|
+
const settings = videoTrack === null || videoTrack === void 0 ? void 0 : videoTrack.getSettings();
|
|
16
|
+
return (_jsxs(_Fragment, { children: [_jsx("span", { className: "str-video__debug__track-stats-icon", tabIndex: 0, ref: refs.setReference, title: settings &&
|
|
17
|
+
`${settings.width}x${settings.height}@${Math.round(settings.frameRate || 0)}`, onClick: () => {
|
|
18
|
+
setIsPopperOpen((v) => !v);
|
|
19
|
+
} }), isPopperOpen && (_jsx("div", Object.assign({ className: "str-video__debug__track-stats", ref: refs.setFloating, style: {
|
|
20
|
+
position: strategy,
|
|
21
|
+
top: y !== null && y !== void 0 ? y : 0,
|
|
22
|
+
left: x !== null && x !== void 0 ? x : 0,
|
|
23
|
+
overflowY: 'auto',
|
|
24
|
+
} }, { children: _jsx("pre", { children: JSON.stringify(stats, null, 2) }) })))] }));
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=DebugStatsView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DebugStatsView.js","sourceRoot":"","sources":["../../../../src/components/Debug/DebugStatsView.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAElD,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAI9B,EAAE,EAAE;;IACH,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,GAAG,KAAK,CAAC;IAC1C,MAAM,KAAK,GAAG,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC;IAEnD,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,mBAAmB,CAAC;QACnD,SAAS,EAAE,KAAK;QAChB,QAAQ,EAAE,UAAU;KACrB,CAAC,CAAC;IAEH,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAExD,MAAM,CAAC,UAAU,CAAC,GAAG,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,cAAc,EAAE,mCAAI,EAAE,CAAC;IACzD,MAAM,QAAQ,GAAG,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,WAAW,EAAE,CAAC;IAC3C,OAAO,CACL,8BACE,eACE,SAAS,EAAC,oCAAoC,EAC9C,QAAQ,EAAE,CAAC,EACX,GAAG,EAAE,IAAI,CAAC,YAAY,EACtB,KAAK,EACH,QAAQ;oBACR,GAAG,QAAQ,CAAC,KAAK,IAAI,QAAQ,CAAC,MAAM,IAAI,IAAI,CAAC,KAAK,CAChD,QAAQ,CAAC,SAAS,IAAI,CAAC,CACxB,EAAE,EAEL,OAAO,EAAE,GAAG,EAAE;oBACZ,eAAe,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;gBAC7B,CAAC,GACD,EACD,YAAY,IAAI,CACf,4BACE,SAAS,EAAC,+BAA+B,EACzC,GAAG,EAAE,IAAI,CAAC,WAAW,EACrB,KAAK,EAAE;oBACL,QAAQ,EAAE,QAAQ;oBAClB,GAAG,EAAE,CAAC,aAAD,CAAC,cAAD,CAAC,GAAI,CAAC;oBACX,IAAI,EAAE,CAAC,aAAD,CAAC,cAAD,CAAC,GAAI,CAAC;oBACZ,SAAS,EAAE,MAAM;iBAClB,gBAED,wBAAM,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,GAAO,IACvC,CACP,IACA,CACJ,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
|
+
const useQueryParams = () => {
|
|
3
|
+
return useMemo(() => typeof window === 'undefined'
|
|
4
|
+
? null
|
|
5
|
+
: new URLSearchParams(window.location.search), []);
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Internal purpose hook. Enables certain development mode tools.
|
|
9
|
+
*/
|
|
10
|
+
export const useIsDebugMode = () => {
|
|
11
|
+
const params = useQueryParams();
|
|
12
|
+
return !!(params === null || params === void 0 ? void 0 : params.get('debug'));
|
|
13
|
+
};
|
|
14
|
+
export const useDebugPreferredVideoCodec = () => {
|
|
15
|
+
const params = useQueryParams();
|
|
16
|
+
return params === null || params === void 0 ? void 0 : params.get('video_codec');
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=useIsDebugMode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useIsDebugMode.js","sourceRoot":"","sources":["../../../../src/components/Debug/useIsDebugMode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEhC,MAAM,cAAc,GAAG,GAAG,EAAE;IAC1B,OAAO,OAAO,CACZ,GAAG,EAAE,CACH,OAAO,MAAM,KAAK,WAAW;QAC3B,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,IAAI,eAAe,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,EACjD,EAAE,CACH,CAAC;AACJ,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,EAAE;IACjC,MAAM,MAAM,GAAG,cAAc,EAAE,CAAC;IAChC,OAAO,CAAC,CAAC,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,GAAG,CAAC,OAAO,CAAC,CAAA,CAAC;AAChC,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,2BAA2B,GAAG,GAAG,EAAE;IAC9C,MAAM,MAAM,GAAG,cAAc,EAAE,CAAC;IAChC,OAAO,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,GAAG,CAAC,aAAa,CAAC,CAAC;AACpC,CAAC,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
const DeviceSelectorOption = ({ disabled, id, label, onChange, name, selected, defaultChecked, value, }) => {
|
|
4
|
+
return (_jsxs("label", Object.assign({ className: clsx('str-video__device-settings__option', {
|
|
5
|
+
'str-video__device-settings__option--selected': selected,
|
|
6
|
+
'str-video__device-settings__option--disabled': disabled,
|
|
7
|
+
}), htmlFor: id }, { children: [_jsx("input", { type: "radio", name: name, onChange: onChange, value: value, id: id, checked: selected, defaultChecked: defaultChecked, disabled: disabled }), label] })));
|
|
8
|
+
};
|
|
9
|
+
export const DeviceSelector = (props) => {
|
|
10
|
+
const { devices = [], selectedDeviceId: selectedDeviceFromProps, title, onChange, } = props;
|
|
11
|
+
const inputGroupName = title.replace(' ', '-').toLowerCase();
|
|
12
|
+
// sometimes the browser (Chrome) will report the system-default device
|
|
13
|
+
// with an id of 'default'. In case when it doesn't, we'll select the first
|
|
14
|
+
// available device.
|
|
15
|
+
let selectedDeviceId = selectedDeviceFromProps;
|
|
16
|
+
if (devices.length > 0 &&
|
|
17
|
+
!devices.find((d) => d.deviceId === selectedDeviceId)) {
|
|
18
|
+
selectedDeviceId = devices[0].deviceId;
|
|
19
|
+
}
|
|
20
|
+
return (_jsxs("div", Object.assign({ className: "str-video__device-settings__device-kind" }, { children: [_jsx("div", Object.assign({ className: "str-video__device-settings__device-selector-title" }, { children: title })), !devices.length ? (_jsx(DeviceSelectorOption, { id: `${inputGroupName}--default`, label: "Default", name: inputGroupName, defaultChecked: true, value: "default" })) : (devices.map((device) => {
|
|
21
|
+
return (_jsx(DeviceSelectorOption, { id: `${inputGroupName}--${device.deviceId}`, value: device.deviceId, label: device.label, onChange: (e) => {
|
|
22
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(e.target.value);
|
|
23
|
+
}, name: inputGroupName, selected: device.deviceId === selectedDeviceId || devices.length === 1 }, device.deviceId));
|
|
24
|
+
}))] })));
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=DeviceSelector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DeviceSelector.js","sourceRoot":"","sources":["../../../../src/components/DeviceSettings/DeviceSelector.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AAcxB,MAAM,oBAAoB,GAAG,CAAC,EAC5B,QAAQ,EACR,EAAE,EACF,KAAK,EACL,QAAQ,EACR,IAAI,EACJ,QAAQ,EACR,cAAc,EACd,KAAK,GACqB,EAAE,EAAE;IAC9B,OAAO,CACL,+BACE,SAAS,EAAE,IAAI,CAAC,oCAAoC,EAAE;YACpD,8CAA8C,EAAE,QAAQ;YACxD,8CAA8C,EAAE,QAAQ;SACzD,CAAC,EACF,OAAO,EAAE,EAAE,iBAEX,gBACE,IAAI,EAAC,OAAO,EACZ,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,KAAK,EACZ,EAAE,EAAE,EAAE,EACN,OAAO,EAAE,QAAQ,EACjB,cAAc,EAAE,cAAc,EAC9B,QAAQ,EAAE,QAAQ,GAClB,EACD,KAAK,KACA,CACT,CAAC;AACJ,CAAC,CAAC;AACF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAK9B,EAAE,EAAE;IACH,MAAM,EACJ,OAAO,GAAG,EAAE,EACZ,gBAAgB,EAAE,uBAAuB,EACzC,KAAK,EACL,QAAQ,GACT,GAAG,KAAK,CAAC;IACV,MAAM,cAAc,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC;IAE7D,uEAAuE;IACvE,2EAA2E;IAC3E,oBAAoB;IACpB,IAAI,gBAAgB,GAAG,uBAAuB,CAAC;IAC/C,IACE,OAAO,CAAC,MAAM,GAAG,CAAC;QAClB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,gBAAgB,CAAC,EACrD;QACA,gBAAgB,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;KACxC;IAED,OAAO,CACL,6BAAK,SAAS,EAAC,yCAAyC,iBACtD,4BAAK,SAAS,EAAC,mDAAmD,gBAC/D,KAAK,IACF,EACL,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CACjB,KAAC,oBAAoB,IACnB,EAAE,EAAE,GAAG,cAAc,WAAW,EAChC,KAAK,EAAC,SAAS,EACf,IAAI,EAAE,cAAc,EACpB,cAAc,QACd,KAAK,EAAC,SAAS,GACf,CACH,CAAC,CAAC,CAAC,CACF,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;gBACrB,OAAO,CACL,KAAC,oBAAoB,IACnB,EAAE,EAAE,GAAG,cAAc,KAAK,MAAM,CAAC,QAAQ,EAAE,EAC3C,KAAK,EAAE,MAAM,CAAC,QAAQ,EACtB,KAAK,EAAE,MAAM,CAAC,KAAK,EAEnB,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE;wBACd,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAG,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;oBAC7B,CAAC,EACD,IAAI,EAAE,cAAc,EACpB,QAAQ,EACN,MAAM,CAAC,QAAQ,KAAK,gBAAgB,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,IANzD,MAAM,CAAC,QAAQ,CAQpB,CACH,CAAC;YACJ,CAAC,CAAC,CACH,KACG,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export type DeviceSelectorAudioInputProps = {
|
|
3
|
+
title?: string;
|
|
4
|
+
};
|
|
5
|
+
export declare const DeviceSelectorAudioInput: ({ title, }: DeviceSelectorAudioInputProps) => JSX.Element;
|
|
6
|
+
export type DeviceSelectorAudioOutputProps = {
|
|
7
|
+
title?: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const DeviceSelectorAudioOutput: ({ title, }: DeviceSelectorAudioOutputProps) => JSX.Element | null;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { DeviceSelector } from './DeviceSelector';
|
|
3
|
+
import { useMediaDevices } from '../../core/contexts';
|
|
4
|
+
export const DeviceSelectorAudioInput = ({ title = 'Select a Mic', }) => {
|
|
5
|
+
const { audioInputDevices, selectedAudioInputDeviceId, switchDevice } = useMediaDevices();
|
|
6
|
+
return (_jsx(DeviceSelector, { devices: audioInputDevices, selectedDeviceId: selectedAudioInputDeviceId, onChange: (deviceId) => {
|
|
7
|
+
switchDevice('audioinput', deviceId);
|
|
8
|
+
}, title: title }));
|
|
9
|
+
};
|
|
10
|
+
export const DeviceSelectorAudioOutput = ({ title = 'Select speakers', }) => {
|
|
11
|
+
const { audioOutputDevices, isAudioOutputChangeSupported, selectedAudioOutputDeviceId, switchDevice, } = useMediaDevices();
|
|
12
|
+
if (!isAudioOutputChangeSupported)
|
|
13
|
+
return null;
|
|
14
|
+
return (_jsx(DeviceSelector, { devices: audioOutputDevices, selectedDeviceId: selectedAudioOutputDeviceId, onChange: (deviceId) => {
|
|
15
|
+
switchDevice('audiooutput', deviceId);
|
|
16
|
+
}, title: title }));
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=DeviceSelectorAudio.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DeviceSelectorAudio.js","sourceRoot":"","sources":["../../../../src/components/DeviceSettings/DeviceSelectorAudio.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAMtD,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,EACvC,KAAK,GAAG,cAAc,GACQ,EAAE,EAAE;IAClC,MAAM,EAAE,iBAAiB,EAAE,0BAA0B,EAAE,YAAY,EAAE,GACnE,eAAe,EAAE,CAAC;IAEpB,OAAO,CACL,KAAC,cAAc,IACb,OAAO,EAAE,iBAAiB,EAC1B,gBAAgB,EAAE,0BAA0B,EAC5C,QAAQ,EAAE,CAAC,QAAQ,EAAE,EAAE;YACrB,YAAY,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;QACvC,CAAC,EACD,KAAK,EAAE,KAAK,GACZ,CACH,CAAC;AACJ,CAAC,CAAC;AAMF,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,EACxC,KAAK,GAAG,iBAAiB,GACM,EAAE,EAAE;IACnC,MAAM,EACJ,kBAAkB,EAClB,4BAA4B,EAC5B,2BAA2B,EAC3B,YAAY,GACb,GAAG,eAAe,EAAE,CAAC;IAEtB,IAAI,CAAC,4BAA4B;QAAE,OAAO,IAAI,CAAC;IAE/C,OAAO,CACL,KAAC,cAAc,IACb,OAAO,EAAE,kBAAkB,EAC3B,gBAAgB,EAAE,2BAA2B,EAC7C,QAAQ,EAAE,CAAC,QAAQ,EAAE,EAAE;YACrB,YAAY,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAC;QACxC,CAAC,EACD,KAAK,EAAE,KAAK,GACZ,CACH,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { DeviceSelector } from './DeviceSelector';
|
|
3
|
+
import { useMediaDevices } from '../../core/contexts';
|
|
4
|
+
export const DeviceSelectorVideo = ({ title }) => {
|
|
5
|
+
const { videoDevices, selectedVideoDeviceId, switchDevice } = useMediaDevices();
|
|
6
|
+
return (_jsx(DeviceSelector, { devices: videoDevices, selectedDeviceId: selectedVideoDeviceId, onChange: (deviceId) => {
|
|
7
|
+
switchDevice('videoinput', deviceId);
|
|
8
|
+
}, title: title || 'Select a Camera' }));
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=DeviceSelectorVideo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DeviceSelectorVideo.js","sourceRoot":"","sources":["../../../../src/components/DeviceSettings/DeviceSelectorVideo.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAMtD,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,EAAE,KAAK,EAA4B,EAAE,EAAE;IACzE,MAAM,EAAE,YAAY,EAAE,qBAAqB,EAAE,YAAY,EAAE,GACzD,eAAe,EAAE,CAAC;IAEpB,OAAO,CACL,KAAC,cAAc,IACb,OAAO,EAAE,YAAY,EACrB,gBAAgB,EAAE,qBAAqB,EACvC,QAAQ,EAAE,CAAC,QAAQ,EAAE,EAAE;YACrB,YAAY,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;QACvC,CAAC,EACD,KAAK,EAAE,KAAK,IAAI,iBAAiB,GACjC,CACH,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import { MenuToggle } from '../Menu';
|
|
4
|
+
import { DeviceSelectorAudioInput, DeviceSelectorAudioOutput, } from './DeviceSelectorAudio';
|
|
5
|
+
import { DeviceSelectorVideo } from './DeviceSelectorVideo';
|
|
6
|
+
import { IconButton } from '../Button';
|
|
7
|
+
import clsx from 'clsx';
|
|
8
|
+
export const DeviceSettings = () => {
|
|
9
|
+
return (_jsx(MenuToggle, Object.assign({ placement: "bottom-end", ToggleButton: ToggleMenuButton }, { children: _jsx(Menu, {}) })));
|
|
10
|
+
};
|
|
11
|
+
const Menu = () => (_jsxs("div", Object.assign({ className: "str-video__device-settings" }, { children: [_jsx(DeviceSelectorVideo, {}), _jsx(DeviceSelectorAudioInput, {}), _jsx(DeviceSelectorAudioOutput, {})] })));
|
|
12
|
+
const ToggleMenuButton = forwardRef(({ menuShown }, ref) => (_jsx(IconButton, { className: clsx('str-video__device-settings__button', {
|
|
13
|
+
'str-video__device-settings__button--active': menuShown,
|
|
14
|
+
}), title: "Toggle device menu", icon: "device-settings", ref: ref })));
|
|
15
|
+
//# sourceMappingURL=DeviceSettings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DeviceSettings.js","sourceRoot":"","sources":["../../../../src/components/DeviceSettings/DeviceSettings.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACnC,OAAO,EAAE,UAAU,EAAyB,MAAM,SAAS,CAAC;AAC5D,OAAO,EACL,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,EAAE;IACjC,OAAO,CACL,KAAC,UAAU,kBAAC,SAAS,EAAC,YAAY,EAAC,YAAY,EAAE,gBAAgB,gBAC/D,KAAC,IAAI,KAAG,IACG,CACd,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,IAAI,GAAG,GAAG,EAAE,CAAC,CACjB,6BAAK,SAAS,EAAC,4BAA4B,iBACzC,KAAC,mBAAmB,KAAG,EACvB,KAAC,wBAAwB,KAAG,EAC5B,KAAC,yBAAyB,KAAG,KACzB,CACP,CAAC;AAEF,MAAM,gBAAgB,GAAG,UAAU,CACjC,CAAC,EAAE,SAAS,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CACtB,KAAC,UAAU,IACT,SAAS,EAAE,IAAI,CAAC,oCAAoC,EAAE;QACpD,4CAA4C,EAAE,SAAS;KACxD,CAAC,EACF,KAAK,EAAC,oBAAoB,EAC1B,IAAI,EAAC,iBAAiB,EACtB,GAAG,EAAE,GAAG,GAER,CACH,CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/DeviceSettings/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Icon.js","sourceRoot":"","sources":["../../../../src/components/Icon/Icon.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAM5B,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,EAAE,IAAI,EAAa,EAAE,EAAE,CAAC,CAC3C,eACE,SAAS,EAAE,IAAI,CAAC,iBAAiB,EAAE,IAAI,IAAI,oBAAoB,IAAI,EAAE,CAAC,GACtE,CACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Icon';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/Icon/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export type LoadingIndicatorProps = {
|
|
3
|
+
className?: string;
|
|
4
|
+
/** String will be injected into class and later used to apply as a CSS mask-image to an element as data URL */
|
|
5
|
+
type?: string;
|
|
6
|
+
/** Text to be displayed under the loading indicator icon */
|
|
7
|
+
text?: string;
|
|
8
|
+
/** Tooltip to be displayed on hover */
|
|
9
|
+
tooltip?: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const LoadingIndicator: ({ className, type, text, tooltip, }: LoadingIndicatorProps) => JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
export const LoadingIndicator = ({ className, type = 'spinner', text, tooltip, }) => {
|
|
4
|
+
return (_jsxs("div", Object.assign({ className: clsx('str-video__loading-indicator', className), title: tooltip }, { children: [_jsx("div", { className: clsx('str-video__loading-indicator__icon', type) }), text && _jsx("p", Object.assign({ className: "str-video__loading-indicator-text" }, { children: text }))] })));
|
|
5
|
+
};
|
|
6
|
+
//# sourceMappingURL=LoadingIndicator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LoadingIndicator.js","sourceRoot":"","sources":["../../../../src/components/LoadingIndicator/LoadingIndicator.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AAYxB,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,EAC/B,SAAS,EACT,IAAI,GAAG,SAAS,EAChB,IAAI,EACJ,OAAO,GACe,EAAE,EAAE;IAC1B,OAAO,CACL,6BACE,SAAS,EAAE,IAAI,CAAC,8BAA8B,EAAE,SAAS,CAAC,EAC1D,KAAK,EAAE,OAAO,iBAEd,cAAK,SAAS,EAAE,IAAI,CAAC,oCAAoC,EAAE,IAAI,CAAC,GAAQ,EACvE,IAAI,IAAI,0BAAG,SAAS,EAAC,mCAAmC,gBAAE,IAAI,IAAK,KAChE,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './LoadingIndicator';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/LoadingIndicator/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
export const GenericMenu = ({ children }) => {
|
|
14
|
+
return _jsx("ul", Object.assign({ className: "str-video__generic-menu" }, { children: children }));
|
|
15
|
+
};
|
|
16
|
+
export const GenericMenuButtonItem = (_a) => {
|
|
17
|
+
var { children } = _a, rest = __rest(_a, ["children"]);
|
|
18
|
+
return (_jsx("li", Object.assign({ className: "str-video__generic-menu--item" }, { children: _jsx("button", Object.assign({}, rest, { children: children })) })));
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=GenericMenu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GenericMenu.js","sourceRoot":"","sources":["../../../../src/components/Menu/GenericMenu.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAEA,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,EAAE,QAAQ,EAAqB,EAAE,EAAE;IAC7D,OAAO,2BAAI,SAAS,EAAC,yBAAyB,gBAAE,QAAQ,IAAM,CAAC;AACjE,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,EAGE,EAAE,EAAE;QAHN,EACpC,QAAQ,OAE8B,EADnC,IAAI,cAF6B,YAGrC,CADQ;IAEP,OAAO,CACL,2BAAI,SAAS,EAAC,+BAA+B,gBAC3C,iCAAY,IAAI,cAAG,QAAQ,IAAU,IAClC,CACN,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ComponentType, PropsWithChildren, ForwardedRef } from 'react';
|
|
2
|
+
import { Placement, Strategy } from '@floating-ui/react';
|
|
3
|
+
export type ToggleMenuButtonProps<E extends HTMLElement = HTMLButtonElement> = {
|
|
4
|
+
menuShown: boolean;
|
|
5
|
+
ref: ForwardedRef<E>;
|
|
6
|
+
};
|
|
7
|
+
export type MenuToggleProps<E extends HTMLElement> = PropsWithChildren<{
|
|
8
|
+
ToggleButton: ComponentType<ToggleMenuButtonProps<E>>;
|
|
9
|
+
placement?: Placement;
|
|
10
|
+
strategy?: Strategy;
|
|
11
|
+
}>;
|
|
12
|
+
export declare const MenuToggle: <E extends HTMLElement>({ ToggleButton, placement, strategy, children, }: MenuToggleProps<E>) => JSX.Element;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useState, } from 'react';
|
|
3
|
+
import { useFloatingUIPreset } from '../../hooks';
|
|
4
|
+
export const MenuToggle = ({ ToggleButton, placement = 'top-start', strategy = 'absolute', children, }) => {
|
|
5
|
+
const [menuShown, setMenuShown] = useState(false);
|
|
6
|
+
const { floating, domReference, refs, x, y } = useFloatingUIPreset({
|
|
7
|
+
placement,
|
|
8
|
+
strategy,
|
|
9
|
+
});
|
|
10
|
+
useEffect(() => {
|
|
11
|
+
const handleClick = (event) => {
|
|
12
|
+
if (!floating && (domReference === null || domReference === void 0 ? void 0 : domReference.contains(event.target))) {
|
|
13
|
+
setMenuShown(true);
|
|
14
|
+
}
|
|
15
|
+
else if (floating && !(floating === null || floating === void 0 ? void 0 : floating.contains(event.target))) {
|
|
16
|
+
setMenuShown(false);
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
const handleKeyDown = (event) => {
|
|
20
|
+
if (event.key.toLowerCase() === 'escape' &&
|
|
21
|
+
!event.altKey &&
|
|
22
|
+
!event.ctrlKey) {
|
|
23
|
+
setMenuShown(false);
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
document === null || document === void 0 ? void 0 : document.addEventListener('click', handleClick, { capture: true });
|
|
27
|
+
document === null || document === void 0 ? void 0 : document.addEventListener('keydown', handleKeyDown);
|
|
28
|
+
return () => {
|
|
29
|
+
document === null || document === void 0 ? void 0 : document.removeEventListener('click', handleClick, { capture: true });
|
|
30
|
+
document === null || document === void 0 ? void 0 : document.removeEventListener('keydown', handleKeyDown);
|
|
31
|
+
};
|
|
32
|
+
}, [floating, domReference]);
|
|
33
|
+
return (_jsxs(_Fragment, { children: [menuShown && (_jsx("div", Object.assign({ className: "str-video__menu-container", ref: refs.setFloating, style: {
|
|
34
|
+
position: strategy,
|
|
35
|
+
top: y !== null && y !== void 0 ? y : 0,
|
|
36
|
+
left: x !== null && x !== void 0 ? x : 0,
|
|
37
|
+
overflowY: 'auto',
|
|
38
|
+
} }, { children: children }))), _jsx(ToggleButton, { menuShown: menuShown, ref: refs.setReference })] }));
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=MenuToggle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MenuToggle.js","sourceRoot":"","sources":["../../../../src/components/Menu/MenuToggle.tsx"],"names":[],"mappings":";AAAA,OAAO,EAGL,SAAS,EACT,QAAQ,GAET,MAAM,OAAO,CAAC;AAGf,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAalD,MAAM,CAAC,MAAM,UAAU,GAAG,CAAwB,EAChD,YAAY,EACZ,SAAS,GAAG,WAAW,EACvB,QAAQ,GAAG,UAAU,EACrB,QAAQ,GACW,EAAE,EAAE;IACvB,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAElD,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,mBAAmB,CAAC;QACjE,SAAS;QACT,QAAQ;KACT,CAAC,CAAC;IAEH,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,WAAW,GAAG,CAAC,KAAiB,EAAE,EAAE;YACxC,IAAI,CAAC,QAAQ,KAAI,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,QAAQ,CAAC,KAAK,CAAC,MAAc,CAAC,CAAA,EAAE;gBAC7D,YAAY,CAAC,IAAI,CAAC,CAAC;aACpB;iBAAM,IAAI,QAAQ,IAAI,CAAC,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,QAAQ,CAAC,KAAK,CAAC,MAAc,CAAC,CAAA,EAAE;gBAChE,YAAY,CAAC,KAAK,CAAC,CAAC;aACrB;QACH,CAAC,CAAC;QAEF,MAAM,aAAa,GAAG,CAAC,KAAoB,EAAE,EAAE;YAC7C,IACE,KAAK,CAAC,GAAG,CAAC,WAAW,EAAE,KAAK,QAAQ;gBACpC,CAAC,KAAK,CAAC,MAAM;gBACb,CAAC,KAAK,CAAC,OAAO,EACd;gBACA,YAAY,CAAC,KAAK,CAAC,CAAC;aACrB;QACH,CAAC,CAAC;QACF,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,gBAAgB,CAAC,OAAO,EAAE,WAAW,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;QACpE,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,gBAAgB,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC;QACrD,OAAO,GAAG,EAAE;YACV,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,mBAAmB,CAAC,OAAO,EAAE,WAAW,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;YACvE,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,mBAAmB,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC;QAC1D,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC;IAE7B,OAAO,CACL,8BACG,SAAS,IAAI,CACZ,4BACE,SAAS,EAAC,2BAA2B,EACrC,GAAG,EAAE,IAAI,CAAC,WAAW,EACrB,KAAK,EAAE;oBACL,QAAQ,EAAE,QAAQ;oBAClB,GAAG,EAAE,CAAC,aAAD,CAAC,cAAD,CAAC,GAAI,CAAC;oBACX,IAAI,EAAE,CAAC,aAAD,CAAC,cAAD,CAAC,GAAI,CAAC;oBACZ,SAAS,EAAE,MAAM;iBAClB,gBAEA,QAAQ,IACL,CACP,EACD,KAAC,YAAY,IAAC,SAAS,EAAE,SAAS,EAAE,GAAG,EAAE,IAAI,CAAC,YAAY,GAAI,IAC7D,CACJ,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/Menu/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC"}
|