Skip to content

Commit 8d9ebc3

Browse files
committed
separate control bar from chat and video
1 parent 6f02e9f commit 8d9ebc3

File tree

2 files changed

+42
-30
lines changed

2 files changed

+42
-30
lines changed

packages/react/src/prefabs/VideoConference.tsx

Lines changed: 31 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -138,39 +138,41 @@ export function VideoConference({
138138
// onPinChange={handleFocusStateChange}
139139
onWidgetChange={widgetUpdate}
140140
>
141-
<div className="lk-video-conference-inner">
142-
{!focusTrack ? (
143-
<div className="lk-grid-layout-wrapper">
144-
<GridLayout tracks={tracks}>
145-
<ParticipantTile />
146-
</GridLayout>
147-
</div>
148-
) : (
149-
<div className="lk-focus-layout-wrapper">
150-
<FocusLayoutContainer>
151-
<CarouselLayout tracks={carouselTracks}>
141+
<div className="lk-video-conference-content">
142+
<div className="lk-video-conference-inner">
143+
{!focusTrack ? (
144+
<div className="lk-grid-layout-wrapper">
145+
<GridLayout tracks={tracks}>
152146
<ParticipantTile />
153-
</CarouselLayout>
154-
{focusTrack && <FocusLayout trackRef={focusTrack} />}
155-
</FocusLayoutContainer>
147+
</GridLayout>
148+
</div>
149+
) : (
150+
<div className="lk-focus-layout-wrapper">
151+
<FocusLayoutContainer>
152+
<CarouselLayout tracks={carouselTracks}>
153+
<ParticipantTile />
154+
</CarouselLayout>
155+
{focusTrack && <FocusLayout trackRef={focusTrack} />}
156+
</FocusLayoutContainer>
157+
</div>
158+
)}
159+
</div>
160+
<Chat
161+
style={{ display: widgetState.showChat ? 'grid' : 'none' }}
162+
messageFormatter={chatMessageFormatter}
163+
messageEncoder={chatMessageEncoder}
164+
messageDecoder={chatMessageDecoder}
165+
/>
166+
{SettingsComponent && (
167+
<div
168+
className="lk-settings-menu-modal"
169+
style={{ display: widgetState.showSettings ? 'block' : 'none' }}
170+
>
171+
<SettingsComponent />
156172
</div>
157173
)}
158-
<ControlBar controls={{ chat: true, settings: !!SettingsComponent }} />
159174
</div>
160-
<Chat
161-
style={{ display: widgetState.showChat ? 'grid' : 'none' }}
162-
messageFormatter={chatMessageFormatter}
163-
messageEncoder={chatMessageEncoder}
164-
messageDecoder={chatMessageDecoder}
165-
/>
166-
{SettingsComponent && (
167-
<div
168-
className="lk-settings-menu-modal"
169-
style={{ display: widgetState.showSettings ? 'block' : 'none' }}
170-
>
171-
<SettingsComponent />
172-
</div>
173-
)}
175+
<ControlBar controls={{ chat: true, settings: !!SettingsComponent }} />
174176
</LayoutContextProvider>
175177
)}
176178
<RoomAudioRenderer />

packages/styles/scss/prefabs/video-conference.scss

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,25 @@
1919
.video-conference {
2020
position: relative;
2121
display: flex;
22+
flex-direction: column;
2223
align-items: stretch;
2324
height: 100%;
2425
}
2526

27+
.video-conference-content {
28+
display: flex;
29+
flex-direction: column;
30+
align-items: stretch;
31+
width: 100%;
32+
flex: 1;
33+
}
34+
2635
.video-conference-inner {
2736
display: flex;
2837
flex-direction: column;
2938
align-items: stretch;
3039
width: 100%;
40+
flex: 1;
3141
}
3242

3343
.settings-menu-modal {
@@ -53,4 +63,4 @@
5363
max-width: 100%;
5464
max-height: 100%;
5565
overflow-y: auto;
56-
}
66+
}

0 commit comments

Comments
 (0)