jitsi-roomsv2/frontend/src/components/jitsi/JitsiEntrypoint.tsx

37 lines
1.1 KiB
TypeScript
Raw Normal View History

2023-01-07 19:06:04 +01:00
import { JitsiMeeting } from "@jitsi/react-sdk";
import { JITSI_DOMAIN } from "../../background/constants";
2023-01-10 19:00:20 +01:00
import { UserInfo } from "./types";
2023-01-07 19:06:04 +01:00
2023-01-10 19:00:20 +01:00
interface Props {
roomName: string;
userInfo: UserInfo;
}
function JitsiEntrypoint({ roomName, userInfo }: Props) {
2023-01-07 19:06:04 +01:00
return (
<JitsiMeeting
domain={JITSI_DOMAIN}
2023-01-10 19:00:20 +01:00
roomName={roomName}
2023-01-07 19:06:04 +01:00
configOverwrite={{
startWithAudioMuted: true,
disableModeratorIndicator: true,
startScreenSharing: true,
enableEmailInStats: false,
prejoinConfig: { enabled: false },
}}
interfaceConfigOverwrite={{}}
2023-01-10 19:00:20 +01:00
userInfo={userInfo}
2023-01-07 19:06:04 +01:00
onApiReady={(externalApi) => {
// here you can attach custom event listeners to the Jitsi Meet External API
// you can also store it locally to execute commands
}}
getIFrameRef={(iframeRef) => {
iframeRef.style.height = "100%";
iframeRef.style.width = "100%";
}}
/>
);
}
export default JitsiEntrypoint;