LevelChatLevelChatDocs
RecordingPanel

Components

RecordingPanel

Operator surface for in-room recording control.

RecordingPanel is the operator-facing surface for recording: start/stop button, current mode (composed / individual / screen-only), elapsed timer, output destination. Composes useRecordingState.

Install

pnpm add @levelchat/react-components @levelchat/web

Requirements

  • Reactreact and react-dom ^18 || ^19 (peer dependency).
  • LevelChat Web SDK@levelchat/web ^0.2.4 (peer dependency, wires hook-driven mode to the live Room).
  • Provider — wrap the tree in <LevelChatProvider> from @levelchat/web-react so hook-driven mode can subscribe to room events. Prop-driven demos work without it.
  • Styles — import the brand tokens + kit stylesheet exactly once at the app entry, before any kit component renders.

In Next.js (App Router), import the stylesheets at the top of your root layout:

TypeScript (TSX)
// app/layout.tsx
import '@levelchat/brand/tokens.css';
import '@levelchat/react-components/styles.css';

In Vite (or any plain React app), import them at the top of your entry module:

TypeScript (TSX)
// src/main.tsx
import '@levelchat/brand/tokens.css';
import '@levelchat/react-components/styles.css';

Basic usage

Recording modes

  • composed — server-side mix of all tracks into one MP4. Best for archival.
  • individual — one file per track (audio + video per participant). Best for post-production.
  • screen-only — captures the active screen-share stream only. Best for demos / tutorials.

Headless hook

import { useRecordingState } from '@levelchat/react-components';

function MyRecorder() {
  const { active, start, stop, elapsedMs, mode } = useRecordingState();
  return active
    ? <button onClick={stop}>Stop · {Math.round(elapsedMs / 1000)}s</button>
    : <button onClick={() => start({ mode: 'composed' })}>Start recording</button>;
}

Props

PropTypeDefaultNotes
defaultMode'composed' | 'individual' | 'screen-only'composedMode pre-selected on first open.
classNamestringContainer override.