@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,36 +0,0 @@
|
|
|
1
|
-
import { useMaybeParticipantContext } from '@/context/participant.context';
|
|
2
|
-
import { useRoomContext } from '@/context/room.context';
|
|
3
|
-
import { participantTracksObservable, type TrackReference } from '@livekit/components-core';
|
|
4
|
-
import type { Participant, Track } from 'livekit-client';
|
|
5
|
-
import type { Observable } from 'rxjs';
|
|
6
|
-
import { computed, type ShallowRef } from 'vue';
|
|
7
|
-
import { useObservableState } from './private/useObservableState';
|
|
8
|
-
|
|
9
|
-
export function useParticipantTracks(
|
|
10
|
-
sources: Track.Source[],
|
|
11
|
-
participantIdentity?: string,
|
|
12
|
-
): ShallowRef<TrackReference[]> {
|
|
13
|
-
const room = useRoomContext();
|
|
14
|
-
const participantContext = useMaybeParticipantContext();
|
|
15
|
-
|
|
16
|
-
const p = computed<Participant | undefined>(() =>
|
|
17
|
-
participantIdentity
|
|
18
|
-
? room?.value?.getParticipantByIdentity(participantIdentity)
|
|
19
|
-
: participantContext?.value,
|
|
20
|
-
);
|
|
21
|
-
|
|
22
|
-
const observable = computed<Observable<TrackReference[]> | undefined>(() => {
|
|
23
|
-
return p.value
|
|
24
|
-
? (participantTracksObservable(p.value, { sources }) as unknown as Observable<
|
|
25
|
-
TrackReference[]
|
|
26
|
-
>)
|
|
27
|
-
: undefined;
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
const trackRefs = useObservableState<TrackReference[]>({
|
|
31
|
-
observable: observable.value,
|
|
32
|
-
startWith: [],
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
return trackRefs;
|
|
36
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { LocalParticipant, RemoteParticipant, Room, RoomEvent } from 'livekit-client';
|
|
2
|
-
import { computed, type ShallowRef } from 'vue';
|
|
3
|
-
import { useLocalParticipant } from './useLocalParticipant';
|
|
4
|
-
import { useRemoteParticipants } from './useRemoteParticipants';
|
|
5
|
-
|
|
6
|
-
export type UseParticipantsOptions = {
|
|
7
|
-
updateOnlyOn?: RoomEvent[];
|
|
8
|
-
room?: Room;
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export function useParticipants(
|
|
12
|
-
options: UseParticipantsOptions = {},
|
|
13
|
-
): ShallowRef<(RemoteParticipant | LocalParticipant)[]> {
|
|
14
|
-
const remoteParticipants = useRemoteParticipants(options);
|
|
15
|
-
const localParticipant = useLocalParticipant()?.localParticipant;
|
|
16
|
-
|
|
17
|
-
const participants = computed<(RemoteParticipant | LocalParticipant)[]>(() => {
|
|
18
|
-
return [localParticipant.value, ...remoteParticipants.value] as (
|
|
19
|
-
| RemoteParticipant
|
|
20
|
-
| LocalParticipant
|
|
21
|
-
)[];
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
return participants;
|
|
25
|
-
}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { loadUserChoices, saveUserChoices, type LocalUserChoices } from '@livekit/components-core';
|
|
2
|
-
import { ref, watch, type ShallowRef } from 'vue';
|
|
3
|
-
|
|
4
|
-
export type UsePersistentUserChoicesOptions = {
|
|
5
|
-
defaults?: Partial<LocalUserChoices>;
|
|
6
|
-
preventSave?: boolean;
|
|
7
|
-
preventLoad?: boolean;
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
export type UsePersistentUserChoicesReturnType = {
|
|
11
|
-
userChoices: ShallowRef<LocalUserChoices>;
|
|
12
|
-
saveAudioInputEnabled: (enabled: boolean) => void;
|
|
13
|
-
saveVideoInputEnabled: (enabled: boolean) => void;
|
|
14
|
-
saveAudioInputDeviceId: (deviceId: string) => void;
|
|
15
|
-
saveVideoInputDeviceId: (deviceId: string) => void;
|
|
16
|
-
saveUsername: (username: string) => void;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export function usePersistentUserChoices(
|
|
20
|
-
options: UsePersistentUserChoicesOptions = {},
|
|
21
|
-
): UsePersistentUserChoicesReturnType {
|
|
22
|
-
const userChoices = ref<LocalUserChoices>(
|
|
23
|
-
loadUserChoices(options.defaults, options.preventLoad ?? false),
|
|
24
|
-
);
|
|
25
|
-
|
|
26
|
-
function saveAudioInputDeviceId(deviceId: string) {
|
|
27
|
-
userChoices.value = { ...userChoices.value, audioDeviceId: deviceId };
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
function saveVideoInputDeviceId(deviceId: string) {
|
|
31
|
-
userChoices.value = { ...userChoices.value, videoDeviceId: deviceId };
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
function saveAudioInputEnabled(enabled: boolean) {
|
|
35
|
-
userChoices.value = { ...userChoices.value, audioEnabled: enabled };
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
function saveVideoInputEnabled(enabled: boolean) {
|
|
39
|
-
userChoices.value = { ...userChoices.value, videoEnabled: enabled };
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
function saveUsername(username: string) {
|
|
43
|
-
userChoices.value = { ...userChoices.value, username };
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
watch(
|
|
47
|
-
[userChoices, options.preventSave],
|
|
48
|
-
() => {
|
|
49
|
-
saveUserChoices(userChoices.value, options.preventSave ?? false);
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
deep: true,
|
|
53
|
-
},
|
|
54
|
-
);
|
|
55
|
-
|
|
56
|
-
return {
|
|
57
|
-
userChoices,
|
|
58
|
-
saveAudioInputEnabled,
|
|
59
|
-
saveVideoInputEnabled,
|
|
60
|
-
saveAudioInputDeviceId,
|
|
61
|
-
saveVideoInputDeviceId,
|
|
62
|
-
saveUsername,
|
|
63
|
-
};
|
|
64
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { useEnsureLayoutContext, type LayoutState } from '@/context/layout.context';
|
|
2
|
-
import type { TrackReferenceOrPlaceholder } from '@livekit/components-core';
|
|
3
|
-
import { computed, type ShallowRef } from 'vue';
|
|
4
|
-
|
|
5
|
-
export function usePinnedTracks(context?: LayoutState): ShallowRef<TrackReferenceOrPlaceholder[]> {
|
|
6
|
-
const layoutContext = useEnsureLayoutContext(context);
|
|
7
|
-
|
|
8
|
-
const pinState = computed<TrackReferenceOrPlaceholder[]>(() => {
|
|
9
|
-
if (layoutContext.value?.pin.state !== undefined && layoutContext.value.pin.state.length >= 1) {
|
|
10
|
-
return layoutContext.value.pin.state;
|
|
11
|
-
}
|
|
12
|
-
return [];
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
return pinState;
|
|
16
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { useEnsureRoomContext } from '@/context/room.context';
|
|
2
|
-
import {
|
|
3
|
-
connectedParticipantObserver,
|
|
4
|
-
participantByIdentifierObserver,
|
|
5
|
-
type ParticipantIdentifier,
|
|
6
|
-
} from '@livekit/components-core';
|
|
7
|
-
import { useSubscription } from '@vueuse/rxjs';
|
|
8
|
-
import type { Participant, ParticipantEvent, RemoteParticipant, Room } from 'livekit-client';
|
|
9
|
-
import { computed, ref, type Ref, type ShallowRef } from 'vue';
|
|
10
|
-
|
|
11
|
-
export type UseRemoteParticipantOptions = {
|
|
12
|
-
updateOnlyOn?: ParticipantEvent[];
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export function useRemoteParticipant(
|
|
16
|
-
identityOrIdentifier: string | ParticipantIdentifier,
|
|
17
|
-
options: UseRemoteParticipantOptions = {},
|
|
18
|
-
): ShallowRef<Participant | undefined> {
|
|
19
|
-
const room: Ref<Room> = useEnsureRoomContext();
|
|
20
|
-
const updateOnlyOn: Ref<ParticipantEvent[]> = ref(options.updateOnlyOn ?? []);
|
|
21
|
-
const participant: Ref<RemoteParticipant | undefined> = ref(undefined);
|
|
22
|
-
|
|
23
|
-
const observable = computed(() => {
|
|
24
|
-
if (typeof identityOrIdentifier === 'string') {
|
|
25
|
-
return connectedParticipantObserver(room.value, identityOrIdentifier, {
|
|
26
|
-
additionalEvents: updateOnlyOn.value,
|
|
27
|
-
});
|
|
28
|
-
} else {
|
|
29
|
-
return participantByIdentifierObserver(room.value, identityOrIdentifier, {
|
|
30
|
-
additionalEvents: updateOnlyOn.value,
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
useSubscription(
|
|
36
|
-
observable.value.subscribe((p) => {
|
|
37
|
-
participant.value = p;
|
|
38
|
-
}),
|
|
39
|
-
);
|
|
40
|
-
|
|
41
|
-
return participant;
|
|
42
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { useEnsureRoomContext } from '@/context/room.context';
|
|
2
|
-
import { connectedParticipantsObserver } from '@livekit/components-core';
|
|
3
|
-
import { useSubscription } from '@vueuse/rxjs';
|
|
4
|
-
import type { Participant, Room, RoomEvent } from 'livekit-client';
|
|
5
|
-
import { ref, watch, type ShallowRef } from 'vue';
|
|
6
|
-
|
|
7
|
-
export type UseRemoteParticipantsOptions = {
|
|
8
|
-
updateOnlyOn?: RoomEvent[];
|
|
9
|
-
room?: Room;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export function useRemoteParticipants(
|
|
13
|
-
options: UseRemoteParticipantsOptions = {},
|
|
14
|
-
): ShallowRef<Participant[]> {
|
|
15
|
-
const room = useEnsureRoomContext(options.room);
|
|
16
|
-
const participants = ref<Participant[]>([]);
|
|
17
|
-
|
|
18
|
-
watch([room, options.updateOnlyOn], () => {
|
|
19
|
-
useSubscription(
|
|
20
|
-
connectedParticipantsObserver(room.value, {
|
|
21
|
-
additionalRoomEvents: options.updateOnlyOn,
|
|
22
|
-
}).subscribe((v) => (participants.value = v)),
|
|
23
|
-
);
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
return participants as ShallowRef<Participant[]>;
|
|
27
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { useEnsureRoomContext } from '@/context/room.context';
|
|
2
|
-
import { roomInfoObserver } from '@livekit/components-core';
|
|
3
|
-
import { useObservable } from '@vueuse/rxjs';
|
|
4
|
-
import type { Room } from 'livekit-client';
|
|
5
|
-
import type { Observable } from 'rxjs';
|
|
6
|
-
import { toRefs, type ShallowRef } from 'vue';
|
|
7
|
-
import { useObservableState } from './private/useObservableState';
|
|
8
|
-
|
|
9
|
-
export type UseRoomInfoOptions = {
|
|
10
|
-
room?: Room;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export type RoomInfo = {
|
|
14
|
-
name: string;
|
|
15
|
-
metadata: string;
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export function useRoomInfo(options: UseRoomInfoOptions = {}): {
|
|
19
|
-
name: ShallowRef<string>;
|
|
20
|
-
metadata: ShallowRef<string | undefined>;
|
|
21
|
-
} {
|
|
22
|
-
const room = useEnsureRoomContext(options.room);
|
|
23
|
-
|
|
24
|
-
const infoObserver = useObservable(
|
|
25
|
-
roomInfoObserver(room.value) as unknown as Observable<RoomInfo>,
|
|
26
|
-
);
|
|
27
|
-
|
|
28
|
-
const info = useObservableState({
|
|
29
|
-
observable: infoObserver.value as unknown as Observable<RoomInfo>,
|
|
30
|
-
startWith: {
|
|
31
|
-
name: room.value.name,
|
|
32
|
-
metadata: room.value.metadata,
|
|
33
|
-
},
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
const { name, metadata } = toRefs(info.value);
|
|
37
|
-
|
|
38
|
-
return {
|
|
39
|
-
name,
|
|
40
|
-
metadata,
|
|
41
|
-
};
|
|
42
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { sortParticipants } from '@livekit/components-core';
|
|
2
|
-
import type { Participant } from 'livekit-client';
|
|
3
|
-
import { ref, watch, type ShallowRef } from 'vue';
|
|
4
|
-
import { useSpeakingParticipants } from './useSpeakingParticipants';
|
|
5
|
-
|
|
6
|
-
export function useSortedParticipants(participants: Array<Participant>): ShallowRef<Participant[]> {
|
|
7
|
-
const activeSpeakers = useSpeakingParticipants();
|
|
8
|
-
const sortedParticipants = ref<Participant[]>(sortParticipants(participants));
|
|
9
|
-
|
|
10
|
-
watch(
|
|
11
|
-
[activeSpeakers, participants],
|
|
12
|
-
() => {
|
|
13
|
-
sortedParticipants.value = sortParticipants(participants);
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
deep: true,
|
|
17
|
-
},
|
|
18
|
-
);
|
|
19
|
-
|
|
20
|
-
return sortedParticipants as ShallowRef<Participant[]>;
|
|
21
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { useEnsureRoomContext } from '@/context/room.context';
|
|
2
|
-
import { activeSpeakerObserver } from '@livekit/components-core';
|
|
3
|
-
import { useObservable } from '@vueuse/rxjs';
|
|
4
|
-
import type { Participant } from 'livekit-client';
|
|
5
|
-
import type { Observable } from 'rxjs';
|
|
6
|
-
import type { ShallowRef } from 'vue';
|
|
7
|
-
import { useObservableState } from './private/useObservableState';
|
|
8
|
-
|
|
9
|
-
export function useSpeakingParticipants(): ShallowRef<Participant[]> {
|
|
10
|
-
const room = useEnsureRoomContext();
|
|
11
|
-
|
|
12
|
-
const speakerObserver = useObservable(
|
|
13
|
-
activeSpeakerObserver(room.value) as unknown as Observable<Participant[]>,
|
|
14
|
-
);
|
|
15
|
-
|
|
16
|
-
const activeSpeakers = useObservableState({
|
|
17
|
-
observable: speakerObserver.value as unknown as Observable<Participant[]>,
|
|
18
|
-
startWith: room.value.activeSpeakers,
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
return activeSpeakers;
|
|
22
|
-
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { useEnsureRoomContext } from '@/context/room.context';
|
|
2
|
-
import { setupStartAudio } from '@livekit/components-core';
|
|
3
|
-
import { useObservable } from '@vueuse/rxjs';
|
|
4
|
-
import type { Room } from 'livekit-client';
|
|
5
|
-
import type { Observable } from 'rxjs';
|
|
6
|
-
import { computed, ref, toRefs, type HTMLAttributes, type ShallowRef } from 'vue';
|
|
7
|
-
import { useObservableState } from './private/useObservableState';
|
|
8
|
-
|
|
9
|
-
export type UseStartAudioProps = {
|
|
10
|
-
room?: Room;
|
|
11
|
-
props: HTMLAttributes;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export type UseStartAudioReturnType = {
|
|
15
|
-
canPlayAudio: ShallowRef<boolean>;
|
|
16
|
-
elementProps: HTMLAttributes;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export function useStartAudio({ room, props }: UseStartAudioProps): UseStartAudioReturnType {
|
|
20
|
-
const roomEnsured = useEnsureRoomContext(room);
|
|
21
|
-
|
|
22
|
-
const setupStartAudioResult = computed(() => setupStartAudio());
|
|
23
|
-
|
|
24
|
-
const { className, roomAudioPlaybackAllowedObservable, handleStartAudioPlayback } = toRefs(
|
|
25
|
-
setupStartAudioResult.value,
|
|
26
|
-
);
|
|
27
|
-
|
|
28
|
-
const observable = useObservable(
|
|
29
|
-
roomAudioPlaybackAllowedObservable.value(roomEnsured.value) as unknown as Observable<{
|
|
30
|
-
canPlayAudio: boolean;
|
|
31
|
-
}>,
|
|
32
|
-
);
|
|
33
|
-
|
|
34
|
-
const canPlayAudioObj = useObservableState({
|
|
35
|
-
observable: observable.value as unknown as Observable<{ canPlayAudio: boolean }>,
|
|
36
|
-
startWith: {
|
|
37
|
-
canPlayAudio: roomEnsured.value.canPlaybackVideo,
|
|
38
|
-
},
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
const canPlayAudio = ref(canPlayAudioObj.value.canPlayAudio);
|
|
42
|
-
|
|
43
|
-
return {
|
|
44
|
-
canPlayAudio,
|
|
45
|
-
elementProps: {
|
|
46
|
-
...props,
|
|
47
|
-
class: className.value,
|
|
48
|
-
onClick: () => {
|
|
49
|
-
handleStartAudioPlayback.value(roomEnsured.value);
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
};
|
|
53
|
-
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { useEnsureRoomContext } from '@/context/room.context';
|
|
2
|
-
import { setupStartVideo } from '@livekit/components-core';
|
|
3
|
-
import { useObservable } from '@vueuse/rxjs';
|
|
4
|
-
import type { Room } from 'livekit-client';
|
|
5
|
-
import type { Observable } from 'rxjs';
|
|
6
|
-
import { computed, ref, toRefs, type HTMLAttributes, type ShallowRef } from 'vue';
|
|
7
|
-
import { useObservableState } from './private/useObservableState';
|
|
8
|
-
|
|
9
|
-
export type UseStartVideoProps = {
|
|
10
|
-
room?: Room;
|
|
11
|
-
props: HTMLAttributes;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export type UseStartVideoReturnType = {
|
|
15
|
-
canPlayVideo: ShallowRef<boolean>;
|
|
16
|
-
elementProps: HTMLAttributes;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export function useStartVideo({ room, props }: UseStartVideoProps): UseStartVideoReturnType {
|
|
20
|
-
const roomEnsured = useEnsureRoomContext(room);
|
|
21
|
-
|
|
22
|
-
const setupStartVideoResult = computed<ReturnType<typeof setupStartVideo>>(() =>
|
|
23
|
-
setupStartVideo(),
|
|
24
|
-
);
|
|
25
|
-
|
|
26
|
-
const { className, roomVideoPlaybackAllowedObservable, handleStartVideoPlayback } = toRefs(
|
|
27
|
-
setupStartVideoResult.value,
|
|
28
|
-
);
|
|
29
|
-
|
|
30
|
-
const observable = useObservable(
|
|
31
|
-
roomVideoPlaybackAllowedObservable.value(roomEnsured.value) as unknown as Observable<{
|
|
32
|
-
canPlayVideo: boolean;
|
|
33
|
-
}>,
|
|
34
|
-
);
|
|
35
|
-
|
|
36
|
-
const canPlayVideoObj = useObservableState({
|
|
37
|
-
observable: observable.value as unknown as Observable<{ canPlayVideo: boolean }>,
|
|
38
|
-
startWith: {
|
|
39
|
-
canPlayVideo: roomEnsured.value.canPlaybackVideo,
|
|
40
|
-
},
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
return {
|
|
44
|
-
canPlayVideo: ref(canPlayVideoObj.value.canPlayVideo),
|
|
45
|
-
elementProps: {
|
|
46
|
-
...props,
|
|
47
|
-
class: className.value,
|
|
48
|
-
onClick: () => {
|
|
49
|
-
handleStartVideoPlayback.value(roomEnsured.value);
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
};
|
|
53
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { ref, watch, type ShallowRef } from 'vue';
|
|
2
|
-
|
|
3
|
-
export type UserInfo = {
|
|
4
|
-
identity?: string;
|
|
5
|
-
name?: string;
|
|
6
|
-
metadata?: string;
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
export type UseTokenOptions = {
|
|
10
|
-
userInfo?: UserInfo;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export function useToken(
|
|
14
|
-
tokenEndpoint: string | undefined,
|
|
15
|
-
roomName: string,
|
|
16
|
-
options: UseTokenOptions = {},
|
|
17
|
-
): ShallowRef<string | undefined> {
|
|
18
|
-
const token = ref<string | undefined>(undefined);
|
|
19
|
-
|
|
20
|
-
async function fetchToken() {
|
|
21
|
-
console.debug('fetching token');
|
|
22
|
-
|
|
23
|
-
const params = new URLSearchParams({ ...options.userInfo, roomName });
|
|
24
|
-
const res = await fetch(`${tokenEndpoint}?${params.toString()}`);
|
|
25
|
-
|
|
26
|
-
if (!res.ok) {
|
|
27
|
-
console.error(
|
|
28
|
-
`Could not fetch token. Server responded with status ${res.status}: ${res.statusText}`,
|
|
29
|
-
);
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
const { accessToken } = await res.json();
|
|
34
|
-
token.value = accessToken;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
watch([tokenEndpoint, roomName, options.userInfo], fetchToken);
|
|
38
|
-
|
|
39
|
-
return token;
|
|
40
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { useEnsureParticipant } from '@/context/participant.context';
|
|
2
|
-
import type { Participant, Track } from 'livekit-client';
|
|
3
|
-
import { useTrackRefBySourceOrName } from './useTrackRefBySourceOrName';
|
|
4
|
-
|
|
5
|
-
export function useTrack(
|
|
6
|
-
source: Track.Source,
|
|
7
|
-
participant?: Participant,
|
|
8
|
-
): ReturnType<typeof useTrackRefBySourceOrName> {
|
|
9
|
-
const p = useEnsureParticipant(participant);
|
|
10
|
-
return useTrackRefBySourceOrName({ source, participant: p.value });
|
|
11
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { useEnsureParticipant } from '@/context/participant.context';
|
|
2
|
-
import type { Participant } from 'livekit-client';
|
|
3
|
-
import { useTrackRefBySourceOrName } from './useTrackRefBySourceOrName';
|
|
4
|
-
|
|
5
|
-
export function useTrackByName(
|
|
6
|
-
name: string,
|
|
7
|
-
participant?: Participant,
|
|
8
|
-
): ReturnType<typeof useTrackRefBySourceOrName> {
|
|
9
|
-
const p = useEnsureParticipant(participant);
|
|
10
|
-
return useTrackRefBySourceOrName({ name, participant: p.value });
|
|
11
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { useEnsureTrackRef } from '@/context/track_reference.context';
|
|
2
|
-
import {
|
|
3
|
-
setupTrackMutedIndicator,
|
|
4
|
-
type TrackReferenceOrPlaceholder,
|
|
5
|
-
} from '@livekit/components-core';
|
|
6
|
-
import { useObservable } from '@vueuse/rxjs';
|
|
7
|
-
import type { Observable } from 'rxjs';
|
|
8
|
-
import { computed, toRefs, type ShallowRef } from 'vue';
|
|
9
|
-
import { useObservableState } from './private/useObservableState';
|
|
10
|
-
|
|
11
|
-
export function useTrackMutedIndicator(trackRef?: TrackReferenceOrPlaceholder): {
|
|
12
|
-
isMuted: ShallowRef<boolean>;
|
|
13
|
-
className: ShallowRef<string>;
|
|
14
|
-
} {
|
|
15
|
-
const trackReference = useEnsureTrackRef(trackRef);
|
|
16
|
-
|
|
17
|
-
const mediaTrackSetupResult = computed<ReturnType<typeof setupTrackMutedIndicator>>(() =>
|
|
18
|
-
setupTrackMutedIndicator(trackReference.value),
|
|
19
|
-
);
|
|
20
|
-
|
|
21
|
-
const { className, mediaMutedObserver } = toRefs(mediaTrackSetupResult.value);
|
|
22
|
-
|
|
23
|
-
const observable = useObservable(mediaMutedObserver.value as unknown as Observable<boolean>);
|
|
24
|
-
|
|
25
|
-
const isMuted = useObservableState({
|
|
26
|
-
observable: observable.value as unknown as Observable<boolean>,
|
|
27
|
-
startWith: !!(
|
|
28
|
-
trackReference.value.publication?.isMuted ||
|
|
29
|
-
trackReference.value.participant.getTrackPublication(trackReference.value.source)?.isMuted
|
|
30
|
-
),
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
return { isMuted, className };
|
|
34
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
getTrackByIdentifier,
|
|
3
|
-
setupMediaTrack,
|
|
4
|
-
type TrackReferenceOrPlaceholder,
|
|
5
|
-
type TrackSource,
|
|
6
|
-
} from '@livekit/components-core';
|
|
7
|
-
import { useSubscription } from '@vueuse/rxjs';
|
|
8
|
-
import { Track, TrackPublication } from 'livekit-client';
|
|
9
|
-
import { computed, ref, toRefs, type ShallowRef } from 'vue';
|
|
10
|
-
|
|
11
|
-
export function useTrackRefBySourceOrName(
|
|
12
|
-
source: TrackSource<Track.Source>,
|
|
13
|
-
): ShallowRef<TrackReferenceOrPlaceholder> {
|
|
14
|
-
const publication = ref<TrackPublication | undefined>(getTrackByIdentifier(source));
|
|
15
|
-
|
|
16
|
-
const mediaTrackSetupResult = computed<ReturnType<typeof setupMediaTrack>>(() =>
|
|
17
|
-
setupMediaTrack(source),
|
|
18
|
-
);
|
|
19
|
-
|
|
20
|
-
const { trackObserver } = toRefs(mediaTrackSetupResult.value);
|
|
21
|
-
|
|
22
|
-
useSubscription(
|
|
23
|
-
trackObserver.value.subscribe((pub) => {
|
|
24
|
-
publication.value = pub;
|
|
25
|
-
}),
|
|
26
|
-
);
|
|
27
|
-
|
|
28
|
-
const trackReference = computed<TrackReferenceOrPlaceholder>(() => {
|
|
29
|
-
const track: TrackReferenceOrPlaceholder = {
|
|
30
|
-
participant: source.participant,
|
|
31
|
-
source: source.source ?? Track.Source.Unknown,
|
|
32
|
-
publication: publication.value as TrackPublication,
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
return track;
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
return trackReference;
|
|
39
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { trackSyncTimeObserver, type TrackReferenceOrPlaceholder } from '@livekit/components-core';
|
|
2
|
-
import { useObservable } from '@vueuse/rxjs';
|
|
3
|
-
import type { Observable } from 'rxjs';
|
|
4
|
-
import type { ShallowRef } from 'vue';
|
|
5
|
-
import { useObservableState } from './private/useObservableState';
|
|
6
|
-
|
|
7
|
-
export function useTrackSyncTime(ref: TrackReferenceOrPlaceholder | undefined): ShallowRef<{
|
|
8
|
-
timestamp: number;
|
|
9
|
-
rtpTimestamp: number | undefined;
|
|
10
|
-
}> {
|
|
11
|
-
const observable = ref?.publication?.track
|
|
12
|
-
? // @ts-expect-error - Observer type mismatch
|
|
13
|
-
useObservable(trackSyncTimeObserver(ref?.publication.track))
|
|
14
|
-
: undefined;
|
|
15
|
-
|
|
16
|
-
if (!observable) {
|
|
17
|
-
throw new Error('Please provide a valid observable when using `useTrackSyncTime`');
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
const observedState = useObservableState({
|
|
21
|
-
observable: observable?.value as unknown as Observable<{
|
|
22
|
-
timestamp: number;
|
|
23
|
-
rtpTimestamp: number;
|
|
24
|
-
}>,
|
|
25
|
-
startWith: {
|
|
26
|
-
timestamp: Date.now(),
|
|
27
|
-
rtpTimestamp: ref?.publication?.track?.rtpTimestamp,
|
|
28
|
-
},
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
return observedState;
|
|
32
|
-
}
|