Clone
3
Task-26-Sense单路实时监看
ila edited this page 2026-08-14 09:52:25 +08:00
This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

26 Sense 单路实时监看

  • 类型:需求
  • 所属 Epic:#7
  • 所属 MVP / 版本:#8
  • 状态:已完成
  • 日期:2026-08-12
  • Gitea 工单:#26
  • Wiki 页面:Task-26-Sense单路实时监看
  • Wiki revision:见本地镜像头

背景与目标

让授权用户选择一路已验证视频并获得清晰播放状态,不依赖 Brain 或 Bell。

最终方案

实现媒体路径列表、绑定当前用户且最长两分钟的播放会话、受认证保护的播放器入口和状态查询;前端只打开一路流,提供 Profile 选择、加载、等待、服务失败、断开、过期与重连反馈,并新增局部 StreamPlayer。

与已确认方案一致。为使用 #21 的模块注册和项目内窄端口,实施前已在工单评论中记录精确集成 write_path;未修改 contracts、Brain、Bell 或根级部署。

修改文件

  • Sense/server/app/sense/:本工单后端领域、适配器、服务、HTTP 与测试。
  • Sense/server/cmd/sense/modules_*.go:独立模块注册文件。
  • Sense/server/database/migrations/:本工单需要的 PostgreSQL 迁移(如适用)。
  • Sense/ui/src/:本工单 API、页面、路由及明确需要的局部业务组件。
  • Sense/tests/、Sense/testdata/:无生产数据、无真实秘密的验收说明与夹具。

验收结果

播放基础 URL 凭据拒绝、TTL 上限、会话所有者隔离和过期测试通过;前端 lint/build 通过。

工单保持 open / 待验收,未代替用户执行浏览器、真实设备或部署环境验收。

测试

  • Go 1.26.5 go vet ./...:通过。
  • Go 1.26.5 go test -race ./...:全部通过。
  • Go 1.26.5 go test -count=1 ./...:全部通过。
  • Go 1.26.5 go build ./...:通过。
  • corepack pnpm@9.15.1 install --frozen-lockfile:通过。
  • corepack pnpm@9.15.1 lint --quiet:通过。
  • corepack pnpm@9.15.1 build:通过;仅有 Element Plus vendor bundle 体积建议警告。
  • Sense 独立 smoke、Harness 严格检查和 31 项 Harness 测试:通过。
  • 未验证部分:未在目标浏览器连接真实 MediaMTX WebRTC 页面和实验室流,未人工验证主辅切换及真实断线恢复。

相关提交

  • $(System.Collections.Hashtable.commit) 本工单实现提交
  • 5177861 docs: document Sense MVP operations (#22-#27)

用户验收

  • 2026-08-14:用户明确确认当前未验收工单通过验收。
  • 本次验收确认该工单在历史 explore 快照中的交付与证据;不恢复旧自研基础框架为 dev 产品基线,后续迁移仍受 #58、#61、#62 约束。