@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,151 @@
|
|
|
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, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { useCallback, useEffect, useRef, useState, } from 'react';
|
|
14
|
+
import { DebounceType, SfuModels, VisibilityState, } from '@stream-io/video-client';
|
|
15
|
+
import clsx from 'clsx';
|
|
16
|
+
import { VideoPlaceholder } from './VideoPlaceholder';
|
|
17
|
+
import { BaseVideo } from './BaseVideo';
|
|
18
|
+
export const Video = (props) => {
|
|
19
|
+
const { call, kind, participant, className, setVideoElementRef } = props, rest = __rest(props, ["call", "kind", "participant", "className", "setVideoElementRef"]);
|
|
20
|
+
const { sessionId, videoStream, screenShareStream, publishedTracks } = participant;
|
|
21
|
+
const [videoElement, setVideoElement] = useState(null);
|
|
22
|
+
// const [videoTrackMuted, setVideoTrackMuted] = useState(false);
|
|
23
|
+
const [videoPlaying, setVideoPlaying] = useState(false);
|
|
24
|
+
const viewportVisibilityRef = useRef(participant.viewportVisibilityState);
|
|
25
|
+
const stream = kind === 'video' ? videoStream : screenShareStream;
|
|
26
|
+
// TODO: handle track muting
|
|
27
|
+
// useEffect(() => {
|
|
28
|
+
// if (!stream) return;
|
|
29
|
+
// const [track] = stream.getVideoTracks();
|
|
30
|
+
// setVideoTrackMuted(track.muted);
|
|
31
|
+
// const handleMute = () => {
|
|
32
|
+
// setVideoTrackMuted(true);
|
|
33
|
+
// };
|
|
34
|
+
// const handleUnmute = () => {
|
|
35
|
+
// setVideoTrackMuted(false);
|
|
36
|
+
// };
|
|
37
|
+
// track.addEventListener('mute', handleMute);
|
|
38
|
+
// track.addEventListener('unmute', handleUnmute);
|
|
39
|
+
// return () => {
|
|
40
|
+
// track.removeEventListener('mute', handleMute);
|
|
41
|
+
// track.removeEventListener('unmute', handleUnmute);
|
|
42
|
+
// };
|
|
43
|
+
// }, [stream]);
|
|
44
|
+
const isPublishingTrack = publishedTracks.includes(kind === 'video'
|
|
45
|
+
? SfuModels.TrackType.VIDEO
|
|
46
|
+
: SfuModels.TrackType.SCREEN_SHARE);
|
|
47
|
+
const displayPlaceholder = !isPublishingTrack ||
|
|
48
|
+
(participant.viewportVisibilityState === VisibilityState.INVISIBLE &&
|
|
49
|
+
!screenShareStream) ||
|
|
50
|
+
!videoPlaying;
|
|
51
|
+
const lastDimensionRef = useRef();
|
|
52
|
+
const updateSubscription = useCallback((dimension, type = DebounceType.SLOW) => {
|
|
53
|
+
call.updateSubscriptionsPartial(kind, {
|
|
54
|
+
[sessionId]: {
|
|
55
|
+
dimension,
|
|
56
|
+
},
|
|
57
|
+
}, type);
|
|
58
|
+
}, [call, kind, sessionId]);
|
|
59
|
+
// handle generic subscription updates
|
|
60
|
+
// handle visibility subscription updates
|
|
61
|
+
useEffect(() => {
|
|
62
|
+
viewportVisibilityRef.current = participant.viewportVisibilityState;
|
|
63
|
+
if (!videoElement || !isPublishingTrack || participant.isLoggedInUser)
|
|
64
|
+
return;
|
|
65
|
+
const isInvisibleVVS = participant.viewportVisibilityState === VisibilityState.INVISIBLE;
|
|
66
|
+
updateSubscription(isInvisibleVVS
|
|
67
|
+
? undefined
|
|
68
|
+
: {
|
|
69
|
+
height: videoElement.clientHeight,
|
|
70
|
+
width: videoElement.clientWidth,
|
|
71
|
+
}, DebounceType.MEDIUM);
|
|
72
|
+
}, [
|
|
73
|
+
updateSubscription,
|
|
74
|
+
participant.viewportVisibilityState,
|
|
75
|
+
videoElement,
|
|
76
|
+
isPublishingTrack,
|
|
77
|
+
participant.isLoggedInUser,
|
|
78
|
+
]);
|
|
79
|
+
// handle resize subscription updates
|
|
80
|
+
useEffect(() => {
|
|
81
|
+
if (!videoElement || !isPublishingTrack || participant.isLoggedInUser)
|
|
82
|
+
return;
|
|
83
|
+
const resizeObserver = new ResizeObserver(() => {
|
|
84
|
+
const currentDimensions = `${videoElement.clientWidth},${videoElement.clientHeight}`;
|
|
85
|
+
// skip initial trigger of the observer
|
|
86
|
+
if (!lastDimensionRef.current) {
|
|
87
|
+
return (lastDimensionRef.current = currentDimensions);
|
|
88
|
+
}
|
|
89
|
+
if (lastDimensionRef.current === currentDimensions ||
|
|
90
|
+
viewportVisibilityRef.current === VisibilityState.INVISIBLE)
|
|
91
|
+
return;
|
|
92
|
+
updateSubscription({
|
|
93
|
+
height: videoElement.clientHeight,
|
|
94
|
+
width: videoElement.clientWidth,
|
|
95
|
+
}, DebounceType.SLOW);
|
|
96
|
+
lastDimensionRef.current = currentDimensions;
|
|
97
|
+
});
|
|
98
|
+
resizeObserver.observe(videoElement);
|
|
99
|
+
return () => {
|
|
100
|
+
resizeObserver.disconnect();
|
|
101
|
+
};
|
|
102
|
+
}, [
|
|
103
|
+
updateSubscription,
|
|
104
|
+
videoElement,
|
|
105
|
+
participant.viewportVisibilityState,
|
|
106
|
+
isPublishingTrack,
|
|
107
|
+
participant.isLoggedInUser,
|
|
108
|
+
]);
|
|
109
|
+
useEffect(() => {
|
|
110
|
+
if (!isPublishingTrack || !videoElement || participant.isLoggedInUser)
|
|
111
|
+
return;
|
|
112
|
+
updateSubscription({
|
|
113
|
+
height: videoElement.clientHeight,
|
|
114
|
+
width: videoElement.clientWidth,
|
|
115
|
+
}, DebounceType.FAST);
|
|
116
|
+
return () => {
|
|
117
|
+
updateSubscription(undefined, DebounceType.FAST);
|
|
118
|
+
};
|
|
119
|
+
}, [
|
|
120
|
+
updateSubscription,
|
|
121
|
+
videoElement,
|
|
122
|
+
isPublishingTrack,
|
|
123
|
+
participant.isLoggedInUser,
|
|
124
|
+
]);
|
|
125
|
+
const [isWideMode, setIsWideMode] = useState(true);
|
|
126
|
+
useEffect(() => {
|
|
127
|
+
if (!stream || !videoElement)
|
|
128
|
+
return;
|
|
129
|
+
setVideoPlaying(!videoElement.paused);
|
|
130
|
+
const calculateVideoRatio = () => {
|
|
131
|
+
setVideoPlaying(true);
|
|
132
|
+
const [track] = stream.getVideoTracks();
|
|
133
|
+
if (!track)
|
|
134
|
+
return;
|
|
135
|
+
const { width = 0, height = 0 } = track.getSettings();
|
|
136
|
+
setIsWideMode(width > height);
|
|
137
|
+
};
|
|
138
|
+
videoElement.addEventListener('play', calculateVideoRatio);
|
|
139
|
+
return () => {
|
|
140
|
+
videoElement.removeEventListener('play', calculateVideoRatio);
|
|
141
|
+
};
|
|
142
|
+
}, [stream, videoElement]);
|
|
143
|
+
return (_jsxs(_Fragment, { children: [_jsx(BaseVideo, Object.assign({}, rest, { stream: stream, className: clsx(className, {
|
|
144
|
+
'str-video__video--wide': isWideMode,
|
|
145
|
+
'str-video__video--tall': !isWideMode,
|
|
146
|
+
}), "data-user-id": participant.userId, "data-session-id": sessionId, ref: (ref) => {
|
|
147
|
+
setVideoElement(ref);
|
|
148
|
+
setVideoElementRef === null || setVideoElementRef === void 0 ? void 0 : setVideoElementRef(ref);
|
|
149
|
+
} })), displayPlaceholder && (_jsx(VideoPlaceholder, { style: { position: 'absolute' }, participant: participant, ref: setVideoElementRef }))] }));
|
|
150
|
+
};
|
|
151
|
+
//# sourceMappingURL=Video.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Video.js","sourceRoot":"","sources":["../../../../../src/core/components/Video/Video.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAEL,WAAW,EACX,SAAS,EACT,MAAM,EACN,QAAQ,GAET,MAAM,OAAO,CAAC;AACf,OAAO,EAEL,YAAY,EACZ,SAAS,EAET,eAAe,GAChB,MAAM,yBAAyB,CAAC;AACjC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,MAAM,CAAC,MAAM,KAAK,GAAG,CACnB,KAQC,EACD,EAAE;IACF,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,kBAAkB,KAC5D,KAAK,EAD4D,IAAI,UACrE,KAAK,EADD,kEAAmE,CAClE,CAAC;IACR,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,iBAAiB,EAAE,eAAe,EAAE,GAClE,WAAW,CAAC;IAEd,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAC9C,IAAI,CACL,CAAC;IACF,iEAAiE;IACjE,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACxD,MAAM,qBAAqB,GAAG,MAAM,CAClC,WAAW,CAAC,uBAAuB,CACpC,CAAC;IAEF,MAAM,MAAM,GAAG,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,iBAAiB,CAAC;IAElE,4BAA4B;IAC5B,oBAAoB;IACpB,yBAAyB;IAEzB,6CAA6C;IAC7C,qCAAqC;IAErC,+BAA+B;IAC/B,gCAAgC;IAChC,OAAO;IACP,iCAAiC;IACjC,iCAAiC;IACjC,OAAO;IAEP,gDAAgD;IAChD,oDAAoD;IAEpD,m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,kBACY,WAAW,CAAC,MAAM,qBACf,SAAS,EAC1B,GAAG,EAAE,CAAC,GAAG,EAAE,EAAE;oBACX,eAAe,CAAC,GAAG,CAAC,CAAC;oBACrB,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAG,GAAG,CAAC,CAAC;gBAC5B,CAAC,IACD,EACD,kBAAkB,IAAI,CACrB,KAAC,gBAAgB,IACf,KAAK,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,EAC/B,WAAW,EAAE,WAAW,EACxB,GAAG,EAAE,kBAAkB,GACvB,CACH,IACA,CACJ,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
import { StreamVideoParticipant } from '@stream-io/video-client';
|
|
3
|
+
export type VideoPlaceholderProps = {
|
|
4
|
+
participant: StreamVideoParticipant;
|
|
5
|
+
} & ComponentProps<'div'>;
|
|
6
|
+
export declare const VideoPlaceholder: import("react").ForwardRefExoticComponent<Omit<VideoPlaceholderProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef, useState } from 'react';
|
|
3
|
+
import { clsx } from 'clsx';
|
|
4
|
+
export const VideoPlaceholder = forwardRef(({ participant, style }, ref) => {
|
|
5
|
+
const [error, setError] = useState(false);
|
|
6
|
+
const name = (participant === null || participant === void 0 ? void 0 : participant.name) || (participant === null || participant === void 0 ? void 0 : participant.userId);
|
|
7
|
+
return (_jsxs("div", Object.assign({ className: "str-video__participant-placeholder", style: style, ref: ref }, { children: [(!participant.image || error) &&
|
|
8
|
+
(name ? (_jsx("div", Object.assign({ className: "str-video__participant-placeholder--initials-fallback" }, { children: _jsx("div", { children: name[0] }) }))) : (_jsx("div", { children: "Video is disabled" }))), participant.image && !error && (_jsx("img", { onError: () => setError(true), alt: "participant-placeholder", className: clsx('str-video__participant-placeholder--avatar', {
|
|
9
|
+
'str-video__participant-placeholder--avatar-speaking': participant.isSpeaking,
|
|
10
|
+
}), src: participant.image }))] })));
|
|
11
|
+
});
|
|
12
|
+
//# sourceMappingURL=VideoPlaceholder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VideoPlaceholder.js","sourceRoot":"","sources":["../../../../../src/core/components/Video/VideoPlaceholder.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAkB,UAAU,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC7D,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAO5B,MAAM,CAAC,MAAM,gBAAgB,GAAG,UAAU,CAGxC,CAAC,EAAE,WAAW,EAAE,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IAChC,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE1C,MAAM,IAAI,GAAG,CAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,IAAI,MAAI,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,MAAM,CAAA,CAAC;IAEtD,OAAO,CACL,6BAAK,SAAS,EAAC,oCAAoC,EAAC,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,iBACvE,CAAC,CAAC,WAAW,CAAC,KAAK,IAAI,KAAK,CAAC;gBAC5B,CAAC,IAAI,CAAC,CAAC,CAAC,CACN,4BAAK,SAAS,EAAC,uDAAuD,gBACpE,wBAAM,IAAI,CAAC,CAAC,CAAC,GAAO,IAChB,CACP,CAAC,CAAC,CAAC,CACF,8CAA4B,CAC7B,CAAC,EACH,WAAW,CAAC,KAAK,IAAI,CAAC,KAAK,IAAI,CAC9B,cACE,OAAO,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,EAC7B,GAAG,EAAC,yBAAyB,EAC7B,SAAS,EAAE,IAAI,CAAC,4CAA4C,EAAE;oBAC5D,qDAAqD,EACnD,WAAW,CAAC,UAAU;iBACzB,CAAC,EACF,GAAG,EAAE,WAAW,CAAC,KAAK,GACtB,CACH,KACG,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/core/components/Video/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,kBAAkB,CAAC;AAEjC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAGhC,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
type EnabledStateType = 'starting' | 'playing';
|
|
3
|
+
type DisabledStateType = 'uninitialized' | 'stopped';
|
|
4
|
+
type EnabledDeviceState<T extends EnabledStateType> = {
|
|
5
|
+
type: T;
|
|
6
|
+
enabled: true;
|
|
7
|
+
};
|
|
8
|
+
type DisabledDeviceState<T extends DisabledStateType> = {
|
|
9
|
+
type: T;
|
|
10
|
+
enabled: false;
|
|
11
|
+
};
|
|
12
|
+
type ErrorDeviceState = {
|
|
13
|
+
type: 'error';
|
|
14
|
+
message: string;
|
|
15
|
+
enabled: false;
|
|
16
|
+
};
|
|
17
|
+
type DeviceState = EnabledDeviceState<EnabledStateType> | DisabledDeviceState<DisabledStateType> | ErrorDeviceState;
|
|
18
|
+
/**
|
|
19
|
+
* Exclude types from documentaiton site, but we should still add doc comments
|
|
20
|
+
* @internal
|
|
21
|
+
*/
|
|
22
|
+
export declare const DEVICE_STATE: {
|
|
23
|
+
starting: EnabledDeviceState<'starting'>;
|
|
24
|
+
playing: EnabledDeviceState<'playing'>;
|
|
25
|
+
stopped: DisabledDeviceState<'stopped'>;
|
|
26
|
+
uninitialized: DisabledDeviceState<'uninitialized'>;
|
|
27
|
+
error: ErrorDeviceState;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Exclude types from documentaiton site, but we should still add doc comments
|
|
31
|
+
* @internal
|
|
32
|
+
*/
|
|
33
|
+
export type MediaDevicesContextAPI = {
|
|
34
|
+
audioInputDevices: MediaDeviceInfo[];
|
|
35
|
+
audioOutputDevices: MediaDeviceInfo[];
|
|
36
|
+
videoDevices: MediaDeviceInfo[];
|
|
37
|
+
disposeOfMediaStream: (stream: MediaStream) => void;
|
|
38
|
+
getAudioStream: (deviceId?: string) => Promise<MediaStream>;
|
|
39
|
+
getVideoStream: (deviceId?: string) => Promise<MediaStream>;
|
|
40
|
+
isAudioOutputChangeSupported: boolean;
|
|
41
|
+
initialAudioEnabled: boolean;
|
|
42
|
+
initialVideoState: DeviceState;
|
|
43
|
+
publishVideoStream: () => Promise<void>;
|
|
44
|
+
publishAudioStream: () => Promise<void>;
|
|
45
|
+
stopPublishingAudio: () => void;
|
|
46
|
+
stopPublishingVideo: () => void;
|
|
47
|
+
setInitialVideoState: (state: DeviceState) => void;
|
|
48
|
+
selectedAudioInputDeviceId?: string;
|
|
49
|
+
selectedAudioOutputDeviceId?: string;
|
|
50
|
+
selectedVideoDeviceId?: string;
|
|
51
|
+
switchDevice: (kind: MediaDeviceKind, deviceId?: string) => void;
|
|
52
|
+
toggleAudioMuteState: () => void;
|
|
53
|
+
toggleVideoMuteState: () => void;
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Exclude types from documentaiton site, but we should still add doc comments
|
|
57
|
+
* @internal
|
|
58
|
+
*/
|
|
59
|
+
export type MediaDevicesProviderProps = PropsWithChildren<{
|
|
60
|
+
enumerate?: boolean;
|
|
61
|
+
initialAudioEnabled?: boolean;
|
|
62
|
+
initialVideoEnabled?: boolean;
|
|
63
|
+
initialAudioInputDeviceId?: string;
|
|
64
|
+
initialAudioOutputDeviceId?: string;
|
|
65
|
+
initialVideoInputDeviceId?: string;
|
|
66
|
+
}>;
|
|
67
|
+
/**
|
|
68
|
+
*
|
|
69
|
+
* @param param0
|
|
70
|
+
* @returns
|
|
71
|
+
*
|
|
72
|
+
* @category Device Management
|
|
73
|
+
*/
|
|
74
|
+
export declare const MediaDevicesProvider: ({ children, enumerate, initialAudioEnabled, initialVideoEnabled, initialVideoInputDeviceId, initialAudioOutputDeviceId, initialAudioInputDeviceId, }: MediaDevicesProviderProps) => JSX.Element;
|
|
75
|
+
/**
|
|
76
|
+
*
|
|
77
|
+
* @returns
|
|
78
|
+
*
|
|
79
|
+
* @category Device Management
|
|
80
|
+
*/
|
|
81
|
+
export declare const useMediaDevices: () => MediaDevicesContextAPI;
|
|
82
|
+
export {};
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
+
import { createContext, useCallback, useContext, useEffect, useState, } from 'react';
|
|
12
|
+
import { map, pairwise, take } from 'rxjs';
|
|
13
|
+
import { CallingState, checkIfAudioOutputChangeSupported, disposeOfMediaStream, getAudioDevices, getAudioOutputDevices, getAudioStream, getVideoDevices, getVideoStream, SfuModels, watchForDisconnectedAudioOutputDevice, } from '@stream-io/video-client';
|
|
14
|
+
import { useCall, useCallCallingState, useCallState, } from '@stream-io/video-react-bindings';
|
|
15
|
+
import { useAudioPublisher, useVideoPublisher } from '../hooks';
|
|
16
|
+
const DEVICE_STATE_TOGGLE = {
|
|
17
|
+
starting: 'stopped',
|
|
18
|
+
playing: 'stopped',
|
|
19
|
+
stopped: 'starting',
|
|
20
|
+
uninitialized: 'starting',
|
|
21
|
+
error: 'starting',
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Exclude types from documentaiton site, but we should still add doc comments
|
|
25
|
+
* @internal
|
|
26
|
+
*/
|
|
27
|
+
export const DEVICE_STATE = {
|
|
28
|
+
starting: { type: 'starting', enabled: true },
|
|
29
|
+
playing: { type: 'playing', enabled: true },
|
|
30
|
+
stopped: { type: 'stopped', enabled: false },
|
|
31
|
+
uninitialized: { type: 'uninitialized', enabled: false },
|
|
32
|
+
error: { type: 'error', message: '', enabled: false },
|
|
33
|
+
};
|
|
34
|
+
const MediaDevicesContext = createContext(null);
|
|
35
|
+
// todo: republish the stream, when a new default device connected
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @param param0
|
|
39
|
+
* @returns
|
|
40
|
+
*
|
|
41
|
+
* @category Device Management
|
|
42
|
+
*/
|
|
43
|
+
export const MediaDevicesProvider = ({ children, enumerate = true, initialAudioEnabled, initialVideoEnabled, initialVideoInputDeviceId = 'default', initialAudioOutputDeviceId = 'default', initialAudioInputDeviceId = 'default', }) => {
|
|
44
|
+
const call = useCall();
|
|
45
|
+
const callingState = useCallCallingState();
|
|
46
|
+
const callState = useCallState();
|
|
47
|
+
const { localParticipant$ } = callState;
|
|
48
|
+
const [audioInputDevices, setAudioInputDevices] = useState([]);
|
|
49
|
+
const [videoDevices, setVideoDevices] = useState([]);
|
|
50
|
+
const [audioOutputDevices, setAudioOutputDevices] = useState([]);
|
|
51
|
+
const [selectedAudioInputDeviceId, setSelectedAudioInputDeviceId] = useState(initialAudioInputDeviceId);
|
|
52
|
+
const [selectedAudioOutputDeviceId, setSelectedAudioOutputDeviceId] = useState(initialAudioOutputDeviceId);
|
|
53
|
+
const [selectedVideoDeviceId, selectVideoDeviceId] = useState(initialVideoInputDeviceId);
|
|
54
|
+
const [isAudioOutputChangeSupported] = useState(() => checkIfAudioOutputChangeSupported());
|
|
55
|
+
const [initAudioEnabled, setInitAudioEnabled] = useState(!!initialAudioEnabled);
|
|
56
|
+
const [initialVideoState, setInitialVideoState] = useState(() => initialVideoEnabled ? DEVICE_STATE.starting : DEVICE_STATE.uninitialized);
|
|
57
|
+
const publishVideoStream = useVideoPublisher({
|
|
58
|
+
initialVideoMuted: !initialVideoState.enabled,
|
|
59
|
+
videoDeviceId: selectedVideoDeviceId,
|
|
60
|
+
});
|
|
61
|
+
const publishAudioStream = useAudioPublisher({
|
|
62
|
+
initialAudioMuted: !initAudioEnabled,
|
|
63
|
+
audioDeviceId: selectedAudioInputDeviceId,
|
|
64
|
+
});
|
|
65
|
+
const stopPublishingAudio = useCallback(() => {
|
|
66
|
+
if (callingState === CallingState.IDLE ||
|
|
67
|
+
callingState === CallingState.RINGING) {
|
|
68
|
+
setInitAudioEnabled(false);
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
call === null || call === void 0 ? void 0 : call.stopPublish(SfuModels.TrackType.AUDIO);
|
|
72
|
+
}
|
|
73
|
+
}, [call, callingState]);
|
|
74
|
+
const stopPublishingVideo = useCallback(() => {
|
|
75
|
+
if (callingState === CallingState.IDLE ||
|
|
76
|
+
callingState === CallingState.RINGING) {
|
|
77
|
+
setInitialVideoState(DEVICE_STATE.stopped);
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
call === null || call === void 0 ? void 0 : call.stopPublish(SfuModels.TrackType.VIDEO);
|
|
81
|
+
}
|
|
82
|
+
}, [call, callingState]);
|
|
83
|
+
const toggleAudioMuteState = useCallback(() => setInitAudioEnabled((prev) => !prev), []);
|
|
84
|
+
const toggleVideoMuteState = useCallback(() => setInitialVideoState((prev) => {
|
|
85
|
+
const newType = DEVICE_STATE_TOGGLE[prev.type];
|
|
86
|
+
return DEVICE_STATE[newType];
|
|
87
|
+
}), []);
|
|
88
|
+
const switchDevice = useCallback((kind, deviceId) => {
|
|
89
|
+
if (kind === 'videoinput') {
|
|
90
|
+
selectVideoDeviceId(deviceId);
|
|
91
|
+
}
|
|
92
|
+
if (kind === 'audioinput') {
|
|
93
|
+
setSelectedAudioInputDeviceId(deviceId);
|
|
94
|
+
}
|
|
95
|
+
if (kind === 'audiooutput') {
|
|
96
|
+
setSelectedAudioOutputDeviceId(deviceId);
|
|
97
|
+
}
|
|
98
|
+
}, []);
|
|
99
|
+
useEffect(() => {
|
|
100
|
+
if (!enumerate)
|
|
101
|
+
return;
|
|
102
|
+
const validateInitialInputDeviceId = getAudioDevices()
|
|
103
|
+
.pipe(take(1))
|
|
104
|
+
.subscribe((devices) => {
|
|
105
|
+
const initialDeviceFound = devices.find((device) => device.deviceId === initialAudioInputDeviceId);
|
|
106
|
+
if (!initialDeviceFound) {
|
|
107
|
+
setSelectedAudioInputDeviceId('default');
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
const subscription = getAudioDevices().subscribe(setAudioInputDevices);
|
|
111
|
+
return () => {
|
|
112
|
+
subscription.unsubscribe();
|
|
113
|
+
validateInitialInputDeviceId.unsubscribe();
|
|
114
|
+
};
|
|
115
|
+
}, [enumerate, initialAudioInputDeviceId]);
|
|
116
|
+
useEffect(() => {
|
|
117
|
+
if (!enumerate)
|
|
118
|
+
return;
|
|
119
|
+
const validateInitialInputDeviceId = getVideoDevices()
|
|
120
|
+
.pipe(take(1))
|
|
121
|
+
.subscribe((devices) => {
|
|
122
|
+
const initialDeviceFound = devices.find((device) => device.deviceId === initialVideoInputDeviceId);
|
|
123
|
+
if (!initialDeviceFound) {
|
|
124
|
+
selectVideoDeviceId('default');
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
const subscription = getVideoDevices().subscribe(setVideoDevices);
|
|
128
|
+
return () => {
|
|
129
|
+
subscription.unsubscribe();
|
|
130
|
+
validateInitialInputDeviceId.unsubscribe();
|
|
131
|
+
};
|
|
132
|
+
}, [enumerate, initialVideoInputDeviceId]);
|
|
133
|
+
useEffect(() => {
|
|
134
|
+
if (!enumerate)
|
|
135
|
+
return;
|
|
136
|
+
const validateInitialInputDeviceId = getAudioOutputDevices()
|
|
137
|
+
.pipe(take(1))
|
|
138
|
+
.subscribe((devices) => {
|
|
139
|
+
const initialDeviceFound = devices.find((device) => device.deviceId === initialAudioOutputDeviceId);
|
|
140
|
+
if (!initialDeviceFound) {
|
|
141
|
+
setSelectedAudioOutputDeviceId('default');
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
const subscription = getAudioOutputDevices().subscribe(setAudioOutputDevices);
|
|
145
|
+
return () => {
|
|
146
|
+
subscription.unsubscribe();
|
|
147
|
+
validateInitialInputDeviceId.unsubscribe();
|
|
148
|
+
};
|
|
149
|
+
}, [enumerate, initialAudioOutputDeviceId]);
|
|
150
|
+
useEffect(() => {
|
|
151
|
+
const subscription = getVideoDevices()
|
|
152
|
+
.pipe(pairwise())
|
|
153
|
+
.subscribe(([prev, current]) => {
|
|
154
|
+
// When there are 0 video devices (e.g. when laptop lid closed),
|
|
155
|
+
// we do not restart the video automatically when the device is again available,
|
|
156
|
+
// but rather leave this to the user.
|
|
157
|
+
if (prev.length > 0 && current.length === 0) {
|
|
158
|
+
setInitialVideoState(DEVICE_STATE.stopped);
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
return () => subscription.unsubscribe();
|
|
162
|
+
}, [videoDevices.length]);
|
|
163
|
+
useEffect(() => {
|
|
164
|
+
if (!call || callingState !== CallingState.JOINED)
|
|
165
|
+
return;
|
|
166
|
+
call.setAudioOutputDevice(selectedAudioOutputDeviceId);
|
|
167
|
+
}, [call, callingState, selectedAudioOutputDeviceId]);
|
|
168
|
+
useEffect(() => {
|
|
169
|
+
if (!localParticipant$)
|
|
170
|
+
return;
|
|
171
|
+
const subscription = watchForDisconnectedAudioOutputDevice(localParticipant$.pipe(map((p) => p === null || p === void 0 ? void 0 : p.audioOutputDeviceId))).subscribe(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
172
|
+
setSelectedAudioOutputDeviceId('default');
|
|
173
|
+
}));
|
|
174
|
+
return () => {
|
|
175
|
+
subscription.unsubscribe();
|
|
176
|
+
};
|
|
177
|
+
}, [localParticipant$]);
|
|
178
|
+
const contextValue = {
|
|
179
|
+
audioInputDevices,
|
|
180
|
+
videoDevices,
|
|
181
|
+
audioOutputDevices,
|
|
182
|
+
disposeOfMediaStream,
|
|
183
|
+
getAudioStream,
|
|
184
|
+
getVideoStream,
|
|
185
|
+
isAudioOutputChangeSupported,
|
|
186
|
+
selectedAudioInputDeviceId,
|
|
187
|
+
selectedAudioOutputDeviceId,
|
|
188
|
+
selectedVideoDeviceId,
|
|
189
|
+
switchDevice,
|
|
190
|
+
initialAudioEnabled: initAudioEnabled,
|
|
191
|
+
initialVideoState,
|
|
192
|
+
setInitialVideoState,
|
|
193
|
+
toggleAudioMuteState,
|
|
194
|
+
toggleVideoMuteState,
|
|
195
|
+
publishAudioStream,
|
|
196
|
+
publishVideoStream,
|
|
197
|
+
stopPublishingAudio,
|
|
198
|
+
stopPublishingVideo,
|
|
199
|
+
};
|
|
200
|
+
return (_jsx(MediaDevicesContext.Provider, Object.assign({ value: contextValue }, { children: children })));
|
|
201
|
+
};
|
|
202
|
+
/**
|
|
203
|
+
*
|
|
204
|
+
* @returns
|
|
205
|
+
*
|
|
206
|
+
* @category Device Management
|
|
207
|
+
*/
|
|
208
|
+
export const useMediaDevices = () => {
|
|
209
|
+
const value = useContext(MediaDevicesContext);
|
|
210
|
+
if (!value) {
|
|
211
|
+
console.warn(`Null MediaDevicesContext`);
|
|
212
|
+
}
|
|
213
|
+
return value;
|
|
214
|
+
};
|
|
215
|
+
//# sourceMappingURL=MediaDevicesContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MediaDevicesContext.js","sourceRoot":"","sources":["../../../../src/core/contexts/MediaDevicesContext.tsx"],"names":[],"mappings":";;;;;;;;;;AAAA,OAAO,EACL,aAAa,EAEb,WAAW,EACX,UAAU,EACV,SAAS,EACT,QAAQ,GACT,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC3C,OAAO,EACL,YAAY,EACZ,iCAAiC,EACjC,oBAAoB,EACpB,eAAe,EACf,qBAAqB,EACrB,cAAc,EACd,eAAe,EACf,cAAc,EACd,SAAS,EACT,qCAAqC,GACtC,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,OAAO,EACP,mBAAmB,EACnB,YAAY,GACb,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AA0BhE,MAAM,mBAAmB,GAAoD;IAC3E,QAAQ,EAAE,SAAS;IACnB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,UAAU;IACnB,aAAa,EAAE,UAAU;IACzB,KAAK,EAAE,UAAU;CAClB,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAMrB;IACF,QAAQ,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,IAAI,EAAE;IAC7C,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE;IAC3C,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE;IAC5C,aAAa,EAAE,EAAE,IAAI,EAAE,eAAe,EAAE,OAAO,EAAE,KAAK,EAAE;IACxD,KAAK,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE;CACtD,CAAC;AA6BF,MAAM,mBAAmB,GAAG,aAAa,CAAgC,IAAI,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AG,EAAE;YACV,YAAY,CAAC,WAAW,EAAE,CAAC;QAC7B,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,iBAAiB,CAAC,CAAC,CAAC;IAExB,MAAM,YAAY,GAA2B;QAC3C,iBAAiB;QACjB,YAAY;QACZ,kBAAkB;QAClB,oBAAoB;QACpB,cAAc;QACd,cAAc;QACd,4BAA4B;QAC5B,0BAA0B;QAC1B,2BAA2B;QAC3B,qBAAqB;QACrB,YAAY;QACZ,mBAAmB,EAAE,gBAAgB;QACrC,iBAAiB;QACjB,oBAAoB;QACpB,oBAAoB;QACpB,oBAAoB;QACpB,kBAAkB;QAClB,kBAAkB;QAClB,mBAAmB;QACnB,mBAAmB;KACpB,CAAC;IAEF,OAAO,CACL,KAAC,mBAAmB,CAAC,QAAQ,kBAAC,KAAK,EAAE,YAAY,gBAC9C,QAAQ,IACoB,CAChC,CAAC;AACJ,CAAC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,EAAE;IAClC,MAAM,KAAK,GAAG,UAAU,CAAC,mBAAmB,CAAC,CAAC;IAC9C,IAAI,CAAC,KAAK,EAAE;QACV,OAAO,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC;KAC1C;IACD,OAAO,KAA+B,CAAC;AACzC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './MediaDevicesContext';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/contexts/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @internal
|
|
3
|
+
*/
|
|
4
|
+
export type AudioPublisherInit = {
|
|
5
|
+
initialAudioMuted?: boolean;
|
|
6
|
+
audioDeviceId?: string;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* @internal
|
|
10
|
+
* @category Device Management
|
|
11
|
+
*/
|
|
12
|
+
export declare const useAudioPublisher: ({ initialAudioMuted, audioDeviceId, }: AudioPublisherInit) => () => Promise<void>;
|