Skip to content

Commit 78b8e6d

Browse files
authored
Update fast-search-card.js
1 parent 2d30b26 commit 78b8e6d

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

dist/fast-search-card.js

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8149,8 +8149,21 @@ class FastSearchCard extends HTMLElement {
81498149
const newVideoUrl = this.getVideoUrl(item);
81508150
const currentSrc = videoElement.src || videoElement.getAttribute('src');
81518151

8152-
// Nur bei echter URL-Änderung updaten
8153-
if (newVideoUrl && currentSrc && !currentSrc.includes(newVideoUrl.split('/').pop())) {
8152+
// Verbesserte Änderungs-Erkennung:
8153+
// Vergleiche sowohl URL als auch aktuellen State
8154+
const currentVideoFile = currentSrc ? currentSrc.split('/').pop() : '';
8155+
const newVideoFile = newVideoUrl ? newVideoUrl.split('/').pop() : '';
8156+
8157+
console.log('🎬 Video Check:', {
8158+
current: currentVideoFile,
8159+
new: newVideoFile,
8160+
shouldUpdate: currentVideoFile !== newVideoFile
8161+
});
8162+
8163+
// Update wenn Dateiname sich ändert (climate-on.mp4 ↔ climate-off.mp4)
8164+
if (newVideoUrl && currentVideoFile !== newVideoFile) {
8165+
console.log('🔄 Video State geändert, lade neues Video:', newVideoFile);
8166+
81548167
videoElement.src = newVideoUrl;
81558168
videoElement.load();
81568169

0 commit comments

Comments
 (0)