Commit fa4f6f11 by lijiabin

【需求 20520】 ux: 非正式环境可直接跳过cg

parent 8c944c35
...@@ -194,6 +194,7 @@ const formattedDuration = computed(() => formatTime(videoDuration.value)) ...@@ -194,6 +194,7 @@ const formattedDuration = computed(() => formatTime(videoDuration.value))
let progressTimer: ReturnType<typeof setInterval> | null = null let progressTimer: ReturnType<typeof setInterval> | null = null
const SKIP_TIME = import.meta.env.MODE === 'production' ? 60 : 0
const startTimers = () => { const startTimers = () => {
progressTimer = setInterval(() => { progressTimer = setInterval(() => {
if (videoRef.value) { if (videoRef.value) {
...@@ -202,7 +203,7 @@ const startTimers = () => { ...@@ -202,7 +203,7 @@ const startTimers = () => {
videoDuration.value = duration videoDuration.value = duration
if (duration && Number.isFinite(duration)) { if (duration && Number.isFinite(duration)) {
videoProgress.value = (currentTime / duration) * 100 videoProgress.value = (currentTime / duration) * 100
if (!canSkip.value && currentTime >= 60) canSkip.value = true if (!canSkip.value && currentTime >= SKIP_TIME) canSkip.value = true
} }
} }
}, 200) }, 200)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment