Espelhamento de tela (captura + WebRTC + prévia com retângulo)
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 40/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- typescript
- 领域
- frontend
调研方向
Start from index.ts to see how public exports are declared and where a new createScreenCapture entry point would sit, then look at ./map, ./kit and VideoPlayer for the existing component and injection conventions, and at #668 to confirm voice/video rooms are separate. The acceptance criteria in the issue double as the test file: mock getDisplayMedia and RTCPeerConnection, assert video.cursor, setFocusBehavior ordering, NotAllowedError rejection, and addTrack per track. Done means those five checks pass plus a <TrackPreview> whose arrow keys step 1% and whose aria-valuetext reports the region in px. Expect to design the API shape before writing it.
由索引模型根据 Issue 内容生成。
描述
Versão: @codeatlasdev/ui 4.6.0 · código lido em main (950628f2) · classe: lacuna (migração do AC)
Problema
O AC depende deste comportamento hoje e a lib não o oferece. Sem ele, a migração perde qualidade no desktop, no mobile ou no PWA.
O que a lib já oferece (para não duplicar) e o que falta
(leitura de origin/main, index.ts sem exports de captura) não há getDisplayMedia, WebRTC nem prévia de track. ./map, ./kit e VideoPlayer não cobrem. #668 cobre salas de voz/vídeo (StageGrid, CallControls), mas não captura de tela.
Referência no AC
Caminhos do repo AC (repo privado, só caminho):
apps/web/src/lib/cast/sender.ts:56-104 (CastSender, captureDisplay), :201-205 (new RTCPeerConnection, addTrack), sender-encoder.ts:16-19 (navigator.mediaDevices.getDisplayMedia), sender-encoder.ts:37 (preferH264), constraints.ts:61-65 (1080p, dicas Chromium), capture-controller.ts:36-51 (setFocusBehavior só após getDisplayMedia); components/videowall-cast/cast-area-picker.tsx:115-120, 177-185 (prévia <video> do track, retângulo de 1 px = 1 px da TV).
Defeitos do AC (verificados por leitura do código): (leitura) o retângulo de área só se move com ponteiro (cast-area-picker.tsx:177-179). Há alternativa por rádio (Centro, Esquerda, Direita), mas não por teclado para posição fina.
Proposta
createScreenCapture({ hint: 'motion'|'detail', cursor, maxSize: {w:1920,h:1080} }) (headless, injetável: getDisplayMedia e RTCPeerConnection) e <TrackPreview track bind:region> com retângulo arrastável e teclado. Estatísticas e H.264 como opções.
Critério de aceite (testável)
- Com
getDisplayMediainjetado,createScreenCapturechama a função comvideo.cursoralwaysquandocursor=trueeneverquandofalse. -
setFocusBehavioré chamado só depois do retorno degetDisplayMedia; se lançar, o stream segue e o motivo vai só paradebug. - Recusa do usuário (
NotAllowedError) rejeita a promessa sem tocar no controlador. -
<TrackPreview>com retângulo: setas movem em passos de 1% e oaria-valuetextdiz a área em px. - Em teste,
RTCPeerConnectioninjetado recebeaddTrackpara cada track do stream.
Mãe: #1089
- 主要语言
- TypeScript
- 星标
- 6
- 派生
- 3
- 平均合并
- 5 小时 21 分钟
- 30 天内合并 PR
- 378
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
codeatlasdev/ui 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 84/100
codeatlasdev/ui#1340 ·
维护者通常 1 天内回复
-
area:a11y area:components bug
难度 2/5 1-3 小时 新手友好度 76/100
codeatlasdev/ui#1336 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 77/100
codeatlasdev/ui#1329 ·
维护者通常 1 天内回复
-
good first issue
难度 2/5 1-3 小时 新手友好度 74/100
codeatlasdev/ui#1292 · 1 条评论 ·
维护者通常 1 天内回复
-
area:components enhancement good first issue
难度 2/5 1-3 小时 新手友好度 68/100
codeatlasdev/ui#1198 ·
维护者通常 1 天内回复
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 86/100
sandbox-quantum/switch#2163 ·
维护者通常 1 天内回复
-
automated issue report
难度 1/5 1 小时以内 新手友好度 78/100
维护者通常 1 天内回复
-
area/dashboard kind/bug QA/dev-automation
难度 1/5 1 小时以内 新手友好度 75/100
维护者通常 1 天内回复
-
bug pydanty:is-working
难度 2/5 1-3 小时 新手友好度 82/100
pydantic/pydantic-ai#13939 ·
维护者通常 1 天内回复
-
self-host
难度 2/5 1-3 小时 新手友好度 70/100
funmusicplace/mirlo#2625 ·
维护者通常 1 天内回复