ai-clone/MINIMAL_FIX.md
2026-03-05 14:29:21 +08:00

32 lines
1.1 KiB
Markdown
Raw Permalink 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.

# 最小化修复方案 - 只修复"视频播放时显示缓冲遮罩"问题
## 问题
视频已经在播放(有 timeupdate 事件),但缓冲遮罩一直显示。
## 唯一需要修改的地方
找到 `showLoadingOverlay()` 计算属性约第73-85行只需要调整判断顺序
### 修改前:
```javascript
if (!this.videoHasStarted) return true;
// 视频已经在播放且有正常的 timeupdate不显示加载遮罩
if (this.isVideoPlaying && this.lastVideoTime > 0) return false;
if (this.videoWaiting) return true;
```
### 修改后:
```javascript
// 如果有 timeupdatelastVideoTime > 0说明视频已经在播放
if (this.lastVideoTime > 0 && !this.videoWaiting) return false;
if (!this.videoHasStarted) return true;
if (this.videoWaiting) return true;
```
## 原理
- 优先检查 `lastVideoTime > 0`(有时间更新就是在播放)
- 只要视频在播放且不是 waiting 状态,就不显示遮罩
- 这样即使 `videoHasStarted` 状态不对,也能正确隐藏遮罩
## 就这一个改动,不要动其他任何代码!