Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix(lightbox): add playsInline + fail-safe close for mobile fullscreen (#446)

[._.]/ Adam Eivy72b868c6fc40
diff --git a/client/src/components/media/MediaLightbox.jsx b/client/src/components/media/MediaLightbox.jsx
index dc11c2b234..0747381df4 100644
--- a/client/src/components/media/MediaLightbox.jsx
+++ b/client/src/components/media/MediaLightbox.jsx
@@ -225,15 +225,29 @@ export default function MediaLightbox({
onTouchEnd={onTouchEnd}
>
{isVideo ? (
- <video src={item.downloadUrl} controls autoPlay loop className={imgMax} />
+ /* playsInline keeps iOS Safari from auto-promoting autoplay video
+ to a native fullscreen player — exiting that leaves the modal
+ laid out as a tiny strip with no reachable close button. */
+ <video src={item.downloadUrl} controls autoPlay loop playsInline className={imgMax} />
) : (
<img src={item.previewUrl} alt={item.prompt} className={`${imgMax} object-contain`} />
)}
+ {/* Fail-safe close — the SettingsPane's X is hidden in fullscreen
+ and unreachable if iOS Safari mis-lays out the page. */}
+ <button
+ type="button"
+ onClick={(e) => { e.stopPropagation(); onClose(); }}
+ className="absolute top-2 left-2 z-30 p-2 rounded-full bg-white text-black hover:bg-white/85 shadow-lg focus:outline-none focus:ring-2 focus:ring-port-accent"
+ aria-label="Close"
+ title="Close (Esc)"
+ >
+ <X className="w-4 h-4" />
+ </button>
{/* Solid white pill keeps it readable against black letterbox bars. */}
<button
type="button"
onClick={(e) => { e.stopPropagation(); setFullScreen((v) => !v); }}
- className="absolute top-2 right-2 z-30 p-2 rounded-full bg-white text-black hover:bg-white/85 shadow-lg"
+ className="absolute top-2 right-2 z-30 p-2 rounded-full bg-white text-black hover:bg-white/85 shadow-lg focus:outline-none focus:ring-2 focus:ring-port-accent"
aria-label={fullScreen ? 'Exit full screen' : 'Full screen'}
title={fullScreen ? 'Exit full screen (Esc, F)' : 'Full screen (F)'}
>
diff --git a/client/src/pages/VideoGen.jsx b/client/src/pages/VideoGen.jsx
index 6dafaa728a..d630cf4938 100644
--- a/client/src/pages/VideoGen.jsx
+++ b/client/src/pages/VideoGen.jsx
@@ -1251,7 +1251,7 @@ export default function VideoGen() {
</div>
<div className="aspect-video max-w-[420px] mx-auto bg-port-bg border border-port-border rounded-lg overflow-hidden flex items-center justify-center relative">
{result ? (
- <video src={result.path || `/data/videos/${result.filename}`} controls autoPlay loop preload="metadata" className="w-full h-full" />
+ <video src={result.path || `/data/videos/${result.filename}`} controls autoPlay loop playsInline preload="metadata" className="w-full h-full" />
) : generating ? (
<div className="text-gray-500 text-xs flex flex-col items-center gap-1.5">
<BrailleSpinner />