@werxt/livekit-components-react 2.9.20
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/LICENSE +201 -0
- package/README.md +36 -0
- package/dist/assets/icons/CameraDisabledIcon.d.ts +11 -0
- package/dist/assets/icons/CameraDisabledIcon.d.ts.map +1 -0
- package/dist/assets/icons/CameraIcon.d.ts +11 -0
- package/dist/assets/icons/CameraIcon.d.ts.map +1 -0
- package/dist/assets/icons/ChatCloseIcon.d.ts +11 -0
- package/dist/assets/icons/ChatCloseIcon.d.ts.map +1 -0
- package/dist/assets/icons/ChatIcon.d.ts +11 -0
- package/dist/assets/icons/ChatIcon.d.ts.map +1 -0
- package/dist/assets/icons/Chevron.d.ts +11 -0
- package/dist/assets/icons/Chevron.d.ts.map +1 -0
- package/dist/assets/icons/FocusToggleIcon.d.ts +11 -0
- package/dist/assets/icons/FocusToggleIcon.d.ts.map +1 -0
- package/dist/assets/icons/GearIcon.d.ts +11 -0
- package/dist/assets/icons/GearIcon.d.ts.map +1 -0
- package/dist/assets/icons/LeaveIcon.d.ts +11 -0
- package/dist/assets/icons/LeaveIcon.d.ts.map +1 -0
- package/dist/assets/icons/LockLockedIcon.d.ts +11 -0
- package/dist/assets/icons/LockLockedIcon.d.ts.map +1 -0
- package/dist/assets/icons/MicDisabledIcon.d.ts +11 -0
- package/dist/assets/icons/MicDisabledIcon.d.ts.map +1 -0
- package/dist/assets/icons/MicIcon.d.ts +11 -0
- package/dist/assets/icons/MicIcon.d.ts.map +1 -0
- package/dist/assets/icons/QualityExcellentIcon.d.ts +11 -0
- package/dist/assets/icons/QualityExcellentIcon.d.ts.map +1 -0
- package/dist/assets/icons/QualityGoodIcon.d.ts +11 -0
- package/dist/assets/icons/QualityGoodIcon.d.ts.map +1 -0
- package/dist/assets/icons/QualityPoorIcon.d.ts +11 -0
- package/dist/assets/icons/QualityPoorIcon.d.ts.map +1 -0
- package/dist/assets/icons/QualityUnknownIcon.d.ts +11 -0
- package/dist/assets/icons/QualityUnknownIcon.d.ts.map +1 -0
- package/dist/assets/icons/ScreenShareIcon.d.ts +11 -0
- package/dist/assets/icons/ScreenShareIcon.d.ts.map +1 -0
- package/dist/assets/icons/ScreenShareStopIcon.d.ts +11 -0
- package/dist/assets/icons/ScreenShareStopIcon.d.ts.map +1 -0
- package/dist/assets/icons/SpinnerIcon.d.ts +11 -0
- package/dist/assets/icons/SpinnerIcon.d.ts.map +1 -0
- package/dist/assets/icons/UnfocusToggleIcon.d.ts +11 -0
- package/dist/assets/icons/UnfocusToggleIcon.d.ts.map +1 -0
- package/dist/assets/icons/index.d.ts +20 -0
- package/dist/assets/icons/index.d.ts.map +1 -0
- package/dist/assets/icons/util.d.ts +11 -0
- package/dist/assets/icons/util.d.ts.map +1 -0
- package/dist/assets/images/ParticipantPlaceholder.d.ts +11 -0
- package/dist/assets/images/ParticipantPlaceholder.d.ts.map +1 -0
- package/dist/assets/images/index.d.ts +2 -0
- package/dist/assets/images/index.d.ts.map +1 -0
- package/dist/components/ChatEntry.d.ts +35 -0
- package/dist/components/ChatEntry.d.ts.map +1 -0
- package/dist/components/ConnectionState.d.ts +23 -0
- package/dist/components/ConnectionState.d.ts.map +1 -0
- package/dist/components/ConnectionStateToast.d.ts +13 -0
- package/dist/components/ConnectionStateToast.d.ts.map +1 -0
- package/dist/components/LiveKitRoom.d.ts +92 -0
- package/dist/components/LiveKitRoom.d.ts.map +1 -0
- package/dist/components/ParticipantLoop.d.ts +28 -0
- package/dist/components/ParticipantLoop.d.ts.map +1 -0
- package/dist/components/RoomAudioRenderer.d.ts +29 -0
- package/dist/components/RoomAudioRenderer.d.ts.map +1 -0
- package/dist/components/RoomName.d.ts +20 -0
- package/dist/components/RoomName.d.ts.map +1 -0
- package/dist/components/SessionProvider.d.ts +13 -0
- package/dist/components/SessionProvider.d.ts.map +1 -0
- package/dist/components/Toast.d.ts +14 -0
- package/dist/components/Toast.d.ts.map +1 -0
- package/dist/components/TrackLoop.d.ts +26 -0
- package/dist/components/TrackLoop.d.ts.map +1 -0
- package/dist/components/controls/ChatToggle.d.ts +19 -0
- package/dist/components/controls/ChatToggle.d.ts.map +1 -0
- package/dist/components/controls/ClearPinButton.d.ts +20 -0
- package/dist/components/controls/ClearPinButton.d.ts.map +1 -0
- package/dist/components/controls/DisconnectButton.d.ts +19 -0
- package/dist/components/controls/DisconnectButton.d.ts.map +1 -0
- package/dist/components/controls/FocusToggle.d.ts +21 -0
- package/dist/components/controls/FocusToggle.d.ts.map +1 -0
- package/dist/components/controls/MediaDeviceSelect.d.ts +40 -0
- package/dist/components/controls/MediaDeviceSelect.d.ts.map +1 -0
- package/dist/components/controls/PaginationControl.d.ts +9 -0
- package/dist/components/controls/PaginationControl.d.ts.map +1 -0
- package/dist/components/controls/PaginationIndicator.d.ts +7 -0
- package/dist/components/controls/PaginationIndicator.d.ts.map +1 -0
- package/dist/components/controls/SettingsMenuToggle.d.ts +13 -0
- package/dist/components/controls/SettingsMenuToggle.d.ts.map +1 -0
- package/dist/components/controls/StartAudio.d.ts +24 -0
- package/dist/components/controls/StartAudio.d.ts.map +1 -0
- package/dist/components/controls/StartMediaButton.d.ts +22 -0
- package/dist/components/controls/StartMediaButton.d.ts.map +1 -0
- package/dist/components/controls/TrackToggle.d.ts +32 -0
- package/dist/components/controls/TrackToggle.d.ts.map +1 -0
- package/dist/components/index.d.ts +30 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/layout/CarouselLayout.d.ts +27 -0
- package/dist/components/layout/CarouselLayout.d.ts.map +1 -0
- package/dist/components/layout/FocusLayout.d.ts +25 -0
- package/dist/components/layout/FocusLayout.d.ts.map +1 -0
- package/dist/components/layout/GridLayout.d.ts +26 -0
- package/dist/components/layout/GridLayout.d.ts.map +1 -0
- package/dist/components/layout/LayoutContextProvider.d.ts +12 -0
- package/dist/components/layout/LayoutContextProvider.d.ts.map +1 -0
- package/dist/components/layout/index.d.ts +4 -0
- package/dist/components/layout/index.d.ts.map +1 -0
- package/dist/components/participant/AudioTrack.d.ts +33 -0
- package/dist/components/participant/AudioTrack.d.ts.map +1 -0
- package/dist/components/participant/AudioVisualizer.d.ts +22 -0
- package/dist/components/participant/AudioVisualizer.d.ts.map +1 -0
- package/dist/components/participant/BarVisualizer.d.ts +77 -0
- package/dist/components/participant/BarVisualizer.d.ts.map +1 -0
- package/dist/components/participant/ConnectionQualityIndicator.d.ts +16 -0
- package/dist/components/participant/ConnectionQualityIndicator.d.ts.map +1 -0
- package/dist/components/participant/ParticipantAudioTile.d.ts +14 -0
- package/dist/components/participant/ParticipantAudioTile.d.ts.map +1 -0
- package/dist/components/participant/ParticipantName.d.ts +17 -0
- package/dist/components/participant/ParticipantName.d.ts.map +1 -0
- package/dist/components/participant/ParticipantTile.d.ts +49 -0
- package/dist/components/participant/ParticipantTile.d.ts.map +1 -0
- package/dist/components/participant/TrackMutedIndicator.d.ts +19 -0
- package/dist/components/participant/TrackMutedIndicator.d.ts.map +1 -0
- package/dist/components/participant/VideoTrack.d.ts +23 -0
- package/dist/components/participant/VideoTrack.d.ts.map +1 -0
- package/dist/components/participant/animationSequences/connectingSequence.d.ts +2 -0
- package/dist/components/participant/animationSequences/connectingSequence.d.ts.map +1 -0
- package/dist/components/participant/animationSequences/listeningSequence.d.ts +2 -0
- package/dist/components/participant/animationSequences/listeningSequence.d.ts.map +1 -0
- package/dist/components/participant/animationSequences/thinkingSequence.d.ts +2 -0
- package/dist/components/participant/animationSequences/thinkingSequence.d.ts.map +1 -0
- package/dist/components/participant/animators/useBarAnimator.d.ts +3 -0
- package/dist/components/participant/animators/useBarAnimator.d.ts.map +1 -0
- package/dist/components-lNrIMTWQ.mjs +1051 -0
- package/dist/components-lNrIMTWQ.mjs.map +1 -0
- package/dist/context/chat-context.d.ts +23 -0
- package/dist/context/chat-context.d.ts.map +1 -0
- package/dist/context/feature-context.d.ts +14 -0
- package/dist/context/feature-context.d.ts.map +1 -0
- package/dist/context/index.d.ts +10 -0
- package/dist/context/index.d.ts.map +1 -0
- package/dist/context/layout-context.d.ts +32 -0
- package/dist/context/layout-context.d.ts.map +1 -0
- package/dist/context/participant-context.d.ts +22 -0
- package/dist/context/participant-context.d.ts.map +1 -0
- package/dist/context/pin-context.d.ts +17 -0
- package/dist/context/pin-context.d.ts.map +1 -0
- package/dist/context/room-context.d.ts +22 -0
- package/dist/context/room-context.d.ts.map +1 -0
- package/dist/context/session-context.d.ts +22 -0
- package/dist/context/session-context.d.ts.map +1 -0
- package/dist/context/track-reference-context.d.ts +25 -0
- package/dist/context/track-reference-context.d.ts.map +1 -0
- package/dist/contexts-D4V9wQRc.mjs +4026 -0
- package/dist/contexts-D4V9wQRc.mjs.map +1 -0
- package/dist/hooks/cloud/krisp/useKrispNoiseFilter.d.ts +42 -0
- package/dist/hooks/cloud/krisp/useKrispNoiseFilter.d.ts.map +1 -0
- package/dist/hooks/index.d.ts +54 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/internal/index.d.ts +10 -0
- package/dist/hooks/internal/index.d.ts.map +1 -0
- package/dist/hooks/internal/useMediaQuery.d.ts +7 -0
- package/dist/hooks/internal/useMediaQuery.d.ts.map +1 -0
- package/dist/hooks/internal/useObservableState.d.ts +6 -0
- package/dist/hooks/internal/useObservableState.d.ts.map +1 -0
- package/dist/hooks/internal/useResizeObserver.d.ts +14 -0
- package/dist/hooks/internal/useResizeObserver.d.ts.map +1 -0
- package/dist/hooks/useAgent.d.ts +219 -0
- package/dist/hooks/useAgent.d.ts.map +1 -0
- package/dist/hooks/useAudioPlayback.d.ts +15 -0
- package/dist/hooks/useAudioPlayback.d.ts.map +1 -0
- package/dist/hooks/useChat.d.ts +43 -0
- package/dist/hooks/useChat.d.ts.map +1 -0
- package/dist/hooks/useChatToggle.d.ts +21 -0
- package/dist/hooks/useChatToggle.d.ts.map +1 -0
- package/dist/hooks/useClearPinButton.d.ts +15 -0
- package/dist/hooks/useClearPinButton.d.ts.map +1 -0
- package/dist/hooks/useConnectionQualityIndicator.d.ts +20 -0
- package/dist/hooks/useConnectionQualityIndicator.d.ts.map +1 -0
- package/dist/hooks/useConnectionStatus.d.ts +12 -0
- package/dist/hooks/useConnectionStatus.d.ts.map +1 -0
- package/dist/hooks/useDataChannel.d.ts +38 -0
- package/dist/hooks/useDataChannel.d.ts.map +1 -0
- package/dist/hooks/useDisconnectButton.d.ts +21 -0
- package/dist/hooks/useDisconnectButton.d.ts.map +1 -0
- package/dist/hooks/useEvents.d.ts +9 -0
- package/dist/hooks/useEvents.d.ts.map +1 -0
- package/dist/hooks/useFacingMode.d.ts +10 -0
- package/dist/hooks/useFacingMode.d.ts.map +1 -0
- package/dist/hooks/useFocusToggle.d.ts +26 -0
- package/dist/hooks/useFocusToggle.d.ts.map +1 -0
- package/dist/hooks/useGridLayout.d.ts +27 -0
- package/dist/hooks/useGridLayout.d.ts.map +1 -0
- package/dist/hooks/useIsEncrypted.d.ts +12 -0
- package/dist/hooks/useIsEncrypted.d.ts.map +1 -0
- package/dist/hooks/useIsMuted.d.ts +22 -0
- package/dist/hooks/useIsMuted.d.ts.map +1 -0
- package/dist/hooks/useIsRecording.d.ts +11 -0
- package/dist/hooks/useIsRecording.d.ts.map +1 -0
- package/dist/hooks/useIsSpeaking.d.ts +11 -0
- package/dist/hooks/useIsSpeaking.d.ts.map +1 -0
- package/dist/hooks/useLiveKitRoom.d.ts +19 -0
- package/dist/hooks/useLiveKitRoom.d.ts.map +1 -0
- package/dist/hooks/useLocalParticipant.d.ts +29 -0
- package/dist/hooks/useLocalParticipant.d.ts.map +1 -0
- package/dist/hooks/useLocalParticipantPermissions.d.ts +12 -0
- package/dist/hooks/useLocalParticipantPermissions.d.ts.map +1 -0
- package/dist/hooks/useMediaDeviceSelect.d.ts +41 -0
- package/dist/hooks/useMediaDeviceSelect.d.ts.map +1 -0
- package/dist/hooks/useMediaDevices.d.ts +15 -0
- package/dist/hooks/useMediaDevices.d.ts.map +1 -0
- package/dist/hooks/useMediaTrackBySourceOrName.d.ts +18 -0
- package/dist/hooks/useMediaTrackBySourceOrName.d.ts.map +1 -0
- package/dist/hooks/usePagination.d.ts +24 -0
- package/dist/hooks/usePagination.d.ts.map +1 -0
- package/dist/hooks/useParticipantAttributes.d.ts +30 -0
- package/dist/hooks/useParticipantAttributes.d.ts.map +1 -0
- package/dist/hooks/useParticipantInfo.d.ts +21 -0
- package/dist/hooks/useParticipantInfo.d.ts.map +1 -0
- package/dist/hooks/useParticipantPermissions.d.ts +17 -0
- package/dist/hooks/useParticipantPermissions.d.ts.map +1 -0
- package/dist/hooks/useParticipantTile.d.ts +22 -0
- package/dist/hooks/useParticipantTile.d.ts.map +1 -0
- package/dist/hooks/useParticipantTracks.d.ts +14 -0
- package/dist/hooks/useParticipantTracks.d.ts.map +1 -0
- package/dist/hooks/useParticipants.d.ts +30 -0
- package/dist/hooks/useParticipants.d.ts.map +1 -0
- package/dist/hooks/usePersistentUserChoices.d.ts +35 -0
- package/dist/hooks/usePersistentUserChoices.d.ts.map +1 -0
- package/dist/hooks/usePinnedTracks.d.ts +14 -0
- package/dist/hooks/usePinnedTracks.d.ts.map +1 -0
- package/dist/hooks/useRemoteParticipant.d.ts +35 -0
- package/dist/hooks/useRemoteParticipant.d.ts.map +1 -0
- package/dist/hooks/useRemoteParticipants.d.ts +30 -0
- package/dist/hooks/useRemoteParticipants.d.ts.map +1 -0
- package/dist/hooks/useRoomInfo.d.ts +21 -0
- package/dist/hooks/useRoomInfo.d.ts.map +1 -0
- package/dist/hooks/useSequentialRoomConnectDisconnect.d.ts +27 -0
- package/dist/hooks/useSequentialRoomConnectDisconnect.d.ts.map +1 -0
- package/dist/hooks/useSession.d.ts +130 -0
- package/dist/hooks/useSession.d.ts.map +1 -0
- package/dist/hooks/useSessionMessages.d.ts +29 -0
- package/dist/hooks/useSessionMessages.d.ts.map +1 -0
- package/dist/hooks/useSettingsToggle.d.ts +20 -0
- package/dist/hooks/useSettingsToggle.d.ts.map +1 -0
- package/dist/hooks/useSortedParticipants.d.ts +7 -0
- package/dist/hooks/useSortedParticipants.d.ts.map +1 -0
- package/dist/hooks/useSpeakingParticipants.d.ts +16 -0
- package/dist/hooks/useSpeakingParticipants.d.ts.map +1 -0
- package/dist/hooks/useStartAudio.d.ts +27 -0
- package/dist/hooks/useStartAudio.d.ts.map +1 -0
- package/dist/hooks/useStartVideo.d.ts +26 -0
- package/dist/hooks/useStartVideo.d.ts.map +1 -0
- package/dist/hooks/useSwipe.d.ts +24 -0
- package/dist/hooks/useSwipe.d.ts.map +1 -0
- package/dist/hooks/useTextStream.d.ts +20 -0
- package/dist/hooks/useTextStream.d.ts.map +1 -0
- package/dist/hooks/useToken.d.ts +20 -0
- package/dist/hooks/useToken.d.ts.map +1 -0
- package/dist/hooks/useTrack.d.ts +4 -0
- package/dist/hooks/useTrack.d.ts.map +1 -0
- package/dist/hooks/useTrackByName.d.ts +10 -0
- package/dist/hooks/useTrackByName.d.ts.map +1 -0
- package/dist/hooks/useTrackMutedIndicator.d.ts +18 -0
- package/dist/hooks/useTrackMutedIndicator.d.ts.map +1 -0
- package/dist/hooks/useTrackRefBySourceOrName.d.ts +7 -0
- package/dist/hooks/useTrackRefBySourceOrName.d.ts.map +1 -0
- package/dist/hooks/useTrackSyncTime.d.ts +10 -0
- package/dist/hooks/useTrackSyncTime.d.ts.map +1 -0
- package/dist/hooks/useTrackToggle.d.ts +27 -0
- package/dist/hooks/useTrackToggle.d.ts.map +1 -0
- package/dist/hooks/useTrackTranscription.d.ts +26 -0
- package/dist/hooks/useTrackTranscription.d.ts.map +1 -0
- package/dist/hooks/useTrackVolume.d.ts +49 -0
- package/dist/hooks/useTrackVolume.d.ts.map +1 -0
- package/dist/hooks/useTracks.d.ts +29 -0
- package/dist/hooks/useTracks.d.ts.map +1 -0
- package/dist/hooks/useTranscriptions.d.ts +21 -0
- package/dist/hooks/useTranscriptions.d.ts.map +1 -0
- package/dist/hooks/useVisualStableUpdate.d.ts +27 -0
- package/dist/hooks/useVisualStableUpdate.d.ts.map +1 -0
- package/dist/hooks/useVoiceAssistant.d.ts +43 -0
- package/dist/hooks/useVoiceAssistant.d.ts.map +1 -0
- package/dist/hooks/useWarnAboutMissingStyles.d.ts +5 -0
- package/dist/hooks/useWarnAboutMissingStyles.d.ts.map +1 -0
- package/dist/hooks-hQJmeINB.mjs +1992 -0
- package/dist/hooks-hQJmeINB.mjs.map +1 -0
- package/dist/hooks.d.ts +2 -0
- package/dist/hooks.js +2 -0
- package/dist/hooks.js.map +1 -0
- package/dist/hooks.mjs +64 -0
- package/dist/hooks.mjs.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.docs.d.ts +6 -0
- package/dist/index.docs.d.ts.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +157 -0
- package/dist/index.mjs.map +1 -0
- package/dist/krisp.d.ts +2 -0
- package/dist/krisp.js +2 -0
- package/dist/krisp.js.map +1 -0
- package/dist/krisp.mjs +45 -0
- package/dist/krisp.mjs.map +1 -0
- package/dist/mergeProps.d.ts +25 -0
- package/dist/mergeProps.d.ts.map +1 -0
- package/dist/prefabs/AudioConference.d.ts +22 -0
- package/dist/prefabs/AudioConference.d.ts.map +1 -0
- package/dist/prefabs/Chat.d.ts +35 -0
- package/dist/prefabs/Chat.d.ts.map +1 -0
- package/dist/prefabs/ControlBar.d.ts +45 -0
- package/dist/prefabs/ControlBar.d.ts.map +1 -0
- package/dist/prefabs/MediaDeviceMenu.d.ts +36 -0
- package/dist/prefabs/MediaDeviceMenu.d.ts.map +1 -0
- package/dist/prefabs/PreJoin.d.ts +59 -0
- package/dist/prefabs/PreJoin.d.ts.map +1 -0
- package/dist/prefabs/VideoConference.d.ts +35 -0
- package/dist/prefabs/VideoConference.d.ts.map +1 -0
- package/dist/prefabs/VoiceAssistantControlBar.d.ts +32 -0
- package/dist/prefabs/VoiceAssistantControlBar.d.ts.map +1 -0
- package/dist/prefabs/index.d.ts +8 -0
- package/dist/prefabs/index.d.ts.map +1 -0
- package/dist/prefabs.d.ts +2 -0
- package/dist/prefabs.js +2 -0
- package/dist/prefabs.js.map +1 -0
- package/dist/prefabs.mjs +579 -0
- package/dist/prefabs.mjs.map +1 -0
- package/dist/room-BP3SCCCd.mjs +191 -0
- package/dist/room-BP3SCCCd.mjs.map +1 -0
- package/dist/shared-88J2fzv7.js +2 -0
- package/dist/shared-88J2fzv7.js.map +1 -0
- package/dist/shared-BDr0qLg4.js +4 -0
- package/dist/shared-BDr0qLg4.js.map +1 -0
- package/dist/shared-CjI_UuOX.js +2 -0
- package/dist/shared-CjI_UuOX.js.map +1 -0
- package/dist/shared-DTHOl3uJ.js +2 -0
- package/dist/shared-DTHOl3uJ.js.map +1 -0
- package/dist/utils.d.ts +19 -0
- package/dist/utils.d.ts.map +1 -0
- package/package.json +104 -0
- package/src/assets/icons/CameraDisabledIcon.tsx +15 -0
- package/src/assets/icons/CameraIcon.tsx +14 -0
- package/src/assets/icons/ChatCloseIcon.tsx +17 -0
- package/src/assets/icons/ChatIcon.tsx +25 -0
- package/src/assets/icons/Chevron.tsx +19 -0
- package/src/assets/icons/FocusToggleIcon.tsx +16 -0
- package/src/assets/icons/GearIcon.tsx +19 -0
- package/src/assets/icons/LeaveIcon.tsx +25 -0
- package/src/assets/icons/LockLockedIcon.tsx +19 -0
- package/src/assets/icons/MicDisabledIcon.tsx +15 -0
- package/src/assets/icons/MicIcon.tsx +19 -0
- package/src/assets/icons/QualityExcellentIcon.tsx +15 -0
- package/src/assets/icons/QualityGoodIcon.tsx +19 -0
- package/src/assets/icons/QualityPoorIcon.tsx +20 -0
- package/src/assets/icons/QualityUnknownIcon.tsx +17 -0
- package/src/assets/icons/ScreenShareIcon.tsx +25 -0
- package/src/assets/icons/ScreenShareStopIcon.tsx +21 -0
- package/src/assets/icons/SpinnerIcon.tsx +93 -0
- package/src/assets/icons/UnfocusToggleIcon.tsx +16 -0
- package/src/assets/icons/index.ts +19 -0
- package/src/assets/icons/util.tsx +47 -0
- package/src/assets/images/ParticipantPlaceholder.tsx +31 -0
- package/src/assets/images/index.ts +1 -0
- package/src/assets/template.js +21 -0
- package/src/components/ChatEntry.tsx +112 -0
- package/src/components/ConnectionState.tsx +36 -0
- package/src/components/ConnectionStateToast.tsx +47 -0
- package/src/components/LiveKitRoom.tsx +122 -0
- package/src/components/ParticipantLoop.tsx +41 -0
- package/src/components/RoomAudioRenderer.tsx +57 -0
- package/src/components/RoomName.tsx +36 -0
- package/src/components/SessionProvider.tsx +22 -0
- package/src/components/Toast.tsx +18 -0
- package/src/components/TrackLoop.tsx +45 -0
- package/src/components/controls/ChatToggle.tsx +32 -0
- package/src/components/controls/ClearPinButton.tsx +32 -0
- package/src/components/controls/DisconnectButton.tsx +32 -0
- package/src/components/controls/FocusToggle.tsx +54 -0
- package/src/components/controls/MediaDeviceSelect.tsx +144 -0
- package/src/components/controls/PaginationControl.tsx +51 -0
- package/src/components/controls/PaginationIndicator.tsx +26 -0
- package/src/components/controls/SettingsMenuToggle.tsx +26 -0
- package/src/components/controls/StartAudio.tsx +40 -0
- package/src/components/controls/StartMediaButton.tsx +41 -0
- package/src/components/controls/TrackToggle.tsx +54 -0
- package/src/components/index.ts +34 -0
- package/src/components/layout/CarouselLayout.tsx +80 -0
- package/src/components/layout/FocusLayout.tsx +37 -0
- package/src/components/layout/GridLayout.tsx +63 -0
- package/src/components/layout/LayoutContextProvider.tsx +36 -0
- package/src/components/layout/index.ts +3 -0
- package/src/components/participant/AudioTrack.tsx +89 -0
- package/src/components/participant/AudioVisualizer.tsx +67 -0
- package/src/components/participant/BarVisualizer.tsx +164 -0
- package/src/components/participant/ConnectionQualityIndicator.tsx +36 -0
- package/src/components/participant/ParticipantAudioTile.tsx +67 -0
- package/src/components/participant/ParticipantName.tsx +50 -0
- package/src/components/participant/ParticipantTile.tsx +192 -0
- package/src/components/participant/TrackMutedIndicator.tsx +53 -0
- package/src/components/participant/VideoTrack.tsx +92 -0
- package/src/components/participant/animationSequences/connectingSequence.ts +9 -0
- package/src/components/participant/animationSequences/listeningSequence.ts +6 -0
- package/src/components/participant/animationSequences/thinkingSequence.ts +12 -0
- package/src/components/participant/animators/useBarAnimator.ts +55 -0
- package/src/context/chat-context.ts +37 -0
- package/src/context/feature-context.ts +28 -0
- package/src/context/index.ts +27 -0
- package/src/context/layout-context.ts +72 -0
- package/src/context/participant-context.ts +44 -0
- package/src/context/pin-context.ts +27 -0
- package/src/context/room-context.ts +42 -0
- package/src/context/session-context.ts +43 -0
- package/src/context/track-reference-context.ts +47 -0
- package/src/hooks/cloud/krisp/useKrispNoiseFilter.ts +110 -0
- package/src/hooks/index.ts +72 -0
- package/src/hooks/internal/index.ts +10 -0
- package/src/hooks/internal/useMediaQuery.ts +46 -0
- package/src/hooks/internal/useObservableState.ts +24 -0
- package/src/hooks/internal/useResizeObserver.ts +124 -0
- package/src/hooks/useAgent.ts +945 -0
- package/src/hooks/useAudioPlayback.ts +34 -0
- package/src/hooks/useChat.ts +57 -0
- package/src/hooks/useChatToggle.ts +38 -0
- package/src/hooks/useClearPinButton.ts +29 -0
- package/src/hooks/useConnectionQualityIndicator.ts +33 -0
- package/src/hooks/useConnectionStatus.ts +22 -0
- package/src/hooks/useDataChannel.ts +73 -0
- package/src/hooks/useDisconnectButton.ts +36 -0
- package/src/hooks/useEvents.ts +39 -0
- package/src/hooks/useFacingMode.ts +22 -0
- package/src/hooks/useFocusToggle.ts +59 -0
- package/src/hooks/useGridLayout.ts +44 -0
- package/src/hooks/useIsEncrypted.ts +29 -0
- package/src/hooks/useIsMuted.ts +51 -0
- package/src/hooks/useIsRecording.ts +23 -0
- package/src/hooks/useIsSpeaking.ts +21 -0
- package/src/hooks/useLiveKitRoom.ts +186 -0
- package/src/hooks/useLocalParticipant.ts +73 -0
- package/src/hooks/useLocalParticipantPermissions.ts +24 -0
- package/src/hooks/useMediaDeviceSelect.ts +81 -0
- package/src/hooks/useMediaDevices.ts +28 -0
- package/src/hooks/useMediaTrackBySourceOrName.ts +97 -0
- package/src/hooks/usePagination.test.ts +77 -0
- package/src/hooks/usePagination.ts +67 -0
- package/src/hooks/useParticipantAttributes.ts +69 -0
- package/src/hooks/useParticipantInfo.ts +35 -0
- package/src/hooks/useParticipantPermissions.ts +29 -0
- package/src/hooks/useParticipantTile.ts +81 -0
- package/src/hooks/useParticipantTracks.ts +54 -0
- package/src/hooks/useParticipants.ts +42 -0
- package/src/hooks/usePersistentUserChoices.ts +64 -0
- package/src/hooks/usePinnedTracks.ts +24 -0
- package/src/hooks/useRemoteParticipant.ts +79 -0
- package/src/hooks/useRemoteParticipants.ts +45 -0
- package/src/hooks/useRoomInfo.ts +32 -0
- package/src/hooks/useSequentialRoomConnectDisconnect.ts +171 -0
- package/src/hooks/useSession.ts +642 -0
- package/src/hooks/useSessionMessages.ts +158 -0
- package/src/hooks/useSettingsToggle.ts +32 -0
- package/src/hooks/useSortedParticipants.ts +20 -0
- package/src/hooks/useSpeakingParticipants.ts +27 -0
- package/src/hooks/useStartAudio.ts +50 -0
- package/src/hooks/useStartVideo.ts +49 -0
- package/src/hooks/useSwipe.ts +68 -0
- package/src/hooks/useTextStream.ts +35 -0
- package/src/hooks/useToken.ts +54 -0
- package/src/hooks/useTrack.ts +11 -0
- package/src/hooks/useTrackByName.ts +15 -0
- package/src/hooks/useTrackMutedIndicator.ts +44 -0
- package/src/hooks/useTrackRefBySourceOrName.ts +30 -0
- package/src/hooks/useTrackSyncTime.ts +18 -0
- package/src/hooks/useTrackToggle.ts +93 -0
- package/src/hooks/useTrackTranscription.ts +75 -0
- package/src/hooks/useTrackVolume.ts +283 -0
- package/src/hooks/useTracks.test.ts +60 -0
- package/src/hooks/useTracks.ts +154 -0
- package/src/hooks/useTranscriptions.ts +48 -0
- package/src/hooks/useVisualStableUpdate.ts +63 -0
- package/src/hooks/useVoiceAssistant.ts +109 -0
- package/src/hooks/useWarnAboutMissingStyles.ts +11 -0
- package/src/index.docs.ts +12 -0
- package/src/index.ts +32 -0
- package/src/mergeProps.ts +87 -0
- package/src/prefabs/AudioConference.tsx +57 -0
- package/src/prefabs/Chat.tsx +153 -0
- package/src/prefabs/ControlBar.tsx +227 -0
- package/src/prefabs/MediaDeviceMenu.tsx +159 -0
- package/src/prefabs/PreJoin.tsx +439 -0
- package/src/prefabs/VideoConference.tsx +184 -0
- package/src/prefabs/VoiceAssistantControlBar.tsx +109 -0
- package/src/prefabs/index.ts +11 -0
- package/src/utils.ts +78 -0
package/dist/hooks.d.ts
ADDED
package/dist/hooks.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./shared-88J2fzv7.js"),s=require("./shared-CjI_UuOX.js"),t=require("./shared-BDr0qLg4.js");exports.AgentEvent=e.AgentEvent;exports.MessagesEvent=e.MessagesEvent;exports.SessionEvent=e.SessionEvent;exports.useAgent=e.useAgent;exports.useAudioPlayback=e.useAudioPlayback;exports.useClearPinButton=e.useClearPinButton;exports.useDataChannel=e.useDataChannel;exports.useEvents=e.useEvents;exports.useIsRecording=e.useIsRecording;exports.useLiveKitRoom=e.useLiveKitRoom;exports.useParticipantAttribute=e.useParticipantAttribute;exports.useParticipantAttributes=e.useParticipantAttributes;exports.useParticipantInfo=e.useParticipantInfo;exports.useParticipantPermissions=e.useParticipantPermissions;exports.useParticipantTracks=e.useParticipantTracks;exports.useParticipants=e.useParticipants;exports.useRemoteParticipant=e.useRemoteParticipant;exports.useRemoteParticipants=e.useRemoteParticipants;exports.useRoomInfo=e.useRoomInfo;exports.useSequentialRoomConnectDisconnect=e.useSequentialRoomConnectDisconnect;exports.useSession=e.useSession;exports.useSessionMessages=e.useSessionMessages;exports.useSortedParticipants=e.useSortedParticipants;exports.useSpeakingParticipants=e.useSpeakingParticipants;exports.useTextStream=e.useTextStream;exports.useToken=e.useToken;exports.useTrackByName=e.useTrackByName;exports.useTrackTranscription=e.useTrackTranscription;exports.useTranscriptions=e.useTranscriptions;exports.useVoiceAssistant=e.useVoiceAssistant;exports.useAudioWaveform=s.useAudioWaveform;exports.useChat=s.useChat;exports.useChatToggle=s.useChatToggle;exports.useConnectionQualityIndicator=s.useConnectionQualityIndicator;exports.useConnectionState=s.useConnectionState;exports.useDisconnectButton=s.useDisconnectButton;exports.useFacingMode=s.useFacingMode;exports.useFocusToggle=s.useFocusToggle;exports.useGridLayout=s.useGridLayout;exports.useIsEncrypted=s.useIsEncrypted;exports.useIsMuted=s.useIsMuted;exports.useIsSpeaking=s.useIsSpeaking;exports.useLocalParticipantPermissions=s.useLocalParticipantPermissions;exports.useMediaDeviceSelect=s.useMediaDeviceSelect;exports.useMediaDevices=s.useMediaDevices;exports.useMultibandTrackVolume=s.useMultibandTrackVolume;exports.usePagination=s.usePagination;exports.useParticipantTile=s.useParticipantTile;exports.usePersistentUserChoices=s.usePersistentUserChoices;exports.usePinnedTracks=s.usePinnedTracks;exports.useStartAudio=s.useStartAudio;exports.useStartVideo=s.useStartVideo;exports.useSwipe=s.useSwipe;exports.useTrackMutedIndicator=s.useTrackMutedIndicator;exports.useTrackToggle=s.useTrackToggle;exports.useTrackVolume=s.useTrackVolume;exports.useTracks=s.useTracks;exports.useVisualStableUpdate=s.useVisualStableUpdate;exports.useLocalParticipant=t.useLocalParticipant;
|
|
2
|
+
//# sourceMappingURL=hooks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/hooks.mjs
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { R as e, a5 as t, a2 as i, S as u, D as n, U as o, w as r, b as c, u as p, i as P, a as d, E as l, c as T, a4 as g, F as m, d as S, n as k, m as v, G as A, _ as C, H as I, C as M, A as R, e as b, y as f, s as y, o as D, Z as E, Y as V, I as h, J as L, l as x, V as B, K as F, x as U, B as w, L as G, M as K, v as N, a1 as Q, a3 as W, a6 as q, N as H, O as J, f as O, g as X, p as Y, $ as Z, P as _, Q as $, k as j, h as z, W as ss, T as as, t as es, a0 as ts, r as is, X as us } from "./hooks-hQJmeINB.mjs";
|
|
2
|
+
import { u as os } from "./room-BP3SCCCd.mjs";
|
|
3
|
+
export {
|
|
4
|
+
e as AgentEvent,
|
|
5
|
+
t as MessagesEvent,
|
|
6
|
+
i as SessionEvent,
|
|
7
|
+
u as useAgent,
|
|
8
|
+
n as useAudioPlayback,
|
|
9
|
+
o as useAudioWaveform,
|
|
10
|
+
r as useChat,
|
|
11
|
+
c as useChatToggle,
|
|
12
|
+
p as useClearPinButton,
|
|
13
|
+
P as useConnectionQualityIndicator,
|
|
14
|
+
d as useConnectionState,
|
|
15
|
+
l as useDataChannel,
|
|
16
|
+
T as useDisconnectButton,
|
|
17
|
+
g as useEvents,
|
|
18
|
+
m as useFacingMode,
|
|
19
|
+
S as useFocusToggle,
|
|
20
|
+
k as useGridLayout,
|
|
21
|
+
v as useIsEncrypted,
|
|
22
|
+
A as useIsMuted,
|
|
23
|
+
C as useIsRecording,
|
|
24
|
+
I as useIsSpeaking,
|
|
25
|
+
os as useLiveKitRoom,
|
|
26
|
+
M as useLocalParticipant,
|
|
27
|
+
R as useLocalParticipantPermissions,
|
|
28
|
+
b as useMediaDeviceSelect,
|
|
29
|
+
f as useMediaDevices,
|
|
30
|
+
y as useMultibandTrackVolume,
|
|
31
|
+
D as usePagination,
|
|
32
|
+
E as useParticipantAttribute,
|
|
33
|
+
V as useParticipantAttributes,
|
|
34
|
+
h as useParticipantInfo,
|
|
35
|
+
L as useParticipantPermissions,
|
|
36
|
+
x as useParticipantTile,
|
|
37
|
+
B as useParticipantTracks,
|
|
38
|
+
F as useParticipants,
|
|
39
|
+
U as usePersistentUserChoices,
|
|
40
|
+
w as usePinnedTracks,
|
|
41
|
+
G as useRemoteParticipant,
|
|
42
|
+
K as useRemoteParticipants,
|
|
43
|
+
N as useRoomInfo,
|
|
44
|
+
Q as useSequentialRoomConnectDisconnect,
|
|
45
|
+
W as useSession,
|
|
46
|
+
q as useSessionMessages,
|
|
47
|
+
H as useSortedParticipants,
|
|
48
|
+
J as useSpeakingParticipants,
|
|
49
|
+
O as useStartAudio,
|
|
50
|
+
X as useStartVideo,
|
|
51
|
+
Y as useSwipe,
|
|
52
|
+
Z as useTextStream,
|
|
53
|
+
_ as useToken,
|
|
54
|
+
$ as useTrackByName,
|
|
55
|
+
j as useTrackMutedIndicator,
|
|
56
|
+
z as useTrackToggle,
|
|
57
|
+
ss as useTrackTranscription,
|
|
58
|
+
as as useTrackVolume,
|
|
59
|
+
es as useTracks,
|
|
60
|
+
ts as useTranscriptions,
|
|
61
|
+
is as useVisualStableUpdate,
|
|
62
|
+
us as useVoiceAssistant
|
|
63
|
+
};
|
|
64
|
+
//# sourceMappingURL=hooks.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './components';
|
|
2
|
+
export * from './hooks';
|
|
3
|
+
export * from './prefabs';
|
|
4
|
+
export * from './context';
|
|
5
|
+
export * from './assets/icons';
|
|
6
|
+
export * from './assets/images';
|
|
7
|
+
export { setLogLevel, setLogExtension, isTrackReference } from '@livekit/components-core';
|
|
8
|
+
export type { ChatMessage, ReceivedMessage, ReceivedChatMessage, ReceivedUserTranscriptionMessage, ReceivedAgentTranscriptionMessage, MessageDecoder, MessageEncoder, LocalUserChoices, TrackReference, TrackReferenceOrPlaceholder, ParticipantClickEvent, ParticipantIdentifier, PinState, WidgetState, GridLayoutDefinition, TextStreamData, } from '@livekit/components-core';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAE7B,cAAc,SAAS,CAAC;AAExB,cAAc,WAAW,CAAC;AAE1B,cAAc,WAAW,CAAC;AAE1B,cAAc,gBAAgB,CAAC;AAE/B,cAAc,iBAAiB,CAAC;AAGhC,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC1F,YAAY,EACV,WAAW,EACX,eAAe,EACf,mBAAmB,EACnB,gCAAgC,EAChC,iCAAiC,EACjC,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,2BAA2B,EAC3B,qBAAqB,EACrB,qBAAqB,EACrB,QAAQ,EACR,WAAW,EACX,oBAAoB,EACpB,cAAc,GACf,MAAM,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Used to merge the exports from the main index.ts file with the exports from the cloud/krisp/useKrispNoiseFilter.ts file for docs generation.
|
|
3
|
+
*/
|
|
4
|
+
export * from './index';
|
|
5
|
+
export { useKrispNoiseFilter, type useKrispNoiseFilterOptions, } from './hooks/cloud/krisp/useKrispNoiseFilter';
|
|
6
|
+
//# sourceMappingURL=index.docs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.docs.d.ts","sourceRoot":"","sources":["../src/index.docs.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,cAAc,SAAS,CAAC;AAGxB,OAAO,EACL,mBAAmB,EACnB,KAAK,0BAA0B,GAChC,MAAM,yCAAyC,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./shared-88J2fzv7.js"),t=require("./shared-CjI_UuOX.js"),u=require("./shared-BDr0qLg4.js"),e=require("./shared-DTHOl3uJ.js"),m=require("react");function P(i){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(i){for(const s in i)if(s!=="default"){const r=Object.getOwnPropertyDescriptor(i,s);Object.defineProperty(a,s,r.get?r:{enumerable:!0,get:()=>i[s]})}}return a.default=i,Object.freeze(a)}const n=P(m),v=n.forwardRef(function(a,s){const{buttonProps:r}=o.useClearPinButton(a);return n.createElement("button",{ref:s,...r},a.children)}),T=n.forwardRef(function({room:a,...s},r){const c=t.useConnectionState(a);return n.createElement("div",{ref:r,...s},c)}),p=n.forwardRef(function({label:a="Allow Audio",...s},r){const c=u.useEnsureRoom(s.room),{mergedProps:l}=t.useStartAudio({room:c,props:s});return n.createElement("button",{ref:r,...l},a)}),f=n.forwardRef(function(a,s){const{room:r,htmlProps:c}=o.useLiveKitRoom(a);return n.createElement("div",{ref:s,...c},r&&n.createElement(u.RoomContext.Provider,{value:r},n.createElement(e.LKFeatureContext.Provider,{value:a.featureFlags},a.children)))}),k=n.forwardRef(function({trackRef:a,...s},r){const g=t.useEnsureTrackRef(a),S=t.useMultibandTrackVolume(g,{bands:7,loPass:300});return n.createElement("svg",{ref:r,width:"100%",height:"100%",viewBox:"0 0 200 90",...s,className:"lk-audio-visualizer"},n.createElement("rect",{x:"0",y:"0",width:"100%",height:"100%"}),n.createElement("g",{style:{transform:`translate(${130/2}px, 0)`}},S.map((d,C)=>n.createElement("rect",{key:C,x:C*10,y:90/2-d*50/2,width:6,height:d*50}))))});function y({participants:i,...a}){return n.createElement(n.Fragment,null,i.map(s=>n.createElement(t.ParticipantContext.Provider,{value:s,key:s.identity},t.cloneSingleChild(a.children))))}const I=n.forwardRef(function({childrenPosition:a="before",children:s,...r},c){const{name:l}=o.useRoomInfo();return n.createElement("span",{ref:c,...r},a==="before"&&s,l,a==="after"&&s)});function x(i){return n.createElement(o.SessionContext.Provider,{value:i.session},n.createElement(u.RoomContext.Provider,{value:i.session.room},i.children))}exports.AgentEvent=o.AgentEvent;exports.MessagesEvent=o.MessagesEvent;exports.SessionEvent=o.SessionEvent;exports.useAgent=o.useAgent;exports.useAudioPlayback=o.useAudioPlayback;exports.useClearPinButton=o.useClearPinButton;exports.useDataChannel=o.useDataChannel;exports.useEnsureSession=o.useEnsureSession;exports.useEvents=o.useEvents;exports.useIsRecording=o.useIsRecording;exports.useLiveKitRoom=o.useLiveKitRoom;exports.useMaybeSessionContext=o.useMaybeSessionContext;exports.useParticipantAttribute=o.useParticipantAttribute;exports.useParticipantAttributes=o.useParticipantAttributes;exports.useParticipantInfo=o.useParticipantInfo;exports.useParticipantPermissions=o.useParticipantPermissions;exports.useParticipantTracks=o.useParticipantTracks;exports.useParticipants=o.useParticipants;exports.useRemoteParticipant=o.useRemoteParticipant;exports.useRemoteParticipants=o.useRemoteParticipants;exports.useRoomInfo=o.useRoomInfo;exports.useSequentialRoomConnectDisconnect=o.useSequentialRoomConnectDisconnect;exports.useSession=o.useSession;exports.useSessionContext=o.useSessionContext;exports.useSessionMessages=o.useSessionMessages;exports.useSortedParticipants=o.useSortedParticipants;exports.useSpeakingParticipants=o.useSpeakingParticipants;exports.useTextStream=o.useTextStream;exports.useToken=o.useToken;exports.useTrackByName=o.useTrackByName;exports.useTrackTranscription=o.useTrackTranscription;exports.useTranscriptions=o.useTranscriptions;exports.useVoiceAssistant=o.useVoiceAssistant;exports.LayoutContext=t.LayoutContext;exports.ParticipantContext=t.ParticipantContext;exports.TrackRefContext=t.TrackRefContext;exports.useAudioWaveform=t.useAudioWaveform;exports.useChat=t.useChat;exports.useChatToggle=t.useChatToggle;exports.useConnectionQualityIndicator=t.useConnectionQualityIndicator;exports.useConnectionState=t.useConnectionState;exports.useCreateLayoutContext=t.useCreateLayoutContext;exports.useDisconnectButton=t.useDisconnectButton;exports.useEnsureCreateLayoutContext=t.useEnsureCreateLayoutContext;exports.useEnsureLayoutContext=t.useEnsureLayoutContext;exports.useEnsureParticipant=t.useEnsureParticipant;exports.useEnsureTrackRef=t.useEnsureTrackRef;exports.useFacingMode=t.useFacingMode;exports.useFocusToggle=t.useFocusToggle;exports.useGridLayout=t.useGridLayout;exports.useIsEncrypted=t.useIsEncrypted;exports.useIsMuted=t.useIsMuted;exports.useIsSpeaking=t.useIsSpeaking;exports.useLayoutContext=t.useLayoutContext;exports.useLocalParticipantPermissions=t.useLocalParticipantPermissions;exports.useMaybeLayoutContext=t.useMaybeLayoutContext;exports.useMaybeParticipantContext=t.useMaybeParticipantContext;exports.useMaybeTrackRefContext=t.useMaybeTrackRefContext;exports.useMediaDeviceSelect=t.useMediaDeviceSelect;exports.useMediaDevices=t.useMediaDevices;exports.useMultibandTrackVolume=t.useMultibandTrackVolume;exports.usePagination=t.usePagination;exports.useParticipantContext=t.useParticipantContext;exports.useParticipantTile=t.useParticipantTile;exports.usePersistentUserChoices=t.usePersistentUserChoices;exports.usePinnedTracks=t.usePinnedTracks;exports.useStartAudio=t.useStartAudio;exports.useStartVideo=t.useStartVideo;exports.useSwipe=t.useSwipe;exports.useTrackMutedIndicator=t.useTrackMutedIndicator;exports.useTrackRefContext=t.useTrackRefContext;exports.useTrackToggle=t.useTrackToggle;exports.useTrackVolume=t.useTrackVolume;exports.useTracks=t.useTracks;exports.useVisualStableUpdate=t.useVisualStableUpdate;exports.RoomContext=u.RoomContext;exports.isTrackReference=u.isTrackReference;exports.setLogExtension=u.setLogExtension;exports.setLogLevel=u.setLogLevel;exports.useEnsureRoom=u.useEnsureRoom;exports.useLocalParticipant=u.useLocalParticipant;exports.useMaybeRoomContext=u.useMaybeRoomContext;exports.useRoomContext=u.useRoomContext;exports.AudioConference=e.AudioConference;exports.AudioTrack=e.AudioTrack;exports.BarVisualizer=e.BarVisualizer;exports.CameraDisabledIcon=e.SvgCameraDisabledIcon;exports.CameraIcon=e.SvgCameraIcon;exports.CarouselLayout=e.CarouselLayout;exports.Chat=e.Chat;exports.ChatCloseIcon=e.SvgChatCloseIcon;exports.ChatEntry=e.ChatEntry;exports.ChatIcon=e.SvgChatIcon;exports.ChatToggle=e.ChatToggle;exports.Chevron=e.SvgChevron;exports.ConnectionQualityIndicator=e.ConnectionQualityIndicator;exports.ConnectionStateToast=e.ConnectionStateToast;exports.ControlBar=e.ControlBar;exports.DisconnectButton=e.DisconnectButton;exports.FocusLayout=e.FocusLayout;exports.FocusLayoutContainer=e.FocusLayoutContainer;exports.FocusToggle=e.FocusToggle;exports.FocusToggleIcon=e.SvgFocusToggleIcon;exports.GearIcon=e.SvgGearIcon;exports.GridLayout=e.GridLayout;exports.LKFeatureContext=e.LKFeatureContext;exports.LayoutContextProvider=e.LayoutContextProvider;exports.LeaveIcon=e.SvgLeaveIcon;exports.LockLockedIcon=e.SvgLockLockedIcon;exports.MediaDeviceMenu=e.MediaDeviceMenu;exports.MediaDeviceSelect=e.MediaDeviceSelect;exports.MicDisabledIcon=e.SvgMicDisabledIcon;exports.MicIcon=e.SvgMicIcon;exports.ParticipantAudioTile=e.ParticipantAudioTile;exports.ParticipantContextIfNeeded=e.ParticipantContextIfNeeded;exports.ParticipantName=e.ParticipantName;exports.ParticipantPlaceholder=e.SvgParticipantPlaceholder;exports.ParticipantTile=e.ParticipantTile;exports.PreJoin=e.PreJoin;exports.QualityExcellentIcon=e.SvgQualityExcellentIcon;exports.QualityGoodIcon=e.SvgQualityGoodIcon;exports.QualityPoorIcon=e.SvgQualityPoorIcon;exports.QualityUnknownIcon=e.SvgQualityUnknownIcon;exports.RoomAudioRenderer=e.RoomAudioRenderer;exports.ScreenShareIcon=e.SvgScreenShareIcon;exports.ScreenShareStopIcon=e.SvgScreenShareStopIcon;exports.SpinnerIcon=e.SvgSpinnerIcon;exports.StartMediaButton=e.StartMediaButton;exports.Toast=e.Toast;exports.TrackLoop=e.TrackLoop;exports.TrackMutedIndicator=e.TrackMutedIndicator;exports.TrackRefContextIfNeeded=e.TrackRefContextIfNeeded;exports.TrackToggle=e.TrackToggle;exports.UnfocusToggleIcon=e.SvgUnfocusToggleIcon;exports.VideoConference=e.VideoConference;exports.VideoTrack=e.VideoTrack;exports.VoiceAssistantControlBar=e.VoiceAssistantControlBar;exports.formatChatMessageLinks=e.formatChatMessageLinks;exports.useFeatureContext=e.useFeatureContext;exports.usePreviewDevice=e.usePreviewDevice;exports.usePreviewTracks=e.usePreviewTracks;exports.AudioVisualizer=k;exports.ClearPinButton=v;exports.ConnectionState=T;exports.LiveKitRoom=f;exports.ParticipantLoop=y;exports.RoomName=I;exports.SessionProvider=x;exports.StartAudio=p;
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/components/controls/ClearPinButton.tsx","../src/components/ConnectionState.tsx","../src/components/controls/StartAudio.tsx","../src/components/LiveKitRoom.tsx","../src/components/participant/AudioVisualizer.tsx","../src/components/ParticipantLoop.tsx","../src/components/RoomName.tsx","../src/components/SessionProvider.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useClearPinButton } from '../../hooks';\n\n/** @public */\nexport interface ClearPinButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {}\n\n/**\n * The `ClearPinButton` is a basic html button with the added ability to signal\n * the `LayoutContext` that it should display the grid view again.\n * @remarks\n * This component works only inside a `LayoutContext`.\n *\n * @example\n * ```tsx\n * <LiveKitRoom>\n * <ClearPinButton>Back to grid view</ClearPinButton>\n * </LiveKitRoom>\n * ```\n * @public\n */\nexport const ClearPinButton: (\n props: ClearPinButtonProps & React.RefAttributes<HTMLButtonElement>,\n) => React.ReactNode = /* @__PURE__ */ React.forwardRef<HTMLButtonElement, ClearPinButtonProps>(\n function ClearPinButton(props: ClearPinButtonProps, ref) {\n const { buttonProps } = useClearPinButton(props);\n return (\n <button ref={ref} {...buttonProps}>\n {props.children}\n </button>\n );\n },\n);\n","import type { Room } from 'livekit-client';\nimport * as React from 'react';\nimport { useConnectionState } from '../hooks';\n\n/** @public */\nexport interface ConnectionStatusProps extends React.HTMLAttributes<HTMLDivElement> {\n /**\n * The room from which the connection status should be displayed.\n */\n room?: Room;\n}\n\n/**\n * The `ConnectionState` component displays the connection status of the room as strings\n * (`\"connected\" | \"connecting\" | \"disconnected\" | \"reconnecting\"`).\n *\n * @example\n * ```tsx\n * <LiveKitRoom>\n * <ConnectionState />\n * </LiveKitRoom>\n * ```\n * @public\n */\nexport const ConnectionState: (\n props: ConnectionStatusProps & React.RefAttributes<HTMLDivElement>,\n) => React.ReactNode = /* @__PURE__ */ React.forwardRef<HTMLDivElement, ConnectionStatusProps>(\n function ConnectionState({ room, ...props }: ConnectionStatusProps, ref) {\n const connectionState = useConnectionState(room);\n return (\n <div ref={ref} {...props}>\n {connectionState}\n </div>\n );\n },\n);\n","import * as React from 'react';\nimport { useEnsureRoom } from '../../context';\nimport { useStartAudio } from '../../hooks';\nimport { Room } from 'livekit-client';\n\n/** @public */\nexport interface AllowAudioPlaybackProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n room?: Room;\n label: string;\n}\n\n/**\n * The `StartAudio` component is only visible when the browser blocks audio playback. This is due to some browser implemented autoplay policies.\n * To start audio playback, the user must perform a user-initiated event such as clicking this button.\n * As soon as audio playback starts, the button hides itself again.\n *\n * @example\n * ```tsx\n * <LiveKitRoom>\n * <StartAudio label=\"Click to allow audio playback\" />\n * </LiveKitRoom>\n * ```\n *\n * @see Autoplay policy on MDN web docs: {@link https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API/Best_practices#autoplay_policy}\n * @public\n */\nexport const StartAudio: (\n props: AllowAudioPlaybackProps & React.RefAttributes<HTMLButtonElement>,\n) => React.ReactNode = /* @__PURE__ */ React.forwardRef<HTMLButtonElement, AllowAudioPlaybackProps>(\n function StartAudio({ label = 'Allow Audio', ...props }: AllowAudioPlaybackProps, ref) {\n const room = useEnsureRoom(props.room);\n const { mergedProps } = useStartAudio({ room, props });\n\n return (\n <button ref={ref} {...mergedProps}>\n {label}\n </button>\n );\n },\n);\n","import type {\n AudioCaptureOptions,\n DisconnectReason,\n RoomConnectOptions,\n RoomOptions,\n ScreenShareCaptureOptions,\n VideoCaptureOptions,\n} from 'livekit-client';\nimport type { MediaDeviceFailure, Room } from 'livekit-client';\nimport * as React from 'react';\nimport { type FeatureFlags, LKFeatureContext, RoomContext } from '../context';\nimport { useLiveKitRoom } from '../hooks';\n\n/** @public */\nexport interface LiveKitRoomProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onError'> {\n /**\n * URL to the LiveKit server.\n * For example: `wss://<domain>.livekit.cloud`\n * To simplify the implementation, `undefined` is also accepted as an intermediate value, but only with a valid string url can the connection be established.\n */\n serverUrl: string | undefined;\n /**\n * A user specific access token for a client to authenticate to the room.\n * This token is necessary to establish a connection to the room.\n * To simplify the implementation, `undefined` is also accepted as an intermediate value, but only with a valid string token can the connection be established.\n *\n * @see https://docs.livekit.io/cloud/project-management/keys-and-tokens/#generating-access-tokens\n */\n token: string | undefined;\n /**\n * Publish audio immediately after connecting to your LiveKit room.\n * @defaultValue `false`\n * @see https://docs.livekit.io/client-sdk-js/interfaces/AudioCaptureOptions.html\n */\n audio?: AudioCaptureOptions | boolean;\n /**\n * Publish video immediately after connecting to your LiveKit room.\n * @defaultValue `false`\n * @see https://docs.livekit.io/client-sdk-js/interfaces/VideoCaptureOptions.html\n */\n video?: VideoCaptureOptions | boolean;\n /**\n * Publish screen share immediately after connecting to your LiveKit room.\n * @defaultValue `false`\n * @see https://docs.livekit.io/client-sdk-js/interfaces/ScreenShareCaptureOptions.html\n */\n screen?: ScreenShareCaptureOptions | boolean;\n /**\n * If set to true a connection to LiveKit room is initiated.\n * @defaultValue `true`\n */\n connect?: boolean;\n /**\n * Options for when creating a new room.\n * When you pass your own room instance to this component, these options have no effect.\n * Instead, set the options directly in the room instance.\n *\n * @see https://docs.livekit.io/client-sdk-js/interfaces/RoomOptions.html\n */\n options?: RoomOptions;\n /**\n * Define options how to connect to the LiveKit server.\n *\n * @see https://docs.livekit.io/client-sdk-js/interfaces/RoomConnectOptions.html\n */\n connectOptions?: RoomConnectOptions;\n onConnected?: () => void;\n onDisconnected?: (reason?: DisconnectReason) => void;\n onError?: (error: Error) => void;\n onMediaDeviceFailure?: (failure?: MediaDeviceFailure, kind?: MediaDeviceKind) => void;\n onEncryptionError?: (error: Error) => void;\n /**\n * Optional room instance.\n * By passing your own room instance you overwrite the `options` parameter,\n * make sure to set the options directly on the room instance itself.\n */\n room?: Room;\n\n simulateParticipants?: number | undefined;\n\n /**\n * @internal\n */\n featureFlags?: FeatureFlags;\n}\n\n/**\n * The `LiveKitRoom` component provides the room context to all its child components.\n * It is generally the starting point of your LiveKit app and the root of the LiveKit component tree.\n * It provides the room state as a React context to all child components, so you don't have to pass it yourself.\n *\n * @example\n * ```tsx\n * <LiveKitRoom\n * token='<livekit-token>'\n * serverUrl='<url-to-livekit-server>'\n * connect={true}\n * >\n * ...\n * </LiveKitRoom>\n * ```\n * @public\n */\nexport const LiveKitRoom: (\n props: React.PropsWithChildren<LiveKitRoomProps> & React.RefAttributes<HTMLDivElement>,\n) => React.ReactNode = /* @__PURE__ */ React.forwardRef<\n HTMLDivElement,\n React.PropsWithChildren<LiveKitRoomProps>\n>(function LiveKitRoom(props: React.PropsWithChildren<LiveKitRoomProps>, ref) {\n const { room, htmlProps } = useLiveKitRoom(props);\n return (\n <div ref={ref} {...htmlProps}>\n {room && (\n <RoomContext.Provider value={room}>\n <LKFeatureContext.Provider value={props.featureFlags}>\n {props.children}\n </LKFeatureContext.Provider>\n </RoomContext.Provider>\n )}\n </div>\n );\n});\n","import * as React from 'react';\nimport { type TrackReference } from '@livekit/components-core';\nimport { useEnsureTrackRef } from '../../context';\nimport { useMultibandTrackVolume } from '../../hooks';\n\n/**\n * @public\n * @deprecated Use BarVisualizer instead\n */\nexport interface AudioVisualizerProps extends React.HTMLAttributes<SVGElement> {\n trackRef?: TrackReference;\n}\n\n/**\n * The AudioVisualizer component is used to visualize the audio volume of a given audio track.\n * @remarks\n * Requires a `TrackReferenceOrPlaceholder` to be provided either as a property or via the `TrackRefContext`.\n * @example\n * ```tsx\n * <AudioVisualizer />\n * ```\n * @public\n * @deprecated Use BarVisualizer instead\n */\nexport const AudioVisualizer: (\n props: AudioVisualizerProps & React.RefAttributes<SVGSVGElement>,\n) => React.ReactNode = /* @__PURE__ */ React.forwardRef<SVGSVGElement, AudioVisualizerProps>(\n function AudioVisualizer({ trackRef, ...props }: AudioVisualizerProps, ref) {\n const svgWidth = 200;\n const svgHeight = 90;\n const barWidth = 6;\n const barSpacing = 4;\n const volMultiplier = 50;\n const barCount = 7;\n const trackReference = useEnsureTrackRef(trackRef);\n\n const volumes = useMultibandTrackVolume(trackReference, { bands: 7, loPass: 300 });\n\n return (\n <svg\n ref={ref}\n width=\"100%\"\n height=\"100%\"\n viewBox={`0 0 ${svgWidth} ${svgHeight}`}\n {...props}\n className=\"lk-audio-visualizer\"\n >\n <rect x=\"0\" y=\"0\" width=\"100%\" height=\"100%\" />\n <g\n style={{\n transform: `translate(${(svgWidth - barCount * (barWidth + barSpacing)) / 2}px, 0)`,\n }}\n >\n {volumes.map((vol, idx) => (\n <rect\n key={idx}\n x={idx * (barWidth + barSpacing)}\n y={svgHeight / 2 - (vol * volMultiplier) / 2}\n width={barWidth}\n height={vol * volMultiplier}\n ></rect>\n ))}\n </g>\n </svg>\n );\n },\n);\n","import type { Participant } from 'livekit-client';\nimport * as React from 'react';\nimport { ParticipantContext } from '../context';\nimport { cloneSingleChild } from '../utils';\n\n/** @public */\nexport interface ParticipantLoopProps {\n /** The participants to loop over. Use `useParticipants()` hook to get participants. */\n participants: Participant[];\n /** The template component to be used in the loop. */\n children: React.ReactNode;\n}\n\n/**\n * The `ParticipantLoop` component loops over an array of participants to create a context for every participant.\n * This component takes exactly one child component as a template.\n * By providing your own template as a child you have full control over the look and feel of your participant representations.\n *\n * @remarks\n * If you want to loop over individual tracks instead of participants, you can use the `TrackLoop` component.\n *\n * @example\n * ```tsx\n * const participants = useParticipants();\n * <ParticipantLoop participants={participants}>\n * <ParticipantName />\n * </ParticipantLoop>\n * ```\n * @public\n */\nexport function ParticipantLoop({ participants, ...props }: ParticipantLoopProps) {\n return (\n <>\n {participants.map((participant) => (\n <ParticipantContext.Provider value={participant} key={participant.identity}>\n {cloneSingleChild(props.children)}\n </ParticipantContext.Provider>\n ))}\n </>\n );\n}\n","import * as React from 'react';\nimport { useRoomInfo } from '../hooks';\n\n/** @public */\nexport interface RoomNameProps extends React.HTMLAttributes<HTMLSpanElement> {\n childrenPosition?: 'before' | 'after';\n}\n\n/**\n * The `RoomName` component renders the name of the connected LiveKit room inside a span tag.\n *\n * @example\n * ```tsx\n * <LiveKitRoom>\n * <RoomName />\n * </LiveKitRoom>\n * ```\n * @public\n *\n * @param props - RoomNameProps\n */\nexport const RoomName: React.FC<RoomNameProps & React.RefAttributes<HTMLSpanElement>> =\n /* @__PURE__ */ React.forwardRef<HTMLSpanElement, RoomNameProps>(function RoomName(\n { childrenPosition = 'before', children, ...htmlAttributes }: RoomNameProps,\n ref,\n ) {\n const { name } = useRoomInfo();\n\n return (\n <span ref={ref} {...htmlAttributes}>\n {childrenPosition === 'before' && children}\n {name}\n {childrenPosition === 'after' && children}\n </span>\n );\n });\n","import * as React from 'react';\nimport { UseSessionReturn } from '../hooks';\nimport { RoomContext } from '../context';\nimport { SessionContext } from '../context/session-context';\n\n/** @beta */\nexport type SessionProviderProps = {\n session: UseSessionReturn;\n children: React.ReactNode;\n};\n\n/**\n * The `SessionProvider` component instantiates a SessionContext from the return of useSession\n * @beta\n */\nexport function SessionProvider(props: SessionProviderProps) {\n return (\n <SessionContext.Provider value={props.session}>\n <RoomContext.Provider value={props.session.room}>{props.children}</RoomContext.Provider>\n </SessionContext.Provider>\n );\n}\n"],"names":["ClearPinButton","React","props","ref","buttonProps","useClearPinButton","ConnectionState","room","connectionState","useConnectionState","StartAudio","label","useEnsureRoom","mergedProps","useStartAudio","LiveKitRoom","htmlProps","useLiveKitRoom","RoomContext","LKFeatureContext","AudioVisualizer","trackRef","trackReference","useEnsureTrackRef","volumes","useMultibandTrackVolume","vol","idx","ParticipantLoop","participants","participant","ParticipantContext","cloneSingleChild","RoomName","childrenPosition","children","htmlAttributes","name","useRoomInfo","SessionProvider","SessionContext"],"mappings":"2gBAoBaA,EAE0BC,EAAM,WAC3C,SAAwBC,EAA4BC,EAAK,CACvD,KAAM,CAAE,YAAAC,CAAA,EAAgBC,EAAAA,kBAAkBH,CAAK,EAC/C,uBACG,SAAA,CAAO,IAAAC,EAAW,GAAGC,CAAA,EACnBF,EAAM,QACT,CAEJ,CACF,ECPaI,EAE0BL,EAAM,WAC3C,SAAyB,CAAE,KAAAM,EAAM,GAAGL,CAAA,EAAgCC,EAAK,CACvE,MAAMK,EAAkBC,EAAAA,mBAAmBF,CAAI,EAC/C,OACEN,EAAA,cAAC,MAAA,CAAI,IAAAE,EAAW,GAAGD,GAChBM,CACH,CAEJ,CACF,ECTaE,EAE0BT,EAAM,WAC3C,SAAoB,CAAE,MAAAU,EAAQ,cAAe,GAAGT,CAAA,EAAkCC,EAAK,CACrF,MAAMI,EAAOK,EAAAA,cAAcV,EAAM,IAAI,EAC/B,CAAE,YAAAW,CAAA,EAAgBC,EAAAA,cAAc,CAAE,KAAAP,EAAM,MAAAL,EAAO,EAErD,OACED,EAAA,cAAC,SAAA,CAAO,IAAAE,EAAW,GAAGU,GACnBF,CACH,CAEJ,CACF,ECgEaI,EAE0Bd,EAAM,WAG3C,SAAqBC,EAAkDC,EAAK,CAC5E,KAAM,CAAE,KAAAI,EAAM,UAAAS,GAAcC,EAAAA,eAAef,CAAK,EAChD,OACED,EAAA,cAAC,OAAI,IAAAE,EAAW,GAAGa,GAChBT,GACCN,EAAA,cAACiB,EAAAA,YAAY,SAAZ,CAAqB,MAAOX,GAC3BN,EAAA,cAACkB,EAAAA,iBAAiB,SAAjB,CAA0B,MAAOjB,EAAM,YAAA,EACrCA,EAAM,QACT,CACF,CAEJ,CAEJ,CAAC,ECjGYkB,EAE0BnB,EAAM,WAC3C,SAAyB,CAAE,SAAAoB,EAAU,GAAGnB,CAAA,EAA+BC,EAAK,CAO1E,MAAMmB,EAAiBC,EAAAA,kBAAkBF,CAAQ,EAE3CG,EAAUC,EAAAA,wBAAwBH,EAAgB,CAAE,MAAO,EAAG,OAAQ,IAAK,EAEjF,OACErB,EAAA,cAAC,MAAA,CACC,IAAAE,EACA,MAAM,OACN,OAAO,OACP,QAAS,aACR,GAAGD,EACJ,UAAU,qBAAA,EAEVD,EAAA,cAAC,QAAK,EAAE,IAAI,EAAE,IAAI,MAAM,OAAO,OAAO,MAAA,CAAO,EAC7CA,EAAA,cAAC,IAAA,CACC,MAAO,CACL,UAAW,aAAc,IAAiD,CAAC,QAAA,CAC7E,EAECuB,EAAQ,IAAI,CAACE,EAAKC,IACjB1B,EAAA,cAAC,OAAA,CACC,IAAK0B,EACL,EAAGA,EAAO,GACV,EAAG,GAAY,EAAKD,EAAM,GAAiB,EAC3C,MAAO,EACP,OAAQA,EAAM,EAAA,CAAA,CAEjB,CAAA,CACH,CAGN,CACF,ECpCO,SAASE,EAAgB,CAAE,aAAAC,EAAc,GAAG3B,GAA+B,CAChF,uCAEK2B,EAAa,IAAKC,GACjB7B,EAAA,cAAC8B,EAAAA,mBAAmB,SAAnB,CAA4B,MAAOD,EAAa,IAAKA,EAAY,QAAA,EAC/DE,mBAAiB9B,EAAM,QAAQ,CAClC,CACD,CACH,CAEJ,CCnBO,MAAM+B,EACKhC,EAAM,WAA2C,SAC/D,CAAE,iBAAAiC,EAAmB,SAAU,SAAAC,EAAU,GAAGC,CAAA,EAC5CjC,EACA,CACA,KAAM,CAAE,KAAAkC,CAAA,EAASC,cAAA,EAEjB,OACErC,EAAA,cAAC,OAAA,CAAK,IAAAE,EAAW,GAAGiC,CAAA,EACjBF,IAAqB,UAAYC,EACjCE,EACAH,IAAqB,SAAWC,CACnC,CAEJ,CAAC,ECpBI,SAASI,EAAgBrC,EAA6B,CAC3D,uBACGsC,iBAAe,SAAf,CAAwB,MAAOtC,EAAM,OAAA,EACpCD,EAAA,cAACiB,cAAY,SAAZ,CAAqB,MAAOhB,EAAM,QAAQ,IAAA,EAAOA,EAAM,QAAS,CACnE,CAEJ"}
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { R as e, a5 as t, a2 as o, S as n, D as i, U as u, w as r, b as c, u as C, i as d, a as l, E as p, c as P, a4 as T, F as k, d as x, n as I, m, G as S, _ as g, H as y, C as L, A as f, e as M, y as R, s as v, o as A, Z as h, Y as E, I as b, J as B, l as D, V, K as F, x as Q, B as w, L as N, M as G, v as U, a1 as K, a3 as z, a6 as j, N as J, O as W, f as q, g as H, p as O, $ as X, P as Y, Q as Z, k as _, h as $, W as aa, T as sa, t as ea, a0 as ta, r as oa, X as na } from "./hooks-hQJmeINB.mjs";
|
|
2
|
+
import { L as ua, u as ra } from "./room-BP3SCCCd.mjs";
|
|
3
|
+
import { AudioConference as Ca, Chat as da, ControlBar as la, MediaDeviceMenu as pa, PreJoin as Pa, VideoConference as Ta, VoiceAssistantControlBar as ka, usePreviewDevice as xa, usePreviewTracks as Ia } from "./prefabs.mjs";
|
|
4
|
+
import { L as Sa, af as ga, aj as ya, R as La, ak as fa, a1 as Ma, az as Ra, ay as va, av as Aa, ao as ha, F as Ea, c as ba, u as Ba, ad as Da, i as Va, al as Fa, a as Qa, j as wa, B as Na, w as Ga, ac as Ua, ae as Ka, aA as za, f as ja, aB as Ja, aC as Wa } from "./contexts-D4V9wQRc.mjs";
|
|
5
|
+
import { s as Ha, A as Oa, B as Xa, E as Ya, H as Za, g as _a, S as $a, a as as, c as ss, C as es, I as ts, n as os, r as ns, o as is, i as us, D as rs, h as cs, F as Cs, p as ds, J as ls, d as ps, G as Ps, L as Ts, e as ks, K as xs, M as Is, N as ms, O as Ss, k as gs, x as ys, v as Ls, t as fs, b as Ms, P as Rs, Q as vs, U as As, W as hs, X as Es, R as bs, w as Bs, Y as Ds, Z as Vs, z as Fs, _ as Qs, q as ws, f as Ns, l as Gs, j as Us, u as Ks, y as zs, T as js, $ as Js, V as Ws, m as qs } from "./components-lNrIMTWQ.mjs";
|
|
6
|
+
export {
|
|
7
|
+
e as AgentEvent,
|
|
8
|
+
Ca as AudioConference,
|
|
9
|
+
Ha as AudioTrack,
|
|
10
|
+
Oa as AudioVisualizer,
|
|
11
|
+
Xa as BarVisualizer,
|
|
12
|
+
Ya as CameraDisabledIcon,
|
|
13
|
+
Za as CameraIcon,
|
|
14
|
+
_a as CarouselLayout,
|
|
15
|
+
da as Chat,
|
|
16
|
+
$a as ChatCloseIcon,
|
|
17
|
+
as as ChatEntry,
|
|
18
|
+
ss as ChatIcon,
|
|
19
|
+
es as ChatToggle,
|
|
20
|
+
ts as Chevron,
|
|
21
|
+
os as ClearPinButton,
|
|
22
|
+
ns as ConnectionQualityIndicator,
|
|
23
|
+
is as ConnectionState,
|
|
24
|
+
us as ConnectionStateToast,
|
|
25
|
+
la as ControlBar,
|
|
26
|
+
rs as DisconnectButton,
|
|
27
|
+
cs as FocusLayout,
|
|
28
|
+
Cs as FocusLayoutContainer,
|
|
29
|
+
ds as FocusToggle,
|
|
30
|
+
ls as FocusToggleIcon,
|
|
31
|
+
ps as GearIcon,
|
|
32
|
+
Ps as GridLayout,
|
|
33
|
+
Sa as LKFeatureContext,
|
|
34
|
+
ga as LayoutContext,
|
|
35
|
+
Ts as LayoutContextProvider,
|
|
36
|
+
ks as LeaveIcon,
|
|
37
|
+
ua as LiveKitRoom,
|
|
38
|
+
xs as LockLockedIcon,
|
|
39
|
+
pa as MediaDeviceMenu,
|
|
40
|
+
Is as MediaDeviceSelect,
|
|
41
|
+
t as MessagesEvent,
|
|
42
|
+
ms as MicDisabledIcon,
|
|
43
|
+
Ss as MicIcon,
|
|
44
|
+
gs as ParticipantAudioTile,
|
|
45
|
+
ya as ParticipantContext,
|
|
46
|
+
ys as ParticipantContextIfNeeded,
|
|
47
|
+
Ls as ParticipantLoop,
|
|
48
|
+
fs as ParticipantName,
|
|
49
|
+
Ms as ParticipantPlaceholder,
|
|
50
|
+
Rs as ParticipantTile,
|
|
51
|
+
Pa as PreJoin,
|
|
52
|
+
vs as QualityExcellentIcon,
|
|
53
|
+
As as QualityGoodIcon,
|
|
54
|
+
hs as QualityPoorIcon,
|
|
55
|
+
Es as QualityUnknownIcon,
|
|
56
|
+
bs as RoomAudioRenderer,
|
|
57
|
+
La as RoomContext,
|
|
58
|
+
Bs as RoomName,
|
|
59
|
+
Ds as ScreenShareIcon,
|
|
60
|
+
Vs as ScreenShareStopIcon,
|
|
61
|
+
o as SessionEvent,
|
|
62
|
+
Fs as SessionProvider,
|
|
63
|
+
Qs as SpinnerIcon,
|
|
64
|
+
ws as StartAudio,
|
|
65
|
+
Ns as StartMediaButton,
|
|
66
|
+
Gs as Toast,
|
|
67
|
+
Us as TrackLoop,
|
|
68
|
+
Ks as TrackMutedIndicator,
|
|
69
|
+
fa as TrackRefContext,
|
|
70
|
+
zs as TrackRefContextIfNeeded,
|
|
71
|
+
js as TrackToggle,
|
|
72
|
+
Js as UnfocusToggleIcon,
|
|
73
|
+
Ta as VideoConference,
|
|
74
|
+
Ws as VideoTrack,
|
|
75
|
+
ka as VoiceAssistantControlBar,
|
|
76
|
+
qs as formatChatMessageLinks,
|
|
77
|
+
Ma as isTrackReference,
|
|
78
|
+
Ra as setLogExtension,
|
|
79
|
+
va as setLogLevel,
|
|
80
|
+
n as useAgent,
|
|
81
|
+
i as useAudioPlayback,
|
|
82
|
+
u as useAudioWaveform,
|
|
83
|
+
r as useChat,
|
|
84
|
+
c as useChatToggle,
|
|
85
|
+
C as useClearPinButton,
|
|
86
|
+
d as useConnectionQualityIndicator,
|
|
87
|
+
l as useConnectionState,
|
|
88
|
+
Aa as useCreateLayoutContext,
|
|
89
|
+
p as useDataChannel,
|
|
90
|
+
P as useDisconnectButton,
|
|
91
|
+
ha as useEnsureCreateLayoutContext,
|
|
92
|
+
Ea as useEnsureLayoutContext,
|
|
93
|
+
ba as useEnsureParticipant,
|
|
94
|
+
Ba as useEnsureRoom,
|
|
95
|
+
Da as useEnsureSession,
|
|
96
|
+
Va as useEnsureTrackRef,
|
|
97
|
+
T as useEvents,
|
|
98
|
+
k as useFacingMode,
|
|
99
|
+
Fa as useFeatureContext,
|
|
100
|
+
x as useFocusToggle,
|
|
101
|
+
I as useGridLayout,
|
|
102
|
+
m as useIsEncrypted,
|
|
103
|
+
S as useIsMuted,
|
|
104
|
+
g as useIsRecording,
|
|
105
|
+
y as useIsSpeaking,
|
|
106
|
+
Qa as useLayoutContext,
|
|
107
|
+
ra as useLiveKitRoom,
|
|
108
|
+
L as useLocalParticipant,
|
|
109
|
+
f as useLocalParticipantPermissions,
|
|
110
|
+
wa as useMaybeLayoutContext,
|
|
111
|
+
Na as useMaybeParticipantContext,
|
|
112
|
+
Ga as useMaybeRoomContext,
|
|
113
|
+
Ua as useMaybeSessionContext,
|
|
114
|
+
Ka as useMaybeTrackRefContext,
|
|
115
|
+
M as useMediaDeviceSelect,
|
|
116
|
+
R as useMediaDevices,
|
|
117
|
+
v as useMultibandTrackVolume,
|
|
118
|
+
A as usePagination,
|
|
119
|
+
h as useParticipantAttribute,
|
|
120
|
+
E as useParticipantAttributes,
|
|
121
|
+
za as useParticipantContext,
|
|
122
|
+
b as useParticipantInfo,
|
|
123
|
+
B as useParticipantPermissions,
|
|
124
|
+
D as useParticipantTile,
|
|
125
|
+
V as useParticipantTracks,
|
|
126
|
+
F as useParticipants,
|
|
127
|
+
Q as usePersistentUserChoices,
|
|
128
|
+
w as usePinnedTracks,
|
|
129
|
+
xa as usePreviewDevice,
|
|
130
|
+
Ia as usePreviewTracks,
|
|
131
|
+
N as useRemoteParticipant,
|
|
132
|
+
G as useRemoteParticipants,
|
|
133
|
+
ja as useRoomContext,
|
|
134
|
+
U as useRoomInfo,
|
|
135
|
+
K as useSequentialRoomConnectDisconnect,
|
|
136
|
+
z as useSession,
|
|
137
|
+
Ja as useSessionContext,
|
|
138
|
+
j as useSessionMessages,
|
|
139
|
+
J as useSortedParticipants,
|
|
140
|
+
W as useSpeakingParticipants,
|
|
141
|
+
q as useStartAudio,
|
|
142
|
+
H as useStartVideo,
|
|
143
|
+
O as useSwipe,
|
|
144
|
+
X as useTextStream,
|
|
145
|
+
Y as useToken,
|
|
146
|
+
Z as useTrackByName,
|
|
147
|
+
_ as useTrackMutedIndicator,
|
|
148
|
+
Wa as useTrackRefContext,
|
|
149
|
+
$ as useTrackToggle,
|
|
150
|
+
aa as useTrackTranscription,
|
|
151
|
+
sa as useTrackVolume,
|
|
152
|
+
ea as useTracks,
|
|
153
|
+
ta as useTranscriptions,
|
|
154
|
+
oa as useVisualStableUpdate,
|
|
155
|
+
na as useVoiceAssistant
|
|
156
|
+
};
|
|
157
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
package/dist/krisp.d.ts
ADDED
package/dist/krisp.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var P=Object.create;var d=Object.defineProperty;var N=Object.getOwnPropertyDescriptor;var S=Object.getOwnPropertyNames;var F=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty;var y=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of S(t))!h.call(e,s)&&s!==r&&d(e,s,{get:()=>t[s],enumerable:!(n=N(t,s))||n.enumerable});return e};var E=(e,t,r)=>(r=e!=null?P(F(e)):{},y(t||!e||!e.__esModule?d(r,"default",{value:e,enumerable:!0}):r,e));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const K=require("react"),m=require("livekit-client"),p=require("./shared-BDr0qLg4.js");function O(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const c=O(K);function j(e={}){const[t,r]=c.useState(!1),[n,s]=c.useState(!1),[b,u]=c.useState(!1);let i=p.useLocalParticipant().microphoneTrack;const[a,g]=c.useState();e.trackRef&&(i=e.trackRef.publication);const k=c.useCallback(async l=>{if(l){const{KrispNoiseFilter:o,isKrispNoiseFilterSupported:f}=await import("@livekit/krisp-noise-filter");if(!f()){p.log.warn("LiveKit-Krisp noise filter is not supported in this browser");return}a||g(o(e.filterOptions))}r(o=>(o!==l&&s(!0),l))},[]);return c.useEffect(()=>{var l;if(i&&i.track instanceof m.LocalAudioTrack&&a){const o=i.track.getProcessor();o&&o.name==="livekit-noise-filter"?(s(!0),o.setEnabled(t).finally(()=>{s(!1),u(t)})):!o&&t&&(s(!0),(l=i==null?void 0:i.track)==null||l.setProcessor(a).then(()=>a.setEnabled(t)).then(()=>{u(!0)}).catch(f=>{u(!1),p.log.error("Krisp hook: error enabling filter",f)}).finally(()=>{s(!1)}))}},[t,i,a]),{setNoiseFilterEnabled:k,isNoiseFilterEnabled:b,isNoiseFilterPending:n,processor:a}}exports.useKrispNoiseFilter=j;
|
|
2
|
+
//# sourceMappingURL=krisp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"krisp.js","sources":["../src/hooks/cloud/krisp/useKrispNoiseFilter.ts"],"sourcesContent":["import * as React from 'react';\nimport { LocalAudioTrack } from 'livekit-client';\nimport { log } from '@livekit/components-core';\nimport type { KrispNoiseFilterProcessor, NoiseFilterOptions } from '@livekit/krisp-noise-filter';\nimport type { TrackReferenceOrPlaceholder } from '@livekit/components-core';\nimport { useLocalParticipant } from '../../..';\n\n/**\n * @beta\n */\nexport interface useKrispNoiseFilterOptions {\n /**\n * The track reference to use for the noise filter (defaults: local microphone track)\n */\n trackRef?: TrackReferenceOrPlaceholder;\n /**\n * @internal\n */\n filterOptions?: NoiseFilterOptions;\n}\n\n/**\n * Enable the Krisp enhanced noise cancellation feature for local audio tracks.\n *\n * Defaults to the localParticipant's microphone track publication, but you can override this behavior by passing in a different track reference.\n *\n * @package \\@livekit/components-react/krisp\n * @remarks This filter requires that you install the `@livekit/krisp-noise-filter` package and is supported only on {@link https://cloud.livekit.io | LiveKit Cloud}.\n * @beta\n * @example\n * ```tsx\n * const krisp = useKrispNoiseFilter();\n * return <input\n * type=\"checkbox\"\n * onChange={(ev) => krisp.setNoiseFilterEnabled(ev.target.checked)}\n * checked={krisp.isNoiseFilterEnabled}\n * disabled={krisp.isNoiseFilterPending}\n * />\n * ```\n * @returns Use `setIsNoiseFilterEnabled` to enable/disable the noise filter.\n */\nexport function useKrispNoiseFilter(options: useKrispNoiseFilterOptions = {}) {\n const [shouldEnable, setShouldEnable] = React.useState(false);\n const [isNoiseFilterPending, setIsNoiseFilterPending] = React.useState(false);\n const [isNoiseFilterEnabled, setIsNoiseFilterEnabled] = React.useState(false);\n let micPublication = useLocalParticipant().microphoneTrack;\n const [krispProcessor, setKrispProcessor] = React.useState<\n KrispNoiseFilterProcessor | undefined\n >();\n if (options.trackRef) {\n micPublication = options.trackRef.publication;\n }\n\n const setNoiseFilterEnabled = React.useCallback(async (enable: boolean) => {\n if (enable) {\n const { KrispNoiseFilter, isKrispNoiseFilterSupported } = await import(\n '@livekit/krisp-noise-filter'\n );\n\n if (!isKrispNoiseFilterSupported()) {\n log.warn('LiveKit-Krisp noise filter is not supported in this browser');\n return;\n }\n if (!krispProcessor) {\n setKrispProcessor(KrispNoiseFilter(options.filterOptions));\n }\n }\n setShouldEnable((prev) => {\n if (prev !== enable) {\n setIsNoiseFilterPending(true);\n }\n return enable;\n });\n }, []);\n\n React.useEffect(() => {\n if (micPublication && micPublication.track instanceof LocalAudioTrack && krispProcessor) {\n const currentProcessor = micPublication.track.getProcessor();\n if (currentProcessor && currentProcessor.name === 'livekit-noise-filter') {\n setIsNoiseFilterPending(true);\n (currentProcessor as KrispNoiseFilterProcessor).setEnabled(shouldEnable).finally(() => {\n setIsNoiseFilterPending(false);\n setIsNoiseFilterEnabled(shouldEnable);\n });\n } else if (!currentProcessor && shouldEnable) {\n setIsNoiseFilterPending(true);\n micPublication?.track\n ?.setProcessor(krispProcessor)\n .then(() => krispProcessor.setEnabled(shouldEnable))\n .then(() => {\n setIsNoiseFilterEnabled(true);\n })\n .catch((e: any) => {\n setIsNoiseFilterEnabled(false);\n log.error('Krisp hook: error enabling filter', e);\n })\n .finally(() => {\n setIsNoiseFilterPending(false);\n });\n }\n }\n }, [shouldEnable, micPublication, krispProcessor]);\n\n return {\n setNoiseFilterEnabled,\n isNoiseFilterEnabled,\n isNoiseFilterPending,\n processor: krispProcessor,\n };\n}\n"],"names":["useKrispNoiseFilter","options","shouldEnable","setShouldEnable","React","isNoiseFilterPending","setIsNoiseFilterPending","isNoiseFilterEnabled","setIsNoiseFilterEnabled","micPublication","useLocalParticipant","krispProcessor","setKrispProcessor","setNoiseFilterEnabled","enable","KrispNoiseFilter","isKrispNoiseFilterSupported","log","prev","LocalAudioTrack","currentProcessor","_a","e"],"mappings":"44BAyCO,SAASA,EAAoBC,EAAsC,GAAI,CAC5E,KAAM,CAACC,EAAcC,CAAe,EAAIC,EAAM,SAAS,EAAK,EACtD,CAACC,EAAsBC,CAAuB,EAAIF,EAAM,SAAS,EAAK,EACtE,CAACG,EAAsBC,CAAuB,EAAIJ,EAAM,SAAS,EAAK,EAC5E,IAAIK,EAAiBC,EAAAA,sBAAsB,gBAC3C,KAAM,CAACC,EAAgBC,CAAiB,EAAIR,EAAM,SAAA,EAG9CH,EAAQ,WACVQ,EAAiBR,EAAQ,SAAS,aAGpC,MAAMY,EAAwBT,EAAM,YAAY,MAAOU,GAAoB,CACzE,GAAIA,EAAQ,CACV,KAAM,CAAE,iBAAAC,EAAkB,4BAAAC,GAAgC,KAAM,QAC9D,6BACF,EAEA,GAAI,CAACA,IAA+B,CAClCC,EAAAA,IAAI,KAAK,6DAA6D,EACtE,MACF,CACKN,GACHC,EAAkBG,EAAiBd,EAAQ,aAAa,CAAC,CAE7D,CACAE,EAAiBe,IACXA,IAASJ,GACXR,EAAwB,EAAI,EAEvBQ,EACR,CACH,EAAG,CAAA,CAAE,EAELV,OAAAA,EAAM,UAAU,IAAM,OACpB,GAAIK,GAAkBA,EAAe,iBAAiBU,EAAAA,iBAAmBR,EAAgB,CACvF,MAAMS,EAAmBX,EAAe,MAAM,aAAA,EAC1CW,GAAoBA,EAAiB,OAAS,wBAChDd,EAAwB,EAAI,EAC3Bc,EAA+C,WAAWlB,CAAY,EAAE,QAAQ,IAAM,CACrFI,EAAwB,EAAK,EAC7BE,EAAwBN,CAAY,CACtC,CAAC,GACQ,CAACkB,GAAoBlB,IAC9BI,EAAwB,EAAI,GAC5Be,EAAAZ,GAAA,YAAAA,EAAgB,QAAhB,MAAAY,EACI,aAAaV,GACd,KAAK,IAAMA,EAAe,WAAWT,CAAY,GACjD,KAAK,IAAM,CACVM,EAAwB,EAAI,CAC9B,GACC,MAAOc,GAAW,CACjBd,EAAwB,EAAK,EAC7BS,MAAI,MAAM,oCAAqCK,CAAC,CAClD,GACC,QAAQ,IAAM,CACbhB,EAAwB,EAAK,CAC/B,GAEN,CACF,EAAG,CAACJ,EAAcO,EAAgBE,CAAc,CAAC,EAE1C,CACL,sBAAAE,EACA,qBAAAN,EACA,qBAAAF,EACA,UAAWM,CAAA,CAEf"}
|
package/dist/krisp.mjs
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import * as i from "react";
|
|
2
|
+
import { LocalAudioTrack as b } from "livekit-client";
|
|
3
|
+
import { l as f } from "./contexts-D4V9wQRc.mjs";
|
|
4
|
+
import { C as h } from "./hooks-hQJmeINB.mjs";
|
|
5
|
+
function K(l = {}) {
|
|
6
|
+
const [o, u] = i.useState(!1), [p, a] = i.useState(!1), [d, n] = i.useState(!1);
|
|
7
|
+
let e = h().microphoneTrack;
|
|
8
|
+
const [s, k] = i.useState();
|
|
9
|
+
l.trackRef && (e = l.trackRef.publication);
|
|
10
|
+
const m = i.useCallback(async (t) => {
|
|
11
|
+
if (t) {
|
|
12
|
+
const { KrispNoiseFilter: r, isKrispNoiseFilterSupported: c } = await import("@livekit/krisp-noise-filter");
|
|
13
|
+
if (!c()) {
|
|
14
|
+
f.warn("LiveKit-Krisp noise filter is not supported in this browser");
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
s || k(r(l.filterOptions));
|
|
18
|
+
}
|
|
19
|
+
u((r) => (r !== t && a(!0), t));
|
|
20
|
+
}, []);
|
|
21
|
+
return i.useEffect(() => {
|
|
22
|
+
var t;
|
|
23
|
+
if (e && e.track instanceof b && s) {
|
|
24
|
+
const r = e.track.getProcessor();
|
|
25
|
+
r && r.name === "livekit-noise-filter" ? (a(!0), r.setEnabled(o).finally(() => {
|
|
26
|
+
a(!1), n(o);
|
|
27
|
+
})) : !r && o && (a(!0), (t = e == null ? void 0 : e.track) == null || t.setProcessor(s).then(() => s.setEnabled(o)).then(() => {
|
|
28
|
+
n(!0);
|
|
29
|
+
}).catch((c) => {
|
|
30
|
+
n(!1), f.error("Krisp hook: error enabling filter", c);
|
|
31
|
+
}).finally(() => {
|
|
32
|
+
a(!1);
|
|
33
|
+
}));
|
|
34
|
+
}
|
|
35
|
+
}, [o, e, s]), {
|
|
36
|
+
setNoiseFilterEnabled: m,
|
|
37
|
+
isNoiseFilterEnabled: d,
|
|
38
|
+
isNoiseFilterPending: p,
|
|
39
|
+
processor: s
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
export {
|
|
43
|
+
K as useKrispNoiseFilter
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=krisp.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"krisp.mjs","sources":["../src/hooks/cloud/krisp/useKrispNoiseFilter.ts"],"sourcesContent":["import * as React from 'react';\nimport { LocalAudioTrack } from 'livekit-client';\nimport { log } from '@livekit/components-core';\nimport type { KrispNoiseFilterProcessor, NoiseFilterOptions } from '@livekit/krisp-noise-filter';\nimport type { TrackReferenceOrPlaceholder } from '@livekit/components-core';\nimport { useLocalParticipant } from '../../..';\n\n/**\n * @beta\n */\nexport interface useKrispNoiseFilterOptions {\n /**\n * The track reference to use for the noise filter (defaults: local microphone track)\n */\n trackRef?: TrackReferenceOrPlaceholder;\n /**\n * @internal\n */\n filterOptions?: NoiseFilterOptions;\n}\n\n/**\n * Enable the Krisp enhanced noise cancellation feature for local audio tracks.\n *\n * Defaults to the localParticipant's microphone track publication, but you can override this behavior by passing in a different track reference.\n *\n * @package \\@livekit/components-react/krisp\n * @remarks This filter requires that you install the `@livekit/krisp-noise-filter` package and is supported only on {@link https://cloud.livekit.io | LiveKit Cloud}.\n * @beta\n * @example\n * ```tsx\n * const krisp = useKrispNoiseFilter();\n * return <input\n * type=\"checkbox\"\n * onChange={(ev) => krisp.setNoiseFilterEnabled(ev.target.checked)}\n * checked={krisp.isNoiseFilterEnabled}\n * disabled={krisp.isNoiseFilterPending}\n * />\n * ```\n * @returns Use `setIsNoiseFilterEnabled` to enable/disable the noise filter.\n */\nexport function useKrispNoiseFilter(options: useKrispNoiseFilterOptions = {}) {\n const [shouldEnable, setShouldEnable] = React.useState(false);\n const [isNoiseFilterPending, setIsNoiseFilterPending] = React.useState(false);\n const [isNoiseFilterEnabled, setIsNoiseFilterEnabled] = React.useState(false);\n let micPublication = useLocalParticipant().microphoneTrack;\n const [krispProcessor, setKrispProcessor] = React.useState<\n KrispNoiseFilterProcessor | undefined\n >();\n if (options.trackRef) {\n micPublication = options.trackRef.publication;\n }\n\n const setNoiseFilterEnabled = React.useCallback(async (enable: boolean) => {\n if (enable) {\n const { KrispNoiseFilter, isKrispNoiseFilterSupported } = await import(\n '@livekit/krisp-noise-filter'\n );\n\n if (!isKrispNoiseFilterSupported()) {\n log.warn('LiveKit-Krisp noise filter is not supported in this browser');\n return;\n }\n if (!krispProcessor) {\n setKrispProcessor(KrispNoiseFilter(options.filterOptions));\n }\n }\n setShouldEnable((prev) => {\n if (prev !== enable) {\n setIsNoiseFilterPending(true);\n }\n return enable;\n });\n }, []);\n\n React.useEffect(() => {\n if (micPublication && micPublication.track instanceof LocalAudioTrack && krispProcessor) {\n const currentProcessor = micPublication.track.getProcessor();\n if (currentProcessor && currentProcessor.name === 'livekit-noise-filter') {\n setIsNoiseFilterPending(true);\n (currentProcessor as KrispNoiseFilterProcessor).setEnabled(shouldEnable).finally(() => {\n setIsNoiseFilterPending(false);\n setIsNoiseFilterEnabled(shouldEnable);\n });\n } else if (!currentProcessor && shouldEnable) {\n setIsNoiseFilterPending(true);\n micPublication?.track\n ?.setProcessor(krispProcessor)\n .then(() => krispProcessor.setEnabled(shouldEnable))\n .then(() => {\n setIsNoiseFilterEnabled(true);\n })\n .catch((e: any) => {\n setIsNoiseFilterEnabled(false);\n log.error('Krisp hook: error enabling filter', e);\n })\n .finally(() => {\n setIsNoiseFilterPending(false);\n });\n }\n }\n }, [shouldEnable, micPublication, krispProcessor]);\n\n return {\n setNoiseFilterEnabled,\n isNoiseFilterEnabled,\n isNoiseFilterPending,\n processor: krispProcessor,\n };\n}\n"],"names":["useKrispNoiseFilter","options","shouldEnable","setShouldEnable","React","isNoiseFilterPending","setIsNoiseFilterPending","isNoiseFilterEnabled","setIsNoiseFilterEnabled","micPublication","useLocalParticipant","krispProcessor","setKrispProcessor","setNoiseFilterEnabled","enable","KrispNoiseFilter","isKrispNoiseFilterSupported","log","prev","LocalAudioTrack","currentProcessor","_a","e"],"mappings":";;;;AAyCO,SAASA,EAAoBC,IAAsC,IAAI;AAC5E,QAAM,CAACC,GAAcC,CAAe,IAAIC,EAAM,SAAS,EAAK,GACtD,CAACC,GAAsBC,CAAuB,IAAIF,EAAM,SAAS,EAAK,GACtE,CAACG,GAAsBC,CAAuB,IAAIJ,EAAM,SAAS,EAAK;AAC5E,MAAIK,IAAiBC,IAAsB;AAC3C,QAAM,CAACC,GAAgBC,CAAiB,IAAIR,EAAM,SAAA;AAGlD,EAAIH,EAAQ,aACVQ,IAAiBR,EAAQ,SAAS;AAGpC,QAAMY,IAAwBT,EAAM,YAAY,OAAOU,MAAoB;AACzE,QAAIA,GAAQ;AACV,YAAM,EAAE,kBAAAC,GAAkB,6BAAAC,MAAgC,MAAM,OAC9D,6BACF;AAEA,UAAI,CAACA,KAA+B;AAClC,QAAAC,EAAI,KAAK,6DAA6D;AACtE;AAAA,MACF;AACA,MAAKN,KACHC,EAAkBG,EAAiBd,EAAQ,aAAa,CAAC;AAAA,IAE7D;AACA,IAAAE,EAAgB,CAACe,OACXA,MAASJ,KACXR,EAAwB,EAAI,GAEvBQ,EACR;AAAA,EACH,GAAG,CAAA,CAAE;AAEL,SAAAV,EAAM,UAAU,MAAM;;AACpB,QAAIK,KAAkBA,EAAe,iBAAiBU,KAAmBR,GAAgB;AACvF,YAAMS,IAAmBX,EAAe,MAAM,aAAA;AAC9C,MAAIW,KAAoBA,EAAiB,SAAS,0BAChDd,EAAwB,EAAI,GAC3Bc,EAA+C,WAAWlB,CAAY,EAAE,QAAQ,MAAM;AACrF,QAAAI,EAAwB,EAAK,GAC7BE,EAAwBN,CAAY;AAAA,MACtC,CAAC,KACQ,CAACkB,KAAoBlB,MAC9BI,EAAwB,EAAI,IAC5Be,IAAAZ,KAAA,gBAAAA,EAAgB,UAAhB,QAAAY,EACI,aAAaV,GACd,KAAK,MAAMA,EAAe,WAAWT,CAAY,GACjD,KAAK,MAAM;AACV,QAAAM,EAAwB,EAAI;AAAA,MAC9B,GACC,MAAM,CAACc,MAAW;AACjB,QAAAd,EAAwB,EAAK,GAC7BS,EAAI,MAAM,qCAAqCK,CAAC;AAAA,MAClD,GACC,QAAQ,MAAM;AACb,QAAAhB,EAAwB,EAAK;AAAA,MAC/B;AAAA,IAEN;AAAA,EACF,GAAG,CAACJ,GAAcO,GAAgBE,CAAc,CAAC,GAE1C;AAAA,IACL,uBAAAE;AAAA,IACA,sBAAAN;AAAA,IACA,sBAAAF;AAAA,IACA,WAAWM;AAAA,EAAA;AAEf;"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Calls all functions in the order they were chained with the same arguments.
|
|
3
|
+
* @internal
|
|
4
|
+
*/
|
|
5
|
+
export declare function chain(...callbacks: any[]): (...args: any[]) => void;
|
|
6
|
+
interface Props {
|
|
7
|
+
[key: string]: any;
|
|
8
|
+
}
|
|
9
|
+
type TupleTypes<T> = {
|
|
10
|
+
[P in keyof T]: T[P];
|
|
11
|
+
} extends {
|
|
12
|
+
[key: number]: infer V;
|
|
13
|
+
} ? V : never;
|
|
14
|
+
type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
|
|
15
|
+
/**
|
|
16
|
+
* Merges multiple props objects together. Event handlers are chained,
|
|
17
|
+
* classNames are combined, and ids are deduplicated - different ids
|
|
18
|
+
* will trigger a side-effect and re-render components hooked up with `useId`.
|
|
19
|
+
* For all other props, the last prop object overrides all previous ones.
|
|
20
|
+
* @param args - Multiple sets of props to merge together.
|
|
21
|
+
* @internal
|
|
22
|
+
*/
|
|
23
|
+
export declare function mergeProps<T extends Props[]>(...args: T): UnionToIntersection<TupleTypes<T>>;
|
|
24
|
+
export {};
|
|
25
|
+
//# sourceMappingURL=mergeProps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mergeProps.d.ts","sourceRoot":"","sources":["../src/mergeProps.ts"],"names":[],"mappings":"AAcA;;;GAGG;AACH,wBAAgB,KAAK,CAAC,GAAG,SAAS,EAAE,GAAG,EAAE,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAYnE;AAED,UAAU,KAAK;IACb,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAGD,KAAK,UAAU,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAE,SAAS;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC,CAAA;CAAE,GAAG,CAAC,GAAG,KAAK,CAAC;AAC7F,KAAK,mBAAmB,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,GAAG,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK,IAAI,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,MAAM,CAAC,KAAK,IAAI,GAC/F,CAAC,GACD,KAAK,CAAC;AAEV;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,CAAC,SAAS,KAAK,EAAE,EAAE,GAAG,IAAI,EAAE,CAAC,GAAG,mBAAmB,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAoC5F"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/** @public */
|
|
3
|
+
export interface AudioConferenceProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* This component is the default setup of a classic LiveKit audio conferencing app.
|
|
7
|
+
* It provides functionality like switching between participant grid view and focus view.
|
|
8
|
+
*
|
|
9
|
+
* @remarks
|
|
10
|
+
* The component is implemented with other LiveKit components like `FocusContextProvider`,
|
|
11
|
+
* `GridLayout`, `ControlBar`, `FocusLayoutContainer` and `FocusLayout`.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```tsx
|
|
15
|
+
* <LiveKitRoom>
|
|
16
|
+
* <AudioConference />
|
|
17
|
+
* <LiveKitRoom>
|
|
18
|
+
* ```
|
|
19
|
+
* @public
|
|
20
|
+
*/
|
|
21
|
+
export declare function AudioConference({ ...props }: AudioConferenceProps): React.JSX.Element;
|
|
22
|
+
//# sourceMappingURL=AudioConference.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AudioConference.d.ts","sourceRoot":"","sources":["../../src/prefabs/AudioConference.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAY/B,cAAc;AACd,MAAM,WAAW,oBAAqB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;CAAG;AAErF;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,eAAe,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,oBAAoB,qBAyBjE"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ChatOptions } from '@livekit/components-core';
|
|
2
|
+
import { MessageFormatter } from '../components/ChatEntry';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
/** @public */
|
|
5
|
+
export interface ChatProps extends React.HTMLAttributes<HTMLDivElement>, ChatOptions {
|
|
6
|
+
messageFormatter?: MessageFormatter;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* The Chat component provides ready-to-use chat functionality in a LiveKit room.
|
|
10
|
+
* Messages are distributed to all participants in the room in real-time.
|
|
11
|
+
*
|
|
12
|
+
* @remarks
|
|
13
|
+
* - Only users who are in the room at the time of dispatch will receive messages
|
|
14
|
+
* - Message history is not persisted between sessions
|
|
15
|
+
* - Requires `@livekit/components-styles` to be imported for styling
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```tsx
|
|
19
|
+
* import '@livekit/components-styles';
|
|
20
|
+
*
|
|
21
|
+
* function Room() {
|
|
22
|
+
* return (
|
|
23
|
+
* <LiveKitRoom data-lk-theme="default">
|
|
24
|
+
* <Chat />
|
|
25
|
+
* </LiveKitRoom>
|
|
26
|
+
* );
|
|
27
|
+
* }
|
|
28
|
+
* ```
|
|
29
|
+
*
|
|
30
|
+
* For custom styling, refer to: https://docs.livekit.io/reference/components/react/concepts/style-components/
|
|
31
|
+
*
|
|
32
|
+
* @public
|
|
33
|
+
*/
|
|
34
|
+
export declare function Chat({ messageFormatter, messageDecoder, messageEncoder, channelTopic, ...props }: ChatProps): React.JSX.Element;
|
|
35
|
+
//# sourceMappingURL=Chat.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Chat.d.ts","sourceRoot":"","sources":["../../src/prefabs/Chat.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC9E,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAMhE,cAAc;AACd,MAAM,WAAW,SAAU,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,WAAW;IAClF,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;CACrC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,IAAI,CAAC,EACnB,gBAAgB,EAChB,cAAc,EACd,cAAc,EACd,YAAY,EACZ,GAAG,KAAK,EACT,EAAE,SAAS,qBAyGX"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Track } from 'livekit-client';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
/** @public */
|
|
4
|
+
export type ControlBarControls = {
|
|
5
|
+
microphone?: boolean;
|
|
6
|
+
camera?: boolean;
|
|
7
|
+
chat?: boolean;
|
|
8
|
+
screenShare?: boolean;
|
|
9
|
+
leave?: boolean;
|
|
10
|
+
settings?: boolean;
|
|
11
|
+
};
|
|
12
|
+
/** @public */
|
|
13
|
+
export interface ControlBarProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
14
|
+
onDeviceError?: (error: {
|
|
15
|
+
source: Track.Source;
|
|
16
|
+
error: Error;
|
|
17
|
+
}) => void;
|
|
18
|
+
variation?: 'minimal' | 'verbose' | 'textOnly';
|
|
19
|
+
controls?: ControlBarControls;
|
|
20
|
+
/**
|
|
21
|
+
* If `true`, the user's device choices will be persisted.
|
|
22
|
+
* This will enable the user to have the same device choices when they rejoin the room.
|
|
23
|
+
* @defaultValue true
|
|
24
|
+
* @alpha
|
|
25
|
+
*/
|
|
26
|
+
saveUserChoices?: boolean;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* The `ControlBar` prefab gives the user the basic user interface to control their
|
|
30
|
+
* media devices (camera, microphone and screen share), open the `Chat` and leave the room.
|
|
31
|
+
*
|
|
32
|
+
* @remarks
|
|
33
|
+
* This component is build with other LiveKit components like `TrackToggle`,
|
|
34
|
+
* `DeviceSelectorButton`, `DisconnectButton` and `StartAudio`.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```tsx
|
|
38
|
+
* <LiveKitRoom>
|
|
39
|
+
* <ControlBar />
|
|
40
|
+
* </LiveKitRoom>
|
|
41
|
+
* ```
|
|
42
|
+
* @public
|
|
43
|
+
*/
|
|
44
|
+
export declare function ControlBar({ variation, controls, saveUserChoices, onDeviceError, ...props }: ControlBarProps): React.JSX.Element;
|
|
45
|
+
//# sourceMappingURL=ControlBar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ControlBar.d.ts","sourceRoot":"","sources":["../../src/prefabs/ControlBar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAc/B,cAAc;AACd,MAAM,MAAM,kBAAkB,GAAG;IAC/B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAgBF,cAAc;AACd,MAAM,WAAW,eAAgB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC3E,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC;QAAC,KAAK,EAAE,KAAK,CAAA;KAAE,KAAK,IAAI,CAAC;IACxE,SAAS,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC;IAC/C,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IAC9B;;;;;OAKG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,UAAU,CAAC,EACzB,SAAS,EACT,QAAQ,EACR,eAAsB,EACtB,aAAa,EACb,GAAG,KAAK,EACT,EAAE,eAAe,qBAuJjB"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { LocalAudioTrack, LocalVideoTrack } from 'livekit-client';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
/** @public */
|
|
4
|
+
export interface MediaDeviceMenuProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
5
|
+
kind?: MediaDeviceKind;
|
|
6
|
+
initialSelection?: string;
|
|
7
|
+
onActiveDeviceChange?: (kind: MediaDeviceKind, deviceId: string) => void;
|
|
8
|
+
tracks?: Partial<Record<MediaDeviceKind, LocalAudioTrack | LocalVideoTrack | undefined>>;
|
|
9
|
+
/**
|
|
10
|
+
* this will call getUserMedia if the permissions are not yet given to enumerate the devices with device labels.
|
|
11
|
+
* in some browsers multiple calls to getUserMedia result in multiple permission prompts.
|
|
12
|
+
* It's generally advised only flip this to true, once a (preview) track has been acquired successfully with the
|
|
13
|
+
* appropriate permissions.
|
|
14
|
+
*
|
|
15
|
+
* @see {@link PreJoin}
|
|
16
|
+
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/enumerateDevices | MDN enumerateDevices}
|
|
17
|
+
*/
|
|
18
|
+
requestPermissions?: boolean;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* The `MediaDeviceMenu` component is a button that opens a menu that lists
|
|
22
|
+
* all media devices and allows the user to select them.
|
|
23
|
+
*
|
|
24
|
+
* @remarks
|
|
25
|
+
* This component is implemented with the `MediaDeviceSelect` LiveKit components.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```tsx
|
|
29
|
+
* <LiveKitRoom>
|
|
30
|
+
* <MediaDeviceMenu />
|
|
31
|
+
* </LiveKitRoom>
|
|
32
|
+
* ```
|
|
33
|
+
* @public
|
|
34
|
+
*/
|
|
35
|
+
export declare function MediaDeviceMenu({ kind, initialSelection, onActiveDeviceChange, tracks, requestPermissions, ...props }: MediaDeviceMenuProps): React.JSX.Element;
|
|
36
|
+
//# sourceMappingURL=MediaDeviceMenu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MediaDeviceMenu.d.ts","sourceRoot":"","sources":["../../src/prefabs/MediaDeviceMenu.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEvE,cAAc;AACd,MAAM,WAAW,oBAAqB,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IACzF,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,oBAAoB,CAAC,EAAE,CAAC,IAAI,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACzE,MAAM,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,eAAe,EAAE,eAAe,GAAG,eAAe,GAAG,SAAS,CAAC,CAAC,CAAC;IACzF;;;;;;;;OAQG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,eAAe,CAAC,EAC9B,IAAI,EACJ,gBAAgB,EAChB,oBAAoB,EACpB,MAAM,EACN,kBAA0B,EAC1B,GAAG,KAAK,EACT,EAAE,oBAAoB,qBAiHtB"}
|