@atzentis/meeting-react
v0.1.0
Published
React hooks and components for the atzentis-video platform
Maintainers
Readme
@atzentis/meeting-react
React hooks and components for the atzentis-video platform. Built on top of @atzentis/meeting-sdk.
Install
npm install @atzentis/meeting-react @atzentis/meeting-sdk react react-domQuick Start
import { MeetingProvider, useMeeting } from '@atzentis/meeting-react';
function App() {
return (
<MeetingProvider apiKey="atz_live_xxx">
<MeetingRoom />
</MeetingProvider>
);
}
function MeetingRoom() {
const { room, join, leave, toggleAudio, toggleVideo } = useMeeting();
return (
<div>
<h1>{room?.name}</h1>
<button onClick={join}>Join</button>
<button onClick={leave}>Leave</button>
<button onClick={toggleAudio}>Toggle Audio</button>
<button onClick={toggleVideo}>Toggle Video</button>
</div>
);
}Hooks
useMeeting— Meeting state, join/leave, media controlsuseParticipants— Participant list, speaking detection, moderator actionsuseWhiteboard— Whiteboard state, export, collaboratorsuseRecording— Playback, transcript, chaptersuseBreakouts— Breakout room managementuseClassroom— Hand raising, polls, spotlight, attendance
SSR Support
MeetingProvider is SSR-safe for Next.js. WebSocket connections are only established on the client.
License
MIT
