@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,10 +1,11 @@
|
|
|
1
1
|
import { forwardRef, MouseEventHandler, useCallback } from 'react';
|
|
2
2
|
import { OwnCapability } from '@stream-io/video-client';
|
|
3
|
-
import { Restricted, useCall
|
|
3
|
+
import { Restricted, useCall } from '@stream-io/video-react-bindings';
|
|
4
|
+
import { useI18n } from '../../i18n';
|
|
4
5
|
|
|
5
6
|
import { MenuToggle, ToggleMenuButtonProps } from '../Menu';
|
|
6
7
|
|
|
7
|
-
import { IconButton } from '../Button';
|
|
8
|
+
import { Button, ButtonProps, IconButton } from '../Button';
|
|
8
9
|
import { Icon } from '../Icon';
|
|
9
10
|
import { WithTooltip } from '../Tooltip';
|
|
10
11
|
|
|
@@ -16,31 +17,29 @@ const EndCallMenu = (props: {
|
|
|
16
17
|
const { t } = useI18n();
|
|
17
18
|
return (
|
|
18
19
|
<div className="str-video__end-call__confirmation">
|
|
19
|
-
<
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
<Button
|
|
21
|
+
variant="secondary"
|
|
22
|
+
appearance="outline"
|
|
23
|
+
className="str-video__end-call__leave"
|
|
22
24
|
data-testid="leave-call-button"
|
|
23
25
|
onClick={onLeave}
|
|
24
26
|
>
|
|
25
|
-
<Icon
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
/>
|
|
29
|
-
{t('Leave call')}
|
|
30
|
-
</button>
|
|
27
|
+
<Icon icon="logout" />
|
|
28
|
+
{t('callControls.cancelCallButton.leaveCall.title', 'Leave call')}
|
|
29
|
+
</Button>
|
|
31
30
|
<Restricted requiredGrants={[OwnCapability.END_CALL]}>
|
|
32
|
-
<
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
<Button
|
|
32
|
+
variant="destructive"
|
|
33
|
+
className="str-video__end-call__end"
|
|
35
34
|
data-testid="end-call-for-all-button"
|
|
36
35
|
onClick={onEnd}
|
|
37
36
|
>
|
|
38
|
-
<Icon
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
</
|
|
37
|
+
<Icon icon="call-end" />
|
|
38
|
+
{t(
|
|
39
|
+
'callControls.cancelCallButton.endCallForAll.label',
|
|
40
|
+
'End call for all',
|
|
41
|
+
)}
|
|
42
|
+
</Button>
|
|
44
43
|
</Restricted>
|
|
45
44
|
</div>
|
|
46
45
|
);
|
|
@@ -52,10 +51,13 @@ const CancelCallToggleMenuButton = forwardRef<
|
|
|
52
51
|
>(function CancelCallToggleMenuButtonRender({ menuShown }, ref) {
|
|
53
52
|
const { t } = useI18n();
|
|
54
53
|
return (
|
|
55
|
-
<WithTooltip
|
|
54
|
+
<WithTooltip
|
|
55
|
+
title={t('callControls.cancelCallButton.leaveCall.title', 'Leave call')}
|
|
56
|
+
tooltipDisabled={menuShown}
|
|
57
|
+
>
|
|
56
58
|
<IconButton
|
|
57
59
|
icon={menuShown ? 'close' : 'call-end'}
|
|
58
|
-
variant=
|
|
60
|
+
variant="destructive"
|
|
59
61
|
data-testid="leave-call-button"
|
|
60
62
|
ref={ref}
|
|
61
63
|
/>
|
|
@@ -66,6 +68,7 @@ const CancelCallToggleMenuButton = forwardRef<
|
|
|
66
68
|
export type CancelCallButtonProps = {
|
|
67
69
|
disabled?: boolean;
|
|
68
70
|
caption?: string;
|
|
71
|
+
size?: ButtonProps['size'];
|
|
69
72
|
onClick?: MouseEventHandler<HTMLButtonElement>;
|
|
70
73
|
onLeave?: (err?: Error) => void;
|
|
71
74
|
};
|
|
@@ -120,6 +123,7 @@ export const CancelCallConfirmButton = ({
|
|
|
120
123
|
export const CancelCallButton = ({
|
|
121
124
|
disabled,
|
|
122
125
|
caption,
|
|
126
|
+
size,
|
|
123
127
|
onClick,
|
|
124
128
|
onLeave,
|
|
125
129
|
}: CancelCallButtonProps) => {
|
|
@@ -143,10 +147,14 @@ export const CancelCallButton = ({
|
|
|
143
147
|
);
|
|
144
148
|
return (
|
|
145
149
|
<IconButton
|
|
150
|
+
size={size}
|
|
146
151
|
disabled={disabled}
|
|
147
152
|
icon="call-end"
|
|
148
|
-
variant="
|
|
149
|
-
title={
|
|
153
|
+
variant="destructive"
|
|
154
|
+
title={
|
|
155
|
+
caption ??
|
|
156
|
+
t('callControls.cancelCallButton.leaveCall.title', 'Leave call')
|
|
157
|
+
}
|
|
150
158
|
data-testid="cancel-call-button"
|
|
151
159
|
onClick={handleClick}
|
|
152
160
|
/>
|
|
@@ -2,7 +2,8 @@ import { forwardRef } from 'react';
|
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
|
|
4
4
|
import { OwnCapability, StreamReaction } from '@stream-io/video-client';
|
|
5
|
-
import { Restricted, useCall
|
|
5
|
+
import { Restricted, useCall } from '@stream-io/video-react-bindings';
|
|
6
|
+
import { useI18n } from '../../i18n';
|
|
6
7
|
|
|
7
8
|
import {
|
|
8
9
|
MenuToggle,
|
|
@@ -69,8 +70,11 @@ const ToggleReactionsMenuButton = forwardRef<
|
|
|
69
70
|
>(function ToggleReactionsMenuButtonRender({ menuShown }, ref) {
|
|
70
71
|
const { t } = useI18n();
|
|
71
72
|
return (
|
|
72
|
-
<WithTooltip
|
|
73
|
-
|
|
73
|
+
<WithTooltip
|
|
74
|
+
title={t('callControls.reactionsButton.reactions.title', 'Reactions')}
|
|
75
|
+
tooltipDisabled={menuShown}
|
|
76
|
+
>
|
|
77
|
+
<CompositeButton ref={ref} active={menuShown}>
|
|
74
78
|
<Icon icon="reactions" />
|
|
75
79
|
</CompositeButton>
|
|
76
80
|
</WithTooltip>
|
|
@@ -3,10 +3,10 @@ import { forwardRef } from 'react';
|
|
|
3
3
|
import { OwnCapability } from '@stream-io/video-client';
|
|
4
4
|
import {
|
|
5
5
|
Restricted,
|
|
6
|
-
useI18n,
|
|
7
6
|
useToggleCallRecording,
|
|
8
7
|
} from '@stream-io/video-react-bindings';
|
|
9
|
-
import {
|
|
8
|
+
import { useI18n } from '../../i18n';
|
|
9
|
+
import { Button, CompositeButton } from '../Button/';
|
|
10
10
|
import { Icon } from '../Icon';
|
|
11
11
|
import {
|
|
12
12
|
MenuToggle,
|
|
@@ -37,23 +37,38 @@ const RecordEndConfirmation = (props: PropsWithErrorHandler) => {
|
|
|
37
37
|
<div className="str-video__end-recording__confirmation">
|
|
38
38
|
<div className="str-video__end-recording__header">
|
|
39
39
|
<Icon icon="recording-on" />
|
|
40
|
-
<
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
<div className="str-video__end-recording__text">
|
|
41
|
+
<h2 className="str-video__end-recording__heading">
|
|
42
|
+
{t(
|
|
43
|
+
'callControls.recordCallButton.endRecording.title',
|
|
44
|
+
'End recording',
|
|
45
|
+
)}
|
|
46
|
+
</h2>
|
|
47
|
+
<p className="str-video__end-recording__description">
|
|
48
|
+
{t(
|
|
49
|
+
'callControls.recordCallButton.confirmEndRecording.description',
|
|
50
|
+
'Are you sure you want end the recording?',
|
|
51
|
+
)}
|
|
52
|
+
</p>
|
|
53
|
+
</div>
|
|
43
54
|
</div>
|
|
44
|
-
<p className="str-video__end-recording__description">
|
|
45
|
-
{t('Are you sure you want end the recording?')}
|
|
46
|
-
</p>
|
|
47
55
|
<div className="str-video__end-recording__actions">
|
|
48
|
-
<
|
|
49
|
-
|
|
50
|
-
</CompositeButton>
|
|
51
|
-
<CompositeButton
|
|
52
|
-
variant="primary"
|
|
56
|
+
<Button
|
|
57
|
+
variant="destructive"
|
|
53
58
|
onClick={isAwaitingResponse ? undefined : handleClick}
|
|
54
59
|
>
|
|
55
|
-
{isAwaitingResponse ?
|
|
56
|
-
|
|
60
|
+
{isAwaitingResponse ? (
|
|
61
|
+
<LoadingIndicator />
|
|
62
|
+
) : (
|
|
63
|
+
t(
|
|
64
|
+
'callControls.recordCallButton.endRecording.title',
|
|
65
|
+
'End recording',
|
|
66
|
+
)
|
|
67
|
+
)}
|
|
68
|
+
</Button>
|
|
69
|
+
<Button variant="secondary" appearance="outline" onClick={close}>
|
|
70
|
+
{t('common.cancel.label', 'Cancel')}
|
|
71
|
+
</Button>
|
|
57
72
|
</div>
|
|
58
73
|
</div>
|
|
59
74
|
);
|
|
@@ -67,7 +82,7 @@ const ToggleEndRecordingMenuButton = forwardRef<
|
|
|
67
82
|
<CompositeButton
|
|
68
83
|
ref={ref}
|
|
69
84
|
active={true}
|
|
70
|
-
variant="
|
|
85
|
+
variant="destructive"
|
|
71
86
|
data-testid="recording-stop-button"
|
|
72
87
|
>
|
|
73
88
|
<Icon icon="recording-off" />
|
|
@@ -104,8 +119,12 @@ export const RecordCallConfirmationButton = (
|
|
|
104
119
|
}
|
|
105
120
|
|
|
106
121
|
const title = isAwaitingResponse
|
|
107
|
-
? t(
|
|
108
|
-
|
|
122
|
+
? t(
|
|
123
|
+
'callControls.recordCallButton.waitingRecordingStart.title',
|
|
124
|
+
'Waiting for recording to start...',
|
|
125
|
+
)
|
|
126
|
+
: (caption ??
|
|
127
|
+
t('callControls.recordCallButton.recordCall.title', 'Record call'));
|
|
109
128
|
|
|
110
129
|
return (
|
|
111
130
|
<Restricted
|
|
@@ -118,7 +137,7 @@ export const RecordCallConfirmationButton = (
|
|
|
118
137
|
<CompositeButton
|
|
119
138
|
active={isCallRecordingInProgress}
|
|
120
139
|
caption={caption}
|
|
121
|
-
variant=
|
|
140
|
+
variant={isCallRecordingInProgress ? 'destructive' : 'secondary'}
|
|
122
141
|
data-testid="recording-start-button"
|
|
123
142
|
onClick={isAwaitingResponse ? undefined : handleClick}
|
|
124
143
|
>
|
|
@@ -141,12 +160,20 @@ export const RecordCallButton = (props: RecordCallButtonProps) => {
|
|
|
141
160
|
|
|
142
161
|
const handleClick = createCallControlHandler(props, toggleCallRecording);
|
|
143
162
|
|
|
144
|
-
let title =
|
|
163
|
+
let title =
|
|
164
|
+
caption ??
|
|
165
|
+
t('callControls.recordCallButton.recordCall.title', 'Record call');
|
|
145
166
|
|
|
146
167
|
if (isAwaitingResponse) {
|
|
147
168
|
title = isCallRecordingInProgress
|
|
148
|
-
? t(
|
|
149
|
-
|
|
169
|
+
? t(
|
|
170
|
+
'callControls.recordCallButton.waitingRecordingStop.title',
|
|
171
|
+
'Waiting for recording to stop...',
|
|
172
|
+
)
|
|
173
|
+
: t(
|
|
174
|
+
'callControls.recordCallButton.waitingRecordingStart.title',
|
|
175
|
+
'Waiting for recording to start...',
|
|
176
|
+
);
|
|
150
177
|
}
|
|
151
178
|
|
|
152
179
|
return (
|
|
@@ -159,7 +186,7 @@ export const RecordCallButton = (props: RecordCallButtonProps) => {
|
|
|
159
186
|
<CompositeButton
|
|
160
187
|
active={isCallRecordingInProgress}
|
|
161
188
|
caption={caption}
|
|
162
|
-
variant=
|
|
189
|
+
variant={isCallRecordingInProgress ? 'destructive' : 'secondary'}
|
|
163
190
|
data-testid={
|
|
164
191
|
isCallRecordingInProgress
|
|
165
192
|
? 'recording-stop-button'
|
|
@@ -5,9 +5,9 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
Restricted,
|
|
7
7
|
useCallStateHooks,
|
|
8
|
-
useI18n,
|
|
9
8
|
UseInputMediaDeviceOptions,
|
|
10
9
|
} from '@stream-io/video-react-bindings';
|
|
10
|
+
import { useI18n } from '../../i18n';
|
|
11
11
|
import { CompositeButton } from '../Button/';
|
|
12
12
|
import { PermissionNotification } from '../Notification';
|
|
13
13
|
import { useRequestPermission } from '../../hooks';
|
|
@@ -59,15 +59,36 @@ export const ScreenShareButton = (props: ScreenShareButtonProps) => {
|
|
|
59
59
|
<PermissionNotification
|
|
60
60
|
permission={OwnCapability.SCREENSHARE}
|
|
61
61
|
isAwaitingApproval={isAwaitingPermission}
|
|
62
|
-
messageApproved={t(
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
messageApproved={t(
|
|
63
|
+
'callControls.screenShareButton.permissionGranted.text',
|
|
64
|
+
'You can now share your screen.',
|
|
65
|
+
)}
|
|
66
|
+
messageAwaitingApproval={t(
|
|
67
|
+
'callControls.screenShareButton.awaitingApproval.text',
|
|
68
|
+
'Awaiting for an approval to share screen.',
|
|
69
|
+
)}
|
|
70
|
+
messageRevoked={t(
|
|
71
|
+
'callControls.screenShareButton.permissionRevoked.text',
|
|
72
|
+
'You can no longer share your screen.',
|
|
73
|
+
)}
|
|
65
74
|
>
|
|
66
|
-
<WithTooltip
|
|
75
|
+
<WithTooltip
|
|
76
|
+
title={
|
|
77
|
+
caption ??
|
|
78
|
+
t(
|
|
79
|
+
'callControls.screenShareButton.shareScreen.title',
|
|
80
|
+
'Share screen',
|
|
81
|
+
)
|
|
82
|
+
}
|
|
83
|
+
>
|
|
67
84
|
<CompositeButton
|
|
68
85
|
active={isSomeoneScreenSharing || amIScreenSharing}
|
|
69
86
|
caption={caption}
|
|
70
|
-
variant=
|
|
87
|
+
variant={
|
|
88
|
+
isSomeoneScreenSharing || amIScreenSharing
|
|
89
|
+
? 'primary'
|
|
90
|
+
: 'secondary'
|
|
91
|
+
}
|
|
71
92
|
data-testid={
|
|
72
93
|
isSomeoneScreenSharing
|
|
73
94
|
? 'screen-share-stop-button'
|
|
@@ -6,11 +6,12 @@ import {
|
|
|
6
6
|
import {
|
|
7
7
|
Restricted,
|
|
8
8
|
useCallStateHooks,
|
|
9
|
-
useI18n,
|
|
10
9
|
type UseInputMediaDeviceOptions,
|
|
11
10
|
} from '@stream-io/video-react-bindings';
|
|
11
|
+
import { useI18n } from '../../i18n';
|
|
12
12
|
import clsx from 'clsx';
|
|
13
|
-
import {
|
|
13
|
+
import { Badge } from '../Badge';
|
|
14
|
+
import { CompositeButton, CompositeButtonProps } from '../Button';
|
|
14
15
|
import { DeviceSelectorAudioInput } from '../DeviceSettings';
|
|
15
16
|
import { PermissionNotification } from '../Notification';
|
|
16
17
|
import { useRequestPermission } from '../../hooks';
|
|
@@ -24,7 +25,7 @@ import {
|
|
|
24
25
|
|
|
25
26
|
export type ToggleAudioPreviewButtonProps = PropsWithErrorHandler<
|
|
26
27
|
Pick<
|
|
27
|
-
|
|
28
|
+
CompositeButtonProps,
|
|
28
29
|
'caption' | 'Menu' | 'menuPlacement' | 'onMenuToggle'
|
|
29
30
|
> &
|
|
30
31
|
UseInputMediaDeviceOptions
|
|
@@ -62,11 +63,20 @@ export const ToggleAudioPreviewButton = (
|
|
|
62
63
|
return (
|
|
63
64
|
<WithTooltip
|
|
64
65
|
title={
|
|
65
|
-
|
|
66
|
-
? t('
|
|
67
|
-
:
|
|
68
|
-
? t(
|
|
69
|
-
|
|
66
|
+
isPromptingPermission
|
|
67
|
+
? t('common.waitingForPermission.title', 'Waiting for permission')
|
|
68
|
+
: !hasBrowserPermission
|
|
69
|
+
? t(
|
|
70
|
+
'callControls.toggleAudioButton.checkBrowserAudioPermissions.title',
|
|
71
|
+
'Check your browser audio permissions',
|
|
72
|
+
)
|
|
73
|
+
: isSystemMuted
|
|
74
|
+
? t(
|
|
75
|
+
'callControls.toggleAudioButton.microphonePausedBySystem.title',
|
|
76
|
+
'Microphone is paused by your system',
|
|
77
|
+
)
|
|
78
|
+
: (caption ??
|
|
79
|
+
t('callControls.toggleAudioButton.mic.title', 'Mic'))
|
|
70
80
|
}
|
|
71
81
|
tooltipDisabled={tooltipDisabled}
|
|
72
82
|
>
|
|
@@ -76,7 +86,7 @@ export const ToggleAudioPreviewButton = (
|
|
|
76
86
|
className={clsx(
|
|
77
87
|
!hasBrowserPermission && 'str-video__device-unavailable',
|
|
78
88
|
)}
|
|
79
|
-
variant=
|
|
89
|
+
variant={optionsAwareIsMute ? 'destructive' : 'secondary'}
|
|
80
90
|
disabled={
|
|
81
91
|
!hasBrowserPermission || (!optimisticUpdates && isTogglePending)
|
|
82
92
|
}
|
|
@@ -95,27 +105,11 @@ export const ToggleAudioPreviewButton = (
|
|
|
95
105
|
}}
|
|
96
106
|
>
|
|
97
107
|
<Icon icon={!optionsAwareIsMute ? 'mic' : 'mic-off'} />
|
|
98
|
-
{
|
|
99
|
-
<
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
/>
|
|
104
|
-
)}
|
|
105
|
-
{isPromptingPermission && (
|
|
106
|
-
<span
|
|
107
|
-
className="str-video__pending-permission"
|
|
108
|
-
title={t('Waiting for permission')}
|
|
109
|
-
children="?"
|
|
110
|
-
/>
|
|
111
|
-
)}
|
|
112
|
-
{isSystemMuted && hasBrowserPermission && (
|
|
113
|
-
<span
|
|
114
|
-
className="str-video__system-muted"
|
|
115
|
-
title={t('Microphone is paused by your system')}
|
|
116
|
-
children="!"
|
|
117
|
-
/>
|
|
118
|
-
)}
|
|
108
|
+
{isPromptingPermission ? (
|
|
109
|
+
<Badge variant="error" icon="question-mark-fill" />
|
|
110
|
+
) : !hasBrowserPermission || isSystemMuted ? (
|
|
111
|
+
<Badge variant="error" icon="exclamation-mark-fill" />
|
|
112
|
+
) : null}
|
|
119
113
|
</CompositeButton>
|
|
120
114
|
</WithTooltip>
|
|
121
115
|
);
|
|
@@ -123,7 +117,7 @@ export const ToggleAudioPreviewButton = (
|
|
|
123
117
|
|
|
124
118
|
export type ToggleAudioPublishingButtonProps = PropsWithErrorHandler<
|
|
125
119
|
Pick<
|
|
126
|
-
|
|
120
|
+
CompositeButtonProps,
|
|
127
121
|
'caption' | 'Menu' | 'menuPlacement' | 'onMenuToggle'
|
|
128
122
|
> &
|
|
129
123
|
UseInputMediaDeviceOptions
|
|
@@ -172,26 +166,47 @@ export const ToggleAudioPublishingButton = (
|
|
|
172
166
|
<PermissionNotification
|
|
173
167
|
permission={OwnCapability.SEND_AUDIO}
|
|
174
168
|
isAwaitingApproval={isAwaitingPermission}
|
|
175
|
-
messageApproved={t(
|
|
176
|
-
|
|
177
|
-
|
|
169
|
+
messageApproved={t(
|
|
170
|
+
'callControls.toggleAudioButton.permissionGranted.text',
|
|
171
|
+
'You can now speak.',
|
|
172
|
+
)}
|
|
173
|
+
messageAwaitingApproval={t(
|
|
174
|
+
'callControls.toggleAudioButton.awaitingApproval.text',
|
|
175
|
+
'Awaiting for an approval to speak.',
|
|
176
|
+
)}
|
|
177
|
+
messageRevoked={t(
|
|
178
|
+
'callControls.toggleAudioButton.permissionRevoked.text',
|
|
179
|
+
'You can no longer speak.',
|
|
180
|
+
)}
|
|
178
181
|
>
|
|
179
182
|
<WithTooltip
|
|
180
183
|
title={
|
|
181
|
-
|
|
182
|
-
? t('
|
|
183
|
-
: !
|
|
184
|
-
? t(
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
184
|
+
isPromptingPermission
|
|
185
|
+
? t('common.waitingForPermission.title', 'Waiting for permission')
|
|
186
|
+
: !hasPermission
|
|
187
|
+
? t(
|
|
188
|
+
'callControls.toggleAudioButton.noPermissionToShareAudio.title',
|
|
189
|
+
'You have no permission to share your audio',
|
|
190
|
+
)
|
|
191
|
+
: !hasBrowserPermission
|
|
192
|
+
? t(
|
|
193
|
+
'callControls.toggleAudioButton.checkBrowserMicPermissions.title',
|
|
194
|
+
'Check your browser mic permissions',
|
|
195
|
+
)
|
|
196
|
+
: isSystemMuted
|
|
197
|
+
? t(
|
|
198
|
+
'callControls.toggleAudioButton.microphonePausedBySystem.title',
|
|
199
|
+
'Microphone is paused by your system',
|
|
200
|
+
)
|
|
201
|
+
: (caption ??
|
|
202
|
+
t('callControls.toggleAudioButton.mic.title', 'Mic'))
|
|
188
203
|
}
|
|
189
204
|
tooltipDisabled={tooltipDisabled}
|
|
190
205
|
>
|
|
191
206
|
<CompositeButton
|
|
192
207
|
active={optionsAwareIsMute}
|
|
193
208
|
caption={caption}
|
|
194
|
-
variant=
|
|
209
|
+
variant={optionsAwareIsMute ? 'destructive' : 'secondary'}
|
|
195
210
|
disabled={
|
|
196
211
|
!hasBrowserPermission ||
|
|
197
212
|
!hasPermission ||
|
|
@@ -212,25 +227,11 @@ export const ToggleAudioPublishingButton = (
|
|
|
212
227
|
}}
|
|
213
228
|
>
|
|
214
229
|
<Icon icon={optionsAwareIsMute ? 'mic-off' : 'mic'} />
|
|
215
|
-
{
|
|
216
|
-
<
|
|
217
|
-
)
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
className="str-video__pending-permission"
|
|
221
|
-
title={t('Waiting for permission')}
|
|
222
|
-
>
|
|
223
|
-
?
|
|
224
|
-
</span>
|
|
225
|
-
)}
|
|
226
|
-
{isSystemMuted && hasBrowserPermission && hasPermission && (
|
|
227
|
-
<span
|
|
228
|
-
className="str-video__system-muted"
|
|
229
|
-
title={t('Microphone is paused by your system')}
|
|
230
|
-
>
|
|
231
|
-
!
|
|
232
|
-
</span>
|
|
233
|
-
)}
|
|
230
|
+
{isPromptingPermission ? (
|
|
231
|
+
<Badge variant="error" icon="question-mark-fill" />
|
|
232
|
+
) : !hasBrowserPermission || !hasPermission || isSystemMuted ? (
|
|
233
|
+
<Badge variant="error" icon="exclamation-mark-fill" />
|
|
234
|
+
) : null}
|
|
234
235
|
</CompositeButton>
|
|
235
236
|
</WithTooltip>
|
|
236
237
|
</PermissionNotification>
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { CompositeButton,
|
|
2
|
-
import { useI18n } from '
|
|
1
|
+
import { CompositeButton, CompositeButtonProps } from '../Button';
|
|
2
|
+
import { useI18n } from '../../i18n';
|
|
3
3
|
import { Icon } from '../Icon';
|
|
4
4
|
import { DeviceSelectorAudioOutput } from '../DeviceSettings';
|
|
5
5
|
import { WithTooltip } from '../Tooltip';
|
|
6
6
|
import { useState } from 'react';
|
|
7
7
|
|
|
8
8
|
export type ToggleAudioOutputButtonProps = Pick<
|
|
9
|
-
|
|
9
|
+
CompositeButtonProps,
|
|
10
10
|
'caption' | 'Menu' | 'menuPlacement' | 'onMenuToggle'
|
|
11
11
|
>;
|
|
12
12
|
|
|
@@ -24,7 +24,10 @@ export const ToggleAudioOutputButton = (
|
|
|
24
24
|
|
|
25
25
|
return (
|
|
26
26
|
<WithTooltip
|
|
27
|
-
title={
|
|
27
|
+
title={
|
|
28
|
+
caption ||
|
|
29
|
+
t('callControls.toggleAudioOutputButton.speakers.title', 'Speakers')
|
|
30
|
+
}
|
|
28
31
|
tooltipDisabled={tooltipDisabled}
|
|
29
32
|
>
|
|
30
33
|
<CompositeButton
|