会议室
会议室插件(Meeting)为 Monibuca V6 提供 专业视频会议 能力。适用于在线会议、远程协作、培训讲座等场景。
- 多人视频会议:支持 50+ 并发参与者
- 会议管理:
- 议程管理(Agenda)
- 会议计时器与发言计时
- 举手功能(Raise Hand)
- 等候室(Lobby)控制入场
- 实时转写:语音自动转文字(需外部 ASR 服务)
- AI 智能服务:
- 自动生成会议纪要
- 从转写内容中提取待办任务
- 会议决议总结
- 录制与控制:
- 会议录制(MP4 格式)
- 屏幕共享
- 主持人权限控制
- 参与者管理:踢人、禁言、锁定房间、禁用入场
features = ["meeting"]
# Meeting 插件依赖 Room 服务# room feature 会自动启用graph TB subgraph Meeting["MeetingPlugin"] SM["SessionManager<br/>会议信息、参与者"] Agenda["AgendaManager<br/>议程控制"] Trans["TranscriptionManager<br/>实时转写"] AI["AIService<br/>总结 & 任务提取"] Record["RecordingManager<br/>录制控制"] Lobby["LobbyManager<br/>等候室"] DB["数据持久化<br/>会议、议程、转写"] end
subgraph RS["Room Service"] Room["房间管理<br/>主持人 + 参与者"] WS["WebSocket<br/>信令通信"] API["RoomApi"] end
subgraph Media["媒体层"] WHIP["WebRTC WHIP<br/>推流"] WHEP["WebRTC WHEP<br/>拉流"] ASR["ASR Service<br/>语音识别"] end
Meeting -->|register_callbacks| RS SM --> DB Agenda --> DB Trans --> AI Trans --> DB Record --> Media Lobby --> API Room --> API API -->|set_room_locked<br/>set_lobby_enabled| Meeting WS --> Meeting WHIP --> Media WHEP --> Media Trans -->|实时推送| ASR会议生命周期
Section titled “会议生命周期”Scheduled → Starting → Active → Paused → Ended| 状态 | 说明 |
|---|---|
Scheduled | 会议已排期,等待开始 |
Starting | 等候室接纳参与者中 |
Active | 会议进行中 |
Paused | 会议暂停 |
Ended | 会议已结束 |
会议基础信令
Section titled “会议基础信令”| Action | 方向 | 说明 |
|---|---|---|
start_meeting | C→S | 主持人开始会议 |
end_meeting | C→S | 主持人结束会议 |
pause_meeting | C→S | 主持人暂停会议 |
resume_meeting | C→S | 主持人恢复会议 |
参与者控制信令
Section titled “参与者控制信令”| Action | 方向 | 说明 |
|---|---|---|
mute_participant | C→S | 主持人静音参与者 |
unmute_participant | C→S | 主持人取消静音 |
kick_participant | C→S | 主持人踢出参与者 |
raise_hand | C→S | 参与者举手 |
lower_hand | C→S | 参与者放下手 |
participant_muted | S→C | 参与者被静音通知 |
participant_kicked | S→C | 参与者被踢出通知 |
hand_raised | S→C | 举手通知(广播) |
| Action | 方向 | 说明 |
|---|---|---|
update_agenda | C→S | 更新当前议程项 |
next_agenda | C→S | 进入下一个议程项 |
agenda_changed | S→C | 议程变化通知(广播) |
转写与录制信令
Section titled “转写与录制信令”| Action | 方向 | 说明 |
|---|---|---|
start_transcription | C→S | 启动实时转写 |
stop_transcription | C→S | 停止实时转写 |
transcription_result | S→C | 转写结果推送 |
start_recording | C→S | 开始录制 |
stop_recording | C→S | 停止录制 |
| Action | 方向 | 说明 |
|---|---|---|
toggle_lobby | C→S | 开关等候室 |
admit_user | C→S | 允许用户进入 |
reject_user | C→S | 拒绝用户进入 |
user_pending | S→C | 用户在等候室(广播) |
房间锁定信令
Section titled “房间锁定信令”| Action | 方向 | 说明 |
|---|---|---|
lock_room | C→S | 锁定房间(禁止新用户加入) |
unlock_room | C→S | 解锁房间 |
{ "meeting_id": "meeting_001", "agenda": [ { "id": "agenda_1", "title": "开场致辞", "speaker": "主持人", "duration": 5, // 分钟 "order": 1 }, { "id": "agenda_2", "title": "业务进展汇报", "speaker": "部门负责人", "duration": 20, "order": 2 }, { "id": "agenda_3", "title": "Q&A 环节", "speaker": "全体参与者", "duration": 10, "order": 3 } ], "current_agenda_id": "agenda_2"}{ "action": "update_agenda", "agenda": [ { "title": "开场致辞", "speaker": "主持人", "duration": 5 } ]}{ "action": "mute_participant", "target_user_id": "user_005", "mute_audio": true, // 静音麦克风 "mute_video": false // 不关闭摄像头}主持人权限控制
Section titled “主持人权限控制”主持人具有以下权限:
- 开始/结束/暂停会议
- 静音/取消静音参与者
- 踢出参与者(强制退出)
- 控制等候室(允许/拒绝进入)
- 锁定/解锁房间
- 启动/停止录制
- 启动/停止转写
参与者可以举手表示想发言,主持人可以看到举手队列:
{ "action": "raise_hand"}┌────────────────┐│ 参与者麦克风 │└────────┬───────┘ │ RTC Audio ↓ ┌─────────────┐ ┌──────────────┐ │ AudioBuffer │────────→│ ASR Service │ └─────────────┘ │ (外部服务) │ └──────┬───────┘ │ 识别结果 ↓ ┌─────────────────┐ │ TranscriptionDB │ └─────────────────┘ │ ↓ ┌────────────────────┐ │ WebSocket 实时推送 │ │ 至所有参与者 │ └────────────────────┘{ "action": "start_transcription", "language": "zh-CN" // 语言代码}转写结果格式
Section titled “转写结果格式”{ "action": "transcription_result", "speaker_id": "user_003", "speaker_name": "张三", "text": "我们上半年的销售额增长了 25%", "is_final": true, // true: 句子完成, false: 临时结果 "timestamp": "2024-01-15T10:35:00Z"}AI 智能服务
Section titled “AI 智能服务”会议结束后,AI 自动生成纪要:
{ "meeting_id": "meeting_001", "title": "2024 Q1 季度总结会", "date": "2024-01-15", "duration": "2小时 15分钟", "participants": ["主持人", "张三", "李四"], "summary": "本次会议总结了 Q1 业绩,制定了 Q2 目标...", "key_points": [ "销售额同比增长 25%", "市场份额提升 5 个百分点", "新产品线已上线 3 个" ], "action_items": [ { "item": "完成市场调研报告", "owner": "市场部", "deadline": "2024-01-31" }, { "item": "优化售后服务流程", "owner": "运营部", "deadline": "2024-02-15" } ]}从转写内容中自动提取任务项:
转写: "李四,能否在下周五前完成客户需求分析?"
提取的任务:{ "item": "完成客户需求分析", "owner": "李四", "deadline": "2024-01-19", // 下周五 "priority": "high"}等候室(Lobby)
Section titled “等候室(Lobby)”{ "action": "toggle_lobby", "enable": true}用户尝试加入 → 进入等候室 → 主持人审核 → 允许/拒绝进入允许用户进入
Section titled “允许用户进入”{ "action": "admit_user", "target_user_id": "user_008"}拒绝用户进入
Section titled “拒绝用户进入”{ "action": "reject_user", "target_user_id": "user_008"}开启屏幕共享
Section titled “开启屏幕共享”{ "action": "share_screen"}参与者通过浏览器 API 选择要共享的屏幕或窗口。系统自动将共享内容作为独立的媒体轨道处理。
会中 开始 / 停止录制 由 WebSocket 房间信令 与 RoomApi 驱动(见上文信令与架构),不提供 POST /meeting/.../recording/start 这类与全局规则不一致的独立 HTTP 路径。
与其它插件相同,Meeting 的 HTTP REST 统一为 /meeting/api/...(引擎挂载前缀 meeting/api)。若只需通过 HTTP 查看录制条目列表:
curl http://localhost:8080/meeting/api/recordings(持久化录制目录完全接入前,列表可能为空;单条 play / download / DELETE 见 HTTP API — Meeting REST,与仓库 docs/http-api.md §14.2 同步。)
HTTP API
Section titled “HTTP API”基路径: http(s)://<host>:<port>/meeting/api。请勿使用已废弃的 /room/meeting/...,也勿省略 api 段写成 /meeting/rooms(会与插件顶层路径混淆)。
curl http://localhost:8080/meeting/api/roomscurl -X POST http://localhost:8080/meeting/api/rooms \ -H "Content-Type: application/json" \ -d '{"room_id":"room-demo-1"}'curl http://localhost:8080/meeting/api/reservationscurl -X POST http://localhost:8080/meeting/api/reservations \ -H "Content-Type: application/json" \ -d '{ "room_id": "room-1", "room_name": "周例会", "host_user_id": "u1", "host_user_name": "主持人", "start_time": "2026-04-21T10:00:00+08:00", "duration_minutes": 60, "timezone": "Asia/Shanghai", "participants": ["u2"], "has_password": false, "mute_all": false, "mute_video_all": false }'模板列表 / 创建模板
Section titled “模板列表 / 创建模板”curl http://localhost:8080/meeting/api/templatescurl -X POST http://localhost:8080/meeting/api/templates \ -H "Content-Type: application/json" \ -d '{ "name": "默认模板", "description": null, "max_participants": 50, "default_password": null, "auto_record": false, "auto_lock": false, "enabled": true, "sort_order": 0 }'会议统计与特性列表
Section titled “会议统计与特性列表”curl http://localhost:8080/meeting/api/statscurl http://localhost:8080/meeting/api/features锁定房间、静音、踢人、录制单条 URL 等完整路径表见 HTTP API — Meeting REST(与仓库 docs/http-api.md §14.2 一致)。议程、转写、纪要等能力以 WebSocket 信令与特性扩展 为主,本文档其它章节描述的是协议与数据模型,不对应 GET /meeting/meetings/... 这类未在引擎中注册的 REST 路径。
数据库持久化
Section titled “数据库持久化”会议表 meeting_sessions
Section titled “会议表 meeting_sessions”| 字段 | 类型 | 说明 |
|---|---|---|
id | string | 会议 ID |
title | string | 会议标题 |
organizer_id | string | 组织者 ID |
status | enum | 会议状态 |
start_time | timestamp | 开始时间 |
end_time | timestamp | 结束时间 |
participant_count | int | 参与者数 |
recording_file | string | 录制文件路径 |
议程表 meeting_agenda
Section titled “议程表 meeting_agenda”| 字段 | 类型 | 说明 |
|---|---|---|
id | string | 议程 ID |
meeting_id | string | 会议 ID |
title | string | 议程标题 |
speaker | string | 发言人 |
duration | int | 时长(秒) |
order | int | 排序 |
转写表 meeting_transcription
Section titled “转写表 meeting_transcription”| 字段 | 类型 | 说明 |
|---|---|---|
id | string | 转写 ID |
meeting_id | string | 会议 ID |
speaker_id | string | 发言人 ID |
text | text | 转写内容 |
timestamp | timestamp | 时间戳 |
language | string | 语言 |
meeting: # 基本配置 max_participants: 50 # 最大参与者数 session_timeout: 7200 # 会议超时(秒)
# 等候室 enable_lobby: true # 启用等候室 lobby_timeout: 300 # 等候室超时(秒)
# 录制 enable_recording: true # 启用录制 recording_format: "mp4" # 录制格式 recording_dir: "./recordings"
# 转写 enable_transcription: false # 启用转写(需配置 ASR 服务) asr_service_url: "" # ASR 服务 URL transcription_language: "zh-CN"
# AI 服务 enable_ai_summary: false # 启用 AI 总结 ai_service_url: "" # AI 服务 URL
# 计时器 timer: max_duration: 7200 # 会议最大时长(秒) warning_before_end: 300 # 结束前提醒(秒) enable_agenda_timer: true # 议程计时Web-SDK 集成
Section titled “Web-SDK 集成”const room = document.getElementById('room') as MbRoom;const publisher = document.getElementById('publisher') as MbPublisher;
// 连接会议室room.setAttribute('ws-url', 'ws://localhost:8080/room?type=meeting');room.setAttribute('room-id', 'meeting_001');
// 开启音视频await publisher.startCapture({ audio: true, video: true });await publisher.startPublish();const room = document.getElementById('room') as MbRoom;
// 启动会议room.sendMessage({ action: 'start_meeting'});
// 静音参与者room.sendMessage({ action: 'mute_participant', target_user_id: 'user_005', mute_audio: true});
// 开启等候室room.sendMessage({ action: 'toggle_lobby', enable: true});// 启动转写room.sendMessage({ action: 'start_transcription', language: 'zh-CN'});
// 监听转写结果room.addEventListener('transcription_result', (event) => { console.log(`${event.speaker_name}: ${event.text}`); // 实时显示在转写面板});const publisher = document.getElementById('publisher') as MbPublisher;
// 启动屏幕共享await publisher.startScreenShare();
// 停止屏幕共享await publisher.stopScreenShare();Demo 项目
Section titled “Demo 项目”完整的会议室 Demo 位于 web-sdk/packages/demo/meeting/:
meeting/├── src/│ ├── pages/│ │ ├── Lobby/index.tsx # 会议列表│ │ ├── MeetingRoom/index.tsx # 会议间│ │ └── Waiting/index.tsx # 等候室│ ├── components/│ │ ├── VideoGrid/index.tsx # 视频网格│ │ ├── Transcription/index.tsx # 实时转写面板│ │ ├── Agenda/index.tsx # 议程面板│ │ ├── Participants/index.tsx # 参与者列表│ │ └── Controls/index.tsx # 控制栏│ ├── services/api.ts # API 封装│ └── types/index.ts # 类型定义├── package.json # port: 5475└── vite.config.ts启动 Demo
Section titled “启动 Demo”cd web-sdk/packages/demo/meetingpnpm installpnpm dev# 访问 http://localhost:5475http://localhost:5475?meeting_id=meeting_001&user_id=user_123&role=participantDemo 自动检测设备类型,移动端采用:
- 自适应视频网格(最多 4 个视频)
- 底部固定控制栏
- 上拉唤出参与者列表
- 下拉唤出议程面板
- 转写结果滚动显示
联系我们