55 lines
1.8 KiB
Markdown
55 lines
1.8 KiB
Markdown
# K95.2 首切频道用封面过渡
|
||
|
||
## 目标
|
||
|
||
- 首页频道切换后立即显示目标短剧封面,视频首帧就绪后再淡入。
|
||
- 首页模式视频初始化期间不再显示 `player-session-loading` 大转圈。
|
||
- 非首页播放器及票据加载状态保持现有行为。
|
||
|
||
## 分支
|
||
|
||
- ReelShort:`fix/k95.2-poster-transition`,从最新 `origin/develop` 创建。
|
||
- FruitServer 仅写计划与 PROGRESS 留痕,不改后端功能代码。
|
||
|
||
## A. PlayerVideoSurface
|
||
|
||
- 新增可选参数 `posterUrl = ''`。
|
||
- 未 reveal 时:
|
||
- `posterUrl` 非空显示 `RemoteImage(path: posterUrl, fit: BoxFit.cover)`,
|
||
Key 为 `player-video-poster`。
|
||
- `posterUrl` 为空继续显示黑色 `ColoredBox`,保留
|
||
`player-fallback-background` Key。
|
||
- 视频 reveal 后继续通过现有 200ms `AnimatedOpacity` 淡入覆盖封面。
|
||
|
||
## B. PlayerPage
|
||
|
||
- `PlayerVideoSurface` 传入当前 `drama.posterUrl`。
|
||
- `player-session-loading` 条件增加 `!widget.homeMode`:
|
||
- 首页模式视频初始化期间只显示封面。
|
||
- 非首页播放器继续显示原 session loading。
|
||
- 首页 `player-ticket-loading` 不变。
|
||
|
||
## C. 测试
|
||
|
||
- 视频表面:非空 poster 显示 `player-video-poster`,空 poster 保留黑底且无封面。
|
||
- 首页模式:视频未就绪时不出现 `player-session-loading`。
|
||
- 非首页模式:视频未就绪时仍出现 `player-session-loading`。
|
||
- 复跑既有播放器、首页相关测试。
|
||
|
||
## 门禁
|
||
|
||
- `dart analyze lib test`
|
||
- `flutter test`
|
||
- `flutter build apk --debug`
|
||
|
||
## Git
|
||
|
||
- ReelShort 提交:`fix(home): 频道切换用封面过渡`
|
||
- `--no-ff` 合回 `develop` 并 push。
|
||
- 作者 `Zhou Weidong <502333560@qq.com>`;禁止 `git add -A`。
|
||
|
||
## 约束
|
||
|
||
- 全程中文;不改后端、ReelShortWeb、specs。
|
||
- 不安装或操作真机;完成后停住等待验收。
|