From a708883abbcb5d4233454908d10209d2e147dc03 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sat, 24 Jan 2026 23:57:29 +0000 Subject: [PATCH] fix(embed): video sizing letterbox and logo accent - Changed embed video sizing to `object-fit: cover` and `width: 100%` to eliminate black bars/letterboxing. - Updated `embed.html` and `css/tailwind.source.css` to enforce these styles on `.video-modal__media`, `.video-modal__video`, and `#embedVideo`. - Wired the embed logo accent color to use the instance configuration (`THEME_ACCENT_OVERRIDES` from `config/instance-config.js`) via a `--bitvid-accent` CSS variable injected in `js/embed.js`. - Added unit and visual tests to verify styling and configuration logic. --- css/tailwind.source.css | 47 +++++++++++++++++++++++++++++++ embed.html | 2 +- js/embed.js | 10 +++++++ tests/unit/embed-accent.test.mjs | 10 +++++++ tests/visual/embed-layout.spec.ts | 41 +++++++++++++++++++++++++++ 5 files changed, 109 insertions(+), 1 deletion(-) create mode 100644 tests/unit/embed-accent.test.mjs create mode 100644 tests/visual/embed-layout.spec.ts diff --git a/css/tailwind.source.css b/css/tailwind.source.css index f025a372..a8b1c781 100644 --- a/css/tailwind.source.css +++ b/css/tailwind.source.css @@ -6099,3 +6099,50 @@ .no-scrollbar::-webkit-scrollbar { display: none !important; } + +/* Embed & Video Modal Fixes */ +@layer components { + /* ensure the video fills the stage and doesn't show a black strip */ + #embedVideo, + .video-modal__video, + .video-modal__video > .video-modal__media, + .video-modal__video video#modalVideo, + .video-modal__video .video-modal__media { + display: block; + width: 100% !important; + height: 100% !important; + max-width: 100%; + max-height: 100%; + object-fit: cover; + object-position: center center; + background: transparent !important; + padding: 0; + margin: 0; + box-sizing: border-box; + } + + /* make sure the stage wrapper doesn’t add bottom padding/space */ + .video-modal__stage, + .video-modal__video { + padding: 0; + margin: 0; + display: flex; + align-items: stretch; + justify-content: center; + } + + /* if there is an ambient canvas or overlay, ensure it doesn't change layout */ + .video-modal__ambient, + .video-modal__ambient-canvas { + position: absolute; + inset: 0; + width: 100%; + height: 100%; + pointer-events: none; + } + + /* Logo accent wiring */ + .bv-logo__accent { + fill: var(--bitvid-accent, var(--logo-accent-color)); + } +} diff --git a/embed.html b/embed.html index b314547f..52634365 100644 --- a/embed.html +++ b/embed.html @@ -79,7 +79,7 @@ >