@mrksbnc/livekit-vue 0.0.0 → 0.0.2
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/dist/index.css +1 -1
- package/dist/livekit-vue.js +20559 -0
- package/dist/livekit-vue.umd.cjs +62 -0
- package/dist/src/assets/index.d.ts +0 -0
- package/dist/src/components/controls/TrackToggle.vue.d.ts +15 -0
- package/dist/src/components/controls/buttons.d.ts +4 -0
- package/dist/src/components/controls/index.d.ts +3 -0
- package/dist/src/components/controls/track_toggle.d.ts +12 -0
- package/dist/src/components/icons/ParticipantPlaceholderIcon.vue.d.ts +2 -0
- package/dist/src/components/icons/TrackIcon.vue.d.ts +7 -0
- package/dist/src/components/index.d.ts +3 -0
- package/dist/src/components/participant/audio_track.d.ts +7 -0
- package/dist/src/composables/index.d.ts +37 -0
- package/dist/src/composables/private/useObservableState.d.ts +8 -0
- package/dist/src/composables/useAudioPlayback.d.ts +11 -0
- package/dist/src/composables/useClearPinButton.d.ts +5 -0
- package/dist/src/composables/useConnectionQualityIndicator.d.ts +10 -0
- package/dist/src/composables/useConnectionState.d.ts +3 -0
- package/dist/src/composables/useDataChannel.d.ts +15 -0
- package/dist/src/composables/useDisconnectButton.d.ts +5 -0
- package/dist/src/composables/useFacingMode.d.ts +10 -0
- package/dist/src/composables/useFocusToggle.d.ts +11 -0
- package/dist/src/composables/useGridLayout.d.ts +10 -0
- package/dist/src/composables/useIsEncrypted.d.ts +8 -0
- package/dist/src/composables/useIsMuted.d.ts +7 -0
- package/dist/src/composables/useIsRecording.d.ts +5 -0
- package/dist/src/composables/useIsSpeaking.d.ts +5 -0
- package/dist/src/composables/useLiveKitRoom.d.ts +8 -0
- package/dist/src/composables/useLocalParticipant.d.ts +16 -0
- package/dist/src/composables/useParticipantTile.d.ts +11 -0
- package/dist/src/composables/useParticipantTracks.d.ts +4 -0
- package/dist/src/composables/useParticipants.d.ts +7 -0
- package/dist/src/composables/usePersistentUserChoices.d.ts +16 -0
- package/dist/src/composables/usePinnedTracks.d.ts +4 -0
- package/dist/src/composables/useRemoteParticipant.d.ts +7 -0
- package/dist/src/composables/useRemoteParticipants.d.ts +7 -0
- package/dist/src/composables/useRoomInfo.d.ts +13 -0
- package/dist/src/composables/useSortedParticipants.d.ts +3 -0
- package/dist/src/composables/useSpeakingParticipants.d.ts +3 -0
- package/dist/src/composables/useStartAudio.d.ts +11 -0
- package/dist/src/composables/useStartVideo.d.ts +11 -0
- package/dist/src/composables/useToken.d.ts +10 -0
- package/dist/src/composables/useTrack.d.ts +3 -0
- package/dist/src/composables/useTrackByName.d.ts +3 -0
- package/dist/src/composables/useTrackMutedIndicator.d.ts +6 -0
- package/dist/src/composables/useTrackRefBySourceOrName.d.ts +4 -0
- package/dist/src/composables/useTrackSyncTime.d.ts +6 -0
- package/dist/src/composables/useTrackToggle.d.ts +21 -0
- package/dist/src/composables/useTrackVolume.d.ts +28 -0
- package/dist/src/composables/useTracks.d.ts +10 -0
- package/dist/src/composables/useVisualStableUpdate.d.ts +8 -0
- package/dist/src/context/index.d.ts +6 -0
- package/dist/src/context/layout.context.d.ts +28 -0
- package/dist/src/context/participant.context.d.ts +9 -0
- package/dist/src/context/pin.context.d.ts +26 -0
- package/dist/src/context/room.context.d.ts +9 -0
- package/dist/src/context/track_reference.context.d.ts +6 -0
- package/dist/src/context/widget.context.d.ts +7 -0
- package/dist/src/index.d.ts +3 -0
- package/dist/src/types/livekit_room.types.d.ts +68 -0
- package/dist/src/utils/room.utils.d.ts +1 -0
- package/package.json +10 -9
- package/dist/components.cjs +0 -2
- package/dist/components.cjs.map +0 -1
- package/dist/components.d.ts +0 -1
- package/dist/components.mjs +0 -213
- package/dist/components.mjs.map +0 -1
- package/dist/composables.cjs +0 -2
- package/dist/composables.cjs.map +0 -1
- package/dist/composables.d.ts +0 -1
- package/dist/composables.mjs +0 -913
- package/dist/composables.mjs.map +0 -1
- package/dist/contexts-BGR-EyiF.mjs +0 -227
- package/dist/contexts-BGR-EyiF.mjs.map +0 -1
- package/dist/index.cjs +0 -2
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.mjs +0 -74
- package/dist/index.mjs.map +0 -1
- package/dist/shared-B72lPzrj.cjs +0 -2
- package/dist/shared-B72lPzrj.cjs.map +0 -1
- package/dist/shared-Bt-fJtlk.cjs +0 -2
- package/dist/shared-Bt-fJtlk.cjs.map +0 -1
- package/dist/shared-UqxyWhFA.cjs +0 -2
- package/dist/shared-UqxyWhFA.cjs.map +0 -1
- package/src/App.vue +0 -16
- package/src/main.ts +0 -6
|
File without changes
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ToggleSource } from '@livekit/components-core';
|
|
2
|
+
import { TrackToggleProps } from './track_toggle';
|
|
3
|
+
declare const _default: <T extends ToggleSource>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, never> & TrackToggleProps<T> & Partial<{}>> & import('vue').PublicProps;
|
|
5
|
+
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
|
|
6
|
+
attrs: any;
|
|
7
|
+
slots: {};
|
|
8
|
+
emit: {};
|
|
9
|
+
}>) => import('vue').VNode & {
|
|
10
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
11
|
+
};
|
|
12
|
+
export default _default;
|
|
13
|
+
type __VLS_PrettifyLocal<T> = {
|
|
14
|
+
[K in keyof T]: T[K];
|
|
15
|
+
} & {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CaptureOptionsBySource, ToggleSource } from '@livekit/components-core';
|
|
2
|
+
import { TrackPublishOptions } from 'livekit-client';
|
|
3
|
+
export interface TrackToggleProps<T extends ToggleSource> {
|
|
4
|
+
source: T;
|
|
5
|
+
showIcon?: boolean;
|
|
6
|
+
initialState?: boolean;
|
|
7
|
+
captureOptions?: CaptureOptionsBySource<T>;
|
|
8
|
+
publishOptions?: TrackPublishOptions;
|
|
9
|
+
onChange?: (enabled: boolean, isUserInitiated: boolean) => void;
|
|
10
|
+
onDeviceError?: (error: Error | unknown) => void;
|
|
11
|
+
customOnClickHandler?: (evt: MouseEvent) => void;
|
|
12
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Track } from 'livekit-client';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
source: Track.Source;
|
|
4
|
+
enabled: boolean;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export { useAudioPlayback, type AudioPlaybackObservable, type UseAudioPlaybackRetunType, } from './useAudioPlayback';
|
|
2
|
+
export { useClearPinButton, type UseClearButtonReturnType } from './useClearPinButton';
|
|
3
|
+
export { useConnectionQualityIndicator, type ConnectionQualityIndicatorOptions, type ConnectionQualityIndicatorReturnType, } from './useConnectionQualityIndicator';
|
|
4
|
+
export { useConnectionState } from './useConnectionState';
|
|
5
|
+
export { useDataChannel, type MessagePayload, type UseDataChannelReturnType, } from './useDataChannel';
|
|
6
|
+
export { useDisconnectButton } from './useDisconnectButton';
|
|
7
|
+
export { FacingMode, useFacingMode } from './useFacingMode';
|
|
8
|
+
export { useFocusToggle, type UseFocusToggleProps, type UseFocusToggleReturnType, } from './useFocusToggle';
|
|
9
|
+
export { useGridLayout, type UseGridLayoutReturnType } from './useGridLayout';
|
|
10
|
+
export { useIsEncrypted, type EncryptedObservable, type UseIsEncryptedOptions, } from './useIsEncrypted';
|
|
11
|
+
export { useIsMuted, type UseIsMutedOptions } from './useIsMuted';
|
|
12
|
+
export { useIsRecording, type UseIsRecordingObservable } from './useIsRecording';
|
|
13
|
+
export { useIsSpeaking, type IsSpeakingObservable } from './useIsSpeaking';
|
|
14
|
+
export { useLiveKitRoom, type UseLiveKitRoomReturn } from './useLiveKitRoom';
|
|
15
|
+
export { useLocalParticipant, type UseLocalParticipantOptions, type UseLocalParticipantReturnType, } from './useLocalParticipant';
|
|
16
|
+
export { useParticipants, type UseParticipantsOptions } from './useParticipants';
|
|
17
|
+
export { useParticipantTile, type UseParticipantTileProps } from './useParticipantTile';
|
|
18
|
+
export { useParticipantTracks } from './useParticipantTracks';
|
|
19
|
+
export { usePersistentUserChoices, type UsePersistentUserChoicesOptions, type UsePersistentUserChoicesReturnType, } from './usePersistentUserChoices';
|
|
20
|
+
export { usePinnedTracks } from './usePinnedTracks';
|
|
21
|
+
export { useRemoteParticipant, type UseRemoteParticipantOptions } from './useRemoteParticipant';
|
|
22
|
+
export { useRemoteParticipants, type UseRemoteParticipantsOptions } from './useRemoteParticipants';
|
|
23
|
+
export { useRoomInfo, type RoomInfo, type UseRoomInfoOptions } from './useRoomInfo';
|
|
24
|
+
export { useSortedParticipants } from './useSortedParticipants';
|
|
25
|
+
export { useSpeakingParticipants } from './useSpeakingParticipants';
|
|
26
|
+
export { useStartAudio, type UseStartAudioProps, type UseStartAudioReturnType, } from './useStartAudio';
|
|
27
|
+
export { useStartVideo, type UseStartVideoProps, type UseStartVideoReturnType, } from './useStartVideo';
|
|
28
|
+
export { useToken, type UseTokenOptions, type UserInfo } from './useToken';
|
|
29
|
+
export { useTrack } from './useTrack';
|
|
30
|
+
export { useTrackByName } from './useTrackByName';
|
|
31
|
+
export { useTrackMutedIndicator } from './useTrackMutedIndicator';
|
|
32
|
+
export { useTrackRefBySourceOrName } from './useTrackRefBySourceOrName';
|
|
33
|
+
export { requiredPlaceholders, useTracks, type UseTracksHookReturnType, type UseTracksOptions, } from './useTracks';
|
|
34
|
+
export { useTrackSyncTime } from './useTrackSyncTime';
|
|
35
|
+
export { useTrackToggle, type StateObserver, type UseTrackToggleProps, type UseTrackToggleReturnType, } from './useTrackToggle';
|
|
36
|
+
export { useAudioWaveform, useMultibandTrackVolume, useTrackVolume, type AudioWaveformOptions, type MultiBandTrackVolumeOptions, } from './useTrackVolume';
|
|
37
|
+
export { useVisualStableUpdate, type UseVisualStableUpdateOptions } from './useVisualStableUpdate';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { ShallowRef } from 'vue';
|
|
3
|
+
export type UseObservableStateArgs<T = unknown> = {
|
|
4
|
+
observable?: Observable<T> | undefined;
|
|
5
|
+
startWith: T;
|
|
6
|
+
resetWhenObservableChanges?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare function useObservableState<T>(options: UseObservableStateArgs<T>): ShallowRef<T>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Room } from 'livekit-client';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { ShallowRef } from 'vue';
|
|
4
|
+
export type AudioPlaybackObservable = Observable<{
|
|
5
|
+
canPlayAudio: boolean;
|
|
6
|
+
}>;
|
|
7
|
+
export type UseAudioPlaybackRetunType = {
|
|
8
|
+
canPlayAudio: ShallowRef<boolean>;
|
|
9
|
+
startAudio: () => Promise<void>;
|
|
10
|
+
};
|
|
11
|
+
export declare function useAudioPlayback(room?: Room): UseAudioPlaybackRetunType;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ConnectionQuality, Participant } from 'livekit-client';
|
|
2
|
+
import { ShallowRef } from 'vue';
|
|
3
|
+
export type ConnectionQualityIndicatorOptions = {
|
|
4
|
+
participant?: Participant;
|
|
5
|
+
};
|
|
6
|
+
export type ConnectionQualityIndicatorReturnType = {
|
|
7
|
+
className: ShallowRef<string>;
|
|
8
|
+
quality: ShallowRef<ConnectionQuality>;
|
|
9
|
+
};
|
|
10
|
+
export declare function useConnectionQualityIndicator(options?: ConnectionQualityIndicatorOptions): ConnectionQualityIndicatorReturnType;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReceivedDataMessage } from '@livekit/components-core';
|
|
2
|
+
import { DataPublishOptions, RemoteParticipant } from 'livekit-client';
|
|
3
|
+
import { ShallowRef } from 'vue';
|
|
4
|
+
export type MessagePayload<T extends string | undefined = undefined> = {
|
|
5
|
+
payload: Uint8Array;
|
|
6
|
+
topic: T;
|
|
7
|
+
from: RemoteParticipant | undefined;
|
|
8
|
+
};
|
|
9
|
+
export type UseDataChannelReturnType<T extends string | undefined = undefined> = {
|
|
10
|
+
isSending: ShallowRef<boolean>;
|
|
11
|
+
send: ShallowRef<(payload: Uint8Array, options?: DataPublishOptions) => Promise<void>>;
|
|
12
|
+
message: ShallowRef<MessagePayload<T> | undefined>;
|
|
13
|
+
};
|
|
14
|
+
export declare function useDataChannel<T extends string>(topic: T, onMessage?: (msg: ReceivedDataMessage<T>) => void): UseDataChannelReturnType<T>;
|
|
15
|
+
export declare function useDataChannel(onMessage?: (msg: ReceivedDataMessage) => void): UseDataChannelReturnType;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { TrackReferenceOrPlaceholder } from '@livekit/components-core';
|
|
2
|
+
import { ShallowRef } from 'vue';
|
|
3
|
+
export declare enum FacingMode {
|
|
4
|
+
User = "user",
|
|
5
|
+
Environment = "environment",
|
|
6
|
+
Left = "left",
|
|
7
|
+
Right = "right",
|
|
8
|
+
Undefined = "undefined"
|
|
9
|
+
}
|
|
10
|
+
export declare function useFacingMode(trackReference: TrackReferenceOrPlaceholder): ShallowRef<FacingMode>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { TrackReferenceOrPlaceholder } from '@livekit/components-core';
|
|
2
|
+
import { HTMLAttributes, ShallowRef } from 'vue';
|
|
3
|
+
export type UseFocusToggleProps = {
|
|
4
|
+
trackRef?: TrackReferenceOrPlaceholder;
|
|
5
|
+
props: HTMLAttributes;
|
|
6
|
+
};
|
|
7
|
+
export type UseFocusToggleReturnType = {
|
|
8
|
+
elementProps: ShallowRef<HTMLAttributes>;
|
|
9
|
+
inFocus: ShallowRef<boolean>;
|
|
10
|
+
};
|
|
11
|
+
export declare function useFocusToggle({ trackRef, props }: UseFocusToggleProps): UseFocusToggleReturnType;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { GridLayoutDefinition } from '@livekit/components-core';
|
|
2
|
+
import { Ref, ShallowRef } from 'vue';
|
|
3
|
+
export type UseGridLayoutReturnType = {
|
|
4
|
+
layout: ShallowRef<GridLayoutDefinition | undefined>;
|
|
5
|
+
containerWidth: ShallowRef<number | undefined>;
|
|
6
|
+
containerHeight: ShallowRef<number | undefined>;
|
|
7
|
+
};
|
|
8
|
+
export declare function useGridLayout(gridElement: Ref<HTMLDivElement>, trackCount: number, options?: {
|
|
9
|
+
gridLayouts?: GridLayoutDefinition[];
|
|
10
|
+
}): UseGridLayoutReturnType;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Participant, Room } from 'livekit-client';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { ShallowRef } from 'vue';
|
|
4
|
+
export type UseIsEncryptedOptions = {
|
|
5
|
+
room?: Room;
|
|
6
|
+
};
|
|
7
|
+
export type EncryptedObservable = Observable<boolean>;
|
|
8
|
+
export declare function useIsEncrypted(participant?: Participant, options?: UseIsEncryptedOptions): ShallowRef<boolean>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { TrackReferenceOrPlaceholder } from '@livekit/components-core';
|
|
2
|
+
import { Participant } from 'livekit-client';
|
|
3
|
+
import { ShallowRef } from 'vue';
|
|
4
|
+
export type UseIsMutedOptions = {
|
|
5
|
+
participant?: Participant;
|
|
6
|
+
};
|
|
7
|
+
export declare function useIsMuted(trackRef: TrackReferenceOrPlaceholder): ShallowRef<boolean>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { LiveKitRoomProps } from '../types/livekit_room.types';
|
|
2
|
+
import { Room } from 'livekit-client';
|
|
3
|
+
import { HTMLAttributes, ShallowRef } from 'vue';
|
|
4
|
+
export type UseLiveKitRoomReturn = {
|
|
5
|
+
room: ShallowRef<Room | undefined>;
|
|
6
|
+
elementProps: ShallowRef<HTMLAttributes>;
|
|
7
|
+
};
|
|
8
|
+
export declare function useLiveKitRoom(props: LiveKitRoomProps): UseLiveKitRoomReturn;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { LocalParticipant, TrackPublication, Room } from 'livekit-client';
|
|
2
|
+
import { ShallowRef } from 'vue';
|
|
3
|
+
export type UseLocalParticipantOptions = {
|
|
4
|
+
room?: Room;
|
|
5
|
+
};
|
|
6
|
+
export type UseLocalParticipantReturnType = {
|
|
7
|
+
isMicrophoneEnabled: ShallowRef<boolean>;
|
|
8
|
+
isScreenShareEnabled: ShallowRef<boolean>;
|
|
9
|
+
isCameraEnabled: ShallowRef<boolean>;
|
|
10
|
+
microphoneTrack: ShallowRef<TrackPublication | undefined>;
|
|
11
|
+
cameraTrack: ShallowRef<TrackPublication | undefined>;
|
|
12
|
+
lastMicrophoneError: ShallowRef<Error | undefined>;
|
|
13
|
+
lastCameraError: ShallowRef<Error | undefined>;
|
|
14
|
+
localParticipant: ShallowRef<LocalParticipant | undefined>;
|
|
15
|
+
};
|
|
16
|
+
export declare function useLocalParticipant(options?: UseLocalParticipantOptions): UseLocalParticipantReturnType;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ParticipantClickEvent, TrackReferenceOrPlaceholder } from '@livekit/components-core';
|
|
2
|
+
import { HTMLAttributes, ShallowRef } from 'vue';
|
|
3
|
+
export type UseParticipantTileProps = {
|
|
4
|
+
trackRef?: TrackReferenceOrPlaceholder;
|
|
5
|
+
disableSpeakingIndicator?: boolean;
|
|
6
|
+
onParticipantClick?: (event: ParticipantClickEvent) => void;
|
|
7
|
+
htmlProps: HTMLAttributes;
|
|
8
|
+
};
|
|
9
|
+
export declare function useParticipantTile(options: UseParticipantTileProps): {
|
|
10
|
+
elementProps: ShallowRef<HTMLAttributes>;
|
|
11
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { LocalParticipant, RemoteParticipant, Room, RoomEvent } from 'livekit-client';
|
|
2
|
+
import { ShallowRef } from 'vue';
|
|
3
|
+
export type UseParticipantsOptions = {
|
|
4
|
+
updateOnlyOn?: RoomEvent[];
|
|
5
|
+
room?: Room;
|
|
6
|
+
};
|
|
7
|
+
export declare function useParticipants(options?: UseParticipantsOptions): ShallowRef<(RemoteParticipant | LocalParticipant)[]>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { LocalUserChoices } from '@livekit/components-core';
|
|
2
|
+
import { ShallowRef } from 'vue';
|
|
3
|
+
export type UsePersistentUserChoicesOptions = {
|
|
4
|
+
defaults?: Partial<LocalUserChoices>;
|
|
5
|
+
preventSave?: boolean;
|
|
6
|
+
preventLoad?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export type UsePersistentUserChoicesReturnType = {
|
|
9
|
+
userChoices: ShallowRef<LocalUserChoices>;
|
|
10
|
+
saveAudioInputEnabled: (enabled: boolean) => void;
|
|
11
|
+
saveVideoInputEnabled: (enabled: boolean) => void;
|
|
12
|
+
saveAudioInputDeviceId: (deviceId: string) => void;
|
|
13
|
+
saveVideoInputDeviceId: (deviceId: string) => void;
|
|
14
|
+
saveUsername: (username: string) => void;
|
|
15
|
+
};
|
|
16
|
+
export declare function usePersistentUserChoices(options?: UsePersistentUserChoicesOptions): UsePersistentUserChoicesReturnType;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { LayoutState } from '../context/layout.context';
|
|
2
|
+
import { TrackReferenceOrPlaceholder } from '@livekit/components-core';
|
|
3
|
+
import { ShallowRef } from 'vue';
|
|
4
|
+
export declare function usePinnedTracks(context?: LayoutState): ShallowRef<TrackReferenceOrPlaceholder[]>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ParticipantIdentifier } from '@livekit/components-core';
|
|
2
|
+
import { Participant, ParticipantEvent } from 'livekit-client';
|
|
3
|
+
import { ShallowRef } from 'vue';
|
|
4
|
+
export type UseRemoteParticipantOptions = {
|
|
5
|
+
updateOnlyOn?: ParticipantEvent[];
|
|
6
|
+
};
|
|
7
|
+
export declare function useRemoteParticipant(identityOrIdentifier: string | ParticipantIdentifier, options?: UseRemoteParticipantOptions): ShallowRef<Participant | undefined>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Participant, Room, RoomEvent } from 'livekit-client';
|
|
2
|
+
import { ShallowRef } from 'vue';
|
|
3
|
+
export type UseRemoteParticipantsOptions = {
|
|
4
|
+
updateOnlyOn?: RoomEvent[];
|
|
5
|
+
room?: Room;
|
|
6
|
+
};
|
|
7
|
+
export declare function useRemoteParticipants(options?: UseRemoteParticipantsOptions): ShallowRef<Participant[]>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Room } from 'livekit-client';
|
|
2
|
+
import { ShallowRef } from 'vue';
|
|
3
|
+
export type UseRoomInfoOptions = {
|
|
4
|
+
room?: Room;
|
|
5
|
+
};
|
|
6
|
+
export type RoomInfo = {
|
|
7
|
+
name: string;
|
|
8
|
+
metadata: string;
|
|
9
|
+
};
|
|
10
|
+
export declare function useRoomInfo(options?: UseRoomInfoOptions): {
|
|
11
|
+
name: ShallowRef<string>;
|
|
12
|
+
metadata: ShallowRef<string | undefined>;
|
|
13
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Room } from 'livekit-client';
|
|
2
|
+
import { HTMLAttributes, ShallowRef } from 'vue';
|
|
3
|
+
export type UseStartAudioProps = {
|
|
4
|
+
room?: Room;
|
|
5
|
+
props: HTMLAttributes;
|
|
6
|
+
};
|
|
7
|
+
export type UseStartAudioReturnType = {
|
|
8
|
+
canPlayAudio: ShallowRef<boolean>;
|
|
9
|
+
elementProps: HTMLAttributes;
|
|
10
|
+
};
|
|
11
|
+
export declare function useStartAudio({ room, props }: UseStartAudioProps): UseStartAudioReturnType;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Room } from 'livekit-client';
|
|
2
|
+
import { HTMLAttributes, ShallowRef } from 'vue';
|
|
3
|
+
export type UseStartVideoProps = {
|
|
4
|
+
room?: Room;
|
|
5
|
+
props: HTMLAttributes;
|
|
6
|
+
};
|
|
7
|
+
export type UseStartVideoReturnType = {
|
|
8
|
+
canPlayVideo: ShallowRef<boolean>;
|
|
9
|
+
elementProps: HTMLAttributes;
|
|
10
|
+
};
|
|
11
|
+
export declare function useStartVideo({ room, props }: UseStartVideoProps): UseStartVideoReturnType;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ShallowRef } from 'vue';
|
|
2
|
+
export type UserInfo = {
|
|
3
|
+
identity?: string;
|
|
4
|
+
name?: string;
|
|
5
|
+
metadata?: string;
|
|
6
|
+
};
|
|
7
|
+
export type UseTokenOptions = {
|
|
8
|
+
userInfo?: UserInfo;
|
|
9
|
+
};
|
|
10
|
+
export declare function useToken(tokenEndpoint: string | undefined, roomName: string, options?: UseTokenOptions): ShallowRef<string | undefined>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { TrackReferenceOrPlaceholder, TrackSource } from '@livekit/components-core';
|
|
2
|
+
import { Track } from 'livekit-client';
|
|
3
|
+
import { ShallowRef } from 'vue';
|
|
4
|
+
export declare function useTrackRefBySourceOrName(source: TrackSource<Track.Source>): ShallowRef<TrackReferenceOrPlaceholder>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { TrackReferenceOrPlaceholder } from '@livekit/components-core';
|
|
2
|
+
import { ShallowRef } from 'vue';
|
|
3
|
+
export declare function useTrackSyncTime(ref: TrackReferenceOrPlaceholder | undefined): ShallowRef<{
|
|
4
|
+
timestamp: number;
|
|
5
|
+
rtpTimestamp: number | undefined;
|
|
6
|
+
}>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { TrackToggleProps } from '../components/controls/track_toggle';
|
|
2
|
+
import { CaptureOptionsBySource, ToggleSource } from '@livekit/components-core';
|
|
3
|
+
import { LocalTrackPublication } from 'livekit-client';
|
|
4
|
+
import { Observable } from 'rxjs';
|
|
5
|
+
import { ShallowRef } from 'vue';
|
|
6
|
+
export type UseTrackToggleProps<T extends ToggleSource> = Omit<TrackToggleProps<T>, 'showIcon'>;
|
|
7
|
+
export type StateObserver = Observable<boolean>;
|
|
8
|
+
export type UseTrackToggleReturnType<T extends ToggleSource> = {
|
|
9
|
+
toggle?: ShallowRef<((forceState?: boolean) => Promise<void>) | ((forceState?: boolean, captureOptions?: CaptureOptionsBySource<T> | undefined) => Promise<boolean | undefined>)>;
|
|
10
|
+
enabled: ShallowRef<boolean>;
|
|
11
|
+
pending: ShallowRef<boolean>;
|
|
12
|
+
track: ShallowRef<LocalTrackPublication | undefined>;
|
|
13
|
+
buttonProps: {
|
|
14
|
+
'aria-pressed': boolean;
|
|
15
|
+
'data-lk-source': T;
|
|
16
|
+
'data-lk-enabled': boolean;
|
|
17
|
+
disabled: boolean;
|
|
18
|
+
onClick: (evt: MouseEvent) => void;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export declare function useTrackToggle<T extends ToggleSource>(options: UseTrackToggleProps<T>): UseTrackToggleReturnType<T>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { TrackReference, TrackReferenceOrPlaceholder } from '@livekit/components-core';
|
|
2
|
+
import { AudioAnalyserOptions, LocalAudioTrack, RemoteAudioTrack } from 'livekit-client';
|
|
3
|
+
import { ShallowRef } from 'vue';
|
|
4
|
+
export type MultiBandTrackVolumeOptions = {
|
|
5
|
+
bands?: number;
|
|
6
|
+
/**
|
|
7
|
+
* cut off of frequency bins on the lower end
|
|
8
|
+
* Note: this is not a frequency measure, but in relation to analyserOptions.fftSize,
|
|
9
|
+
*/
|
|
10
|
+
loPass?: number;
|
|
11
|
+
/**
|
|
12
|
+
* cut off of frequency bins on the higher end
|
|
13
|
+
* Note: this is not a frequency measure, but in relation to analyserOptions.fftSize,
|
|
14
|
+
*/
|
|
15
|
+
hiPass?: number;
|
|
16
|
+
updateInterval?: number;
|
|
17
|
+
analyserOptions?: AnalyserOptions;
|
|
18
|
+
};
|
|
19
|
+
export type AudioWaveformOptions = {
|
|
20
|
+
barCount?: number;
|
|
21
|
+
volMultiplier?: number;
|
|
22
|
+
updateInterval?: number;
|
|
23
|
+
};
|
|
24
|
+
export declare function useTrackVolume(trackOrTrackReference?: LocalAudioTrack | RemoteAudioTrack | TrackReference, options?: AudioAnalyserOptions): ShallowRef<number>;
|
|
25
|
+
export declare function useMultibandTrackVolume(trackOrTrackReference?: LocalAudioTrack | RemoteAudioTrack | TrackReferenceOrPlaceholder, options?: MultiBandTrackVolumeOptions): ShallowRef<number[]>;
|
|
26
|
+
export declare function useAudioWaveform(trackOrTrackReference?: LocalAudioTrack | RemoteAudioTrack | TrackReferenceOrPlaceholder, options?: AudioWaveformOptions): {
|
|
27
|
+
bars: ShallowRef<number[]>;
|
|
28
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SourcesArray, TrackReference, TrackReferenceOrPlaceholder, TrackSourceWithOptions } from '@livekit/components-core';
|
|
2
|
+
import { Participant, Track, Room, RoomEvent } from 'livekit-client';
|
|
3
|
+
export type UseTracksOptions = {
|
|
4
|
+
updateOnlyOn?: RoomEvent[];
|
|
5
|
+
onlySubscribed?: boolean;
|
|
6
|
+
room?: Room;
|
|
7
|
+
};
|
|
8
|
+
export type UseTracksHookReturnType<T> = T extends Track.Source[] ? TrackReference[] : T extends TrackSourceWithOptions[] ? TrackReferenceOrPlaceholder[] : never;
|
|
9
|
+
export declare function requiredPlaceholders<T extends SourcesArray>(sources: T, participants: Participant[]): Map<Participant['identity'], Track.Source[]>;
|
|
10
|
+
export declare function useTracks<T extends SourcesArray = Track.Source[]>(sources?: T, options?: UseTracksOptions): UseTracksHookReturnType<T>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { TrackReferenceOrPlaceholder } from '@livekit/components-core';
|
|
2
|
+
import { ShallowRef } from 'vue';
|
|
3
|
+
export interface UseVisualStableUpdateOptions {
|
|
4
|
+
customSortFunction?: (trackReferences: TrackReferenceOrPlaceholder[]) => TrackReferenceOrPlaceholder[];
|
|
5
|
+
}
|
|
6
|
+
export declare function useVisualStableUpdate(
|
|
7
|
+
/** `TrackReference`s to display in the grid. */
|
|
8
|
+
trackReferences: TrackReferenceOrPlaceholder[], maxItemsOnPage: number, options?: UseVisualStableUpdateOptions): ShallowRef<TrackReferenceOrPlaceholder[]>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ShallowRef } from 'vue';
|
|
2
|
+
import { PinContext } from './pin.context';
|
|
3
|
+
import { WidgetContextType } from './widget.context';
|
|
4
|
+
export type LayoutState = {
|
|
5
|
+
pin: PinContext;
|
|
6
|
+
widget: WidgetContextType;
|
|
7
|
+
};
|
|
8
|
+
declare const useProvideLayoutContext: (initialValue: LayoutState) => ShallowRef<LayoutState>, useLayoutContext: () => ShallowRef<LayoutState> | undefined;
|
|
9
|
+
export { useLayoutContext, useProvideLayoutContext };
|
|
10
|
+
export declare function useMaybeLayoutContext(): ShallowRef<LayoutState> | undefined;
|
|
11
|
+
export declare function useEnsureLayoutContext(layoutContext?: LayoutState): ShallowRef<LayoutState>;
|
|
12
|
+
export declare function useCreateLayoutContext(): {
|
|
13
|
+
pin: {
|
|
14
|
+
state: ShallowRef<import('@livekit/components-core').PinState, import('@livekit/components-core').PinState>;
|
|
15
|
+
dispatch: (action: import('./pin.context').PinAction) => void;
|
|
16
|
+
} | undefined;
|
|
17
|
+
widget: ShallowRef<import('@livekit/components-core').WidgetState> | undefined;
|
|
18
|
+
};
|
|
19
|
+
export declare function useEnsureCreateLayoutContext(layoutContext?: {
|
|
20
|
+
pin: PinContext;
|
|
21
|
+
widget: WidgetContextType;
|
|
22
|
+
}): ShallowRef<{
|
|
23
|
+
pin: PinContext;
|
|
24
|
+
widget: WidgetContextType;
|
|
25
|
+
} | undefined, {
|
|
26
|
+
pin: PinContext;
|
|
27
|
+
widget: WidgetContextType;
|
|
28
|
+
} | undefined>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Participant } from 'livekit-client';
|
|
2
|
+
import { ShallowRef } from 'vue';
|
|
3
|
+
export type ParticipantContext = {
|
|
4
|
+
participant: Participant;
|
|
5
|
+
};
|
|
6
|
+
declare const useProvideParticipantContext: (initialValue: Participant) => ShallowRef<Participant>, useParticipantContext: () => ShallowRef<Participant> | undefined;
|
|
7
|
+
export declare function useMaybeParticipantContext(): ShallowRef<Participant> | undefined;
|
|
8
|
+
export declare function useEnsureParticipant(participant?: Participant): ShallowRef<Participant>;
|
|
9
|
+
export { useParticipantContext, useProvideParticipantContext };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { PinState, TrackReferenceOrPlaceholder } from '@livekit/components-core';
|
|
2
|
+
export type PinAction = {
|
|
3
|
+
msg: 'set_pin';
|
|
4
|
+
trackReference: TrackReferenceOrPlaceholder;
|
|
5
|
+
} | {
|
|
6
|
+
msg: 'clear_pin';
|
|
7
|
+
} | {
|
|
8
|
+
msg: 'toggle_settings';
|
|
9
|
+
};
|
|
10
|
+
export type PinContext = {
|
|
11
|
+
state: PinState;
|
|
12
|
+
dispatch?: (action: PinAction) => void;
|
|
13
|
+
};
|
|
14
|
+
export declare function pinReducer(state: PinState, action: PinAction): PinState;
|
|
15
|
+
declare const useProvidePinContext: (initialValue: PinState) => {
|
|
16
|
+
state: import('vue').ShallowRef<PinState, PinState>;
|
|
17
|
+
dispatch: (action: PinAction) => void;
|
|
18
|
+
}, usePinContext: () => {
|
|
19
|
+
state: import('vue').ShallowRef<PinState, PinState>;
|
|
20
|
+
dispatch: (action: PinAction) => void;
|
|
21
|
+
} | undefined;
|
|
22
|
+
export { usePinContext, useProvidePinContext };
|
|
23
|
+
export declare const useEnsurePinContext: (pinContext?: PinState) => import('vue').ShallowRef<PinState, PinState> | {
|
|
24
|
+
state: import('vue').ShallowRef<PinState, PinState>;
|
|
25
|
+
dispatch: (action: PinAction) => void;
|
|
26
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Room } from 'livekit-client';
|
|
2
|
+
import { ShallowRef } from 'vue';
|
|
3
|
+
export type RoomContext = {
|
|
4
|
+
room: Room;
|
|
5
|
+
};
|
|
6
|
+
declare const useProvideRoomContext: (initialValue: Room) => ShallowRef<Room>, useRoomContext: () => ShallowRef<Room> | undefined;
|
|
7
|
+
export declare function useMaybeRoomContext(): ShallowRef<Room> | undefined;
|
|
8
|
+
export declare function useEnsureRoomContext(room?: Room): ShallowRef<Room>;
|
|
9
|
+
export { useProvideRoomContext, useRoomContext };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { TrackReferenceOrPlaceholder } from '@livekit/components-core';
|
|
2
|
+
import { ShallowRef } from 'vue';
|
|
3
|
+
declare const useTrackRefContextProvider: (ref: TrackReferenceOrPlaceholder) => ShallowRef<TrackReferenceOrPlaceholder>, useTrackRefContext: () => ShallowRef<TrackReferenceOrPlaceholder> | undefined;
|
|
4
|
+
export declare function useMaybeTrackRefContext(): ShallowRef<TrackReferenceOrPlaceholder> | undefined;
|
|
5
|
+
export declare function useEnsureTrackRef(trackRef?: TrackReferenceOrPlaceholder): ShallowRef<TrackReferenceOrPlaceholder>;
|
|
6
|
+
export { useTrackRefContext, useTrackRefContextProvider };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { WidgetState } from '@livekit/components-core';
|
|
2
|
+
import { ShallowRef } from 'vue';
|
|
3
|
+
export type WidgetContextType = {
|
|
4
|
+
state?: WidgetState;
|
|
5
|
+
};
|
|
6
|
+
declare const useProvideWidgetContext: (initialValue: WidgetState) => ShallowRef<WidgetState>, useWidgetContext: () => ShallowRef<WidgetState> | undefined;
|
|
7
|
+
export { useProvideWidgetContext, useWidgetContext };
|