Skip to content

Commit

Permalink
update api docs
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasIO committed Sep 8, 2023
1 parent 8bd6a0f commit 4a408c0
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 17 deletions.
4 changes: 2 additions & 2 deletions packages/core/etc/components-core.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ export type MediaToggleType<T extends ToggleSource> = {
};

// @public (undocumented)
export function mutedObserver(participant: Participant, source: Track.Source): Observable<boolean>;
export function mutedObserver(trackRef: TrackReferenceOrPlaceholder): Observable<boolean>;

// @public (undocumented)
export function observeParticipantEvents<T extends Participant>(participant: T, ...events: ParticipantEvent[]): Observable<T>;
Expand Down Expand Up @@ -462,7 +462,7 @@ export function setupStartAudio(): {
};

// @public (undocumented)
export function setupTrackMutedIndicator(participant: Participant, source: Track.Source): {
export function setupTrackMutedIndicator(trackRef: TrackReferenceOrPlaceholder): {
className: string;
mediaMutedObserver: Observable<boolean>;
};
Expand Down
57 changes: 42 additions & 15 deletions packages/react/etc/components-react.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@ import { SetMediaDeviceOptions } from '@livekit/components-core';
import type { SourcesArray } from '@livekit/components-core';
import type { ToggleSource } from '@livekit/components-core';
import { Track } from 'livekit-client';
import type { TrackIdentifier } from '@livekit/components-core';
import { TrackPublication } from 'livekit-client';
import type { TrackReference } from '@livekit/components-core';
import type { TrackReferenceOrPlaceholder } from '@livekit/components-core';
import { TrackReferenceOrPlaceholder } from '@livekit/components-core';
import type { TrackSourceWithOptions } from '@livekit/components-core';
import type { VideoCaptureOptions } from 'livekit-client';
import type { VideoSource } from '@livekit/components-core';
Expand Down Expand Up @@ -81,12 +82,14 @@ export interface AudioTrackProps<T extends HTMLMediaElement = HTMLMediaElement>
}

// @public (undocumented)
export function AudioVisualizer({ participant, ...props }: AudioVisualizerProps): React_2.JSX.Element;
export function AudioVisualizer({ participant, trackRef, ...props }: AudioVisualizerProps): React_2.JSX.Element;

// @public (undocumented)
export interface AudioVisualizerProps extends React_2.HTMLAttributes<SVGElement> {
// (undocumented)
// @deprecated (undocumented)
participant?: Participant;
// (undocumented)
trackRef?: TrackReferenceOrPlaceholder;
}

// @public
Expand Down Expand Up @@ -459,16 +462,18 @@ export interface TrackLoopProps {
}

// @public
export function TrackMutedIndicator({ source, participant, show, ...props }: TrackMutedIndicatorProps): React_2.JSX.Element | null;
export function TrackMutedIndicator({ source, participant, trackRef, show, ...props }: TrackMutedIndicatorProps): React_2.JSX.Element | null;

// @public (undocumented)
export interface TrackMutedIndicatorProps extends React_2.HTMLAttributes<HTMLDivElement> {
// (undocumented)
// @deprecated (undocumented)
participant?: Participant;
// (undocumented)
show?: 'always' | 'muted' | 'unmuted';
// (undocumented)
// @deprecated (undocumented)
source: Track.Source;
// (undocumented)
trackRef?: TrackReferenceOrPlaceholder;
}

// @public
Expand Down Expand Up @@ -574,7 +579,7 @@ export function useEnsureParticipant(participant?: Participant): Participant;
export function useEnsureRoom(room?: Room): Room;

// @public
export function useEnsureTrackRef(trackRef?: TrackReferenceOrPlaceholder): void;
export function useEnsureTrackRef(trackRef?: TrackReferenceOrPlaceholder): TrackReferenceOrPlaceholder;

// @public @deprecated
export function useEnsureTrackReference(track?: TrackReferenceOrPlaceholder): TrackReferenceOrPlaceholder;
Expand Down Expand Up @@ -611,7 +616,10 @@ trackCount: number): {
};

// @public (undocumented)
export function useIsMuted(source: Track.Source, options?: UseIsMutedOptions): boolean;
export function useIsMuted(trackRef: TrackReferenceOrPlaceholder): boolean;

// @public @deprecated (undocumented)
export function useIsMuted(source: Track.Source, options: UseIsMutedOptions): boolean;

// @public (undocumented)
export interface UseIsMutedOptions {
Expand Down Expand Up @@ -690,7 +698,7 @@ export interface UseMediaDeviceSelectProps {
track?: LocalAudioTrack | LocalVideoTrack;
}

// @public (undocumented)
// @public @deprecated (undocumented)
export function useMediaTrack(source: VideoSource | AudioSource, participant?: Participant, options?: UseMediaTrackOptions): {
publication: TrackPublication | undefined;
isMuted: boolean | undefined;
Expand All @@ -699,7 +707,7 @@ export function useMediaTrack(source: VideoSource | AudioSource, participant?: P
elementProps: React_2.HTMLAttributes<HTMLElement>;
};

// @public (undocumented)
// @public @deprecated (undocumented)
export function useMediaTrackByName(name: string, participant?: Participant, options?: UseMediaTrackOptions): {
publication: TrackPublication | undefined;
isMuted: boolean | undefined;
Expand Down Expand Up @@ -885,21 +893,40 @@ export interface UseTokenOptions {
userInfo?: UserInfo;
}

// @public (undocumented)
export function useTrack(trackRef: TrackIdentifier, options?: UseTrackOptions): {
publication: TrackPublication | undefined;
isMuted: boolean | undefined;
isSubscribed: boolean | undefined;
track: Track | undefined;
elementProps: React_2.HTMLAttributes<HTMLElement>;
};

// @public @deprecated
export function useTrackContext(): TrackReferenceOrPlaceholder;

// Warning: (ae-forgotten-export) The symbol "TrackMutedIndicatorReturnType" needs to be exported by the entry point index.d.ts
//
// @public (undocumented)
export function useTrackMutedIndicator(source: Track.Source, options?: UseTrackMutedIndicatorOptions): {
isMuted: boolean;
className: string;
};
export function useTrackMutedIndicator(trackRef?: TrackReferenceOrPlaceholder): TrackMutedIndicatorReturnType;

// @public @deprecated (undocumented)
export function useTrackMutedIndicator(source: Track.Source, options: UseTrackMutedIndicatorOptions): TrackMutedIndicatorReturnType;

// @public (undocumented)
export interface UseTrackMutedIndicatorOptions {
// (undocumented)
// @deprecated (undocumented)
participant?: Participant;
}

// @public (undocumented)
export interface UseTrackOptions {
// (undocumented)
element?: React_2.RefObject<HTMLMediaElement>;
// (undocumented)
props?: React_2.HTMLAttributes<HTMLVideoElement | HTMLAudioElement>;
}

// @public
export function useTrackRefContext(): TrackReferenceOrPlaceholder;

Expand Down

0 comments on commit 4a408c0

Please sign in to comment.