UI: Critical fix for PWA/Safari video playback - programmatic initialization and 30fps optimization

This commit is contained in:
Avery Felts 2026-01-31 19:39:39 -07:00
parent 485f7a1e32
commit 5795fd0468
3 changed files with 8 additions and 0 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

View File

@ -139,6 +139,12 @@ export function UserHeader({ user, preferences, onModalStateChange }: UserHeader
// Force play background video
useEffect(() => {
if (videoRef.current) {
// Programmatic attributes for iOS Safari / PWA compatibility
videoRef.current.muted = true;
videoRef.current.defaultMuted = true;
videoRef.current.playsInline = true;
videoRef.current.loop = true;
// If already ready, set loaded immediately
if (videoRef.current.readyState >= 3) {
setIsVideoLoaded(true);
@ -258,6 +264,8 @@ export function UserHeader({ user, preferences, onModalStateChange }: UserHeader
muted
playsInline
preload="auto"
controls={false}
onContextMenu={(e) => e.preventDefault()}
poster="/videos/smoke-poster.jpg"
onCanPlayThrough={() => setIsVideoLoaded(true)}
className={cn(