Files
suixinkan_ios_new/suixinkan/Features/Live/Live.md
汉秋 fdf4659048 Add Live module with stream management and album flows.
Migrate live stream management and live album from home placeholders, including alive album OSS upload, home routing, and unit tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-25 14:38:52 +08:00

20 lines
1.1 KiB
Markdown
Raw Blame History

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.

# 直播模块
## 模块职责
`Features/Live` 承接首页 `live_stream_management``live_album` 权限入口,负责手动直播管理和直播相册素材管理。
## 代码结构
- `LiveAPI`:封装 `/api/app/manual-live/...``/api/app/view-album/...` 接口。
- `LiveManagementViewModel`:管理直播列表分页、创建、开始/暂停、结束和详情失败清理。
- `LiveAlbumViewModel`:管理直播相册日期筛选、分页和删除相册。
- `LiveAlbumCreateViewModel`:管理本地图片/视频上传到 OSS 后创建直播相册。
- `LiveAlbumPreviewViewModel`:进入相册预览时加载相册详情,并支持删除单个素材。
## 业务边界
本模块不接入播放器或推流 SDK。直播详情展示推流地址、复制和控制能力视频素材预览优先展示接口返回的封面缺少封面时展示视频占位并提供打开或复制原始 URL。
直播封面创建沿用旧 iOS 的 URL 输入。直播相册素材通过 `PhotosPicker` 选择后,使用 `OSSUploadService.uploadAliveAlbumFile` 上传到 `live_albums/yyyyMMdd/scenicId/...`,再把最终 URL 提交给创建相册接口。