Skip to content

Commit 67d62ba

Browse files
authored
Deprecate showE2EE options on PreJoin (#693)
1 parent 66df197 commit 67d62ba

File tree

8 files changed

+29
-18
lines changed

8 files changed

+29
-18
lines changed

.changeset/thin-zoos-tell.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@livekit/components-react": minor
3+
"@livekit/component-example-next": minor
4+
---
5+
6+
Deprecate showE2EE options on PreJoin

examples/nextjs/pages/e2ee.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import { setLogLevel } from '@livekit/components-core';
2-
import { LiveKitRoom, useToken, VideoConference } from '@livekit/components-react';
1+
import { LiveKitRoom, useToken, VideoConference, setLogLevel } from '@livekit/components-react';
32
import type { NextPage } from 'next';
43
import * as React from 'react';
54
import { Room, ExternalE2EEKeyProvider } from 'livekit-client';

examples/nextjs/pages/minimal.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import { setLogLevel } from '@livekit/components-core';
2-
import { LiveKitRoom, useToken, VideoConference } from '@livekit/components-react';
1+
import { LiveKitRoom, useToken, VideoConference, setLogLevel } from '@livekit/components-react';
32
import { RoomConnectOptions } from 'livekit-client';
43
import type { NextPage } from 'next';
54
import { generateRandomUserId } from '../lib/helper';

examples/nextjs/pages/prejoin.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
import * as React from 'react';
2-
import { setLogLevel } from '@livekit/components-core';
3-
import { PreJoin } from '@livekit/components-react';
2+
import { PreJoin, setLogLevel } from '@livekit/components-react';
43
import type { NextPage } from 'next';
54

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

98
return (
109
<div data-lk-theme="default" style={{ height: '100vh' }}>
11-
<PreJoin showE2EEOptions={true} />
10+
<PreJoin />
1211
</div>
1312
);
1413
};

packages/react/etc/components-react.api.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ import type { RoomConnectOptions } from 'livekit-client';
3838
import type { RoomEvent } from 'livekit-client';
3939
import type { RoomOptions } from 'livekit-client';
4040
import type { ScreenShareCaptureOptions } from 'livekit-client';
41+
import { setLogLevel } from '@livekit/components-core';
4142
import { SetMediaDeviceOptions } from '@livekit/components-core';
4243
import type { SourcesArray } from '@livekit/components-core';
4344
import type { ToggleSource } from '@livekit/components-core';
@@ -47,7 +48,7 @@ import { TrackPublication } from 'livekit-client';
4748
import type { TrackReference } from '@livekit/components-core';
4849
import { TrackReferenceOrPlaceholder } from '@livekit/components-core';
4950
import type { TrackSourceWithOptions } from '@livekit/components-core';
50-
import type { UserChoices } from '@livekit/components-core';
51+
import { UserChoices } from '@livekit/components-core';
5152
import type { VideoCaptureOptions } from 'livekit-client';
5253
import type { VideoSource } from '@livekit/components-core';
5354
import type { WidgetState } from '@livekit/components-core';
@@ -445,7 +446,7 @@ export interface PreJoinProps extends Omit<React_2.HTMLAttributes<HTMLDivElement
445446
onValidate?: (values: LocalUserChoices) => boolean;
446447
// @alpha
447448
persistUserChoices?: boolean;
448-
// (undocumented)
449+
// @deprecated (undocumented)
449450
showE2EEOptions?: boolean;
450451
// (undocumented)
451452
userLabel?: string;
@@ -475,6 +476,8 @@ export interface RoomNameProps extends React_2.HTMLAttributes<HTMLSpanElement> {
475476
childrenPosition?: 'before' | 'after';
476477
}
477478

479+
export { setLogLevel }
480+
478481
// @public
479482
export function StartAudio({ label, ...props }: AllowAudioPlaybackProps): React_2.JSX.Element;
480483

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

865+
export { UserChoices }
866+
862867
// @public
863868
export function useRemoteParticipant(identity: string, options?: UseRemoteParticipantOptions): RemoteParticipant | undefined;
864869

packages/react/src/index.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,13 @@ export * from './hooks';
55
export * from './prefabs';
66

77
export * from './context';
8+
9+
// Re-exports from core
10+
export { setLogLevel } from '@livekit/components-core';
11+
export type {
12+
ChatMessage,
13+
ReceivedChatMessage,
14+
MessageDecoder,
15+
MessageEncoder,
16+
UserChoices,
17+
} from '@livekit/components-core';

packages/react/src/prefabs/PreJoin.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import { ParticipantPlaceholder } from '../assets/images';
2121
import { useMediaDevices, usePersistentUserChoices } from '../hooks';
2222

2323
/**
24-
* @deprecated Use `UserChoices` from `@livekit/components-core` instead.
24+
* @deprecated Use `UserChoices` instead.
2525
* @public
2626
*/
2727
export type LocalUserChoices = {
@@ -65,6 +65,7 @@ export interface PreJoinProps
6565
micLabel?: string;
6666
camLabel?: string;
6767
userLabel?: string;
68+
/** @deprecated E2EE options will be removed from PreJoin in a future version **/
6869
showE2EEOptions?: boolean;
6970

7071
/**

packages/react/src/prefabs/index.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,3 @@ export { VideoConference, type VideoConferenceProps } from './VideoConference';
1010
export { ControlBar, type ControlBarProps, type ControlBarControls } from './ControlBar';
1111
export { MediaDeviceMenu, type MediaDeviceMenuProps } from './MediaDeviceMenu';
1212
export { AudioConference, type AudioConferenceProps } from './AudioConference';
13-
14-
// Re-export types from core
15-
export {
16-
type ChatMessage,
17-
type ReceivedChatMessage,
18-
type MessageDecoder,
19-
type MessageEncoder,
20-
} from '@livekit/components-core';

0 commit comments

Comments
 (0)