fix: Video-Wiedergabe bei Rückkehr zu Slide 0 sicherstellen

Browser pausiert Videos bei opacity:0, autoplay greift nicht erneut.
Explizit play() bei Slide 0, pause() bei anderen Slides.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Dieser Commit ist enthalten in:
Claude Code
2026-04-12 16:12:55 +02:00
Ursprung d6191584d3
Commit 80ce22b692

Datei anzeigen

@@ -64,7 +64,14 @@
if (heroDots[oldIndex]) heroDots[oldIndex].classList.remove('active'); if (heroDots[oldIndex]) heroDots[oldIndex].classList.remove('active');
var vc = document.getElementById('hero-video-container'); var vc = document.getElementById('hero-video-container');
if (vc) vc.classList.toggle('hidden', index !== 0); if (vc) {
vc.classList.toggle('hidden', index !== 0);
var vid = vc.querySelector('video');
if (vid) {
if (index === 0) vid.play();
else vid.pause();
}
}
setTimeout(function () { setTimeout(function () {
heroSlides[oldIndex].classList.remove('exiting'); heroSlides[oldIndex].classList.remove('exiting');