Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

I treated camera playback as “live with a start time.” Don’t.

说明与用途

针对IP摄像机监控的Web应用进行了改进,使录制回放像VOD一样工作:正确的段选择、准确的时间显示和安全的访问控制。

问题

Treating recorded IP camera playback as a live stream with a start time caused incorrect GOP selection, misleading seek bars, and timezone mismatches, leading to poor user experience and security issues.

结果

Playback now behaves like VOD: correct first frame, accurate seek, proper empty state handling, and secure RBAC enforcement, eliminating the previous live‑stream misbehaviors.

工作流

  • Select a time range using a site‑time picker
  • Send authorized request to list available segments for the range
  • If segments exist, initialize a playback player with the segment list
  • On mode switch, destroy any existing player before creating a new one
  • Handle empty ranges by showing a clear message
  • Ensure RBAC controls hide playback for users without review permission
  • Log channelId and timestamps for debugging
  • Use separate live tiles for live‑device actions like PTZ or two‑way talk

证据

If the list‑segments call returns [], I stop. I do not init the player “just in case.”

The bug that bit me: pause() on live and then seek(). Some stacks ignore seek on a live transport.

  • 记录日期: 2026-09-15T08:00:32.318Z