Skip to main content

DyteMeeting

Dyte provides, DyteMeeting an all encompassing component that internally handles everything from showing a pre-call UI to in-call UI and post-call screen.

<DyteMeeting meeting={meeting} showSetupScreen={true} />

This component contains pre-call, in-call UI as well post-call UIs.

Following code shows a basic split of these UIs from the DyteMeeting component.

import {
DyteSetupScreen,
DyteEndedScreen,
DyteHeader,
DyteParticipantsAudio,
DyteDialogManager,
DyteStage,
DyteGrid,
DyteNotifications,
DyteSidebar,
DyteControlbar,
} from '@dytesdk/react-ui-kit';
import { useDyteMeeting, useDyteSelector } from '@dytesdk/react-web-core';
import { useEffect } from 'react';

export default function MyMeeting() {
const { meeting } = useDyteMeeting();
const roomState = useDyteSelector((m) => m.self.roomState);

return (
<View className="flex h-full w-full">
{roomState === 'init' && <DyteSetupScreen meeting={meeting} />}
{roomState === 'joined' && (
<View className="flex h-full w-full flex-col">
<View>
<DyteHeader meeting={meeting} />
</View>

<View
className="flex w-full flex-1 items-center justify-center"
style={{
backgroundColor: '#272727',
color: '#ffffff',
}}
>
<DyteText>Custom in-call UI</DyteText>
<DyteDialogManager meeting={meeting} />
</View>

<View className="flex w-full overflow-visible">
<DyteControlbar meeting={meeting} />
</View>
</View>
)}
{roomState === 'ended' && <DyteEndedScreen meeting={meeting} />}
</View>
);
}

Since DyteMeeting is a complex component and provides a lot more than just the UI, let's go to the next page and start splitting it to uncover what it does.