Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
功能描述
为视频播放器添加播放进度自动保存和恢复功能,用户关闭页面后重新打开视频时,可自动从上次观看位置继续播放。
主要功能
自动保存:每 5 秒保存播放进度到 localStorage,使用视频 UUID 作为唯一标识
自动恢复:打开视频时自动检测并恢复上次播放位置(大于 5 秒且不在最后 5% 范围内)
友好提示:恢复时显示提示框,展示继续播放的时间点和上次播放时间
智能清理:播放完成或超过 365 天的进度记录自动清除