修复:内测问题修改

This commit is contained in:
2025-12-03 14:10:27 +08:00
parent 35e27753b8
commit 677fe7436e
19 changed files with 172 additions and 163 deletions

View File

@@ -25,7 +25,9 @@ export function useVideoProgress() {
const localPosition = videoStorage.getVideoPosition(videoInfo.id) || 0
// 返回较大的值
let position = Math.max(serverPosition, localPosition)
// let position = Math.max(serverPosition, localPosition)
// 采用服务器记录的播放位置
let position = serverPosition
// 如果播放位置接近视频结尾最后5秒内则从头开始
const videoDuration = videoInfo.duration || 0
@@ -99,12 +101,12 @@ export function useVideoProgress() {
*/
const saveNow = async (videoInfo: IVideoInfo) => {
if (currentTime.value > 0) {
// 保存到本地
videoStorage.saveVideoPosition(
videoInfo.id,
Math.floor(currentTime.value),
videoInfo
)
// 保存到本地 注释掉: 不再保存到本地
// videoStorage.saveVideoPosition(
// videoInfo.id,
// Math.floor(currentTime.value),
// videoInfo
// )
// 保存到服务器
await saveToServer(videoInfo.id, Math.floor(currentTime.value))