docs: 添加视频自动切换的注意事项
- 添加常见问题排查指南 - 更新测试清单 - 补充错误处理说明 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9511cc3de9
commit
2633bd6cd7
1 file changed
+18
@@ -356,6 +356,24 @@ adb shell tail -f /sdcard/Android/data/cn.hugh.bz.gk2/files/wallpaper_log.txt
|
|||||||
- 检查 `isPlayingVideo` 和 `isPrepared` 状态标志
|
- 检查 `isPlayingVideo` 和 `isPrepared` 状态标志
|
||||||
- 使用 `adb logcat -s VideoPlayer AutoWallpaperService` 实时监控
|
- 使用 `adb logcat -s VideoPlayer AutoWallpaperService` 实时监控
|
||||||
|
|
||||||
|
### 6. 视频播放完成后不切换
|
||||||
|
|
||||||
|
**检查清单**:
|
||||||
|
- 确认 `VideoPlayer.setLooping()` 设置为 `false`
|
||||||
|
- 检查 `onCompletion()` 回调是否正确实现
|
||||||
|
- 查看日志确认 "Video completed" 消息
|
||||||
|
- 确认 Surface 在视频播放完成时仍然可见
|
||||||
|
|
||||||
|
**可能原因**:
|
||||||
|
- MediaPlayer 状态异常
|
||||||
|
- Surface 已销毁
|
||||||
|
- 回调未正确设置
|
||||||
|
|
||||||
|
**解决方法**:
|
||||||
|
- 检查 `VideoPlayer` 日志
|
||||||
|
- 确保 `setOnCompletionListener` 已设置
|
||||||
|
- 验证 `isLoadingWallpaper` 标志正确重置
|
||||||
|
|
||||||
## 代码修改指南
|
## 代码修改指南
|
||||||
|
|
||||||
### 添加新的壁纸更换触发条件
|
### 添加新的壁纸更换触发条件
|
||||||
|
|||||||
Reference in new issue
Block a user