Refine fullscreen control overlay

This commit is contained in:
Jonathan Sykes
2026-10-06 02:32:43 +08:00
parent 1cad18826b
commit a81f4ffa51
2 changed files with 59 additions and 16 deletions

View File

@@ -1,17 +1,36 @@
/* Shared fullscreen surface; inline player styling is unchanged. */
.orientation-fullscreen .fullscreen-hud[hidden] { display: none; }
.orientation-fullscreen .fullscreen-hud {
position: absolute; z-index: 20; bottom: max(12px, env(safe-area-inset-bottom));
left: max(12px, env(safe-area-inset-left)); right: max(12px, env(safe-area-inset-right));
display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 12px;
background: rgb(0 0 0 / .8); color: white;
--hud-glass: color-mix(in srgb, var(--bg-1, #111) 74%, transparent);
--hud-ink: var(--text, #fff);
--hud-line: color-mix(in srgb, var(--line, #fff) 32%, transparent);
position: absolute; z-index: 20;
right: max(12px, env(safe-area-inset-right));
bottom: max(12px, env(safe-area-inset-bottom));
left: max(12px, env(safe-area-inset-left));
display: flex; align-items: center; gap: 6px;
padding: 5px; border: 1px solid var(--hud-line); border-radius: 999px;
background: var(--hud-glass); color: var(--hud-ink);
-webkit-backdrop-filter: saturate(150%) blur(18px);
backdrop-filter: saturate(150%) blur(18px);
box-shadow: 0 8px 28px rgb(0 0 0 / .2);
opacity: 1; transition: opacity .22s ease;
}
.orientation-fullscreen .fullscreen-hud.hud-hidden { opacity: 0; pointer-events: none; }
.fullscreen-hud button {
min-height: 44px; padding: 8px 12px; border: 1px solid rgb(255 255 255 / .25);
border-radius: 8px; background: rgb(255 255 255 / .12); color: white; font: inherit;
display: grid; place-items: center; flex: none;
width: 48px; min-width: 48px; height: 48px; min-height: 48px; padding: 0;
border: 1px solid transparent; border-radius: 50%;
background: color-mix(in srgb, var(--hud-ink, #fff) 10%, transparent);
color: var(--hud-ink, #fff); font: inherit; cursor: pointer;
-webkit-tap-highlight-color: transparent;
}
.fullscreen-hud button:focus-visible { outline: 2px solid white; outline-offset: 2px; }
.fullscreen-hud input { min-width: 40px; flex: 1; height: 44px; }
.fullscreen-hud button:hover { background: color-mix(in srgb, var(--hud-ink, #fff) 18%, transparent); }
.fullscreen-hud button:active { transform: scale(.94); }
.fullscreen-hud button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.fullscreen-hud button .fill { fill: currentColor; stroke: none; }
.fullscreen-hud button:focus-visible { outline: 2px solid var(--accent, #fff); outline-offset: 2px; }
.fullscreen-hud input { min-width: 40px; min-height: 44px; height: 44px; flex: 1; margin: 0 4px; accent-color: var(--accent, #fff); touch-action: none; }
.player-stage.orientation-fullscreen { background: #000; }
.player-stage.orientation-overlay {
position: fixed !important; z-index: 10000 !important; inset: 0 !important;
@@ -39,7 +58,10 @@
.orientation-overlay[data-fullscreen-rotation="-90"] .fullscreen-hud {
bottom: max(12px, env(safe-area-inset-right)); left: max(12px, env(safe-area-inset-bottom)); right: max(12px, env(safe-area-inset-top));
}
@media(max-width: 460px) { .fullscreen-hud { flex-wrap: wrap; } .fullscreen-hud input { flex-basis: 100%; order: -1; } .fullscreen-hud button { flex: 1; padding-inline: 6px; font-size: 12px; } }
@media (max-width: 460px) {
.orientation-fullscreen .fullscreen-hud { gap: 2px; padding: 3px; }
.fullscreen-hud button { width: 44px; min-width: 44px; height: 44px; min-height: 44px; }
}
/* Raise existing ancestry instead of moving a playing video in WebKit. */
body.landscape-fs .orientation-ancestor { z-index: 10001 !important; transform: none !important; filter: none !important; overflow: visible !important; }
body.landscape-fs { overflow: hidden; }