Skip to content

Commit ef928a7

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

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

dist/fast-search-card.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8127,27 +8127,27 @@ class FastSearchCard extends HTMLElement {
81278127
}
81288128
}
81298129

8130-
// Video Element Update
8130+
// Video Element Update - nur bei tatsächlichen Änderungen
81318131
const videoElement = detailPanel.querySelector('.icon-video');
81328132
if (videoElement) {
81338133
const newVideoUrl = this.getVideoUrl(item);
8134+
const currentSrc = videoElement.src || videoElement.getAttribute('src');
81348135

8135-
// NUR Video neu laden wenn URL sich geändert hat
8136-
if (newVideoUrl && videoElement.src !== newVideoUrl) {
8137-
console.log('Video URL geändert, lade neu:', newVideoUrl);
8136+
// Nur bei echter URL-Änderung updaten
8137+
if (newVideoUrl && currentSrc && !currentSrc.includes(newVideoUrl.split('/').pop())) {
8138+
console.log('Video URL wirklich geändert:', newVideoUrl);
81388139
videoElement.src = newVideoUrl;
81398140
videoElement.load();
81408141

8141-
// Event Listener nur bei neuem Video setzen
81428142
videoElement.onended = function() {
81438143
console.log('Video beendet! Pausiere jetzt...');
81448144
this.pause();
81458145
this.currentTime = this.duration - 0.1;
81468146
};
8147-
} else {
8148-
console.log('Video URL unverändert, kein Reload nötig');
81498147
}
8148+
// Wenn Video bereits läuft und korrekte URL hat - NICHTS machen
81508149
}
8150+
81518151
}
81528152

81538153
// Device-spezifische Updates (bleibt gleich)

0 commit comments

Comments
 (0)