@stream-io/video-react-sdk 2.0.0-beta.0 → 2.0.0-beta.1
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 +24 -0
- package/dist/css/embedded.css +2592 -1498
- package/dist/css/embedded.css.map +1 -1
- package/dist/css/styles.css +2388 -1222
- package/dist/css/styles.css.map +1 -1
- package/dist/embedded.cjs.js +535 -476
- package/dist/embedded.cjs.js.map +1 -1
- package/dist/esm/index.js +10 -7
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/src/components/Avatar/Avatar.js +13 -5
- package/dist/esm/src/components/Avatar/Avatar.js.map +1 -1
- package/dist/esm/src/components/Badge/Badge.js +21 -0
- package/dist/esm/src/components/Badge/Badge.js.map +1 -0
- package/dist/esm/src/components/Button/Button.js +10 -0
- package/dist/esm/src/components/Button/Button.js.map +1 -0
- package/dist/esm/src/components/Button/CompositeButton.js +10 -17
- package/dist/esm/src/components/Button/CompositeButton.js.map +1 -1
- package/dist/esm/src/components/Button/IconButton.js +3 -9
- package/dist/esm/src/components/Button/IconButton.js.map +1 -1
- package/dist/esm/src/components/CallControls/AcceptCallButton.js +3 -2
- package/dist/esm/src/components/CallControls/AcceptCallButton.js.map +1 -1
- package/dist/esm/src/components/CallControls/CallControls.js +3 -0
- package/dist/esm/src/components/CallControls/CallControls.js.map +1 -1
- package/dist/esm/src/components/CallControls/CancelCallButton.js +11 -6
- package/dist/esm/src/components/CallControls/CancelCallButton.js.map +1 -1
- package/dist/esm/src/components/CallControls/ReactionsButton.js +7 -3
- package/dist/esm/src/components/CallControls/ReactionsButton.js.map +1 -1
- package/dist/esm/src/components/CallControls/RecordCallButton.js +17 -11
- package/dist/esm/src/components/CallControls/RecordCallButton.js.map +1 -1
- package/dist/esm/src/components/CallControls/ScreenShareButton.js +11 -4
- package/dist/esm/src/components/CallControls/ScreenShareButton.js.map +1 -1
- package/dist/esm/src/components/CallControls/ToggleAudioButton.js +28 -17
- package/dist/esm/src/components/CallControls/ToggleAudioButton.js.map +1 -1
- package/dist/esm/src/components/CallControls/ToggleAudioOutputButton.js +9 -4
- package/dist/esm/src/components/CallControls/ToggleAudioOutputButton.js.map +1 -1
- package/dist/esm/src/components/CallControls/ToggleVideoButton.js +32 -23
- package/dist/esm/src/components/CallControls/ToggleVideoButton.js.map +1 -1
- package/dist/esm/src/components/CallParticipantsList/BlockedUserListing.js +3 -3
- package/dist/esm/src/components/CallParticipantsList/BlockedUserListing.js.map +1 -1
- package/dist/esm/src/components/CallParticipantsList/CallParticipantListHeader.js +8 -3
- package/dist/esm/src/components/CallParticipantsList/CallParticipantListHeader.js.map +1 -1
- package/dist/esm/src/components/CallParticipantsList/CallParticipantListingItem.js +20 -7
- package/dist/esm/src/components/CallParticipantsList/CallParticipantListingItem.js.map +1 -1
- package/dist/esm/src/components/CallParticipantsList/CallParticipantsList.js +8 -5
- package/dist/esm/src/components/CallParticipantsList/CallParticipantsList.js.map +1 -1
- package/dist/esm/src/components/CallParticipantsList/EmptyParticipantSearchList.js +5 -2
- package/dist/esm/src/components/CallParticipantsList/EmptyParticipantSearchList.js.map +1 -1
- package/dist/esm/src/components/CallRecordingList/CallRecordingListHeader.js +7 -3
- package/dist/esm/src/components/CallRecordingList/CallRecordingListHeader.js.map +1 -1
- package/dist/esm/src/components/DeviceSettings/DeviceAudioPreviewItem.js +1 -1
- package/dist/esm/src/components/DeviceSettings/DeviceAudioPreviewItem.js.map +1 -1
- package/dist/esm/src/components/DeviceSettings/DeviceSelector.js +1 -1
- package/dist/esm/src/components/DeviceSettings/DeviceSelector.js.map +1 -1
- package/dist/esm/src/components/DeviceSettings/DeviceSelectorAudio.js +2 -2
- package/dist/esm/src/components/DeviceSettings/DeviceSelectorAudio.js.map +1 -1
- package/dist/esm/src/components/DeviceSettings/DeviceSettings.js +8 -5
- package/dist/esm/src/components/DeviceSettings/DeviceSettings.js.map +1 -1
- package/dist/esm/src/components/DeviceSettings/SpeakerTest.js +10 -4
- package/dist/esm/src/components/DeviceSettings/SpeakerTest.js.map +1 -1
- package/dist/esm/src/components/DropdownSelect/DropdownSelect.js +1 -1
- package/dist/esm/src/components/DropdownSelect/DropdownSelect.js.map +1 -1
- package/dist/esm/src/components/Menu/GenericMenu.js +2 -1
- package/dist/esm/src/components/Menu/GenericMenu.js.map +1 -1
- package/dist/esm/src/components/Menu/MenuToggle.js +3 -0
- package/dist/esm/src/components/Menu/MenuToggle.js.map +1 -1
- package/dist/esm/src/components/Notification/MicCaptureErrorNotification.js +6 -3
- package/dist/esm/src/components/Notification/MicCaptureErrorNotification.js.map +1 -1
- package/dist/esm/src/components/Notification/Notification.js +12 -3
- package/dist/esm/src/components/Notification/Notification.js.map +1 -1
- package/dist/esm/src/components/Notification/PermissionNotification.js +2 -2
- package/dist/esm/src/components/Notification/PermissionNotification.js.map +1 -1
- package/dist/esm/src/components/Notification/RecordingInProgressNotification.js +7 -3
- package/dist/esm/src/components/Notification/RecordingInProgressNotification.js.map +1 -1
- package/dist/esm/src/components/Notification/SpeakingWhileMutedNotification.js +7 -2
- package/dist/esm/src/components/Notification/SpeakingWhileMutedNotification.js.map +1 -1
- package/dist/esm/src/components/Permissions/PermissionRequests.js +13 -12
- package/dist/esm/src/components/Permissions/PermissionRequests.js.map +1 -1
- package/dist/esm/src/components/RingingCall/RingingCall.js +38 -14
- package/dist/esm/src/components/RingingCall/RingingCall.js.map +1 -1
- package/dist/esm/src/components/RingingCall/RingingCallControls.js +7 -3
- package/dist/esm/src/components/RingingCall/RingingCallControls.js.map +1 -1
- package/dist/esm/src/components/Search/SearchInput.js +1 -1
- package/dist/esm/src/components/Search/SearchInput.js.map +1 -1
- package/dist/esm/src/components/StreamTheme/StreamTheme.js +2 -2
- package/dist/esm/src/components/StreamTheme/StreamTheme.js.map +1 -1
- package/dist/esm/src/components/Tooltip/Tooltip.js +8 -8
- package/dist/esm/src/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/esm/src/components/VideoPreview/VideoPreview.js +36 -5
- package/dist/esm/src/components/VideoPreview/VideoPreview.js.map +1 -1
- package/dist/esm/src/core/components/CallLayout/LivestreamLayout.js +38 -12
- package/dist/esm/src/core/components/CallLayout/LivestreamLayout.js.map +1 -1
- package/dist/esm/src/core/components/CallLayout/PaginatedGridLayout.js +9 -5
- package/dist/esm/src/core/components/CallLayout/PaginatedGridLayout.js.map +1 -1
- package/dist/esm/src/core/components/CallLayout/PipLayout/Grid.js +9 -6
- package/dist/esm/src/core/components/CallLayout/PipLayout/Grid.js.map +1 -1
- package/dist/esm/src/core/components/CallLayout/PipLayout/Pip.js +9 -6
- package/dist/esm/src/core/components/CallLayout/PipLayout/Pip.js.map +1 -1
- package/dist/esm/src/core/components/CallLayout/SpeakerLayout.js +11 -6
- package/dist/esm/src/core/components/CallLayout/SpeakerLayout.js.map +1 -1
- package/dist/esm/src/core/components/ParticipantView/ConnectionQualityIndicator.js +25 -0
- package/dist/esm/src/core/components/ParticipantView/ConnectionQualityIndicator.js.map +1 -0
- package/dist/esm/src/core/components/ParticipantView/DefaultParticipantViewUI.js +17 -13
- package/dist/esm/src/core/components/ParticipantView/DefaultParticipantViewUI.js.map +1 -1
- package/dist/esm/src/core/components/ParticipantView/ParticipantActionsContextMenu.js +13 -8
- package/dist/esm/src/core/components/ParticipantView/ParticipantActionsContextMenu.js.map +1 -1
- package/dist/esm/src/core/components/StreamVideo/StreamVideo.js +24 -3
- package/dist/esm/src/core/components/StreamVideo/StreamVideo.js.map +1 -1
- package/dist/esm/src/core/components/Video/BaseVideoPlaceholder.js +3 -13
- package/dist/esm/src/core/components/Video/BaseVideoPlaceholder.js.map +1 -1
- package/dist/esm/src/core/components/Video/DefaultPictureInPicturePlaceholder.js +4 -2
- package/dist/esm/src/core/components/Video/DefaultPictureInPicturePlaceholder.js.map +1 -1
- package/dist/esm/src/core/components/Video/DefaultVideoPlaceholder.js +4 -2
- package/dist/esm/src/core/components/Video/DefaultVideoPlaceholder.js.map +1 -1
- package/dist/esm/src/embedded/EmbeddedClientProvider.js +7 -4
- package/dist/esm/src/embedded/EmbeddedClientProvider.js.map +1 -1
- package/dist/esm/src/embedded/call/CallControls.js +10 -6
- package/dist/esm/src/embedded/call/CallControls.js.map +1 -1
- package/dist/esm/src/embedded/call/CallHeader.js +10 -7
- package/dist/esm/src/embedded/call/CallHeader.js.map +1 -1
- package/dist/esm/src/embedded/call/CallLayout.js +8 -5
- package/dist/esm/src/embedded/call/CallLayout.js.map +1 -1
- package/dist/esm/src/embedded/call/CallStateRouter.js +7 -4
- package/dist/esm/src/embedded/call/CallStateRouter.js.map +1 -1
- package/dist/esm/src/embedded/hooks/useLayout.js +7 -4
- package/dist/esm/src/embedded/hooks/useLayout.js.map +1 -1
- package/dist/esm/src/embedded/livestream/host/HostLayout.js +12 -7
- package/dist/esm/src/embedded/livestream/host/HostLayout.js.map +1 -1
- package/dist/esm/src/embedded/livestream/host/HostStateRouter.js +12 -7
- package/dist/esm/src/embedded/livestream/host/HostStateRouter.js.map +1 -1
- package/dist/esm/src/embedded/livestream/viewer/ViewerLayout.js +9 -6
- package/dist/esm/src/embedded/livestream/viewer/ViewerLayout.js.map +1 -1
- package/dist/esm/src/embedded/livestream/viewer/ViewerLobby.js +12 -9
- package/dist/esm/src/embedded/livestream/viewer/ViewerLobby.js.map +1 -1
- package/dist/esm/src/embedded/livestream/viewer/ViewerStateRouter.js +7 -4
- package/dist/esm/src/embedded/livestream/viewer/ViewerStateRouter.js.map +1 -1
- package/dist/esm/src/embedded/shared/BlurToggleButton/BlurToggleButton.js +13 -9
- package/dist/esm/src/embedded/shared/BlurToggleButton/BlurToggleButton.js.map +1 -1
- package/dist/esm/src/embedded/shared/CallDuration/CallDuration.js +40 -0
- package/dist/esm/src/embedded/shared/CallDuration/CallDuration.js.map +1 -0
- package/dist/esm/src/embedded/shared/CallFeedback/CallEndedScreen.js +8 -6
- package/dist/esm/src/embedded/shared/CallFeedback/CallEndedScreen.js.map +1 -1
- package/dist/esm/src/embedded/shared/CallFeedback/RatingScreen.js +26 -2
- package/dist/esm/src/embedded/shared/CallFeedback/RatingScreen.js.map +1 -1
- package/dist/esm/src/embedded/shared/CallFeedback/StarRating.js +12 -6
- package/dist/esm/src/embedded/shared/CallFeedback/StarRating.js.map +1 -1
- package/dist/esm/src/embedded/shared/CallFeedback/ThankYouScreen.js +8 -6
- package/dist/esm/src/embedded/shared/CallFeedback/ThankYouScreen.js.map +1 -1
- package/dist/esm/src/embedded/shared/ConnectionNotification/ConnectionNotification.js +15 -14
- package/dist/esm/src/embedded/shared/ConnectionNotification/ConnectionNotification.js.map +1 -1
- package/dist/esm/src/embedded/shared/EmbeddedParticipantViewUI/EmbeddedParticipantViewUI.js +4 -0
- package/dist/esm/src/embedded/shared/EmbeddedParticipantViewUI/EmbeddedParticipantViewUI.js.map +1 -1
- package/dist/esm/src/embedded/shared/JoinError/JoinError.js +8 -6
- package/dist/esm/src/embedded/shared/JoinError/JoinError.js.map +1 -1
- package/dist/esm/src/embedded/shared/Lobby/DeviceControls.js +11 -7
- package/dist/esm/src/embedded/shared/Lobby/DeviceControls.js.map +1 -1
- package/dist/esm/src/embedded/shared/Lobby/DisabledDeviceButton.js +6 -4
- package/dist/esm/src/embedded/shared/Lobby/DisabledDeviceButton.js.map +1 -1
- package/dist/esm/src/embedded/shared/Lobby/Lobby.js +10 -9
- package/dist/esm/src/embedded/shared/Lobby/Lobby.js.map +1 -1
- package/dist/esm/src/embedded/shared/Lobby/ToggleCameraButton.js +6 -4
- package/dist/esm/src/embedded/shared/Lobby/ToggleCameraButton.js.map +1 -1
- package/dist/esm/src/embedded/shared/Lobby/ToggleMicButton.js +8 -6
- package/dist/esm/src/embedded/shared/Lobby/ToggleMicButton.js.map +1 -1
- package/dist/esm/src/embedded/shared/Lobby/VideoPreviewFallbacks.js +11 -9
- package/dist/esm/src/embedded/shared/Lobby/VideoPreviewFallbacks.js.map +1 -1
- package/dist/esm/src/embedded/shared/ViewersCount/ViewersCount.js +6 -4
- package/dist/esm/src/embedded/shared/ViewersCount/ViewersCount.js.map +1 -1
- package/dist/esm/src/hooks/useDeviceList.js +4 -2
- package/dist/esm/src/hooks/useDeviceList.js.map +1 -1
- package/dist/esm/src/i18n/Streami18n.js +58 -0
- package/dist/esm/src/i18n/Streami18n.js.map +1 -0
- package/dist/esm/src/i18n/TranslationContext.js +42 -0
- package/dist/esm/src/i18n/TranslationContext.js.map +1 -0
- package/dist/esm/src/i18n/runtimeDefaults.js +20 -0
- package/dist/esm/src/i18n/runtimeDefaults.js.map +1 -0
- package/dist/esm/src/i18n/useStreami18n.js +49 -0
- package/dist/esm/src/i18n/useStreami18n.js.map +1 -0
- package/dist/esm/src/wrappers/LivestreamPlayer/LivestreamPlayer.js +4 -0
- package/dist/esm/src/wrappers/LivestreamPlayer/LivestreamPlayer.js.map +1 -1
- package/dist/index.cjs.js +559 -623
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/src/components/Avatar/Avatar.d.ts +9 -4
- package/dist/src/components/Badge/Badge.d.ts +23 -0
- package/dist/src/components/Badge/index.d.ts +1 -0
- package/dist/src/components/Button/Button.d.ts +16 -0
- package/dist/src/components/Button/CompositeButton.d.ts +6 -3
- package/dist/src/components/Button/IconButton.d.ts +7 -7
- package/dist/src/components/Button/index.d.ts +2 -2
- package/dist/src/components/CallControls/CancelCallButton.d.ts +3 -1
- package/dist/src/components/CallControls/ToggleAudioButton.d.ts +3 -3
- package/dist/src/components/CallControls/ToggleAudioOutputButton.d.ts +2 -2
- package/dist/src/components/CallControls/ToggleVideoButton.d.ts +3 -3
- package/dist/src/components/CallControls/index.d.ts +0 -1
- package/dist/src/components/Menu/GenericMenu.d.ts +1 -0
- package/dist/src/components/Notification/Notification.d.ts +2 -1
- package/dist/src/components/StreamTheme/StreamTheme.d.ts +2 -1
- package/dist/src/components/VideoPreview/VideoPreview.d.ts +6 -1
- package/dist/src/components/index.d.ts +1 -1
- package/dist/src/core/components/ParticipantView/ConnectionQualityIndicator.d.ts +10 -0
- package/dist/src/core/components/ParticipantView/index.d.ts +1 -0
- package/dist/src/core/components/StreamVideo/StreamVideo.d.ts +18 -2
- package/dist/src/embedded/shared/CallDuration/CallDuration.d.ts +9 -0
- package/dist/src/embedded/shared/index.d.ts +1 -0
- package/dist/src/i18n/Streami18n.d.ts +56 -0
- package/dist/src/i18n/TranslationContext.d.ts +30 -0
- package/dist/src/i18n/index.d.ts +16 -0
- package/dist/src/i18n/keys.d.ts +164 -0
- package/dist/src/i18n/runtimeDefaults.d.ts +17 -0
- package/dist/src/i18n/types.d.ts +45 -0
- package/dist/src/i18n/useStreami18n.d.ts +19 -0
- package/index.ts +1 -1
- package/package.json +18 -13
- package/src/components/Avatar/Avatar.tsx +53 -19
- package/src/components/Badge/Badge.tsx +48 -0
- package/src/components/Badge/index.ts +1 -0
- package/src/components/Button/Button.tsx +49 -0
- package/src/components/Button/CompositeButton.tsx +82 -73
- package/src/components/Button/IconButton.tsx +19 -29
- package/src/components/Button/index.ts +2 -2
- package/src/components/CallControls/AcceptCallButton.tsx +3 -1
- package/src/components/CallControls/CancelCallButton.tsx +32 -24
- package/src/components/CallControls/ReactionsButton.tsx +7 -3
- package/src/components/CallControls/RecordCallButton.tsx +50 -23
- package/src/components/CallControls/ScreenShareButton.tsx +27 -6
- package/src/components/CallControls/ToggleAudioButton.tsx +62 -61
- package/src/components/CallControls/ToggleAudioOutputButton.tsx +7 -4
- package/src/components/CallControls/ToggleVideoButton.tsx +66 -66
- package/src/components/CallControls/index.ts +0 -1
- package/src/components/CallParticipantsList/BlockedUserListing.tsx +9 -2
- package/src/components/CallParticipantsList/CallParticipantListHeader.tsx +10 -3
- package/src/components/CallParticipantsList/CallParticipantListingItem.tsx +33 -8
- package/src/components/CallParticipantsList/CallParticipantsList.tsx +21 -5
- package/src/components/CallParticipantsList/EmptyParticipantSearchList.tsx +2 -2
- package/src/components/CallRecordingList/CallRecordingListHeader.tsx +11 -3
- package/src/components/DeviceSettings/DeviceAudioPreviewItem.tsx +3 -1
- package/src/components/DeviceSettings/DeviceSelector.tsx +1 -1
- package/src/components/DeviceSettings/DeviceSelectorAudio.tsx +2 -7
- package/src/components/DeviceSettings/DeviceSettings.tsx +14 -5
- package/src/components/DeviceSettings/SpeakerTest.tsx +7 -2
- package/src/components/DropdownSelect/DropdownSelect.tsx +3 -1
- package/src/components/Menu/GenericMenu.tsx +4 -0
- package/src/components/Notification/MicCaptureErrorNotification.tsx +7 -2
- package/src/components/Notification/Notification.tsx +20 -4
- package/src/components/Notification/PermissionNotification.tsx +2 -0
- package/src/components/Notification/RecordingInProgressNotification.tsx +5 -6
- package/src/components/Notification/SpeakingWhileMutedNotification.tsx +8 -2
- package/src/components/Permissions/PermissionRequests.tsx +50 -43
- package/src/components/RingingCall/RingingCall.tsx +40 -14
- package/src/components/RingingCall/RingingCallControls.tsx +2 -1
- package/src/components/Search/SearchInput.tsx +2 -3
- package/src/components/StreamTheme/StreamTheme.tsx +3 -1
- package/src/components/Tooltip/Tooltip.tsx +3 -10
- package/src/components/VideoPreview/VideoPreview.tsx +50 -5
- package/src/components/index.ts +1 -1
- package/src/core/components/CallLayout/LivestreamLayout.tsx +48 -18
- package/src/core/components/CallLayout/PaginatedGridLayout.tsx +14 -0
- package/src/core/components/CallLayout/PipLayout/Grid.tsx +10 -2
- package/src/core/components/CallLayout/PipLayout/Pip.tsx +6 -2
- package/src/core/components/CallLayout/SpeakerLayout.tsx +27 -0
- package/src/core/components/CallLayout/partcipantFilter.test.ts +38 -31
- package/src/core/components/ParticipantView/ConnectionQualityIndicator.tsx +54 -0
- package/src/core/components/ParticipantView/DefaultParticipantViewUI.tsx +60 -27
- package/src/core/components/ParticipantView/ParticipantActionsContextMenu.tsx +63 -22
- package/src/core/components/ParticipantView/index.ts +1 -0
- package/src/core/components/StreamVideo/StreamVideo.tsx +39 -4
- package/src/core/components/Video/BaseVideoPlaceholder.tsx +13 -30
- package/src/core/components/Video/DefaultPictureInPicturePlaceholder.tsx +5 -2
- package/src/core/components/Video/DefaultVideoPlaceholder.tsx +2 -2
- package/src/embedded/call/CallControls.tsx +9 -18
- package/src/embedded/call/CallHeader.tsx +3 -12
- package/src/embedded/call/CallLayout.tsx +1 -1
- package/src/embedded/livestream/host/HostLayout.tsx +26 -20
- package/src/embedded/livestream/host/HostStateRouter.tsx +12 -8
- package/src/embedded/livestream/viewer/ViewerLayout.tsx +8 -11
- package/src/embedded/livestream/viewer/ViewerLobby.tsx +31 -15
- package/src/embedded/shared/BlurToggleButton/BlurToggleButton.tsx +18 -12
- package/src/embedded/shared/CallDuration/CallDuration.tsx +32 -0
- package/src/embedded/shared/CallFeedback/CallEndedScreen.tsx +27 -13
- package/src/embedded/shared/CallFeedback/RatingScreen.tsx +20 -12
- package/src/embedded/shared/CallFeedback/StarRating.tsx +10 -3
- package/src/embedded/shared/CallFeedback/ThankYouScreen.tsx +6 -3
- package/src/embedded/shared/ConnectionNotification/ConnectionNotification.tsx +21 -14
- package/src/embedded/shared/JoinError/JoinError.tsx +7 -6
- package/src/embedded/shared/Lobby/DeviceControls.tsx +25 -3
- package/src/embedded/shared/Lobby/Lobby.tsx +19 -22
- package/src/embedded/shared/Lobby/ToggleMicButton.tsx +10 -3
- package/src/embedded/shared/Lobby/VideoPreviewFallbacks.tsx +4 -2
- package/src/embedded/shared/index.ts +1 -0
- package/src/hooks/useDeviceList.tsx +2 -2
- package/src/i18n/Streami18n.ts +67 -0
- package/src/i18n/TranslationContext.tsx +55 -0
- package/src/i18n/index.ts +22 -0
- package/src/i18n/keys.ts +169 -0
- package/src/i18n/runtimeDefaults.ts +17 -0
- package/src/i18n/types.ts +78 -0
- package/src/i18n/useStreami18n.ts +66 -0
- package/src/utilities/filter.test.ts +132 -124
- package/src/utilities/normalizeString.test.ts +50 -48
- package/dist/embedded-CallStatsLatencyChart-CpL1M_s0.cjs.js +0 -59
- package/dist/embedded-CallStatsLatencyChart-CpL1M_s0.cjs.js.map +0 -1
- package/dist/esm/src/components/Button/TextButton.js +0 -8
- package/dist/esm/src/components/Button/TextButton.js.map +0 -1
- package/dist/esm/src/components/CallControls/CallStatsButton.js +0 -18
- package/dist/esm/src/components/CallControls/CallStatsButton.js.map +0 -1
- package/dist/esm/src/components/CallStats/CallStats.js +0 -180
- package/dist/esm/src/components/CallStats/CallStats.js.map +0 -1
- package/dist/esm/src/components/CallStats/CallStatsLatencyChart.js +0 -57
- package/dist/esm/src/components/CallStats/CallStatsLatencyChart.js.map +0 -1
- package/dist/esm/src/translations/en.json.js +0 -177
- package/dist/esm/src/translations/en.json.js.map +0 -1
- package/dist/esm/src/translations/index.js +0 -6
- package/dist/esm/src/translations/index.js.map +0 -1
- package/dist/latency-chart-CpL1M_s0.cjs.js +0 -59
- package/dist/latency-chart-CpL1M_s0.cjs.js.map +0 -1
- package/dist/src/components/Button/TextButton.d.ts +0 -2
- package/dist/src/components/CallControls/CallStatsButton.d.ts +0 -4
- package/dist/src/components/CallStats/CallStats.d.ts +0 -22
- package/dist/src/components/CallStats/CallStatsLatencyChart.d.ts +0 -7
- package/dist/src/components/CallStats/index.d.ts +0 -1
- package/dist/src/translations/index.d.ts +0 -146
- package/src/components/Button/TextButton.tsx +0 -12
- package/src/components/CallControls/CallStatsButton.tsx +0 -37
- package/src/components/CallStats/CallStats.tsx +0 -439
- package/src/components/CallStats/CallStatsLatencyChart.tsx +0 -76
- package/src/components/CallStats/index.ts +0 -1
- package/src/translations/en.json +0 -154
- package/src/translations/index.ts +0 -3
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { useEffect, useState } from 'react';
|
|
2
|
-
import { Restricted, useCall
|
|
2
|
+
import { Restricted, useCall } from '@stream-io/video-react-bindings';
|
|
3
|
+
import { useI18n } from '../../../i18n';
|
|
3
4
|
import {
|
|
4
5
|
hasAudio,
|
|
5
6
|
hasScreenShare,
|
|
@@ -13,6 +14,7 @@ import { useParticipantViewContext } from './ParticipantViewContext';
|
|
|
13
14
|
import {
|
|
14
15
|
GenericMenu,
|
|
15
16
|
GenericMenuButtonItem,
|
|
17
|
+
GenericMenuSeparator,
|
|
16
18
|
useMenuContext,
|
|
17
19
|
} from '../../../components/Menu';
|
|
18
20
|
import { Icon } from '../../../components/Icon';
|
|
@@ -120,7 +122,9 @@ export const ParticipantActionsContextMenu = () => {
|
|
|
120
122
|
disabled={pin && !pin.isLocalPin}
|
|
121
123
|
>
|
|
122
124
|
<Icon icon="pin" />
|
|
123
|
-
{pin
|
|
125
|
+
{pin
|
|
126
|
+
? t('participantView.unpin.label', 'Unpin')
|
|
127
|
+
: t('participantView.actionsMenu.pin.label', 'Pin')}
|
|
124
128
|
</GenericMenuButtonItem>
|
|
125
129
|
<Restricted requiredGrants={[OwnCapability.PIN_FOR_EVERYONE]}>
|
|
126
130
|
<GenericMenuButtonItem
|
|
@@ -128,100 +132,137 @@ export const ParticipantActionsContextMenu = () => {
|
|
|
128
132
|
disabled={pin && !pin.isLocalPin}
|
|
129
133
|
>
|
|
130
134
|
<Icon icon="pin" />
|
|
131
|
-
{t(
|
|
135
|
+
{t(
|
|
136
|
+
'participantView.actionsMenu.pinForEveryone.label',
|
|
137
|
+
'Pin for everyone',
|
|
138
|
+
)}
|
|
132
139
|
</GenericMenuButtonItem>
|
|
133
140
|
<GenericMenuButtonItem
|
|
134
141
|
onClick={unpinForEveryone}
|
|
135
142
|
disabled={!pin || pin.isLocalPin}
|
|
136
143
|
>
|
|
137
144
|
<Icon icon="pin" />
|
|
138
|
-
{t(
|
|
145
|
+
{t(
|
|
146
|
+
'participantView.actionsMenu.unpinForEveryone.label',
|
|
147
|
+
'Unpin for everyone',
|
|
148
|
+
)}
|
|
139
149
|
</GenericMenuButtonItem>
|
|
140
150
|
</Restricted>
|
|
141
151
|
<Restricted requiredGrants={[OwnCapability.BLOCK_USERS]}>
|
|
142
152
|
<GenericMenuButtonItem onClick={blockUser}>
|
|
143
153
|
<Icon icon="not-allowed" />
|
|
144
|
-
{t('Block')}
|
|
154
|
+
{t('participantView.actionsMenu.block.label', 'Block')}
|
|
145
155
|
</GenericMenuButtonItem>
|
|
146
156
|
</Restricted>
|
|
147
157
|
<Restricted requiredGrants={[OwnCapability.KICK_USER]}>
|
|
148
158
|
<GenericMenuButtonItem onClick={kickUser}>
|
|
149
159
|
<Icon icon="kick-user" />
|
|
150
|
-
{t('Kick')}
|
|
160
|
+
{t('participantView.actionsMenu.kick.label', 'Kick')}
|
|
151
161
|
</GenericMenuButtonItem>
|
|
152
162
|
</Restricted>
|
|
163
|
+
<GenericMenuSeparator />
|
|
153
164
|
<Restricted requiredGrants={[OwnCapability.MUTE_USERS]}>
|
|
154
165
|
{hasVideoTrack && (
|
|
155
166
|
<GenericMenuButtonItem onClick={muteVideo}>
|
|
156
167
|
<Icon icon="camera-off-outline" />
|
|
157
|
-
{t(
|
|
168
|
+
{t(
|
|
169
|
+
'participantView.actionsMenu.turnOffVideo.label',
|
|
170
|
+
'Turn off video',
|
|
171
|
+
)}
|
|
158
172
|
</GenericMenuButtonItem>
|
|
159
173
|
)}
|
|
160
174
|
{hasScreenShareTrack && (
|
|
161
175
|
<GenericMenuButtonItem onClick={muteScreenShare}>
|
|
162
176
|
<Icon icon="screen-share-off" />
|
|
163
|
-
{t(
|
|
177
|
+
{t(
|
|
178
|
+
'participantView.actionsMenu.turnOffScreenShare.label',
|
|
179
|
+
'Turn off screen share',
|
|
180
|
+
)}
|
|
164
181
|
</GenericMenuButtonItem>
|
|
165
182
|
)}
|
|
166
183
|
{hasAudioTrack && (
|
|
167
184
|
<GenericMenuButtonItem onClick={muteAudio}>
|
|
168
185
|
<Icon icon="no-audio" />
|
|
169
|
-
{t('Mute audio')}
|
|
186
|
+
{t('participantView.actionsMenu.muteAudio.label', 'Mute audio')}
|
|
170
187
|
</GenericMenuButtonItem>
|
|
171
188
|
)}
|
|
172
189
|
{hasScreenShareAudioTrack && (
|
|
173
190
|
<GenericMenuButtonItem onClick={muteScreenShareAudio}>
|
|
174
191
|
<Icon icon="no-audio" />
|
|
175
|
-
{t(
|
|
192
|
+
{t(
|
|
193
|
+
'participantView.actionsMenu.muteScreenShareAudio.label',
|
|
194
|
+
'Mute screen share audio',
|
|
195
|
+
)}
|
|
176
196
|
</GenericMenuButtonItem>
|
|
177
197
|
)}
|
|
178
198
|
</Restricted>
|
|
179
199
|
{participantViewElement &&
|
|
180
200
|
typeof participantViewElement.requestFullscreen !== 'undefined' && (
|
|
181
201
|
<GenericMenuButtonItem onClick={toggleFullscreenMode}>
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
202
|
+
<Icon icon="fullscreen" />
|
|
203
|
+
{fullscreenModeOn
|
|
204
|
+
? t(
|
|
205
|
+
'participantView.actionsMenu.leaveFullscreen.label',
|
|
206
|
+
'Leave fullscreen',
|
|
207
|
+
)
|
|
208
|
+
: t(
|
|
209
|
+
'participantView.actionsMenu.enterFullscreen.label',
|
|
210
|
+
'Enter fullscreen',
|
|
211
|
+
)}
|
|
185
212
|
</GenericMenuButtonItem>
|
|
186
213
|
)}
|
|
187
214
|
{videoElement && document.pictureInPictureEnabled && (
|
|
188
215
|
<GenericMenuButtonItem onClick={togglePictureInPicture}>
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
216
|
+
<Icon icon="pip" />
|
|
217
|
+
{isPiP
|
|
218
|
+
? t(
|
|
219
|
+
'participantView.actionsMenu.leavePip.label',
|
|
220
|
+
'Leave picture-in-picture',
|
|
221
|
+
)
|
|
222
|
+
: t(
|
|
223
|
+
'participantView.actionsMenu.enterPip.label',
|
|
224
|
+
'Enter picture-in-picture',
|
|
225
|
+
)}
|
|
192
226
|
</GenericMenuButtonItem>
|
|
193
227
|
)}
|
|
228
|
+
<GenericMenuSeparator />
|
|
194
229
|
<Restricted requiredGrants={[OwnCapability.UPDATE_CALL_PERMISSIONS]}>
|
|
195
230
|
<GenericMenuButtonItem
|
|
196
231
|
onClick={grantPermission(OwnCapability.SEND_AUDIO)}
|
|
197
232
|
>
|
|
198
|
-
{t('Allow audio')}
|
|
233
|
+
{t('participantView.actionsMenu.allowAudio.label', 'Allow audio')}
|
|
199
234
|
</GenericMenuButtonItem>
|
|
200
235
|
<GenericMenuButtonItem
|
|
201
236
|
onClick={grantPermission(OwnCapability.SEND_VIDEO)}
|
|
202
237
|
>
|
|
203
|
-
{t('Allow video')}
|
|
238
|
+
{t('participantView.actionsMenu.allowVideo.label', 'Allow video')}
|
|
204
239
|
</GenericMenuButtonItem>
|
|
205
240
|
<GenericMenuButtonItem
|
|
206
241
|
onClick={grantPermission(OwnCapability.SCREENSHARE)}
|
|
207
242
|
>
|
|
208
|
-
{t(
|
|
243
|
+
{t(
|
|
244
|
+
'participantView.actionsMenu.allowScreenSharing.label',
|
|
245
|
+
'Allow screen sharing',
|
|
246
|
+
)}
|
|
209
247
|
</GenericMenuButtonItem>
|
|
210
248
|
|
|
211
249
|
<GenericMenuButtonItem
|
|
212
250
|
onClick={revokePermission(OwnCapability.SEND_AUDIO)}
|
|
213
251
|
>
|
|
214
|
-
{t('Disable audio')}
|
|
252
|
+
{t('participantView.actionsMenu.disableAudio.label', 'Disable audio')}
|
|
215
253
|
</GenericMenuButtonItem>
|
|
216
254
|
<GenericMenuButtonItem
|
|
217
255
|
onClick={revokePermission(OwnCapability.SEND_VIDEO)}
|
|
218
256
|
>
|
|
219
|
-
{t('Disable video')}
|
|
257
|
+
{t('participantView.actionsMenu.disableVideo.label', 'Disable video')}
|
|
220
258
|
</GenericMenuButtonItem>
|
|
221
259
|
<GenericMenuButtonItem
|
|
222
260
|
onClick={revokePermission(OwnCapability.SCREENSHARE)}
|
|
223
261
|
>
|
|
224
|
-
{t(
|
|
262
|
+
{t(
|
|
263
|
+
'participantView.actionsMenu.disableScreenSharing.label',
|
|
264
|
+
'Disable screen sharing',
|
|
265
|
+
)}
|
|
225
266
|
</GenericMenuButtonItem>
|
|
226
267
|
</Restricted>
|
|
227
268
|
</GenericMenu>
|
|
@@ -1,13 +1,48 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
2
|
+
type StreamVideoProviderProps,
|
|
3
3
|
StreamVideoProvider,
|
|
4
4
|
} from '@stream-io/video-react-bindings';
|
|
5
5
|
import { PropsWithChildren } from 'react';
|
|
6
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
TranslationProvider,
|
|
8
|
+
useStreami18n,
|
|
9
|
+
type UseStreami18nParams,
|
|
10
|
+
} from '../../../i18n';
|
|
11
|
+
|
|
12
|
+
export type StreamVideoProps = StreamVideoProviderProps & UseStreami18nParams;
|
|
7
13
|
|
|
8
|
-
|
|
14
|
+
/**
|
|
15
|
+
* StreamVideo is the root provider of the SDK: it provides the client to the component tree and
|
|
16
|
+
* mounts the SDK's translation context.
|
|
17
|
+
*
|
|
18
|
+
* The i18n runtime lives here rather than in `@stream-io/video-react-bindings` because the key
|
|
19
|
+
* catalog is generated from *this* package's `t()` call sites.
|
|
20
|
+
*
|
|
21
|
+
* This also fixes a real bug in the previous implementation, which rendered
|
|
22
|
+
* `<StreamVideoProvider translationsOverrides={translations} {...props} />`. Because `{...props}`
|
|
23
|
+
* came last, an integrator passing `translationsOverrides` *replaced* the SDK's bundled strings
|
|
24
|
+
* instead of merging with them, leaving every untranslated key rendering as a raw dotted path.
|
|
25
|
+
* `useStreami18n` layers integrator dictionaries over the SDK's own defaults, so a partial
|
|
26
|
+
* dictionary is now safe.
|
|
27
|
+
*/
|
|
28
|
+
export const StreamVideo = ({
|
|
29
|
+
children,
|
|
30
|
+
client,
|
|
31
|
+
i18nInstance,
|
|
32
|
+
language,
|
|
33
|
+
translations,
|
|
34
|
+
}: PropsWithChildren<StreamVideoProps>) => {
|
|
35
|
+
const translationContext = useStreami18n({
|
|
36
|
+
i18nInstance,
|
|
37
|
+
language,
|
|
38
|
+
translations,
|
|
39
|
+
});
|
|
9
40
|
return (
|
|
10
|
-
<StreamVideoProvider
|
|
41
|
+
<StreamVideoProvider client={client}>
|
|
42
|
+
<TranslationProvider value={translationContext}>
|
|
43
|
+
{children}
|
|
44
|
+
</TranslationProvider>
|
|
45
|
+
</StreamVideoProvider>
|
|
11
46
|
);
|
|
12
47
|
};
|
|
13
48
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { ComponentProps, RefAttributes, forwardRef
|
|
1
|
+
import { ComponentProps, RefAttributes, forwardRef } from 'react';
|
|
2
2
|
import type { StreamVideoParticipant } from '@stream-io/video-client';
|
|
3
|
+
import { Avatar } from '../../../components/Avatar';
|
|
3
4
|
|
|
4
5
|
export type BaseVideoPlaceholderProps = {
|
|
5
6
|
participant: StreamVideoParticipant;
|
|
@@ -10,40 +11,22 @@ export const BaseVideoPlaceholder = forwardRef<
|
|
|
10
11
|
HTMLDivElement,
|
|
11
12
|
BaseVideoPlaceholderProps
|
|
12
13
|
>(function DefaultVideoPlaceholder({ participant, style, children }, ref) {
|
|
13
|
-
const [error, setError] = useState(false);
|
|
14
14
|
const name = participant.name || participant.userId;
|
|
15
15
|
return (
|
|
16
16
|
<div className="str-video__video-placeholder" style={style} ref={ref}>
|
|
17
|
-
{(
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
</div>
|
|
24
|
-
))}
|
|
25
|
-
{participant.image && !error && (
|
|
26
|
-
<img
|
|
27
|
-
onError={() => setError(true)}
|
|
28
|
-
alt={name}
|
|
29
|
-
className="str-video__video-placeholder__avatar"
|
|
30
|
-
src={participant.image}
|
|
17
|
+
{(participant.image || name) && (
|
|
18
|
+
<Avatar
|
|
19
|
+
size="2xl"
|
|
20
|
+
showOutline
|
|
21
|
+
imageSrc={participant.image}
|
|
22
|
+
name={name}
|
|
31
23
|
/>
|
|
32
24
|
)}
|
|
25
|
+
{!participant.image && !name && (
|
|
26
|
+
<div className="str-video__video-placeholder__no-video-label">
|
|
27
|
+
{children}
|
|
28
|
+
</div>
|
|
29
|
+
)}
|
|
33
30
|
</div>
|
|
34
31
|
);
|
|
35
32
|
});
|
|
36
|
-
|
|
37
|
-
const InitialsFallback = (props: { name: string }) => {
|
|
38
|
-
const { name } = props;
|
|
39
|
-
const initials = name
|
|
40
|
-
.split(' ')
|
|
41
|
-
.slice(0, 2)
|
|
42
|
-
.map((n) => n[0])
|
|
43
|
-
.join('');
|
|
44
|
-
return (
|
|
45
|
-
<div className="str-video__video-placeholder__initials-fallback">
|
|
46
|
-
{initials}
|
|
47
|
-
</div>
|
|
48
|
-
);
|
|
49
|
-
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { forwardRef } from 'react';
|
|
2
|
-
import { useI18n } from '
|
|
2
|
+
import { useI18n } from '../../../i18n';
|
|
3
3
|
import {
|
|
4
4
|
BaseVideoPlaceholder,
|
|
5
5
|
type BaseVideoPlaceholderProps,
|
|
@@ -14,7 +14,10 @@ export const DefaultPictureInPicturePlaceholder = forwardRef<
|
|
|
14
14
|
const { t } = useI18n();
|
|
15
15
|
return (
|
|
16
16
|
<BaseVideoPlaceholder ref={ref} {...props}>
|
|
17
|
-
{t(
|
|
17
|
+
{t(
|
|
18
|
+
'videoPlaceholder.videoPlayingInPopup.text',
|
|
19
|
+
'Video is playing in a popup',
|
|
20
|
+
)}
|
|
18
21
|
</BaseVideoPlaceholder>
|
|
19
22
|
);
|
|
20
23
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { forwardRef } from 'react';
|
|
2
|
-
import { useI18n } from '
|
|
2
|
+
import { useI18n } from '../../../i18n';
|
|
3
3
|
import {
|
|
4
4
|
BaseVideoPlaceholder,
|
|
5
5
|
type BaseVideoPlaceholderProps,
|
|
@@ -14,7 +14,7 @@ export const DefaultVideoPlaceholder = forwardRef<
|
|
|
14
14
|
const { t } = useI18n();
|
|
15
15
|
return (
|
|
16
16
|
<BaseVideoPlaceholder ref={ref} {...props}>
|
|
17
|
-
{t('Video is disabled')}
|
|
17
|
+
{t('common.videoDisabled.text', 'Video is disabled')}
|
|
18
18
|
</BaseVideoPlaceholder>
|
|
19
19
|
);
|
|
20
20
|
});
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { OwnCapability } from '@stream-io/video-client';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
useCallStateHooks,
|
|
5
|
-
useI18n,
|
|
6
|
-
} from '@stream-io/video-react-bindings';
|
|
2
|
+
import { Restricted, useCallStateHooks } from '@stream-io/video-react-bindings';
|
|
3
|
+
import { useI18n } from '../../i18n';
|
|
7
4
|
import {
|
|
8
5
|
CancelCallConfirmButton,
|
|
9
6
|
CompositeButton,
|
|
@@ -20,7 +17,7 @@ import {
|
|
|
20
17
|
} from '../../components';
|
|
21
18
|
|
|
22
19
|
import { useCallDuration } from '../hooks';
|
|
23
|
-
import { CameraMenuWithBlur } from '../shared';
|
|
20
|
+
import { CallDuration, CameraMenuWithBlur } from '../shared';
|
|
24
21
|
|
|
25
22
|
interface CallControlsProps {
|
|
26
23
|
showParticipants: boolean;
|
|
@@ -49,14 +46,8 @@ export const CallControls = ({
|
|
|
49
46
|
</div>
|
|
50
47
|
</Restricted>
|
|
51
48
|
{startedAt && (
|
|
52
|
-
<div className="str-video__embedded-
|
|
53
|
-
<
|
|
54
|
-
icon="verified"
|
|
55
|
-
className="str-video__embedded-call-duration__icon"
|
|
56
|
-
/>
|
|
57
|
-
<span className="str-video__embedded-call-duration__time">
|
|
58
|
-
{elapsed}
|
|
59
|
-
</span>
|
|
49
|
+
<div className="str-video__embedded-desktop">
|
|
50
|
+
<CallDuration elapsed={elapsed} />
|
|
60
51
|
</div>
|
|
61
52
|
)}
|
|
62
53
|
</div>
|
|
@@ -71,11 +62,11 @@ export const CallControls = ({
|
|
|
71
62
|
<>
|
|
72
63
|
<DeviceSelectorAudioInput
|
|
73
64
|
visualType="list"
|
|
74
|
-
title={t('Microphone')}
|
|
65
|
+
title={t('common.microphone.label', 'Microphone')}
|
|
75
66
|
/>
|
|
76
67
|
<DeviceSelectorAudioOutput
|
|
77
68
|
visualType="list"
|
|
78
|
-
title={t('Speaker')}
|
|
69
|
+
title={t('common.speaker.label', 'Speaker')}
|
|
79
70
|
/>
|
|
80
71
|
</>
|
|
81
72
|
}
|
|
@@ -108,10 +99,10 @@ export const CallControls = ({
|
|
|
108
99
|
</div>
|
|
109
100
|
</div>
|
|
110
101
|
<div className="str-video__call-controls--group str-video__call-controls--sidebar">
|
|
111
|
-
<WithTooltip title={t('Participants')}>
|
|
102
|
+
<WithTooltip title={t('common.participants.label', 'Participants')}>
|
|
112
103
|
<CompositeButton
|
|
113
104
|
active={showParticipants}
|
|
114
|
-
aria-label={t('Participants')}
|
|
105
|
+
aria-label={t('common.participants.label', 'Participants')}
|
|
115
106
|
aria-pressed={showParticipants}
|
|
116
107
|
onClick={onToggleParticipants}
|
|
117
108
|
>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { useCallStateHooks } from '@stream-io/video-react-bindings';
|
|
2
2
|
import { useCallDuration } from '../hooks';
|
|
3
|
-
import { CancelCallConfirmButton
|
|
3
|
+
import { CancelCallConfirmButton } from '../../components';
|
|
4
|
+
import { CallDuration } from '../shared';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* Renders the call header bar with elapsed time and leave/end call button.
|
|
@@ -13,17 +14,7 @@ export const CallHeader = () => {
|
|
|
13
14
|
|
|
14
15
|
return (
|
|
15
16
|
<div className="str-video__embedded-call-header">
|
|
16
|
-
{startedAt &&
|
|
17
|
-
<div className="str-video__embedded-call-duration">
|
|
18
|
-
<Icon
|
|
19
|
-
icon="verified"
|
|
20
|
-
className="str-video__embedded-call-duration__icon"
|
|
21
|
-
/>
|
|
22
|
-
<span className="str-video__embedded-call-duration__time">
|
|
23
|
-
{elapsed}
|
|
24
|
-
</span>
|
|
25
|
-
</div>
|
|
26
|
-
)}
|
|
17
|
+
{startedAt && <CallDuration elapsed={elapsed} />}
|
|
27
18
|
<CancelCallConfirmButton />
|
|
28
19
|
</div>
|
|
29
20
|
);
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { useCallback, useState } from 'react';
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import { OwnCapability } from '@stream-io/video-client';
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
useCallStateHooks,
|
|
7
|
-
useI18n,
|
|
8
|
-
} from '@stream-io/video-react-bindings';
|
|
4
|
+
import { Restricted, useCallStateHooks } from '@stream-io/video-react-bindings';
|
|
5
|
+
import { useI18n } from '../../../i18n';
|
|
9
6
|
import { useLayout } from '../../hooks';
|
|
10
7
|
import {
|
|
8
|
+
Button,
|
|
11
9
|
CallParticipantsList,
|
|
12
10
|
CancelCallConfirmButton,
|
|
13
11
|
CompositeButton,
|
|
@@ -72,7 +70,9 @@ export const HostLayout = ({
|
|
|
72
70
|
: 'str-video__embedded-livestream-duration__backstage-badge'
|
|
73
71
|
}
|
|
74
72
|
>
|
|
75
|
-
{isLive
|
|
73
|
+
{isLive
|
|
74
|
+
? t('common.live.label', 'Live')
|
|
75
|
+
: t('livestreamHost.backstage.text', 'Backstage')}
|
|
76
76
|
</span>
|
|
77
77
|
<ViewersCount count={participantCount} />
|
|
78
78
|
{isLive && elapsed && (
|
|
@@ -129,11 +129,11 @@ export const HostLayout = ({
|
|
|
129
129
|
<>
|
|
130
130
|
<DeviceSelectorAudioOutput
|
|
131
131
|
visualType="list"
|
|
132
|
-
title={t('Speaker')}
|
|
132
|
+
title={t('common.speaker.label', 'Speaker')}
|
|
133
133
|
/>
|
|
134
134
|
<DeviceSelectorAudioInput
|
|
135
135
|
visualType="list"
|
|
136
|
-
title={t('Microphone')}
|
|
136
|
+
title={t('common.microphone.label', 'Microphone')}
|
|
137
137
|
/>
|
|
138
138
|
</>
|
|
139
139
|
}
|
|
@@ -164,26 +164,32 @@ export const HostLayout = ({
|
|
|
164
164
|
{isBackstageEnabled && (
|
|
165
165
|
<Restricted requiredGrants={[OwnCapability.UPDATE_CALL]}>
|
|
166
166
|
{isLive ? (
|
|
167
|
-
<WithTooltip
|
|
168
|
-
|
|
169
|
-
|
|
167
|
+
<WithTooltip
|
|
168
|
+
title={t('livestreamHost.endStream.title', 'End Stream')}
|
|
169
|
+
>
|
|
170
|
+
<Button
|
|
171
|
+
variant="secondary"
|
|
172
|
+
size="sm"
|
|
170
173
|
className="str-video__embedded-end-stream-button"
|
|
171
174
|
onClick={onStopLive}
|
|
172
175
|
>
|
|
173
176
|
<Icon icon="call-end" />
|
|
174
|
-
<span>{t('
|
|
175
|
-
</
|
|
177
|
+
<span>{t('livestreamHost.endLive.label', 'End Live')}</span>
|
|
178
|
+
</Button>
|
|
176
179
|
</WithTooltip>
|
|
177
180
|
) : (
|
|
178
|
-
<WithTooltip
|
|
179
|
-
|
|
180
|
-
|
|
181
|
+
<WithTooltip
|
|
182
|
+
title={t('livestreamHost.startStream.title', 'Start Stream')}
|
|
183
|
+
>
|
|
184
|
+
<Button
|
|
185
|
+
variant="primary"
|
|
186
|
+
size="sm"
|
|
181
187
|
className="str-video__embedded-go-live-button"
|
|
182
188
|
onClick={onGoLive}
|
|
183
189
|
>
|
|
184
190
|
<Icon icon="streaming" />
|
|
185
|
-
<span>{t('Go Live')}</span>
|
|
186
|
-
</
|
|
191
|
+
<span>{t('livestreamHost.goLive.label', 'Go Live')}</span>
|
|
192
|
+
</Button>
|
|
187
193
|
</WithTooltip>
|
|
188
194
|
)}
|
|
189
195
|
</Restricted>
|
|
@@ -193,10 +199,10 @@ export const HostLayout = ({
|
|
|
193
199
|
</div>
|
|
194
200
|
</div>
|
|
195
201
|
<div className="str-video__call-controls--group str-video__call-controls--sidebar">
|
|
196
|
-
<WithTooltip title={t('Participants')}>
|
|
202
|
+
<WithTooltip title={t('common.participants.label', 'Participants')}>
|
|
197
203
|
<CompositeButton
|
|
198
204
|
active={showParticipants}
|
|
199
|
-
aria-label={t('Participants')}
|
|
205
|
+
aria-label={t('common.participants.label', 'Participants')}
|
|
200
206
|
aria-pressed={showParticipants}
|
|
201
207
|
onClick={handleToggleParticipants}
|
|
202
208
|
>
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { useCallback, useState } from 'react';
|
|
2
2
|
import { CallingState } from '@stream-io/video-client';
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
useCallStateHooks,
|
|
6
|
-
useI18n,
|
|
7
|
-
} from '@stream-io/video-react-bindings';
|
|
3
|
+
import { useCall, useCallStateHooks } from '@stream-io/video-react-bindings';
|
|
4
|
+
import { useI18n } from '../../../i18n';
|
|
8
5
|
|
|
9
6
|
import { HostLayout } from './HostLayout';
|
|
10
7
|
import { LoadingIndicator } from '../../../components';
|
|
@@ -73,10 +70,17 @@ export const HostStateRouter = () => {
|
|
|
73
70
|
onJoin={handleJoin}
|
|
74
71
|
title={
|
|
75
72
|
isBackstageEnabled
|
|
76
|
-
? t(
|
|
77
|
-
|
|
73
|
+
? t(
|
|
74
|
+
'livestreamHost.prepareLivestream.title',
|
|
75
|
+
'Prepare your livestream',
|
|
76
|
+
)
|
|
77
|
+
: t('livestreamHost.readyToGoLive.title', 'Ready to go live')
|
|
78
|
+
}
|
|
79
|
+
joinLabel={
|
|
80
|
+
isBackstageEnabled
|
|
81
|
+
? t('livestreamHost.enterBackstage.label', 'Enter Backstage')
|
|
82
|
+
: t('livestreamHost.goLive.label', 'Go Live')
|
|
78
83
|
}
|
|
79
|
-
joinLabel={isBackstageEnabled ? t('Enter Backstage') : t('Go Live')}
|
|
80
84
|
/>
|
|
81
85
|
);
|
|
82
86
|
}
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { useCallback, useState } from 'react';
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import { OwnCapability } from '@stream-io/video-client';
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
useCallStateHooks,
|
|
7
|
-
useI18n,
|
|
8
|
-
} from '@stream-io/video-react-bindings';
|
|
4
|
+
import { Restricted, useCallStateHooks } from '@stream-io/video-react-bindings';
|
|
5
|
+
import { useI18n } from '../../../i18n';
|
|
9
6
|
import { useCallDuration, useLayout, useWakeLock } from '../../hooks';
|
|
10
7
|
import {
|
|
11
8
|
CallParticipantsList,
|
|
@@ -51,7 +48,7 @@ export const ViewerLayout = () => {
|
|
|
51
48
|
<div className="str-video__embedded-call-header">
|
|
52
49
|
<div className="str-video__embedded-livestream-duration">
|
|
53
50
|
<span className="str-video__embedded-livestream-duration__live-badge">
|
|
54
|
-
{t('Live')}
|
|
51
|
+
{t('common.live.label', 'Live')}
|
|
55
52
|
</span>
|
|
56
53
|
<ViewersCount count={participantCount} />
|
|
57
54
|
{elapsed && (
|
|
@@ -90,7 +87,7 @@ export const ViewerLayout = () => {
|
|
|
90
87
|
<div className="str-video__embedded-desktop">
|
|
91
88
|
<div className="str-video__embedded-livestream-duration">
|
|
92
89
|
<span className="str-video__embedded-livestream-duration__live-badge">
|
|
93
|
-
{t('Live')}
|
|
90
|
+
{t('common.live.label', 'Live')}
|
|
94
91
|
</span>
|
|
95
92
|
<ViewersCount count={participantCount} />
|
|
96
93
|
{elapsed && (
|
|
@@ -112,11 +109,11 @@ export const ViewerLayout = () => {
|
|
|
112
109
|
<>
|
|
113
110
|
<DeviceSelectorAudioOutput
|
|
114
111
|
visualType="list"
|
|
115
|
-
title={t('Speaker')}
|
|
112
|
+
title={t('common.speaker.label', 'Speaker')}
|
|
116
113
|
/>
|
|
117
114
|
<DeviceSelectorAudioInput
|
|
118
115
|
visualType="list"
|
|
119
|
-
title={t('Microphone')}
|
|
116
|
+
title={t('common.microphone.label', 'Microphone')}
|
|
120
117
|
/>
|
|
121
118
|
</>
|
|
122
119
|
}
|
|
@@ -143,10 +140,10 @@ export const ViewerLayout = () => {
|
|
|
143
140
|
</div>
|
|
144
141
|
</div>
|
|
145
142
|
<div className="str-video__call-controls--group str-video__call-controls--sidebar">
|
|
146
|
-
<WithTooltip title={t('Participants')}>
|
|
143
|
+
<WithTooltip title={t('common.participants.label', 'Participants')}>
|
|
147
144
|
<CompositeButton
|
|
148
145
|
active={showParticipants}
|
|
149
|
-
aria-label={t('Participants')}
|
|
146
|
+
aria-label={t('common.participants.label', 'Participants')}
|
|
150
147
|
aria-pressed={showParticipants}
|
|
151
148
|
onClick={handleToggleParticipants}
|
|
152
149
|
>
|