该技能用于录制网页屏幕演示,作为视频片花中的插入素材。录制使用 herramientas/grabador/estudio.ts,该命令需在单独的 Bash 调用中执行,不能带 cd、&& 或管道。
用途与流程:先在 demos/<slug>/ 文件夹中用文件工具写入 sitios.txt(每行一个域名,列表之外的导航会被阻止)和 guion.json(版本、描述、主题与步骤列表)。步骤类型包括:ir(网址)、esperar(毫秒)、scroll(像素、时长)、clic(CSS 选择器,或 role 加 name)、escribir(文本,sensible:true 表示不应保存)、tecla、captura。每个步骤需标注 riesgo:lectura、escritura、gasto 或 publica;非 lectura 的步骤会在执行前以退出码 3 结束,除非脚本中 aprobado: true 且创作者当轮已同意。
主题:默认 oscuro(深色,白色文字易读);oscuro-forzado 用于无深色模式的站点;claro 仅在用户要求或其风格配置(perfil.json → demos.tema)指定时使用。可选 ocultar.json 提供额外 CSS 选择器以模糊处理(在密码、卡片和令牌字段之外)。
可选先探索:运行 npx tsx herramientas/grabador/estudio.ts explorar <url> --slug <slug> --sin-sesion,会在 demos/<slug>/capturas/ 留下 PNG,便于查看页面并挑选选择器。
录制命令:npx tsx herramientas/grabador/estudio.ts grabar <slug> --guion demos/<slug>/guion.json --sin-sesion(若站点需要创作者会话则去掉 --sin-sesion)。输出 toma.mp4(CFR 30,2560×1600)、eventos.json(点击与滚动,不含输入文本)和 revision.json。
秘密信息处理:若 revision.json 显示 BLOQUEADA,不得使用或自行批准。需查看第几秒及发现位置;若片花不需要该部分,可裁剪脚本避开后用 --reemplazar 重新录制(上一版保留在 anteriores/);若需要,则告知创作者检测到的内容(已脱敏),由其自行执行 ! npx tsx herramientas/grabador/estudio.ts revision <slug> --aprobar 批准。
放入片花:在 notas-director.json → inserts(或直接在 EDL)中写入 tipo:"demo" 的插入项,asset:"demos/<slug>/toma.mp4"、eventos:"demos/<slug>/eventos.json"、layout:"pantalla-completa"(竖屏取景,点击时缩放)或 "tarjeta"(横向卡片),并设置 trim_desde 与时间位置。DemoPantalla 负责绘制缩放、光标和点击波纹。长度按风格要求保持简短。
会话:需要登录的站点由创作者手动登录一次:! npx tsx herramientas/grabador/estudio.ts --login <url>(不录制、不读取 cookie);不得代输密码或查看配置文件。
终端演示:要展示命令时,使用动画终端演示(demos/<slug>/<x>.terminal.json,契约见 src/estilo/terminal.ts)作为 tipo:"demo" 的插入项,不得编造工具不会产生的输出。原生窗口可用 npx tsx herramientas/grabador/ventana.ts --app Terminal --segundos 10 --salida demos/<slug>/terminal.mp4 录制(需屏幕录制权限)。