mirror of
https://github.com/KuekHaoYang/KVideo.git
synced 2026-08-12 23:33:43 +08:00
fix(useVideoPlayer): 统一 buffered 状态与 refresh 逻辑
- 更新 CustomVideoPlayer 的 key 以包含 source - 确保播放器组件在源切换时正确重新挂载
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user