UI: Defeat iOS play HUD with Hybrid Poster and nuclear CSS suppression
This commit is contained in:
parent
5f87c79b58
commit
3c3f803a1c
Binary file not shown.
|
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 3.2 KiB |
Binary file not shown.
@ -249,16 +249,29 @@ export function UserHeader({ user, preferences, onModalStateChange }: UserHeader
|
|||||||
<div className="absolute inset-0 z-[-1] pointer-events-none overflow-hidden">
|
<div className="absolute inset-0 z-[-1] pointer-events-none overflow-hidden">
|
||||||
<style dangerouslySetInnerHTML={{
|
<style dangerouslySetInnerHTML={{
|
||||||
__html: `
|
__html: `
|
||||||
/* Hide all native iOS media controls */
|
/* Absolute nuclear suppression of all native iOS media HUDs */
|
||||||
video::-webkit-media-controls {
|
video::-webkit-media-controls {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
-webkit-appearance: none;
|
opacity: 0 !important;
|
||||||
|
-webkit-appearance: none !important;
|
||||||
}
|
}
|
||||||
video::-webkit-media-controls-start-playback-button {
|
video::-webkit-media-controls-start-playback-button {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
-webkit-appearance: none;
|
opacity: 0 !important;
|
||||||
|
-webkit-appearance: none !important;
|
||||||
}
|
}
|
||||||
video::-webkit-media-controls-panel {
|
video::-webkit-media-controls-panel {
|
||||||
|
display: none !important;
|
||||||
|
opacity: 0 !important;
|
||||||
|
-webkit-appearance: none !important;
|
||||||
|
}
|
||||||
|
video::-webkit-media-controls-play-button {
|
||||||
|
display: none !important;
|
||||||
|
opacity: 0 !important;
|
||||||
|
-webkit-appearance: none !important;
|
||||||
|
}
|
||||||
|
/* Extra safety for PWA/Safari specifics */
|
||||||
|
*::-webkit-media-controls-start-playback-button {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
-webkit-appearance: none;
|
-webkit-appearance: none;
|
||||||
}
|
}
|
||||||
@ -274,29 +287,40 @@ export function UserHeader({ user, preferences, onModalStateChange }: UserHeader
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{/* Smoke Video background */}
|
{/* Static Poster Image Layer (Safe Fallback) */}
|
||||||
|
<img
|
||||||
|
src="/videos/smoke-poster.jpg"
|
||||||
|
alt=""
|
||||||
|
className={cn(
|
||||||
|
"absolute inset-0 w-full h-full object-cover scale-110 transition-opacity duration-1000",
|
||||||
|
isVideoPlaying ? "opacity-30" : "opacity-70 dark:opacity-50"
|
||||||
|
)}
|
||||||
|
aria-hidden="true"
|
||||||
|
/>
|
||||||
|
|
||||||
|
{/* Smoke Video background - Only visible when MOVING */}
|
||||||
<video
|
<video
|
||||||
ref={videoRef}
|
ref={videoRef}
|
||||||
autoPlay
|
autoPlay
|
||||||
loop
|
loop
|
||||||
muted
|
muted
|
||||||
playsInline
|
playsInline
|
||||||
{...({ "webkit-playsinline": "true" } as any)}
|
{...({
|
||||||
|
"webkit-playsinline": "true",
|
||||||
|
"x-webkit-airplay": "deny",
|
||||||
|
"disableRemotePlayback": true
|
||||||
|
} as any)}
|
||||||
preload="auto"
|
preload="auto"
|
||||||
controls={false}
|
controls={false}
|
||||||
disablePictureInPicture
|
disablePictureInPicture
|
||||||
{...({ "disableRemotePlayback": true } as any)}
|
|
||||||
onContextMenu={(e) => e.preventDefault()}
|
onContextMenu={(e) => e.preventDefault()}
|
||||||
poster="/videos/smoke-poster.jpg"
|
|
||||||
onLoadedData={() => setIsVideoLoaded(true)}
|
onLoadedData={() => setIsVideoLoaded(true)}
|
||||||
onPlay={() => setIsVideoPlaying(true)}
|
onPlay={() => setIsVideoPlaying(true)}
|
||||||
className={cn(
|
className={cn(
|
||||||
"absolute inset-0 w-full h-full object-cover scale-110 transition-opacity duration-[1500ms] ease-in-out",
|
"absolute inset-0 w-full h-full object-cover scale-110 transition-opacity duration-[1500ms] ease-in-out",
|
||||||
isVideoPlaying
|
isVideoPlaying
|
||||||
? "opacity-70 dark:opacity-50"
|
? "opacity-70 dark:opacity-50"
|
||||||
: isVideoLoaded
|
: "opacity-0"
|
||||||
? "opacity-30"
|
|
||||||
: "opacity-10"
|
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<source src="/videos/smoke.mp4" type="video/mp4" />
|
<source src="/videos/smoke.mp4" type="video/mp4" />
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user