修复:内测问题修改
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user