@@ -8130,28 +8130,23 @@ class FastSearchCard extends HTMLElement {
81308130 // Video Element Update
81318131 const videoElement = detailPanel.querySelector('.icon-video');
81328132 if (videoElement) {
8133- console.log('Video Element gefunden:', videoElement);
8134- console.log('Video loop Eigenschaft:', videoElement.loop);
8135- console.log('Video src:', videoElement.src);
8136-
81378133 const newVideoUrl = this.getVideoUrl(item);
8134+
8135+ // NUR Video neu laden wenn URL sich geändert hat
81388136 if (newVideoUrl && videoElement.src !== newVideoUrl) {
8137+ console.log('Video URL geändert, lade neu:', newVideoUrl);
81398138 videoElement.src = newVideoUrl;
81408139 videoElement.load();
8140+
8141+ // Event Listener nur bei neuem Video setzen
8142+ videoElement.onended = function() {
8143+ console.log('Video beendet! Pausiere jetzt...');
8144+ this.pause();
8145+ this.currentTime = this.duration - 0.1;
8146+ };
8147+ } else {
8148+ console.log('Video URL unverändert, kein Reload nötig');
81418149 }
8142-
8143- // Loop explizit deaktivieren
8144- videoElement.loop = false;
8145- videoElement.removeAttribute('loop');
8146-
8147- // Event Listener hinzufügen
8148- videoElement.onended = function() {
8149- console.log('Video beendet! Pausiere jetzt...');
8150- this.pause();
8151- this.currentTime = this.duration - 0.1;
8152- };
8153-
8154- console.log('Nach Setup - Video loop:', videoElement.loop);
81558150 }
81568151 }
81578152
0 commit comments