Add initial chapter name rendering

This commit is contained in:
Ajay Ramachandran
2021-10-12 23:33:41 -04:00
parent a2b054844a
commit e20b60979c
3 changed files with 56 additions and 2 deletions

View File

@@ -419,9 +419,12 @@ function startSponsorSchedule(includeIntersectingSegments = false, currentTime?:
return;
}
if (!video || video.paused) return;
if (!video) return;
if (currentTime === undefined || currentTime === null) currentTime = video.currentTime;
previewBar.updateChapterText(sponsorTimes, currentTime);
if (video.paused) return;
if (videoMuted && !inMuteSegment(currentTime)) {
video.muted = false;
videoMuted = false;
@@ -601,6 +604,8 @@ function setupVideoListeners() {
lastCheckVideoTime = video.currentTime;
startSponsorSchedule();
} else {
previewBar.updateChapterText(sponsorTimes, video.currentTime);
}
if (!Config.config.dontShowNotice) {