Translate the annotation from Chinese to English

This commit is contained in:
Lunatic 2026-02-28 09:46:12 +08:00
parent a046c1a5f2
commit 978128bf99

View file

@ -312,7 +312,7 @@ export default {
this.checkChapterEnd()
}
// intro/outro
// check for intro/outro and skip if needed
this.checkAndSkipIntroOutro(time)
},
setDuration(duration) {
@ -551,7 +551,7 @@ export default {
}
},
//
// get skip settings
getSkipSettings() {
return {
skipIntro: this.$store.getters['user/getUserSetting']('skipIntro'),
@ -561,7 +561,7 @@ export default {
}
},
// intro/outro
// check and skip intro/outro
checkAndSkipIntroOutro(currentTime) {
const skipSettings = this.getSkipSettings()
if (!skipSettings) return
@ -571,10 +571,10 @@ export default {
if (!doSkipIntro && !doSkipOutro) return
if (!this.isPlaying || !this.chapters.length) return
// seek2
// The skip function is not triggered within 2 seconds after the user manually seeks
if (this._manualSeekTime && Date.now() - this._manualSeekTime < 2000) return
//
// Reentry guard: When skipping, wait until reaching the target position before cancelling
if (this._isSkipping) {
if (this._skipTarget != null && currentTime >= this._skipTarget - 0.5) {
this._isSkipping = false
@ -592,10 +592,10 @@ export default {
const introEndTime = Math.min(chapter.start + introDuration, chapter.end)
const outroStartTime = Math.max(chapter.end - outroDuration, chapter.start)
// introoutro
// Short chapter: If the intro and outro intervals overlap, do not skip
if (doSkipIntro && doSkipOutro && introEndTime > outroStartTime) return
// intro
// Check whether it is within the intro interval
if (doSkipIntro && currentTime < introEndTime) {
const target = introEndTime + 0.5
this._isSkipping = true
@ -604,18 +604,18 @@ export default {
return
}
// outro
// check whether it is within the outro interval
if (doSkipOutro && currentTime >= outroStartTime) {
const chapterIndex = this.chapters.indexOf(chapter)
const nextChapter = this.chapters[chapterIndex + 1]
if (nextChapter) {
// skipIntrointro
// has next chapter: skip to next chapter start (if skipIntro is on, skip intro)
let target = nextChapter.start
if (doSkipIntro) {
const nextIntroEnd = Math.min(nextChapter.start + introDuration, nextChapter.end)
const nextOutroStart = Math.max(nextChapter.end - outroDuration, nextChapter.start)
// intro/outro
// ensure that the next chapter intro/outro does not overlap
if (nextIntroEnd <= nextOutroStart) {
target = nextIntroEnd + 0.5
}
@ -624,7 +624,7 @@ export default {
this._skipTarget = target
this.seek(target)
} else {
//
// last chapter: skip to end
this._isSkipping = true
this._skipTarget = chapter.end
this.seek(chapter.end)