@mrksbnc/livekit-vue 0.0.2 → 1.0.0
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/README.md +46 -30
- package/dist/background/BackgroundEffectSelect.vue.d.cts +55 -0
- package/dist/background/BackgroundEffectSelect.vue.d.mts +55 -0
- package/dist/background/index.d.cts +3 -0
- package/dist/background/index.d.mts +3 -0
- package/dist/background.cjs +2 -0
- package/dist/background.cjs.map +1 -0
- package/dist/background.js +239 -0
- package/dist/background.js.map +1 -0
- package/dist/components/chat/ChatEntry.vue.d.cts +16 -0
- package/dist/components/chat/ChatEntry.vue.d.mts +16 -0
- package/dist/components/chat/chat.utils.d.cts +3 -0
- package/dist/components/chat/chat.utils.d.mts +3 -0
- package/dist/components/chat/index.d.cts +3 -0
- package/dist/components/chat/index.d.mts +3 -0
- package/dist/components/chat/render-node.d.cts +8 -0
- package/dist/components/chat/render-node.d.mts +8 -0
- package/dist/components/context/ParticipantContextProvider.vue.d.cts +16 -0
- package/dist/components/context/ParticipantContextProvider.vue.d.mts +16 -0
- package/dist/components/context/RoomContextProvider.vue.d.cts +16 -0
- package/dist/components/context/RoomContextProvider.vue.d.mts +16 -0
- package/dist/components/context/SessionProvider.vue.d.cts +16 -0
- package/dist/components/context/SessionProvider.vue.d.mts +16 -0
- package/dist/components/context/TrackRefContextProvider.vue.d.cts +16 -0
- package/dist/components/context/TrackRefContextProvider.vue.d.mts +16 -0
- package/dist/components/context/index.d.cts +4 -0
- package/dist/components/context/index.d.mts +4 -0
- package/dist/components/controls/ChatToggle.vue.d.cts +17 -0
- package/dist/components/controls/ChatToggle.vue.d.mts +17 -0
- package/dist/components/controls/ClearPinButton.vue.d.cts +22 -0
- package/dist/components/controls/ClearPinButton.vue.d.mts +22 -0
- package/dist/components/controls/DisconnectButton.vue.d.cts +18 -0
- package/dist/components/controls/DisconnectButton.vue.d.mts +18 -0
- package/dist/components/controls/FocusToggle.vue.d.cts +19 -0
- package/dist/components/controls/FocusToggle.vue.d.mts +19 -0
- package/dist/components/controls/MediaDeviceSelect.vue.d.cts +45 -0
- package/dist/components/controls/MediaDeviceSelect.vue.d.mts +45 -0
- package/dist/components/controls/PaginationControl.vue.d.cts +18 -0
- package/dist/components/controls/PaginationControl.vue.d.mts +18 -0
- package/dist/components/controls/PaginationIndicator.vue.d.cts +8 -0
- package/dist/components/controls/PaginationIndicator.vue.d.mts +8 -0
- package/dist/components/controls/SettingsMenuToggle.vue.d.cts +16 -0
- package/dist/components/controls/SettingsMenuToggle.vue.d.mts +16 -0
- package/dist/components/controls/StartAudio.vue.d.cts +21 -0
- package/dist/components/controls/StartAudio.vue.d.mts +21 -0
- package/dist/components/controls/StartMediaButton.vue.d.cts +24 -0
- package/dist/components/controls/StartMediaButton.vue.d.mts +24 -0
- package/dist/components/controls/TrackToggle.vue.d.cts +43 -0
- package/dist/components/controls/TrackToggle.vue.d.mts +43 -0
- package/dist/components/controls/VideoQualitySelect.vue.d.cts +33 -0
- package/dist/components/controls/VideoQualitySelect.vue.d.mts +33 -0
- package/dist/components/controls/index.d.cts +24 -0
- package/dist/components/controls/index.d.mts +24 -0
- package/dist/components/icons/CameraDisabledIcon.vue.d.cts +3 -0
- package/dist/components/icons/CameraDisabledIcon.vue.d.mts +3 -0
- package/dist/components/icons/CameraIcon.vue.d.cts +3 -0
- package/dist/components/icons/CameraIcon.vue.d.mts +3 -0
- package/dist/components/icons/ChatCloseIcon.vue.d.cts +3 -0
- package/dist/components/icons/ChatCloseIcon.vue.d.mts +3 -0
- package/dist/components/icons/ChatIcon.vue.d.cts +3 -0
- package/dist/components/icons/ChatIcon.vue.d.mts +3 -0
- package/dist/components/icons/ChevronIcon.vue.d.cts +3 -0
- package/dist/components/icons/ChevronIcon.vue.d.mts +3 -0
- package/dist/components/icons/FocusToggleIcon.vue.d.cts +3 -0
- package/dist/components/icons/FocusToggleIcon.vue.d.mts +3 -0
- package/dist/components/icons/GearIcon.vue.d.cts +3 -0
- package/dist/components/icons/GearIcon.vue.d.mts +3 -0
- package/dist/components/icons/LeaveIcon.vue.d.cts +3 -0
- package/dist/components/icons/LeaveIcon.vue.d.mts +3 -0
- package/dist/components/icons/LockLockedIcon.vue.d.cts +3 -0
- package/dist/components/icons/LockLockedIcon.vue.d.mts +3 -0
- package/dist/components/icons/MicDisabledIcon.vue.d.cts +3 -0
- package/dist/components/icons/MicDisabledIcon.vue.d.mts +3 -0
- package/dist/components/icons/MicIcon.vue.d.cts +3 -0
- package/dist/components/icons/MicIcon.vue.d.mts +3 -0
- package/dist/components/icons/ParticipantPlaceholder.vue.d.cts +3 -0
- package/dist/components/icons/ParticipantPlaceholder.vue.d.mts +3 -0
- package/dist/components/icons/QualityExcellentIcon.vue.d.cts +3 -0
- package/dist/components/icons/QualityExcellentIcon.vue.d.mts +3 -0
- package/dist/components/icons/QualityGoodIcon.vue.d.cts +3 -0
- package/dist/components/icons/QualityGoodIcon.vue.d.mts +3 -0
- package/dist/components/icons/QualityPoorIcon.vue.d.cts +3 -0
- package/dist/components/icons/QualityPoorIcon.vue.d.mts +3 -0
- package/dist/components/icons/QualityUnknownIcon.vue.d.cts +3 -0
- package/dist/components/icons/QualityUnknownIcon.vue.d.mts +3 -0
- package/dist/components/icons/ScreenShareIcon.vue.d.cts +3 -0
- package/dist/components/icons/ScreenShareIcon.vue.d.mts +3 -0
- package/dist/components/icons/ScreenShareStopIcon.vue.d.cts +3 -0
- package/dist/components/icons/ScreenShareStopIcon.vue.d.mts +3 -0
- package/dist/components/icons/SpinnerIcon.vue.d.cts +3 -0
- package/dist/components/icons/SpinnerIcon.vue.d.mts +3 -0
- package/dist/components/icons/UnfocusToggleIcon.vue.d.cts +3 -0
- package/dist/components/icons/UnfocusToggleIcon.vue.d.mts +3 -0
- package/dist/components/icons/index.d.cts +21 -0
- package/dist/components/icons/index.d.mts +21 -0
- package/dist/components/icons/utils.d.cts +4 -0
- package/dist/components/icons/utils.d.mts +4 -0
- package/dist/components/index.d.cts +9 -0
- package/dist/components/index.d.mts +9 -0
- package/dist/components/layout/CarouselLayout.vue.d.cts +24 -0
- package/dist/components/layout/CarouselLayout.vue.d.mts +24 -0
- package/dist/components/layout/FocusLayout.vue.d.cts +16 -0
- package/dist/components/layout/FocusLayout.vue.d.mts +16 -0
- package/dist/components/layout/FocusLayoutContainer.vue.d.cts +14 -0
- package/dist/components/layout/FocusLayoutContainer.vue.d.mts +14 -0
- package/dist/components/layout/GridLayout.vue.d.cts +24 -0
- package/dist/components/layout/GridLayout.vue.d.mts +24 -0
- package/dist/components/layout/LayoutContextProvider.vue.d.cts +27 -0
- package/dist/components/layout/LayoutContextProvider.vue.d.mts +27 -0
- package/dist/components/layout/index.d.cts +10 -0
- package/dist/components/layout/index.d.mts +10 -0
- package/dist/components/participant/AudioTrack.vue.d.cts +17 -0
- package/dist/components/participant/AudioTrack.vue.d.mts +17 -0
- package/dist/components/participant/AudioVisualizer.vue.d.cts +10 -0
- package/dist/components/participant/AudioVisualizer.vue.d.mts +10 -0
- package/dist/components/participant/BarVisualizer.vue.d.cts +46 -0
- package/dist/components/participant/BarVisualizer.vue.d.mts +46 -0
- package/dist/components/participant/ConnectionQualityIndicator.vue.d.cts +19 -0
- package/dist/components/participant/ConnectionQualityIndicator.vue.d.mts +19 -0
- package/dist/components/participant/ParticipantAudioTile.vue.d.cts +23 -0
- package/dist/components/participant/ParticipantAudioTile.vue.d.mts +23 -0
- package/dist/components/participant/ParticipantAvatar.vue.d.cts +10 -0
- package/dist/components/participant/ParticipantAvatar.vue.d.mts +10 -0
- package/dist/components/participant/ParticipantName.vue.d.cts +17 -0
- package/dist/components/participant/ParticipantName.vue.d.mts +17 -0
- package/dist/components/participant/ParticipantTile.vue.d.cts +27 -0
- package/dist/components/participant/ParticipantTile.vue.d.mts +27 -0
- package/dist/components/participant/TrackMutedIndicator.vue.d.cts +22 -0
- package/dist/components/participant/TrackMutedIndicator.vue.d.mts +22 -0
- package/dist/components/participant/VideoTrack.vue.d.cts +17 -0
- package/dist/components/participant/VideoTrack.vue.d.mts +17 -0
- package/dist/components/participant/index.d.cts +19 -0
- package/dist/components/participant/index.d.mts +19 -0
- package/dist/components/prefabs/AudioConference.vue.d.cts +26 -0
- package/dist/components/prefabs/AudioConference.vue.d.mts +26 -0
- package/dist/components/prefabs/Chat.vue.d.cts +36 -0
- package/dist/components/prefabs/Chat.vue.d.mts +36 -0
- package/dist/components/prefabs/ControlBar.vue.d.cts +52 -0
- package/dist/components/prefabs/ControlBar.vue.d.mts +52 -0
- package/dist/components/prefabs/MediaDeviceMenu.vue.d.cts +46 -0
- package/dist/components/prefabs/MediaDeviceMenu.vue.d.mts +46 -0
- package/dist/components/prefabs/PreJoin.vue.d.cts +45 -0
- package/dist/components/prefabs/PreJoin.vue.d.mts +45 -0
- package/dist/components/prefabs/VideoConference.vue.d.cts +28 -0
- package/dist/components/prefabs/VideoConference.vue.d.mts +28 -0
- package/dist/components/prefabs/VoiceAssistantControlBar.vue.d.cts +33 -0
- package/dist/components/prefabs/VoiceAssistantControlBar.vue.d.mts +33 -0
- package/dist/components/prefabs/index.d.cts +14 -0
- package/dist/components/prefabs/index.d.mts +14 -0
- package/dist/components/room/ConnectionStateToast.vue.d.cts +8 -0
- package/dist/components/room/ConnectionStateToast.vue.d.mts +8 -0
- package/dist/components/room/ConnectionStatus.vue.d.cts +19 -0
- package/dist/components/room/ConnectionStatus.vue.d.mts +19 -0
- package/dist/components/room/LiveKitRoom.vue.d.cts +47 -0
- package/dist/components/room/LiveKitRoom.vue.d.mts +47 -0
- package/dist/components/room/ParticipantLoop.vue.d.cts +18 -0
- package/dist/components/room/ParticipantLoop.vue.d.mts +18 -0
- package/dist/components/room/RoomAudioRenderer.vue.d.cts +13 -0
- package/dist/components/room/RoomAudioRenderer.vue.d.mts +13 -0
- package/dist/components/room/RoomName.vue.d.cts +20 -0
- package/dist/components/room/RoomName.vue.d.mts +20 -0
- package/dist/components/room/Toast.vue.d.cts +14 -0
- package/dist/components/room/Toast.vue.d.mts +14 -0
- package/dist/components/room/TrackLoop.vue.d.cts +18 -0
- package/dist/components/room/TrackLoop.vue.d.mts +18 -0
- package/dist/components/room/index.d.cts +16 -0
- package/dist/components/room/index.d.mts +16 -0
- package/dist/components/style.d.cts +11 -0
- package/dist/components/style.d.mts +11 -0
- package/dist/composables/index.d.cts +66 -0
- package/dist/composables/index.d.mts +66 -0
- package/dist/composables/useAgent.d.cts +67 -0
- package/dist/composables/useAgent.d.mts +67 -0
- package/dist/composables/useAgentExpression.d.cts +20 -0
- package/dist/composables/useAgentExpression.d.mts +20 -0
- package/dist/composables/useAudioPlayback.d.cts +10 -0
- package/dist/composables/useAudioPlayback.d.mts +10 -0
- package/dist/composables/useBackgroundEffect.d.cts +43 -0
- package/dist/composables/useBackgroundEffect.d.mts +43 -0
- package/dist/composables/useBarAnimator.d.cts +11 -0
- package/dist/composables/useBarAnimator.d.mts +11 -0
- package/dist/composables/useChat.d.cts +13 -0
- package/dist/composables/useChat.d.mts +13 -0
- package/dist/composables/useChatToggle.d.cts +13 -0
- package/dist/composables/useChatToggle.d.mts +13 -0
- package/dist/composables/useClearPinButton.d.cts +14 -0
- package/dist/composables/useClearPinButton.d.mts +14 -0
- package/dist/composables/useConnectionQualityIndicator.d.cts +9 -0
- package/dist/composables/useConnectionQualityIndicator.d.mts +9 -0
- package/dist/composables/useConnectionState.d.cts +13 -0
- package/dist/composables/useConnectionState.d.mts +13 -0
- package/dist/composables/useConnectionStatus.d.cts +16 -0
- package/dist/composables/useConnectionStatus.d.mts +16 -0
- package/dist/composables/useDataChannel.d.cts +14 -0
- package/dist/composables/useDataChannel.d.mts +14 -0
- package/dist/composables/useDisconnectButton.d.cts +9 -0
- package/dist/composables/useDisconnectButton.d.mts +9 -0
- package/dist/composables/useEvents.d.cts +15 -0
- package/dist/composables/useEvents.d.mts +15 -0
- package/dist/composables/useFacingMode.d.cts +17 -0
- package/dist/composables/useFacingMode.d.mts +17 -0
- package/dist/composables/useFocusToggle.d.cts +14 -0
- package/dist/composables/useFocusToggle.d.mts +14 -0
- package/dist/composables/useGridLayout.d.cts +13 -0
- package/dist/composables/useGridLayout.d.mts +13 -0
- package/dist/composables/useIsEncrypted.d.cts +10 -0
- package/dist/composables/useIsEncrypted.d.mts +10 -0
- package/dist/composables/useIsMuted.d.cts +11 -0
- package/dist/composables/useIsMuted.d.mts +11 -0
- package/dist/composables/useIsRecording.d.cts +9 -0
- package/dist/composables/useIsRecording.d.mts +9 -0
- package/dist/composables/useIsSpeaking.d.cts +9 -0
- package/dist/composables/useIsSpeaking.d.mts +9 -0
- package/dist/composables/useKrispNoiseFilter.d.cts +16 -0
- package/dist/composables/useKrispNoiseFilter.d.mts +16 -0
- package/dist/composables/useLiveKitRoom.d.cts +15 -0
- package/dist/composables/useLiveKitRoom.d.mts +15 -0
- package/dist/composables/useLocalParticipant.d.cts +16 -0
- package/dist/composables/useLocalParticipant.d.mts +16 -0
- package/dist/composables/useLocalParticipantPermissions.d.cts +13 -0
- package/dist/composables/useLocalParticipantPermissions.d.mts +13 -0
- package/dist/composables/useMediaDeviceSelect.d.cts +16 -0
- package/dist/composables/useMediaDeviceSelect.d.mts +16 -0
- package/dist/composables/useMediaDevices.d.cts +12 -0
- package/dist/composables/useMediaDevices.d.mts +12 -0
- package/dist/composables/useMediaTrackBySourceOrName.d.cts +30 -0
- package/dist/composables/useMediaTrackBySourceOrName.d.mts +30 -0
- package/dist/composables/usePagination.d.cts +26 -0
- package/dist/composables/usePagination.d.mts +26 -0
- package/dist/composables/useParticipantAttributes.d.cts +14 -0
- package/dist/composables/useParticipantAttributes.d.mts +14 -0
- package/dist/composables/useParticipantAvatar.d.cts +17 -0
- package/dist/composables/useParticipantAvatar.d.mts +17 -0
- package/dist/composables/useParticipantInfo.d.cts +14 -0
- package/dist/composables/useParticipantInfo.d.mts +14 -0
- package/dist/composables/useParticipantPermissions.d.cts +10 -0
- package/dist/composables/useParticipantPermissions.d.mts +10 -0
- package/dist/composables/useParticipantTile.d.cts +22 -0
- package/dist/composables/useParticipantTile.d.mts +22 -0
- package/dist/composables/useParticipantTracks.d.cts +12 -0
- package/dist/composables/useParticipantTracks.d.mts +12 -0
- package/dist/composables/useParticipants.d.cts +11 -0
- package/dist/composables/useParticipants.d.mts +11 -0
- package/dist/composables/usePersistentUserChoices.d.cts +16 -0
- package/dist/composables/usePersistentUserChoices.d.mts +16 -0
- package/dist/composables/usePinnedTracks.d.cts +10 -0
- package/dist/composables/usePinnedTracks.d.mts +10 -0
- package/dist/composables/usePreviewTracks.d.cts +15 -0
- package/dist/composables/usePreviewTracks.d.mts +15 -0
- package/dist/composables/useRemoteParticipant.d.cts +14 -0
- package/dist/composables/useRemoteParticipant.d.mts +14 -0
- package/dist/composables/useRemoteParticipants.d.cts +10 -0
- package/dist/composables/useRemoteParticipants.d.mts +10 -0
- package/dist/composables/useRoomInfo.d.cts +13 -0
- package/dist/composables/useRoomInfo.d.mts +13 -0
- package/dist/composables/useRpc.d.cts +18 -0
- package/dist/composables/useRpc.d.mts +18 -0
- package/dist/composables/useSequentialRoomConnectDisconnect.d.cts +10 -0
- package/dist/composables/useSequentialRoomConnectDisconnect.d.mts +10 -0
- package/dist/composables/useSession.d.cts +83 -0
- package/dist/composables/useSession.d.mts +83 -0
- package/dist/composables/useSessionMessages.d.cts +22 -0
- package/dist/composables/useSessionMessages.d.mts +22 -0
- package/dist/composables/useSettingsToggle.d.cts +10 -0
- package/dist/composables/useSettingsToggle.d.mts +10 -0
- package/dist/composables/useSortedParticipants.d.cts +9 -0
- package/dist/composables/useSortedParticipants.d.mts +9 -0
- package/dist/composables/useSpeakingParticipants.d.cts +6 -0
- package/dist/composables/useSpeakingParticipants.d.mts +6 -0
- package/dist/composables/useStartAudio.d.cts +10 -0
- package/dist/composables/useStartAudio.d.mts +10 -0
- package/dist/composables/useStartVideo.d.cts +10 -0
- package/dist/composables/useStartVideo.d.mts +10 -0
- package/dist/composables/useSwipe.d.cts +16 -0
- package/dist/composables/useSwipe.d.mts +16 -0
- package/dist/composables/useTextStream.d.cts +27 -0
- package/dist/composables/useTextStream.d.mts +27 -0
- package/dist/composables/useToast.d.cts +9 -0
- package/dist/composables/useToast.d.mts +9 -0
- package/dist/composables/useToken.d.cts +23 -0
- package/dist/composables/useToken.d.mts +23 -0
- package/dist/composables/useTrack.d.cts +12 -0
- package/dist/composables/useTrack.d.mts +12 -0
- package/dist/composables/useTrackByName.d.cts +11 -0
- package/dist/composables/useTrackByName.d.mts +11 -0
- package/dist/composables/useTrackMutedIndicator.d.cts +9 -0
- package/dist/composables/useTrackMutedIndicator.d.mts +9 -0
- package/dist/composables/useTrackRefBySource.d.cts +9 -0
- package/dist/composables/useTrackRefBySource.d.mts +9 -0
- package/dist/composables/useTrackRefBySourceOrName.d.cts +7 -0
- package/dist/composables/useTrackRefBySourceOrName.d.mts +7 -0
- package/dist/composables/useTrackSyncTime.d.cts +13 -0
- package/dist/composables/useTrackSyncTime.d.mts +13 -0
- package/dist/composables/useTrackToggle.d.cts +28 -0
- package/dist/composables/useTrackToggle.d.mts +28 -0
- package/dist/composables/useTrackTranscription.d.cts +15 -0
- package/dist/composables/useTrackTranscription.d.mts +15 -0
- package/dist/composables/useTrackVolume.d.cts +39 -0
- package/dist/composables/useTrackVolume.d.mts +39 -0
- package/dist/composables/useTracks.d.cts +18 -0
- package/dist/composables/useTracks.d.mts +18 -0
- package/dist/composables/useTranscriptions.d.cts +12 -0
- package/dist/composables/useTranscriptions.d.mts +12 -0
- package/dist/composables/useVideoQuality.d.cts +29 -0
- package/dist/composables/useVideoQuality.d.mts +29 -0
- package/dist/composables/useVisualStableUpdate.d.cts +13 -0
- package/dist/composables/useVisualStableUpdate.d.mts +13 -0
- package/dist/composables/useVoiceAssistant.d.cts +16 -0
- package/dist/composables/useVoiceAssistant.d.mts +16 -0
- package/dist/context/connection-state.context.d.cts +18 -0
- package/dist/context/connection-state.context.d.mts +18 -0
- package/dist/context/error.d.cts +3 -0
- package/dist/context/error.d.mts +3 -0
- package/dist/context/feature.context.d.cts +8 -0
- package/dist/context/feature.context.d.mts +8 -0
- package/dist/context/index.d.cts +9 -0
- package/dist/context/index.d.mts +9 -0
- package/dist/context/layout.context.d.cts +15 -0
- package/dist/context/layout.context.d.mts +15 -0
- package/dist/context/participant.context.d.cts +8 -0
- package/dist/context/participant.context.d.mts +8 -0
- package/dist/context/pin.context.d.cts +21 -0
- package/dist/context/pin.context.d.mts +21 -0
- package/dist/context/room.context.d.cts +8 -0
- package/dist/context/room.context.d.mts +8 -0
- package/dist/context/session.context.d.cts +8 -0
- package/dist/context/session.context.d.mts +8 -0
- package/dist/context/toast.context.d.cts +17 -0
- package/dist/context/toast.context.d.mts +17 -0
- package/dist/context/track-reference.context.d.cts +8 -0
- package/dist/context/track-reference.context.d.mts +8 -0
- package/dist/context/widget.context.d.cts +21 -0
- package/dist/context/widget.context.d.mts +21 -0
- package/dist/index.d.cts +6 -0
- package/dist/index.d.mts +6 -0
- package/dist/internal/emitter.d.cts +17 -0
- package/dist/internal/emitter.d.mts +17 -0
- package/dist/internal/index.d.cts +4 -0
- package/dist/internal/index.d.mts +4 -0
- package/dist/internal/observable.d.cts +3 -0
- package/dist/internal/observable.d.mts +3 -0
- package/dist/internal/permissions.d.cts +4 -0
- package/dist/internal/permissions.d.mts +4 -0
- package/dist/internal/refs.d.cts +1 -0
- package/dist/internal/refs.d.mts +1 -0
- package/dist/krisp/index.d.cts +1 -0
- package/dist/krisp/index.d.mts +1 -0
- package/dist/krisp.cjs +2 -0
- package/dist/krisp.cjs.map +1 -0
- package/dist/krisp.js +62 -0
- package/dist/krisp.js.map +1 -0
- package/dist/livekit-vue.cjs +2 -0
- package/dist/livekit-vue.cjs.map +1 -0
- package/dist/livekit-vue.js +5101 -20542
- package/dist/livekit-vue.js.map +1 -0
- package/dist/livekit-vue.umd.js +4 -0
- package/dist/livekit-vue.umd.js.map +1 -0
- package/dist/style-CDggj9VO.js +14 -0
- package/dist/style-CDggj9VO.js.map +1 -0
- package/dist/style-CkQyDSsh.cjs +2 -0
- package/dist/style-CkQyDSsh.cjs.map +1 -0
- package/dist/styles.css +2 -0
- package/dist/types/agent.types.d.cts +2 -0
- package/dist/types/agent.types.d.mts +2 -0
- package/dist/types/index.d.cts +3 -0
- package/dist/types/index.d.mts +3 -0
- package/dist/types/livekit-room.types.d.cts +19 -0
- package/dist/types/livekit-room.types.d.mts +19 -0
- package/dist/types/participant.types.d.cts +2 -0
- package/dist/types/participant.types.d.mts +2 -0
- package/dist/useLocalParticipant-ByBAgL8i.js +50 -0
- package/dist/useLocalParticipant-ByBAgL8i.js.map +1 -0
- package/dist/useLocalParticipant-Dn5NE_KM.cjs +2 -0
- package/dist/useLocalParticipant-Dn5NE_KM.cjs.map +1 -0
- package/dist/utils/media-choices.utils.d.cts +7 -0
- package/dist/utils/media-choices.utils.d.mts +7 -0
- package/dist/{src/utils/room.utils.d.ts → utils/room.utils.d.cts} +1 -1
- package/dist/utils/room.utils.d.mts +1 -0
- package/package.json +103 -66
- package/dist/favicon.ico +0 -0
- package/dist/index.css +0 -1
- package/dist/livekit-vue.umd.cjs +0 -62
- package/dist/src/assets/index.d.ts +0 -0
- package/dist/src/components/controls/TrackToggle.vue.d.ts +0 -15
- package/dist/src/components/controls/buttons.d.ts +0 -4
- package/dist/src/components/controls/index.d.ts +0 -3
- package/dist/src/components/controls/track_toggle.d.ts +0 -12
- package/dist/src/components/icons/ParticipantPlaceholderIcon.vue.d.ts +0 -2
- package/dist/src/components/icons/TrackIcon.vue.d.ts +0 -7
- package/dist/src/components/index.d.ts +0 -3
- package/dist/src/components/participant/audio_track.d.ts +0 -7
- package/dist/src/composables/index.d.ts +0 -37
- package/dist/src/composables/private/useObservableState.d.ts +0 -8
- package/dist/src/composables/useAudioPlayback.d.ts +0 -11
- package/dist/src/composables/useClearPinButton.d.ts +0 -5
- package/dist/src/composables/useConnectionQualityIndicator.d.ts +0 -10
- package/dist/src/composables/useConnectionState.d.ts +0 -3
- package/dist/src/composables/useDataChannel.d.ts +0 -15
- package/dist/src/composables/useDisconnectButton.d.ts +0 -5
- package/dist/src/composables/useFacingMode.d.ts +0 -10
- package/dist/src/composables/useFocusToggle.d.ts +0 -11
- package/dist/src/composables/useGridLayout.d.ts +0 -10
- package/dist/src/composables/useIsEncrypted.d.ts +0 -8
- package/dist/src/composables/useIsMuted.d.ts +0 -7
- package/dist/src/composables/useIsRecording.d.ts +0 -5
- package/dist/src/composables/useIsSpeaking.d.ts +0 -5
- package/dist/src/composables/useLiveKitRoom.d.ts +0 -8
- package/dist/src/composables/useLocalParticipant.d.ts +0 -16
- package/dist/src/composables/useParticipantTile.d.ts +0 -11
- package/dist/src/composables/useParticipantTracks.d.ts +0 -4
- package/dist/src/composables/useParticipants.d.ts +0 -7
- package/dist/src/composables/usePersistentUserChoices.d.ts +0 -16
- package/dist/src/composables/usePinnedTracks.d.ts +0 -4
- package/dist/src/composables/useRemoteParticipant.d.ts +0 -7
- package/dist/src/composables/useRemoteParticipants.d.ts +0 -7
- package/dist/src/composables/useRoomInfo.d.ts +0 -13
- package/dist/src/composables/useSortedParticipants.d.ts +0 -3
- package/dist/src/composables/useSpeakingParticipants.d.ts +0 -3
- package/dist/src/composables/useStartAudio.d.ts +0 -11
- package/dist/src/composables/useStartVideo.d.ts +0 -11
- package/dist/src/composables/useToken.d.ts +0 -10
- package/dist/src/composables/useTrack.d.ts +0 -3
- package/dist/src/composables/useTrackByName.d.ts +0 -3
- package/dist/src/composables/useTrackMutedIndicator.d.ts +0 -6
- package/dist/src/composables/useTrackRefBySourceOrName.d.ts +0 -4
- package/dist/src/composables/useTrackSyncTime.d.ts +0 -6
- package/dist/src/composables/useTrackToggle.d.ts +0 -21
- package/dist/src/composables/useTrackVolume.d.ts +0 -28
- package/dist/src/composables/useTracks.d.ts +0 -10
- package/dist/src/composables/useVisualStableUpdate.d.ts +0 -8
- package/dist/src/context/index.d.ts +0 -6
- package/dist/src/context/layout.context.d.ts +0 -28
- package/dist/src/context/participant.context.d.ts +0 -9
- package/dist/src/context/pin.context.d.ts +0 -26
- package/dist/src/context/room.context.d.ts +0 -9
- package/dist/src/context/track_reference.context.d.ts +0 -6
- package/dist/src/context/widget.context.d.ts +0 -7
- package/dist/src/index.d.ts +0 -3
- package/dist/src/types/livekit_room.types.d.ts +0 -68
- package/src/assets/icons/chevron-down.svg +0 -4
- package/src/assets/icons/chevron-up.svg +0 -4
- package/src/assets/icons/frown.svg +0 -7
- package/src/assets/icons/heart.svg +0 -6
- package/src/assets/icons/mic-off.svg +0 -8
- package/src/assets/icons/mic.svg +0 -7
- package/src/assets/icons/phone-hang-up.svg +0 -9
- package/src/assets/icons/share-screen-off.svg +0 -6
- package/src/assets/icons/share-screen.svg +0 -7
- package/src/assets/icons/smile.svg +0 -7
- package/src/assets/icons/thumbs-down.svg +0 -6
- package/src/assets/icons/thumbs-up.svg +0 -6
- package/src/assets/icons/video-off.svg +0 -5
- package/src/assets/icons/video.svg +0 -5
- package/src/assets/index.ts +0 -1
- package/src/assets/placeholders/participant.svg +0 -8
- package/src/components/controls/TrackToggle.vue +0 -27
- package/src/components/controls/buttons.ts +0 -5
- package/src/components/controls/index.ts +0 -3
- package/src/components/controls/track_toggle.ts +0 -13
- package/src/components/icons/ParticipantPlaceholderIcon.vue +0 -7
- package/src/components/icons/TrackIcon.vue +0 -55
- package/src/components/index.ts +0 -3
- package/src/components/participant/AudioTrack.vue +0 -17
- package/src/components/participant/audio_track.ts +0 -8
- package/src/composables/index.ts +0 -89
- package/src/composables/private/useObservableState.ts +0 -44
- package/src/composables/useAudioPlayback.ts +0 -42
- package/src/composables/useClearPinButton.ts +0 -41
- package/src/composables/useConnectionQualityIndicator.ts +0 -39
- package/src/composables/useConnectionState.ts +0 -21
- package/src/composables/useDataChannel.ts +0 -56
- package/src/composables/useDisconnectButton.ts +0 -28
- package/src/composables/useFacingMode.ts +0 -28
- package/src/composables/useFocusToggle.ts +0 -38
- package/src/composables/useGridLayout.ts +0 -44
- package/src/composables/useIsEncrypted.ts +0 -34
- package/src/composables/useIsMuted.ts +0 -56
- package/src/composables/useIsRecording.ts +0 -30
- package/src/composables/useIsSpeaking.ts +0 -23
- package/src/composables/useLiveKitRoom.ts +0 -219
- package/src/composables/useLocalParticipant.ts +0 -64
- package/src/composables/useParticipantTile.ts +0 -68
- package/src/composables/useParticipantTracks.ts +0 -36
- package/src/composables/useParticipants.ts +0 -25
- package/src/composables/usePersistentUserChoices.ts +0 -64
- package/src/composables/usePinnedTracks.ts +0 -16
- package/src/composables/useRemoteParticipant.ts +0 -42
- package/src/composables/useRemoteParticipants.ts +0 -27
- package/src/composables/useRoomInfo.ts +0 -42
- package/src/composables/useSortedParticipants.ts +0 -21
- package/src/composables/useSpeakingParticipants.ts +0 -22
- package/src/composables/useStartAudio.ts +0 -53
- package/src/composables/useStartVideo.ts +0 -53
- package/src/composables/useToken.ts +0 -40
- package/src/composables/useTrack.ts +0 -11
- package/src/composables/useTrackByName.ts +0 -11
- package/src/composables/useTrackMutedIndicator.ts +0 -34
- package/src/composables/useTrackRefBySourceOrName.ts +0 -39
- package/src/composables/useTrackSyncTime.ts +0 -32
- package/src/composables/useTrackToggle.ts +0 -113
- package/src/composables/useTrackVolume.ts +0 -268
- package/src/composables/useTracks.ts +0 -122
- package/src/composables/useVisualStableUpdate.ts +0 -57
- package/src/context/index.ts +0 -6
- package/src/context/layout.context.ts +0 -46
- package/src/context/participant.context.ts +0 -33
- package/src/context/pin.context.ts +0 -50
- package/src/context/room.context.ts +0 -31
- package/src/context/track_reference.context.ts +0 -29
- package/src/context/widget.context.ts +0 -17
- package/src/index.css +0 -1
- package/src/index.ts +0 -5
- package/src/types/livekit_room.types.ts +0 -78
- package/src/utils/room.utils.ts +0 -9
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { useEnsureRoomContext } from '@/context/room.context';
|
|
2
|
-
import { setupDataMessageHandler, type ReceivedDataMessage } from '@livekit/components-core';
|
|
3
|
-
import type { DataPublishOptions, RemoteParticipant } from 'livekit-client';
|
|
4
|
-
import type { Observable } from 'rxjs';
|
|
5
|
-
import { computed, toRefs, type ShallowRef } from 'vue';
|
|
6
|
-
import { useObservableState } from './private/useObservableState';
|
|
7
|
-
|
|
8
|
-
export type MessagePayload<T extends string | undefined = undefined> = {
|
|
9
|
-
payload: Uint8Array;
|
|
10
|
-
topic: T;
|
|
11
|
-
from: RemoteParticipant | undefined;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export type UseDataChannelReturnType<T extends string | undefined = undefined> = {
|
|
15
|
-
isSending: ShallowRef<boolean>;
|
|
16
|
-
send: ShallowRef<(payload: Uint8Array, options?: DataPublishOptions) => Promise<void>>;
|
|
17
|
-
message: ShallowRef<MessagePayload<T> | undefined>;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
export function useDataChannel<T extends string>(
|
|
21
|
-
topic: T,
|
|
22
|
-
onMessage?: (msg: ReceivedDataMessage<T>) => void,
|
|
23
|
-
): UseDataChannelReturnType<T>;
|
|
24
|
-
export function useDataChannel(
|
|
25
|
-
onMessage?: (msg: ReceivedDataMessage) => void,
|
|
26
|
-
): UseDataChannelReturnType;
|
|
27
|
-
export function useDataChannel<T extends string>(
|
|
28
|
-
topicOrCallback?: T | ((msg: ReceivedDataMessage) => void),
|
|
29
|
-
callback?: (msg: ReceivedDataMessage<T>) => void,
|
|
30
|
-
): UseDataChannelReturnType {
|
|
31
|
-
const onMessage = typeof topicOrCallback === 'function' ? topicOrCallback : callback;
|
|
32
|
-
const topic = typeof topicOrCallback === 'string' ? topicOrCallback : undefined;
|
|
33
|
-
const room = useEnsureRoomContext();
|
|
34
|
-
|
|
35
|
-
const messageHandler = computed(() => {
|
|
36
|
-
return setupDataMessageHandler(room?.value, topic, onMessage);
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
const { send, messageObservable, isSendingObservable } = toRefs(messageHandler.value);
|
|
40
|
-
|
|
41
|
-
const message = useObservableState({
|
|
42
|
-
observable: messageObservable as unknown as Observable<MessagePayload>,
|
|
43
|
-
startWith: undefined,
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
const isSending = useObservableState({
|
|
47
|
-
observable: isSendingObservable as unknown as Observable<boolean>,
|
|
48
|
-
startWith: false,
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
return {
|
|
52
|
-
message,
|
|
53
|
-
send,
|
|
54
|
-
isSending,
|
|
55
|
-
};
|
|
56
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { DisconnectButtonProps } from '@/components/controls/buttons';
|
|
2
|
-
import { useEnsureRoomContext } from '@/context/room.context';
|
|
3
|
-
import { ConnectionState } from 'livekit-client';
|
|
4
|
-
import { computed, type HTMLAttributes, type ShallowRef } from 'vue';
|
|
5
|
-
import { useConnectionState } from './useConnectionState';
|
|
6
|
-
|
|
7
|
-
export function useDisconnectButton(props: DisconnectButtonProps): {
|
|
8
|
-
buttonProps: ShallowRef<HTMLAttributes>;
|
|
9
|
-
} {
|
|
10
|
-
const room = useEnsureRoomContext();
|
|
11
|
-
const connectionState = useConnectionState(room.value);
|
|
12
|
-
|
|
13
|
-
function disconnect(stopTracks?: boolean) {
|
|
14
|
-
room.value.disconnect(stopTracks);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
const buttonProps = computed<HTMLAttributes>(() => {
|
|
18
|
-
return {
|
|
19
|
-
...props,
|
|
20
|
-
onClick: () => disconnect(),
|
|
21
|
-
disabled: connectionState.value === ConnectionState.Disconnected,
|
|
22
|
-
};
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
return {
|
|
26
|
-
buttonProps,
|
|
27
|
-
};
|
|
28
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { TrackReferenceOrPlaceholder } from '@livekit/components-core';
|
|
2
|
-
import { facingModeFromLocalTrack, LocalTrackPublication } from 'livekit-client';
|
|
3
|
-
import { ref, watch, type ShallowRef } from 'vue';
|
|
4
|
-
|
|
5
|
-
export enum FacingMode {
|
|
6
|
-
User = 'user',
|
|
7
|
-
Environment = 'environment',
|
|
8
|
-
Left = 'left',
|
|
9
|
-
Right = 'right',
|
|
10
|
-
Undefined = 'undefined',
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export function useFacingMode(trackReference: TrackReferenceOrPlaceholder): ShallowRef<FacingMode> {
|
|
14
|
-
const state = ref<FacingMode>(FacingMode.Undefined);
|
|
15
|
-
|
|
16
|
-
watch(trackReference, () => {
|
|
17
|
-
if (trackReference.publication instanceof LocalTrackPublication) {
|
|
18
|
-
const localTrack = trackReference.publication.track;
|
|
19
|
-
if (localTrack) {
|
|
20
|
-
const { facingMode } = facingModeFromLocalTrack(localTrack);
|
|
21
|
-
state.value = FacingMode[facingMode as keyof typeof FacingMode];
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
return state.value;
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
return state;
|
|
28
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { useMaybeLayoutContext } from '@/context/layout.context';
|
|
2
|
-
import { useEnsureTrackRef } from '@/context/track_reference.context';
|
|
3
|
-
import { isTrackReferencePinned, type TrackReferenceOrPlaceholder } from '@livekit/components-core';
|
|
4
|
-
import { computed, type HTMLAttributes, type ShallowRef } from 'vue';
|
|
5
|
-
|
|
6
|
-
export type UseFocusToggleProps = {
|
|
7
|
-
trackRef?: TrackReferenceOrPlaceholder;
|
|
8
|
-
props: HTMLAttributes;
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export type UseFocusToggleReturnType = {
|
|
12
|
-
elementProps: ShallowRef<HTMLAttributes>;
|
|
13
|
-
inFocus: ShallowRef<boolean>;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export function useFocusToggle({ trackRef, props }: UseFocusToggleProps): UseFocusToggleReturnType {
|
|
17
|
-
const trackReference = useEnsureTrackRef(trackRef);
|
|
18
|
-
const layoutContext = useMaybeLayoutContext();
|
|
19
|
-
|
|
20
|
-
const className = 'lk-focus-toggle-button';
|
|
21
|
-
|
|
22
|
-
const inFocus = computed<boolean>(() => {
|
|
23
|
-
return isTrackReferencePinned(trackReference.value, layoutContext?.value?.pin.state);
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
const elementProps = computed<HTMLAttributes>(() => {
|
|
27
|
-
return {
|
|
28
|
-
...props,
|
|
29
|
-
class: className,
|
|
30
|
-
'data-lk-toggle-focused': inFocus.value,
|
|
31
|
-
};
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
return {
|
|
35
|
-
elementProps,
|
|
36
|
-
inFocus,
|
|
37
|
-
};
|
|
38
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
GRID_LAYOUTS,
|
|
3
|
-
selectGridLayout,
|
|
4
|
-
type GridLayoutDefinition,
|
|
5
|
-
} from '@livekit/components-core';
|
|
6
|
-
import { useElementSize } from '@vueuse/core';
|
|
7
|
-
import { computed, watch, type Ref, type ShallowRef } from 'vue';
|
|
8
|
-
|
|
9
|
-
export type UseGridLayoutReturnType = {
|
|
10
|
-
layout: ShallowRef<GridLayoutDefinition | undefined>;
|
|
11
|
-
containerWidth: ShallowRef<number | undefined>;
|
|
12
|
-
containerHeight: ShallowRef<number | undefined>;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export function useGridLayout(
|
|
16
|
-
gridElement: Ref<HTMLDivElement>,
|
|
17
|
-
trackCount: number,
|
|
18
|
-
options: {
|
|
19
|
-
gridLayouts?: GridLayoutDefinition[];
|
|
20
|
-
} = {},
|
|
21
|
-
): UseGridLayoutReturnType {
|
|
22
|
-
const { width, height } = useElementSize(gridElement);
|
|
23
|
-
|
|
24
|
-
const gridLayouts = computed<GridLayoutDefinition[]>(() => {
|
|
25
|
-
return options.gridLayouts ?? GRID_LAYOUTS;
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
const layout = computed(() => {
|
|
29
|
-
return selectGridLayout(gridLayouts.value, trackCount, width.value, height.value);
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
watch([gridElement, layout], () => {
|
|
33
|
-
if (gridElement.value && layout) {
|
|
34
|
-
gridElement.value.style.setProperty('--lk-col-count', layout.value?.columns.toString());
|
|
35
|
-
gridElement.value.style.setProperty('--lk-row-count', layout.value?.rows.toString());
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
return {
|
|
40
|
-
layout,
|
|
41
|
-
containerWidth: width,
|
|
42
|
-
containerHeight: height,
|
|
43
|
-
};
|
|
44
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { useEnsureParticipant } from '@/context/participant.context';
|
|
2
|
-
import { useEnsureRoomContext } from '@/context/room.context';
|
|
3
|
-
import { encryptionStatusObservable } from '@livekit/components-core';
|
|
4
|
-
import type { LocalParticipant, Participant, Room } from 'livekit-client';
|
|
5
|
-
import { Observable } from 'rxjs';
|
|
6
|
-
import { ref, type ShallowRef } from 'vue';
|
|
7
|
-
import { useObservableState } from './private/useObservableState';
|
|
8
|
-
|
|
9
|
-
export type UseIsEncryptedOptions = {
|
|
10
|
-
room?: Room;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export type EncryptedObservable = Observable<boolean>;
|
|
14
|
-
|
|
15
|
-
export function useIsEncrypted(
|
|
16
|
-
participant?: Participant,
|
|
17
|
-
options: UseIsEncryptedOptions = {},
|
|
18
|
-
): ShallowRef<boolean> {
|
|
19
|
-
const p = useEnsureParticipant(participant);
|
|
20
|
-
const room = useEnsureRoomContext(options.room);
|
|
21
|
-
|
|
22
|
-
const observer = ref<EncryptedObservable>(
|
|
23
|
-
encryptionStatusObservable(room.value, p.value) as unknown as EncryptedObservable,
|
|
24
|
-
);
|
|
25
|
-
|
|
26
|
-
const isEncrypted = useObservableState({
|
|
27
|
-
observable: observer.value as unknown as EncryptedObservable,
|
|
28
|
-
startWith: p.value.isLocal
|
|
29
|
-
? (p.value as LocalParticipant).isE2EEEnabled
|
|
30
|
-
: !!p.value?.isEncrypted,
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
return isEncrypted;
|
|
34
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { useEnsureParticipant } from '@/context/participant.context';
|
|
2
|
-
import {
|
|
3
|
-
getTrackReferenceId,
|
|
4
|
-
mutedObserver,
|
|
5
|
-
type TrackReference,
|
|
6
|
-
type TrackReferenceOrPlaceholder,
|
|
7
|
-
type TrackReferencePlaceholder,
|
|
8
|
-
} from '@livekit/components-core';
|
|
9
|
-
import { useSubscription } from '@vueuse/rxjs';
|
|
10
|
-
import type { Participant, Track } from 'livekit-client';
|
|
11
|
-
import { computed, ref, watch, type ShallowRef } from 'vue';
|
|
12
|
-
|
|
13
|
-
export type UseIsMutedOptions = {
|
|
14
|
-
participant?: Participant;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export function useIsMuted(trackRef: TrackReferenceOrPlaceholder): ShallowRef<boolean>;
|
|
18
|
-
export function useIsMuted(
|
|
19
|
-
sourceOrTrackRef: TrackReferenceOrPlaceholder | Track.Source,
|
|
20
|
-
options: UseIsMutedOptions = {},
|
|
21
|
-
): ShallowRef<boolean> {
|
|
22
|
-
const passedParticipant = computed<Participant | undefined>(() =>
|
|
23
|
-
typeof sourceOrTrackRef === 'string' ? options.participant : sourceOrTrackRef.participant,
|
|
24
|
-
);
|
|
25
|
-
|
|
26
|
-
const p = useEnsureParticipant(passedParticipant.value);
|
|
27
|
-
|
|
28
|
-
const trackRef = computed<TrackReference | TrackReferencePlaceholder>(() => {
|
|
29
|
-
const track =
|
|
30
|
-
typeof sourceOrTrackRef === 'string'
|
|
31
|
-
? { participant: p.value, source: sourceOrTrackRef }
|
|
32
|
-
: sourceOrTrackRef;
|
|
33
|
-
|
|
34
|
-
return track;
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
const isMuted = ref(
|
|
38
|
-
!!(
|
|
39
|
-
trackRef.value.publication?.isMuted ||
|
|
40
|
-
p.value.getTrackPublication(trackRef.value.source)?.isMuted
|
|
41
|
-
),
|
|
42
|
-
);
|
|
43
|
-
|
|
44
|
-
watch(
|
|
45
|
-
() => getTrackReferenceId(trackRef.value),
|
|
46
|
-
() => {
|
|
47
|
-
useSubscription(
|
|
48
|
-
mutedObserver(trackRef.value).subscribe((muted) => {
|
|
49
|
-
isMuted.value = muted;
|
|
50
|
-
}),
|
|
51
|
-
);
|
|
52
|
-
},
|
|
53
|
-
);
|
|
54
|
-
|
|
55
|
-
return isMuted;
|
|
56
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { useEnsureRoomContext } from '@/context/room.context';
|
|
2
|
-
import { recordingStatusObservable } from '@livekit/components-core';
|
|
3
|
-
import type { Room } from 'livekit-client';
|
|
4
|
-
import type { Observable } from 'rxjs';
|
|
5
|
-
import { ref, watch, type ShallowRef } from 'vue';
|
|
6
|
-
import { useObservableState } from './private/useObservableState';
|
|
7
|
-
import { useConnectionState } from './useConnectionState';
|
|
8
|
-
|
|
9
|
-
export type UseIsRecordingObservable = Observable<boolean>;
|
|
10
|
-
|
|
11
|
-
export function useIsRecording(room?: Room): ShallowRef<boolean> {
|
|
12
|
-
const r = useEnsureRoomContext(room);
|
|
13
|
-
|
|
14
|
-
const connectionState = useConnectionState(r.value);
|
|
15
|
-
|
|
16
|
-
const observable = ref<UseIsRecordingObservable>(
|
|
17
|
-
recordingStatusObservable(r.value) as unknown as UseIsRecordingObservable,
|
|
18
|
-
);
|
|
19
|
-
|
|
20
|
-
const isRecording = useObservableState({
|
|
21
|
-
observable: observable.value as unknown as UseIsRecordingObservable,
|
|
22
|
-
startWith: r.value.isRecording,
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
watch([connectionState, r], () => {
|
|
26
|
-
observable.value = recordingStatusObservable(r.value) as unknown as UseIsRecordingObservable;
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
return isRecording;
|
|
30
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { useEnsureParticipant } from '@/context/participant.context';
|
|
2
|
-
import { createIsSpeakingObserver } from '@livekit/components-core';
|
|
3
|
-
import type { Participant } from 'livekit-client';
|
|
4
|
-
import type { Observable } from 'rxjs';
|
|
5
|
-
import { computed, type ShallowRef } from 'vue';
|
|
6
|
-
import { useObservableState } from './private/useObservableState';
|
|
7
|
-
|
|
8
|
-
export type IsSpeakingObservable = Observable<boolean>;
|
|
9
|
-
|
|
10
|
-
export function useIsSpeaking(participant?: Participant): ShallowRef<boolean> {
|
|
11
|
-
const p = useEnsureParticipant(participant);
|
|
12
|
-
|
|
13
|
-
const observable = computed<IsSpeakingObservable>(
|
|
14
|
-
() => createIsSpeakingObserver(p.value) as unknown as IsSpeakingObservable,
|
|
15
|
-
);
|
|
16
|
-
|
|
17
|
-
const isSpeaking = useObservableState({
|
|
18
|
-
observable: observable.value as unknown as IsSpeakingObservable,
|
|
19
|
-
startWith: p.value.isSpeaking,
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
return isSpeaking;
|
|
23
|
-
}
|
|
@@ -1,219 +0,0 @@
|
|
|
1
|
-
import { useRoomContext } from '@/context/room.context';
|
|
2
|
-
import type { LiveKitRoomProps } from '@/types/livekit_room.types';
|
|
3
|
-
import { roomOptionsStringifyReplacer } from '@/utils/room.utils';
|
|
4
|
-
import { DisconnectReason, MediaDeviceFailure, Room, RoomEvent } from 'livekit-client';
|
|
5
|
-
import {
|
|
6
|
-
computed,
|
|
7
|
-
onBeforeUnmount,
|
|
8
|
-
onMounted,
|
|
9
|
-
onWatcherCleanup,
|
|
10
|
-
ref,
|
|
11
|
-
toRefs,
|
|
12
|
-
watch,
|
|
13
|
-
type HTMLAttributes,
|
|
14
|
-
type Ref,
|
|
15
|
-
type ShallowRef,
|
|
16
|
-
} from 'vue';
|
|
17
|
-
|
|
18
|
-
export type UseLiveKitRoomReturn = {
|
|
19
|
-
room: ShallowRef<Room | undefined>;
|
|
20
|
-
elementProps: ShallowRef<HTMLAttributes>;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
const defaultRoomProps: Partial<LiveKitRoomProps> = {
|
|
24
|
-
connect: true,
|
|
25
|
-
audio: false,
|
|
26
|
-
video: false,
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
export function useLiveKitRoom(props: LiveKitRoomProps): UseLiveKitRoomReturn {
|
|
30
|
-
const {
|
|
31
|
-
token,
|
|
32
|
-
serverUrl,
|
|
33
|
-
options,
|
|
34
|
-
room: passedRoom,
|
|
35
|
-
connectOptions,
|
|
36
|
-
connect,
|
|
37
|
-
audio,
|
|
38
|
-
video,
|
|
39
|
-
screen,
|
|
40
|
-
onConnected,
|
|
41
|
-
onDisconnected,
|
|
42
|
-
onError,
|
|
43
|
-
onMediaDeviceFailure,
|
|
44
|
-
onEncryptionError,
|
|
45
|
-
simulateParticipants,
|
|
46
|
-
htmlProps,
|
|
47
|
-
} = toRefs({ ...defaultRoomProps, ...props });
|
|
48
|
-
|
|
49
|
-
const shouldConnect = ref(connect?.value ?? false);
|
|
50
|
-
const room = ref<Room | undefined>(passedRoom?.value ?? useRoomContext()?.value);
|
|
51
|
-
|
|
52
|
-
const elementProps = computed<HTMLAttributes>(() => {
|
|
53
|
-
return {
|
|
54
|
-
...htmlProps?.value,
|
|
55
|
-
class: 'lk-room-container',
|
|
56
|
-
};
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
function onSignalConnected() {
|
|
60
|
-
const localP = room.value?.localParticipant;
|
|
61
|
-
|
|
62
|
-
console.debug('trying to publish local tracks');
|
|
63
|
-
Promise.all([
|
|
64
|
-
localP?.setMicrophoneEnabled(
|
|
65
|
-
!!audio?.value,
|
|
66
|
-
typeof audio?.value !== 'boolean' ? audio?.value : undefined,
|
|
67
|
-
),
|
|
68
|
-
localP?.setCameraEnabled(
|
|
69
|
-
!!video?.value,
|
|
70
|
-
typeof video?.value !== 'boolean' ? video?.value : undefined,
|
|
71
|
-
),
|
|
72
|
-
localP?.setScreenShareEnabled(
|
|
73
|
-
!!screen?.value,
|
|
74
|
-
typeof screen?.value !== 'boolean' ? screen?.value : undefined,
|
|
75
|
-
),
|
|
76
|
-
]).catch((e) => {
|
|
77
|
-
console.warn(e);
|
|
78
|
-
onError?.value?.(e as Error);
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
function handleMediaDeviceError(e: Error) {
|
|
83
|
-
const mediaDeviceFailure = MediaDeviceFailure.getFailure(e);
|
|
84
|
-
onMediaDeviceFailure?.value?.(mediaDeviceFailure);
|
|
85
|
-
}
|
|
86
|
-
function handleEncryptionError(e: Error) {
|
|
87
|
-
onEncryptionError?.value?.(e);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
function handleDisconnected(reason?: DisconnectReason) {
|
|
91
|
-
onDisconnected?.value?.(reason);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
function handleConnected() {
|
|
95
|
-
onConnected?.value?.();
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
watch(
|
|
99
|
-
[passedRoom, options, roomOptionsStringifyReplacer],
|
|
100
|
-
() => {
|
|
101
|
-
room.value = passedRoom?.value ?? new Room(options?.value);
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
deep: true,
|
|
105
|
-
immediate: true,
|
|
106
|
-
},
|
|
107
|
-
);
|
|
108
|
-
|
|
109
|
-
watch(
|
|
110
|
-
[
|
|
111
|
-
room,
|
|
112
|
-
audio,
|
|
113
|
-
video,
|
|
114
|
-
screen,
|
|
115
|
-
onError,
|
|
116
|
-
onEncryptionError,
|
|
117
|
-
onMediaDeviceFailure,
|
|
118
|
-
onConnected,
|
|
119
|
-
onDisconnected,
|
|
120
|
-
],
|
|
121
|
-
() => {
|
|
122
|
-
if (!room.value) {
|
|
123
|
-
return;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
room.value
|
|
127
|
-
.on(RoomEvent.SignalConnected, onSignalConnected)
|
|
128
|
-
.on(RoomEvent.MediaDevicesError, handleMediaDeviceError)
|
|
129
|
-
.on(RoomEvent.EncryptionError, handleEncryptionError)
|
|
130
|
-
.on(RoomEvent.Disconnected, handleDisconnected)
|
|
131
|
-
.on(RoomEvent.Connected, handleConnected);
|
|
132
|
-
|
|
133
|
-
onWatcherCleanup(() => {
|
|
134
|
-
if (!room.value) {
|
|
135
|
-
return;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
room.value
|
|
139
|
-
.off(RoomEvent.SignalConnected, onSignalConnected)
|
|
140
|
-
.off(RoomEvent.MediaDevicesError, handleMediaDeviceError)
|
|
141
|
-
.off(RoomEvent.EncryptionError, handleEncryptionError)
|
|
142
|
-
.off(RoomEvent.Disconnected, handleDisconnected)
|
|
143
|
-
.off(RoomEvent.Connected, handleConnected);
|
|
144
|
-
});
|
|
145
|
-
},
|
|
146
|
-
{
|
|
147
|
-
deep: true,
|
|
148
|
-
},
|
|
149
|
-
);
|
|
150
|
-
|
|
151
|
-
watch(
|
|
152
|
-
[connect, token, connectOptions, room, onError, serverUrl, simulateParticipants],
|
|
153
|
-
() => {
|
|
154
|
-
if (!room.value) return;
|
|
155
|
-
|
|
156
|
-
if (simulateParticipants?.value) {
|
|
157
|
-
room.value.simulateParticipants({
|
|
158
|
-
participants: {
|
|
159
|
-
count: simulateParticipants.value,
|
|
160
|
-
},
|
|
161
|
-
publish: {
|
|
162
|
-
audio: true,
|
|
163
|
-
useRealTracks: true,
|
|
164
|
-
},
|
|
165
|
-
});
|
|
166
|
-
return;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
if (connect?.value) {
|
|
170
|
-
shouldConnect.value = true;
|
|
171
|
-
|
|
172
|
-
console.debug('connecting');
|
|
173
|
-
|
|
174
|
-
if (!token.value) {
|
|
175
|
-
console.debug('no token yet');
|
|
176
|
-
return;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
if (!serverUrl.value) {
|
|
180
|
-
console.warn('no livekit url provided');
|
|
181
|
-
onError?.value?.(Error('no livekit url provided'));
|
|
182
|
-
return;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
room.value.connect(serverUrl.value, token.value, connectOptions?.value).catch((e) => {
|
|
186
|
-
console.warn(e);
|
|
187
|
-
if (shouldConnect.value === true) {
|
|
188
|
-
onError?.value?.(e as Error);
|
|
189
|
-
}
|
|
190
|
-
});
|
|
191
|
-
} else {
|
|
192
|
-
console.debug('disconnecting because connect is false');
|
|
193
|
-
shouldConnect.value = false;
|
|
194
|
-
room.value.disconnect();
|
|
195
|
-
}
|
|
196
|
-
},
|
|
197
|
-
{ deep: true },
|
|
198
|
-
);
|
|
199
|
-
|
|
200
|
-
onMounted(() => {
|
|
201
|
-
if (options?.value && passedRoom) {
|
|
202
|
-
console.warn(
|
|
203
|
-
'when using a manually created room, the options object will be ignored. set the desired options directly when creating the room instead.',
|
|
204
|
-
);
|
|
205
|
-
}
|
|
206
|
-
});
|
|
207
|
-
|
|
208
|
-
onBeforeUnmount(() => {
|
|
209
|
-
if (room.value) {
|
|
210
|
-
console.info('disconnecting before unmounting');
|
|
211
|
-
room.value.disconnect();
|
|
212
|
-
}
|
|
213
|
-
});
|
|
214
|
-
|
|
215
|
-
return {
|
|
216
|
-
room: room as Ref<Room | undefined>,
|
|
217
|
-
elementProps,
|
|
218
|
-
};
|
|
219
|
-
}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { useEnsureRoomContext } from '@/context/room.context';
|
|
2
|
-
import { observeParticipantMedia, type ParticipantMedia } from '@livekit/components-core';
|
|
3
|
-
import { useSubscription } from '@vueuse/rxjs';
|
|
4
|
-
import { LocalParticipant, TrackPublication, type Room } from 'livekit-client';
|
|
5
|
-
import { ref, watch, type ShallowRef } from 'vue';
|
|
6
|
-
|
|
7
|
-
export type UseLocalParticipantOptions = {
|
|
8
|
-
room?: Room;
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export type UseLocalParticipantReturnType = {
|
|
12
|
-
isMicrophoneEnabled: ShallowRef<boolean>;
|
|
13
|
-
isScreenShareEnabled: ShallowRef<boolean>;
|
|
14
|
-
isCameraEnabled: ShallowRef<boolean>;
|
|
15
|
-
microphoneTrack: ShallowRef<TrackPublication | undefined>;
|
|
16
|
-
cameraTrack: ShallowRef<TrackPublication | undefined>;
|
|
17
|
-
lastMicrophoneError: ShallowRef<Error | undefined>;
|
|
18
|
-
lastCameraError: ShallowRef<Error | undefined>;
|
|
19
|
-
localParticipant: ShallowRef<LocalParticipant | undefined>;
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
export function useLocalParticipant(
|
|
23
|
-
options: UseLocalParticipantOptions = {},
|
|
24
|
-
): UseLocalParticipantReturnType {
|
|
25
|
-
const room = useEnsureRoomContext(options.room);
|
|
26
|
-
|
|
27
|
-
const localParticipant = ref<LocalParticipant | undefined>(room.value?.localParticipant);
|
|
28
|
-
const isMicrophoneEnabled = ref(localParticipant.value?.isMicrophoneEnabled ?? false);
|
|
29
|
-
const isCameraEnabled = ref(localParticipant.value?.isCameraEnabled ?? false);
|
|
30
|
-
const isScreenShareEnabled = ref(localParticipant.value?.isScreenShareEnabled ?? false);
|
|
31
|
-
|
|
32
|
-
const lastMicrophoneError = ref<Error | undefined>(localParticipant.value?.lastMicrophoneError);
|
|
33
|
-
const lastCameraError = ref<Error | undefined>(localParticipant.value?.lastCameraError);
|
|
34
|
-
|
|
35
|
-
const microphoneTrack = ref<TrackPublication | undefined>(undefined);
|
|
36
|
-
|
|
37
|
-
const cameraTrack = ref<TrackPublication | undefined>(undefined);
|
|
38
|
-
|
|
39
|
-
function handleUpdate(media: ParticipantMedia<LocalParticipant>) {
|
|
40
|
-
isCameraEnabled.value = media.isCameraEnabled;
|
|
41
|
-
isMicrophoneEnabled.value = media.isMicrophoneEnabled;
|
|
42
|
-
isScreenShareEnabled.value = media.isScreenShareEnabled;
|
|
43
|
-
cameraTrack.value = media.cameraTrack;
|
|
44
|
-
microphoneTrack.value = media.microphoneTrack;
|
|
45
|
-
lastMicrophoneError.value = media.participant.lastMicrophoneError;
|
|
46
|
-
lastCameraError.value = media.participant.lastCameraError;
|
|
47
|
-
localParticipant.value = media.participant;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
watch(room, () =>
|
|
51
|
-
useSubscription(observeParticipantMedia(room.value.localParticipant).subscribe(handleUpdate)),
|
|
52
|
-
);
|
|
53
|
-
|
|
54
|
-
return {
|
|
55
|
-
isMicrophoneEnabled,
|
|
56
|
-
isScreenShareEnabled,
|
|
57
|
-
isCameraEnabled,
|
|
58
|
-
microphoneTrack: microphoneTrack as ShallowRef<TrackPublication | undefined>,
|
|
59
|
-
cameraTrack: cameraTrack as ShallowRef<TrackPublication | undefined>,
|
|
60
|
-
lastMicrophoneError,
|
|
61
|
-
lastCameraError,
|
|
62
|
-
localParticipant: localParticipant as ShallowRef<LocalParticipant | undefined>,
|
|
63
|
-
};
|
|
64
|
-
}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { useEnsureTrackRef } from '@/context/track_reference.context';
|
|
2
|
-
import type { ParticipantClickEvent, TrackReferenceOrPlaceholder } from '@livekit/components-core';
|
|
3
|
-
import { Track, TrackPublication } from 'livekit-client';
|
|
4
|
-
import { computed, shallowRef, type HTMLAttributes, type ShallowRef } from 'vue';
|
|
5
|
-
import { useFacingMode } from './useFacingMode';
|
|
6
|
-
import { useIsMuted } from './useIsMuted';
|
|
7
|
-
import { useIsSpeaking } from './useIsSpeaking';
|
|
8
|
-
|
|
9
|
-
export type UseParticipantTileProps = {
|
|
10
|
-
trackRef?: TrackReferenceOrPlaceholder;
|
|
11
|
-
disableSpeakingIndicator?: boolean;
|
|
12
|
-
onParticipantClick?: (event: ParticipantClickEvent) => void;
|
|
13
|
-
htmlProps: HTMLAttributes;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export function useParticipantTile(options: UseParticipantTileProps): {
|
|
17
|
-
elementProps: ShallowRef<HTMLAttributes>;
|
|
18
|
-
} {
|
|
19
|
-
const trackReference = useEnsureTrackRef(options.trackRef);
|
|
20
|
-
|
|
21
|
-
const htmlElementAttributes = computed<HTMLAttributes>(() => {
|
|
22
|
-
return {
|
|
23
|
-
class: 'lk-participant-tile',
|
|
24
|
-
onClick: (event: MouseEvent) => {
|
|
25
|
-
options.htmlProps.onClick?.(event);
|
|
26
|
-
|
|
27
|
-
if (typeof options.onParticipantClick === 'function') {
|
|
28
|
-
const track =
|
|
29
|
-
trackReference.value.publication ??
|
|
30
|
-
trackReference.value.participant.getTrackPublication(trackReference.value.source);
|
|
31
|
-
|
|
32
|
-
options.onParticipantClick({ participant: trackReference.value.participant, track });
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
};
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
const micTrack = computed<TrackPublication | undefined>(() => {
|
|
39
|
-
return trackReference.value.participant.getTrackPublication(Track.Source.Microphone);
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
const micRef = computed<TrackReferenceOrPlaceholder>(() => {
|
|
43
|
-
const trackRef: TrackReferenceOrPlaceholder = {
|
|
44
|
-
participant: trackReference.value.participant,
|
|
45
|
-
source: Track.Source.Microphone,
|
|
46
|
-
publication: micTrack.value,
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
return trackRef;
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
const isVideoMuted = useIsMuted(trackReference.value);
|
|
53
|
-
const isAudioMuted = useIsMuted(micRef.value);
|
|
54
|
-
const isSpeaking = useIsSpeaking(trackReference.value.participant);
|
|
55
|
-
const facingMode = useFacingMode(trackReference.value);
|
|
56
|
-
|
|
57
|
-
return {
|
|
58
|
-
elementProps: shallowRef({
|
|
59
|
-
'data-lk-audio-muted': isAudioMuted,
|
|
60
|
-
'data-lk-video-muted': isVideoMuted,
|
|
61
|
-
'data-lk-speaking': options.disableSpeakingIndicator === true ? false : isSpeaking,
|
|
62
|
-
'data-lk-local-participant': trackReference.value.participant.isLocal,
|
|
63
|
-
'data-lk-source': trackReference.value.source,
|
|
64
|
-
'data-lk-facing-mode': facingMode,
|
|
65
|
-
...htmlElementAttributes.value,
|
|
66
|
-
}),
|
|
67
|
-
};
|
|
68
|
-
}
|