Compare commits
2 commits
fd9cd4f3fd
...
9c9b2b000e
Author | SHA1 | Date | |
---|---|---|---|
9c9b2b000e | |||
f068111110 |
1 changed files with 2 additions and 0 deletions
|
@ -76,6 +76,7 @@ const videos = [
|
|||
}
|
||||
|
||||
function setActiveVideo(index: number) {
|
||||
console.log("setActive", index);
|
||||
currentVideo?.pause();
|
||||
|
||||
currentVideoIndex = index;
|
||||
|
@ -112,6 +113,7 @@ const videos = [
|
|||
observer.observe(video);
|
||||
|
||||
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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue