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:
@@ -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');
|
||||||
|
|||||||
In neuem Issue referenzieren
Einen Benutzer sperren