Fix: Player-UI Content unsichtbar wegen display='' statt display='block'

Die Transition-Logik in displayItem() setzte element.style.display = '',
wodurch die CSS-Klassen-Regel display:none wieder griff und alle
Content-Elemente (iframe, img, video) unsichtbar blieben.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Jesko Anschütz 2026-03-23 11:20:16 +01:00
parent fa74ceb5d8
commit d4ab1da5aa

View file

@ -381,7 +381,7 @@ const playerHTML = `<!DOCTYPE html>
if (type === 'image') {
// display setzen, dann per doppeltem rAF opacity auf 1 für Fade-In.
imgView.src = item.src;
imgView.style.display = '';
imgView.style.display = 'block';
requestAnimationFrame(function() {
requestAnimationFrame(function() { imgView.style.opacity = '1'; });
});
@ -389,7 +389,7 @@ const playerHTML = `<!DOCTYPE html>
} else if (type === 'video') {
videoView.src = item.src;
videoView.style.display = '';
videoView.style.display = 'block';
requestAnimationFrame(function() {
requestAnimationFrame(function() { videoView.style.opacity = '1'; });
});
@ -411,7 +411,7 @@ const playerHTML = `<!DOCTYPE html>
} else {
// type === 'web' oder unbekannt → iframe
frame.src = item.src;
frame.style.display = '';
frame.style.display = 'block';
requestAnimationFrame(function() {
requestAnimationFrame(function() { frame.style.opacity = '1'; });
});