Compare commits

..

2 commits

Author SHA1 Message Date
fc5bbabd9d
fix dead links in introduction 2025-06-18 23:29:29 -07:00
1bbf453ae7
fix the video showcase
Please be fixed this time
2025-06-18 23:29:18 -07:00

View file

@ -68,11 +68,11 @@ const videos = [
window.addEventListener("load", autoplayInit, false);
const videos = document.getElementsByClassName("marquee-item-content") as HTMLCollectionOf<HTMLVideoElement>;
let currentVideoIndex = 0;
let currentVideo: HTMLVideoElement | null = null;
let currentVideo = null;
function autoplayInit() {
setActiveVideo(0);
currentVideo!.play();
currentVideo.play();
}
function setActiveVideo(index: number) {
@ -115,9 +115,7 @@ const videos = [
video.addEventListener("ended", () => {
console.log("video ended", "duration", video.duration, "ctime", video.currentTime);
// The "ended" event might just mean its buffering.
if (video == currentVideo && video.duration !== 0 && video.currentTime === video.duration) {
offsetCarousel(1);
}
if (video == currentVideo && video.duration !== 0 && video.currentTime === video.duration) nextVideo();
});
}