Does Cloud Live support video playback?
说明与用途
在摄像头平台中将实时流和回放路径分离,可消除 UI 混淆,确保正确权限,并简化未来功能扩展。
问题
Developers need to distinguish between live streaming and playback in a camera platform, ensuring correct API routes, UI behavior, and permissions.
结果
Clear separation of live and playback paths prevents UI confusion, enforces correct permissions, and simplifies future feature expansion.
工作流
- 1. Design separate API routes for live and playback.
- 2. Add capability flag cameras.capabilities.playback to indicate recording availability.
- 3. Implement RBAC helper with distinct permission keys for live and playback.
- 4. On Day 1 ship live-only tile without timeline UI.
- 5. On Day 2 expose capability row showing playback:false until source available.
- 6. On Day 3 add playback route with proper error handling (no_source, empty).
- 7. On Day 4 handle empty range with empty state UI.
- 8. On Day 5 ensure teardown destroys player before switching modes.
- 9. Create mediaGateway with openLive, openPlayback, capabilities methods.
- 10. Write unit tests for all edge cases (flags, permissions, empty ranges, navigation, clock skew).
证据
I refuse a single openVideo(). I have shipped that function. It always grows a mode argument and a comment that says “TODO timeline.”
If product asks for “video,” I ask which word they meant.
- 记录日期: 2026-09-22T05:15:26.726Z