Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate showE2EE options on PreJoin #693

Merged
merged 6 commits into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/thin-zoos-tell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@livekit/components-react": minor
"@livekit/component-example-next": minor
---

Deprecate showE2EE options on PreJoin
3 changes: 1 addition & 2 deletions examples/nextjs/pages/e2ee.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { setLogLevel } from '@livekit/components-core';
import { LiveKitRoom, useToken, VideoConference } from '@livekit/components-react';
import { LiveKitRoom, useToken, VideoConference, setLogLevel } from '@livekit/components-react';
import type { NextPage } from 'next';
import * as React from 'react';
import { Room, ExternalE2EEKeyProvider } from 'livekit-client';
Expand Down
3 changes: 1 addition & 2 deletions examples/nextjs/pages/minimal.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { setLogLevel } from '@livekit/components-core';
import { LiveKitRoom, useToken, VideoConference } from '@livekit/components-react';
import { LiveKitRoom, useToken, VideoConference, setLogLevel } from '@livekit/components-react';
import { RoomConnectOptions } from 'livekit-client';
import type { NextPage } from 'next';
import { generateRandomUserId } from '../lib/helper';
Expand Down
5 changes: 2 additions & 3 deletions examples/nextjs/pages/prejoin.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import * as React from 'react';
import { setLogLevel } from '@livekit/components-core';
import { PreJoin } from '@livekit/components-react';
import { PreJoin, setLogLevel } from '@livekit/components-react';
import type { NextPage } from 'next';

const PreJoinExample: NextPage = () => {
setLogLevel('debug', { liveKitClientLogLevel: 'warn' });

return (
<div data-lk-theme="default" style={{ height: '100vh' }}>
<PreJoin showE2EEOptions={true} />
<PreJoin />
</div>
);
};
Expand Down
9 changes: 7 additions & 2 deletions packages/react/etc/components-react.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import type { RoomConnectOptions } from 'livekit-client';
import type { RoomEvent } from 'livekit-client';
import type { RoomOptions } from 'livekit-client';
import type { ScreenShareCaptureOptions } from 'livekit-client';
import { setLogLevel } from '@livekit/components-core';
import { SetMediaDeviceOptions } from '@livekit/components-core';
import type { SourcesArray } from '@livekit/components-core';
import type { ToggleSource } from '@livekit/components-core';
Expand All @@ -47,7 +48,7 @@ import { TrackPublication } from 'livekit-client';
import type { TrackReference } from '@livekit/components-core';
import { TrackReferenceOrPlaceholder } from '@livekit/components-core';
import type { TrackSourceWithOptions } from '@livekit/components-core';
import type { UserChoices } from '@livekit/components-core';
import { UserChoices } from '@livekit/components-core';
import type { VideoCaptureOptions } from 'livekit-client';
import type { VideoSource } from '@livekit/components-core';
import type { WidgetState } from '@livekit/components-core';
Expand Down Expand Up @@ -445,7 +446,7 @@ export interface PreJoinProps extends Omit<React_2.HTMLAttributes<HTMLDivElement
onValidate?: (values: LocalUserChoices) => boolean;
// @alpha
persistUserChoices?: boolean;
// (undocumented)
// @deprecated (undocumented)
showE2EEOptions?: boolean;
// (undocumented)
userLabel?: string;
Expand Down Expand Up @@ -475,6 +476,8 @@ export interface RoomNameProps extends React_2.HTMLAttributes<HTMLSpanElement> {
childrenPosition?: 'before' | 'after';
}

export { setLogLevel }

// @public
export function StartAudio({ label, ...props }: AllowAudioPlaybackProps): React_2.JSX.Element;

Expand Down Expand Up @@ -859,6 +862,8 @@ export function usePreviewDevice<T extends LocalVideoTrack | LocalAudioTrack>(en
// @alpha (undocumented)
export function usePreviewTracks(options: CreateLocalTracksOptions, onError?: (err: Error) => void): LocalTrack[] | undefined;

export { UserChoices }

// @public
export function useRemoteParticipant(identity: string, options?: UseRemoteParticipantOptions): RemoteParticipant | undefined;

Expand Down
10 changes: 10 additions & 0 deletions packages/react/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,13 @@ export * from './hooks';
export * from './prefabs';

export * from './context';

// Re-exports from core
export { setLogLevel } from '@livekit/components-core';
export type {
ChatMessage,
ReceivedChatMessage,
MessageDecoder,
MessageEncoder,
UserChoices,
} from '@livekit/components-core';
3 changes: 2 additions & 1 deletion packages/react/src/prefabs/PreJoin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { ParticipantPlaceholder } from '../assets/images';
import { useMediaDevices, usePersistentUserChoices } from '../hooks';

/**
* @deprecated Use `UserChoices` from `@livekit/components-core` instead.
* @deprecated Use `UserChoices` instead.
* @public
*/
export type LocalUserChoices = {
Expand Down Expand Up @@ -65,6 +65,7 @@ export interface PreJoinProps
micLabel?: string;
camLabel?: string;
userLabel?: string;
/** @deprecated E2EE options will be removed from PreJoin in a future version **/
showE2EEOptions?: boolean;

/**
Expand Down
8 changes: 0 additions & 8 deletions packages/react/src/prefabs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,3 @@ export { VideoConference, type VideoConferenceProps } from './VideoConference';
export { ControlBar, type ControlBarProps, type ControlBarControls } from './ControlBar';
export { MediaDeviceMenu, type MediaDeviceMenuProps } from './MediaDeviceMenu';
export { AudioConference, type AudioConferenceProps } from './AudioConference';

// Re-export types from core
export {
type ChatMessage,
type ReceivedChatMessage,
type MessageDecoder,
type MessageEncoder,
} from '@livekit/components-core';
Loading