fix(useVideoPlayer): 统一 buffered 状态与 refresh 逻辑

- 更新 CustomVideoPlayer 的 key 以包含 source
- 确保播放器组件在源切换时正确重新挂载
This commit is contained in:
Troray
2026-01-24 02:47:58 +08:00
parent 1b09998cdf
commit fdb5f31154
+1 -1
View File
@@ -195,7 +195,7 @@ export function VideoPlayer({
/>
) : (
<CustomVideoPlayer
key={`${useProxy ? 'proxy' : 'direct'}-${retryCount}`} // Only remount when switching modes or retrying, NOT when changing episodes
key={`${useProxy ? 'proxy' : 'direct'}-${retryCount}-${source}`} // Remount when switching sources, modes, or retrying
src={finalPlayUrl}
onError={handleVideoError}
onTimeUpdate={handleTimeUpdate}