pedf
/
spolky
Archived
1
0
Fork 0

carousel now stops videos on slide change

master
Lukáš Hozda 4 years ago
parent d30b262402
commit c9adb664f8

@ -17,16 +17,24 @@ var slideIndex = 1;
var slideIndex2 = 1;
var slideIndex3 = 1;
function stop_vids() {
for (var video of document.querySelectorAll("video")) {
video.pause();
}
}
// Next/previous controls
function plusSlides(n, className = "mySlides", counter = "slideIndex", dotclass = "dot") {
console.log("changing slides");
showSlides(window[counter] += n, className, counter, dotclass);
stop_vids();
}
// Thumbnail image controls
function currentSlide(n, className = "mySlides", counter = "slideIndex", dotclass = "dot") {
showSlides(window[counter] = n, className, counter, dotclass);
stop_vids()
}
function showSlides(n, className = "mySlides", counter = "slideIndex", dotclass = "dot") {