Skip to content

Commit f27198c

Browse files
authored
Update fast-search-card.js
1 parent 11e1303 commit f27198c

File tree

1 file changed

+12
-17
lines changed

1 file changed

+12
-17
lines changed

dist/fast-search-card.js

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)