Skip to content

Commit 4c5f00c

Browse files
committed
Revert "fix prejoin layout shift when video starts (#219)"
This reverts commit 6260a76.
1 parent d6bd2dc commit 4c5f00c

File tree

2 files changed

+16
-28
lines changed

2 files changed

+16
-28
lines changed

packages/react/src/prefabs/PreJoin.tsx

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -259,14 +259,11 @@ export const PreJoin = ({
259259

260260
return (
261261
<div className="lk-prejoin" {...htmlProps}>
262-
<div className="lk-video-container">
263-
{localVideoTrack && <video ref={videoEl} />}
264-
{/* {localVideoTrack?.isMuted === true && (
265-
<div className="lk-placeholder">
266-
<ParticipantPlaceholder />
267-
</div>
268-
)} */}
269-
</div>
262+
{localVideoTrack ? (
263+
<video ref={videoEl} />
264+
) : (
265+
<div className="lk-camera-off-note">Camera is off</div>
266+
)}
270267
{localAudioTrack ? (
271268
<div className="lk-audio-container">
272269
<audio ref={audioEl} />
@@ -317,7 +314,7 @@ export const PreJoin = ({
317314

318315
<form className="lk-username-container">
319316
<input
320-
className="lk-form-control"
317+
className="form-control"
321318
id="username"
322319
name="username"
323320
type="text"

packages/styles/scss/prefab-components/_prejoin.scss

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,29 +7,20 @@
77
margin-inline: auto;
88
background-color: var(--bg);
99

10-
.video-container {
10+
video {
11+
display: block;
1112
width: 480px;
1213
max-width: 100%;
14+
height: auto;
15+
transform: rotateY(180deg);
1316
border-radius: var(--lk-border-radius);
14-
aspect-ratio: 16 / 10;
15-
overflow: hidden;
16-
17-
video {
18-
max-height: 100%;
19-
display: block;
20-
transform: rotateY(180deg);
21-
object-fit: cover;
22-
}
17+
}
2318

24-
.placeholder {
25-
width: 100%;
26-
height: 100%;
27-
display: grid;
28-
place-content: center;
29-
svg {
30-
padding: 20%;
31-
}
32-
}
19+
.camera-off-note {
20+
width: 100%;
21+
height: 11.25rem;
22+
background-color: #000;
23+
border-radius: var(--lk-border-radius);
3324
}
3425

3526
.audio-container {

0 commit comments

Comments
 (0)