OpenClaw 支持通过 iOS/Android 节点和 macOS 应用进行摄像头捕获,供 Agent 工作流使用。所有摄像头访问均受用户控制的设置门控。
支持平台
| 平台 | 默认状态 | 设置路径 |
|---|---|---|
| iOS 节点 | 开启 | Settings → Camera → Allow Camera |
| Android 节点 | 开启 | Settings → Camera → Allow Camera |
| macOS 应用 | 关闭 | Settings → General → Allow Camera |
核心命令(通过 node.invoke)
camera.list
返回设备列表:{ id, name, position, deviceType }
camera.snap(拍照)
{
"facing": "front|back",
"maxWidth": 1600,
"quality": 0.9,
"format": "jpg",
"delayMs": 0,
"deviceId": "<optional>"
}响应:{ format, base64, width, height },payload 限制 5MB。
camera.clip(录制短视频)
{
"facing": "front|back",
"durationMs": 3000,
"includeAudio": true,
"format": "mp4"
}时长上限 60 秒。
CLI 辅助命令
openclaw nodes camera snap --node <id> # 默认前后双摄(2 个 MEDIA 行)
openclaw nodes camera snap --node <id> --facing front
openclaw nodes camera clip --node <id> --duration 10s
openclaw nodes camera clip --node <id> --no-audio前台要求
iOS 和 Android 节点的 camera.* 命令仅在前台可用,后台调用返回 NODE_BACKGROUND_UNAVAILABLE。
错误码
CAMERA_DISABLED— 用户设置中已关闭摄像头*_PERMISSION_REQUIRED— OS 权限未授予NODE_BACKGROUND_UNAVAILABLE— 应用在后台
相关页面
- nodes-images — 图像与媒体支持
- nodes-media-understanding — 媒体理解
- nodes-location-command — 位置命令
- nodes-troubleshooting — 节点故障排查