diff --git a/drafts/2026-08-09_20h35_44.png b/drafts/2026-08-09_20h35_44.png deleted file mode 100644 index c1200f7..0000000 Binary files a/drafts/2026-08-09_20h35_44.png and /dev/null differ diff --git a/drafts/2026-08-09_20h37_12.png b/drafts/2026-08-09_20h37_12.png deleted file mode 100644 index 1cbe802..0000000 Binary files a/drafts/2026-08-09_20h37_12.png and /dev/null differ diff --git a/drafts/Karate match scoreboard overlay.zip b/drafts/Karate match scoreboard overlay.zip deleted file mode 100644 index 3932db2..0000000 Binary files a/drafts/Karate match scoreboard overlay.zip and /dev/null differ diff --git a/drafts/VS Screen Arena - Standalone.html b/drafts/VS Screen Arena - Standalone.html new file mode 100644 index 0000000..cd08eed --- /dev/null +++ b/drafts/VS Screen Arena - Standalone.html @@ -0,0 +1,391 @@ + + + + + Bundled Page + + + + +
+ + + + VS + +
+
Unpacking...
+ + + + + + + + + + + + \ No newline at end of file diff --git a/drafts/unpacked/design_handoff_scoreboard_overlay/Match Points Overlay.dc.html b/drafts/unpacked/design_handoff_scoreboard_overlay/Match Points Overlay.dc.html deleted file mode 100644 index 4b84efd..0000000 --- a/drafts/unpacked/design_handoff_scoreboard_overlay/Match Points Overlay.dc.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - - - - - - - - - -
- -
-
-
-
-
-
-
- -
-
Takeone Karate Series
-
- LadiesClassificationRound 1 -
-
- -
- -
-
-
FIGHTER PHOTO
-
CLUB
LOGO
-
-
-
Fawzia Ahmed
-
- FLAG - Bahrain -
-
Manama Karate Club
-
-
- -
- VS - −61 kg - Ladies · 3 min -
- -
-
-
FIGHTER PHOTO
-
CLUB
LOGO
-
-
-
Noor Salman
-
- Bahrain - FLAG -
-
Riffa Martial Arts
-
-
-
- -
- Bout 12Tatami 1Aug 08, 2026 · Manama -
-
- -
- -
- - - -
- -
-
-
-
{{ disciplineLabel }}
-
Ladies Classification · −61 kg · Round 1
-
-
- - -
-
- Live scoring -
- -
- {{ ev.time }} - {{ ev.name }} - {{ ev.pts }} -
-
-
- - -
- -
-
-
CLUB
LOGO
-
-
- FLAG - Fawzia A. -
-
- Manama Karate Club - SENSHU -
-
-
{{ redCorner }}{{ akaScore }}
-
-
- -
-
{{ roundLabel }}
-
{{ clock }}
-
- - - -
-
- -
-
-
{{ blueCorner }}{{ aoScore }}
-
-
- Noor S. - FLAG -
-
- {{ penaltyLabel }} - Riffa Martial Arts -
-
-
CLUB
LOGO
-
-
-
- - -
- -
-
-
-
- -
-
-
-
-
-
Takeone Karate Series
-
Ladies · Classification · Round 1
-
-
-
-
-
FIGHTER PHOTO
-
CLUB
LOGO
-
-
-
Fawzia Ahmed
-
- FLAG - Bahrain · Manama Karate Club -
-
-
-
- VS - −61 kg -
-
-
-
FIGHTER PHOTO
-
CLUB
LOGO
-
-
-
Noor Salman
-
- Bahrain · Riffa Martial Arts - FLAG -
-
-
-
-
- -
-
-
-
-
-
- - - 0:57 / 4:11 - - - - - - - - - -
-
- -
-
Scoreboard
- - - -
-
- -
- Overlay is a function of playback time · points come from the Points panel - {{ statusLine }} -
-
-
- - - diff --git a/drafts/unpacked/design_handoff_scoreboard_overlay/PROMPT.md b/drafts/unpacked/design_handoff_scoreboard_overlay/PROMPT.md deleted file mode 100644 index a9a6fcf..0000000 --- a/drafts/unpacked/design_handoff_scoreboard_overlay/PROMPT.md +++ /dev/null @@ -1,102 +0,0 @@ -# TASK: Add a match scoreboard overlay + VS intro to the video player on video.takeone.bh - -Implement this end to end in this codebase, in the existing player and video page. Follow the codebase's own framework, component and styling patterns. Do not ship the reference HTML as-is — recreate it. - -Reference prototype (design intent, exact colors/geometry): `Match Points Overlay.dc.html` in this folder. Open it in a browser: it shows the standalone VS card, then the player frame with the VS intro, score bar, live scoring feed, point timeline, control bar and gear menu. - ---- - -## 1. What exists today (do not rebuild) - -- **Points panel** on the video page: rounds (number, optional name, optional start time) and point events shaped `@mm:ss · Point (N pt) · Blue | Red | Both`, with a running score printed `Score `. -- **Coach review** panel: time-ranged notes with author, plus reaction icons. -- **Player**: progress bar, play/pause, volume, time `0:57 / 4:11`, gear (settings) menu, loop, mini player (PiP), theater, fullscreen; playback-speed menu and ¼× ½× ¾× slow motion; a "Highlights" badge top-right. - -## 2. What to add to the data model - -A **Match metadata** form for sports videos, next to "Add Round": - -- Event/series name, division/category, weight class, bout number, tatami/ring, date, venue. -- Per corner (red, blue): athlete name, country name + ISO code, flag image, club name, club logo, optional headshot (3:4). - -Rules: -- Every field is optional. **An empty field hides its element.** Never render placeholder strings ("NOT SET", "—", empty boxes). -- No athlete name → show the corner label ("RED" / "BLUE") in the name slot. -- No flag image → hide the flag chip. No club logo → hide the logo slot. No headshot → hide the photo frame and center the text block. -- Corners in data stay **red** and **blue**. Display labels are a per-video option: Red/Blue (default), Aka/Ao (karate), Hong/Chung (taekwondo). -- A `Both` point event increments both corners and emits two feed rows. - -## 3. Overlay: driven by playback time - -The overlay is a pure function of `video.currentTime`. No timers, no countdown. Slow motion and playback speed must not affect it; scrubbing backwards must remove points again. - -- **Scores** = sum of point values for events with `at <= currentTime`, per corner. -- **Round label** = the round whose start time is the latest `<= currentTime`. -- **Clock** = `currentTime` as `m:ss` (offset from round start when round start times exist). -- **Live scoring feed** = last 4 events with `at <= currentTime`, newest on top, each animating in (translateY 10px → 0, opacity 0 → 1, .45s ease) as playback crosses it. -- **Point timeline** = one segment per event across the full duration, red or blue, positioned by timestamp; empty segments `#2a2724`. - -## 4. Layout spec (design width 1150px, frame 16:9) - -Overlay layer: `position:absolute; inset:0; pointer-events:none;` inside the player container. Only the gear menu is interactive. Scrims: bottom `rgba(6,6,8,.9) → .45 @15% → 0 @30%`, top `rgba(6,6,8,.85) → .4 @14% → 0 @30%`. No texture/grain layer over the footage. - -**Match info** — top-left, 22px/26px inset: 4px vertical rule `linear-gradient(#e8534a,#7c1d18)`; discipline line in `Zen Old Mincho` 15px, .34em tracking, `#efe9e0`; subtitle 13px, .28em, `#cfc9c1`, with `text-shadow: 0 1px 6px rgba(0,0,0,.9)`. - -**Live scoring feed** — top-right, 20px/24px inset, 262px wide. Header: 7px red dot pulsing (opacity 1→.25→1, 1.6s) + "LIVE SCORING" 12px, .3em, `#d5cfc7`. Rows: `rgba(10,10,12,.62)` + `blur(6px)`, padding 7px/10px, `border-right:3px solid `; timestamp 12px `#79736c` · label 17px/700 .12em uppercase `#efe9e0` · points in `Zen Old Mincho` 19px in the corner color. - -**Score bar** — 84px tall, inset 26px left/right, `bottom: 56px` (clears the 48px control band), z-index below controls. Three panels, no gaps: - -- Red panel: `flex:1 1 0; min-width:0; overflow:hidden; transform:skewX(-9deg)`, background `linear-gradient(90deg, rgba(122,26,22,.94), rgba(180,52,44,.9))`, `border-bottom:3px solid #ff6a5e`. - Inside, ONE inner row un-skews: `transform:skewX(9deg); height:100%; padding:0 16px; display:flex; align-items:center; gap:12px`. Never counter-skew individual children — that is what made scores collide with names in the first attempt. - Children: club logo 46×46 (`rgba(0,0,0,.32)`, 1px white 24% border) → text column (`flex:1 1 auto; min-width:0`) → score box (`width:60px; flex:none`, column, right-aligned). - Text column row 1: flag chip 26×17 + athlete name (25px/800 uppercase, `flex:1 1 auto; min-width:0`, nowrap + ellipsis). Row 2: club name (12px, .03em, uppercase, ellipsis) + penalty chip. - Score box: corner label 11px .24em above the numeral; numeral `Zen Old Mincho` 46px/700 white, `text-shadow:0 6px 20px rgba(0,0,0,.5)`. -- Center: `width:118px; flex:none`, `rgba(9,9,11,.9)` + `blur(8px)`, `border-bottom:3px solid #2c2a28`; round label 11px .3em `#8f8a83`, clock 34px/800 `#efe9e0` tabular-nums, three 20×3px pips (`#e8534a` done, `#3a3734` pending). -- Blue panel: exact mirror — score box, text column right-aligned, club logo. Gradient `rgba(30,72,140,.9) → rgba(18,44,92,.94)`, `border-bottom:3px solid #6aa6ff`. - -Both panels must be true mirrors: logo → flag+name → club+penalty → score, with the corner label above its own score on both sides. - -**Point timeline** — `left/right: 26px; bottom: 48px; height: 5px`, segments with 2px gaps. - -## 5. Gear-menu controls - -No floating on-screen toggle. Add a **Scoreboard** section to the existing gear menu (same pattern as quality/speed), anchored above the gear button: - -Panel `rgba(10,10,12,.94)` + `blur(10px)`, 1px white 16% border, 236px wide, header "SCOREBOARD" 11px .3em `#8f8a83`. One switch row per part: - -`Score bar · Live scoring feed · Match info · Point timeline · Club logos · Country flags · Penalties` - -Rows: 14px uppercase label, .14em tracking, hover `rgba(255,255,255,.07)`; switch = 26×14 track (`#e8534a` on, `#3a3734` off) with a 10px knob. Persist per user; the uploader's per-video settings seed the defaults. **Penalties defaults off** — the Points panel has no penalty events yet; enable when it does. Gear icon turns `#e8534a` while the menu is open. Menu closes on outside click and Esc, and never covers the score bar. - -## 6. VS intro before playback - -Part of the play experience, inside the video box at 16:9: - -- On first play of a session, render the VS card over the frame while the video is paused at frame 0. -- Hold **2s**, then fade out over 0.5s; call `video.play()` as the fade begins so motion is already running when the card clears. Scoreboard fades in after. -- Any click, tap or key press skips it immediately and starts playback. -- Replays and scrubs do not re-trigger it. If match metadata is missing, skip the intro entirely. - -**VS card content**: event name in `Zen Old Mincho` 24px .44em uppercase; division line 12px .34em with red/blue 4px square separators; per fighter a **3:4 photo frame** with a **104px circular club crest** overlapping its inner-bottom corner (`bottom:-26px`, `#0d0d10`, 1px white 28% border, `0 10px 30px rgba(0,0,0,.6)`), then a 3px corner-colored rule, name 42px/800 uppercase, flag chip 40×27 + country 14px .3em, club name 13px .18em; center column: "VS" `Zen Old Mincho` 88px, weight class in a 1px-bordered chip, format line; bottom line: bout · tatami · date · venue. - -**Background animation** (CSS only, no video): two radial glows — red `rgba(168,42,34,.62)` and blue `rgba(28,64,136,.62)`, 70% width, drifting `translate3d(±60px, ∓28px) scale(1→1.14)` over 19s and 23s ease-in-out infinite — plus a 26%-wide white 9% light sweep crossing every 11s. No center divider line. - -Also expose the VS card as a 1200×630 share image for `og-image`. - -## 7. Design tokens - -Ink `#0a0a0c` · panel `rgba(9,9,11,.9)` · bone `#efe9e0` · muted `#8f8a83` · brand red `#e8534a` · red edge `#ff6a5e` · red panel `#7a1a16 → #b4342c` · blue panel `#1e488c → #122c5c` · blue edge `#6aa6ff` · senshu `#ffdf6b` on `#3a2a00` · penalty `#c8492f`. -Type: **Barlow Condensed** 400/600/700/800 for all UI; **Zen Old Mincho** 700 for score numerals, "VS" and the discipline/event lines. -Geometry: skew `-9deg` with a single `+9deg` counter-skew row; bar 84px; frame inset 26px; gaps 12px; no border radius on overlay parts. - -## 8. Acceptance criteria - -1. Overlay never blocks the scrubber or any control (`pointer-events:none`, controls above it). -2. Score bar sits fully above the control band; nothing crosses the progress bar or the panels' bottom borders. -3. No text is clipped or overlapping at 1150px design width: every text span has `min-width:0` with ellipsis; fixed boxes are `flex:none`. -4. Red and blue panels are exact mirrors. -5. Scores, feed, round and timeline all match the Points panel at any `currentTime`, including after scrubbing backwards and at ¼×/½×/¾× speed. -6. Missing metadata hides elements — no placeholder text anywhere. -7. Overlay scales with the player (fixed 1150px layer scaled, or clamp-based sizing); minimum rendered text 12px; below ~700px player width only the score bar remains. -8. VS intro holds 2s, fades, playback starts; skippable; first play only. -9. Every one of the seven parts toggles independently from the gear menu and persists per user. diff --git a/drafts/unpacked/design_handoff_scoreboard_overlay/README.md b/drafts/unpacked/design_handoff_scoreboard_overlay/README.md deleted file mode 100644 index 5ccc03b..0000000 --- a/drafts/unpacked/design_handoff_scoreboard_overlay/README.md +++ /dev/null @@ -1,200 +0,0 @@ -# Handoff: Live Match Scoreboard Overlay (Karate / Taekwondo) - -Paste this file to Claude Code as the brief. The bundled `Match Points Overlay.dc.html` is a **design reference prototype written in HTML** — not production code. Recreate it inside the existing video platform (React/Vue/whatever the player is built in), using the codebase's own component and styling patterns. Fidelity: **high** — colors, type, sizes below are final. - -## Goal - -An overlay that sits on top of the video player and shows live match state for a karate kumite or taekwondo kyorugi bout. **Every part must be independently switchable on and off** (per-viewer preference, and per-broadcast defaults set by the uploader). - -## Structure - -The overlay is a layer inside the player container: - -``` -
position: relative -
-``` - -Nothing about the video element changes. The overlay never intercepts clicks except on its own toggle control. - -## Switchable parts - -Each is a boolean, defaulting to on, stored per user (localStorage or profile) and overridable per video: - -| key | part | position in frame | -|---|---|---| -| `identity` | discipline label + match subtitle, with a 4px red-gradient rule at its left | top-left, 22px / 26px inset | -| `ticker` | "LIVE SCORING" header + last 4 judged calls | top-right, 20px / 24px inset, 262px wide | -| `scorebar` | the main bottom bar (both corner panels + center clock) | bottom, full width minus 26px, height 84px, 18px from bottom | -| `timeline` | thin segmented point-history strip | bottom, 5px tall, 8px from bottom | -| `clubs` | club logo slot + club name inside each corner panel | inside scorebar | -| `flags` | country flag chip next to each athlete name | inside scorebar | -| `penalties` | SENSHU chip (red) and C1 / GAM-JEOM chip (blue) | inside scorebar | - -Also a master `overlay` toggle: a chip in the video box (bottom-right, `SCOREBOARD ON/OFF`, dark translucent, 1px white 18% border, red dot when on, grey when off) that hides everything at once. This chip is the only pointer-events:auto element. When the overlay is off, the chip drops from 112px above the bottom to 18px. - -Where the platform has a player settings menu (like captions), expose the same booleans there. - -## Layout spec (design width 1150px, 16:9-ish frame) - -Scrim over the video so text reads: bottom gradient `rgba(6,6,8,.9) 0% → .45 at 15% → 0 at 30%`, top gradient `rgba(6,6,8,.85) 0% → .4 at 14% → 0 at 30%`. A diagonal texture layer over the frame: `repeating-linear-gradient(115deg, rgba(255,255,255,.5) 0 1px, transparent 1px 4px)`, opacity .16, `mix-blend-mode: overlay`. - -### Bottom bar (84px tall, flex row, no gaps between panels) - -- **Red panel** — `flex:1 1 0; min-width:0; overflow:hidden; transform:skewX(-9deg)`, background `linear-gradient(90deg, rgba(122,26,22,.94), rgba(180,52,44,.9))`, `border-bottom:3px solid #ff6a5e`. - Inner row un-skews once: `transform:skewX(9deg); height:100%; padding:0 16px; display:flex; align-items:center; gap:12px`. Applying the counter-skew to the row (not to each child) is what keeps the score numeral from overlapping the name. - Children in order: club logo box (46×46, `rgba(0,0,0,.32)` fill, 1px white 24% border, monospace 8px "CLUB LOGO" placeholder) → text column (`flex:1 1 auto; min-width:0`) → score box (`width:56px; flex:none; text-align:right`). - Text column row 1: flag chip 26×17 → athlete name (25px/800, uppercase, `flex:1 1 auto; min-width:0`, nowrap + ellipsis) → corner label "AKA" (11px, .24em tracking, 66% white). - Text column row 2: club name (12px, .03em tracking, 85% white, uppercase, ellipsis) → SENSHU chip (10px/700, .18em, 1px 6px padding, `#ffdf6b` on `#3a2a00`). -- **Center clock** — `width:118px; flex:none`, `rgba(9,9,11,.9)` + `backdrop-filter: blur(8px)`, `border-bottom:3px solid #2c2a28`. Stacked: round label (11px, .3em, `#8f8a83`), clock `mm:ss` (34px/800, `#efe9e0`, tabular-nums), three 20×3px round pips (`#e8534a` for completed, `#3a3734` for pending). -- **Blue panel** — mirror of red: gradient `rgba(30,72,140,.9) → rgba(18,44,92,.94)`, `border-bottom:3px solid #6aa6ff`, order reversed (score, text column right-aligned, club logo), penalty chip `#c8492f` on white text. -- Score numerals: `'Zen Old Mincho', serif`, 46px, weight 700, white, `text-shadow: 0 6px 20px rgba(0,0,0,.5)`. - -### Ticker (top-right) - -Header row: 7px red dot pulsing (`opacity 1 → .25 → 1`, 1.6s infinite) + "LIVE SCORING" (12px, .3em, `#d5cfc7`, text-shadow for legibility). Each entry: `rgba(10,10,12,.62)` + `blur(6px)`, 7px/10px padding, `border-right: 3px solid `, animating in with `translateY(10px) → 0`, opacity 0 → 1, .45s ease. Entry content: timestamp (12px, `#79736c`) · call name (17px/700, .12em, uppercase, `#efe9e0`) · points (`Zen Old Mincho` 19px, corner color). Newest at top, keep 4. - -Karate calls: Ippon +3, Waza-ari +2, Yuko +1, Chukoku/Keikoku/Hansoku penalties. -Taekwondo calls: head kick +3, turning body +4, body kick +2, punch +1, gam-jeom (awards +1 to the opponent). - -### Timeline strip - -14 equal segments, 5px tall, 2px gaps; red / blue for scored points in chronological order, `#2a2724` for empty. Grows as the bout progresses. - -## Sport switch - -One `sport` setting flips labels without changing layout: - -| | Karate | Taekwondo | -|---|---|---| -| discipline label | KARATE KUMITE | TAEKWONDO KYORUGI | -| corners | AKA / AO | HONG / CHUNG | -| round label | KUMITE | ROUND n / 3 | -| penalty chip | C1 | GAM-JEOM n | -| point names | Ippon / Waza-ari / Yuko | head, turning, body, punch | - -## Data contract - -Drive the overlay from the existing Points panel. Suggested shape: - -```ts -type Corner = 'red' | 'blue'; -interface Athlete { name: string; countryCode: string; flagUrl?: string; clubName: string; clubLogoUrl?: string; } -interface ScoreEvent { id: string; at: string; corner: Corner; label: string; points: number; } -interface MatchState { - sport: 'karate' | 'taekwondo'; - title: string; subtitle: string; // "Finals", "Senior −75 kg · Tatami 1" - red: Athlete; blue: Athlete; - redScore: number; blueScore: number; - senshu: Corner | null; - penalties: { red: number; blue: number }; - round: number; totalRounds: number; - clockSeconds: number; running: boolean; - events: ScoreEvent[]; -} -``` - -Scores, clock and events come from the scorekeeper; the overlay is presentational. The clock counts down once per second while `running`. New events prepend to the ticker and push a segment onto the timeline. - -## Design tokens - -Colors: ink `#0a0a0c` / panel `rgba(9,9,11,.9)` / bone `#efe9e0` / muted `#8f8a83` / brand red `#e8534a` / red edge `#ff6a5e` / red panel `#7a1a16 → #b4342c` / blue panel `#1e488c → #122c5c` / blue edge `#6aa6ff` / senshu `#ffdf6b` on `#3a2a00` / penalty `#c8492f`. -Type: `Barlow Condensed` 400/600/700/800 for all UI; `Zen Old Mincho` 700 for score numerals and the discipline label. -Geometry: panel skew `-9deg` (content counter-skewed `+9deg`), bar height 84px, frame inset 26px, bottom inset 18px, gaps 12px, no border radius on overlay parts. - -## Accessibility / safety - -- Keep every text span `min-width:0` inside its flex column so names truncate instead of overflowing. -- Minimum on-screen text size 12px at 1150px design width; scale the whole overlay proportionally with the player (`transform: scale()` on a fixed 1150px layer, or clamp-based sizing) so it stays legible at small player sizes and in fullscreen. -- Below ~700px player width, hide `identity` and `ticker` automatically and keep only the score bar. -- Overlay is decorative for screen readers; expose the same data as text in the existing Points panel. - -## Files - -- `Match Points Overlay.dc.html` — the reference prototype (open in a browser; the SCOREBOARD chip demonstrates the master toggle). -- `assets/mat.png` — still frame used as the video stand-in. Not part of the deliverable. -- Flags and club logos are mockup placeholders in the prototype; wire real images in. - - ---- - -## Corrections after first implementation pass - -The first build broke the score bar. Specific fixes: - -1. **Keep the skew, but counter-skew ONCE.** The panel gets `transform: skewX(-9deg)`; a single inner row gets `transform: skewX(9deg); height:100%; display:flex; align-items:center`. Do not apply the counter-skew to individual children, and do not drop the skew altogether — the parallelogram edges are the design. -2. **The bar is a fixed-height 84px strip, vertically centered content.** In the broken build the names sat on the very bottom edge and the panels were full-bleed to the frame. The bar is inset 26px left/right, sits above the player control bar, and its content is vertically centered — nothing touches the bar's top or bottom edge. -3. **Both scores must render.** Red score right-aligned in a 56px `flex:none` box at the panel's inner end; blue score left-aligned in the mirrored position. In the broken build the red score was missing and the blue "1" was floating at the top edge. -4. **Never let panel content overflow.** Text spans need `min-width:0` and `overflow:hidden; text-overflow:ellipsis`; fixed boxes (logo 46px, score 56px) are `flex:none`. -5. **Empty data:** when an athlete/club is unknown, render the corner as "—" or hide the row — do not print "NOT SET". -6. **Club logo and flag slots must be filled or hidden.** If no image, hide the slot (toggle default off) rather than showing an empty box. - -## Controls belong in the player's gear menu - -Remove any floating on-screen toggle chip. The scoreboard switches live in the **existing player settings (gear) menu**, as a "Scoreboard" section — same pattern as quality/captions: - -- Gear button in the control bar opens a popup anchored bottom-right, above the control bar. -- Popup: dark translucent panel (`rgba(10,10,12,.94)` + `blur(10px)`, 1px white 16% border), 236px wide, a "SCOREBOARD" header (11px, .3em tracking, `#8f8a83`), then one switch row per part: Score bar, Live scoring feed, Match info, Point timeline, Club logos, Country flags, Penalties. -- Rows: 14px label, uppercase, .14em tracking; switch is a 26×14 track (`#e8534a` on, `#3a3734` off) with a 10px knob; hover `rgba(255,255,255,.07)`. -- Persist each switch per user; the uploader's per-video defaults seed them. -- The popup closes on outside click / Esc, and never covers the score bar. - -The updated prototype in this folder demonstrates the gear menu and all seven switches. - - ---- - -## Target: video.takeone.bh video page (e.g. /videos/11vu7R) - -Studied the live page. The overlay must be driven by what the platform already stores, and by **playback time** — not by a live clock. - -### What the platform already has - -- **Points panel**: rounds (number, name, optional start time) and point events shaped like `@00:11 · Point (1 pt) · Blue|Red|Both` with a running score printed as `Score `. -- **Coach review**: time-ranged notes (`01:40 — 01:45`, text, author) and reaction icons. -- **Player**: Highlights badge, mini player, playback speed menu, ¼× ½× ¾× slow-motion buttons, scrub speeds 1× 5× 20× in the points editor. -- **No fighter metadata at all** — no athlete names, clubs, flags, weight class, or event name. This is exactly why the first implementation printed "NOT SET". - -### Required changes on the platform side - -1. **Add match metadata to the video's sports settings** (one form, next to Add Round): event name, division/category, weight class, bout number, tatami/ring, date, venue — and per corner: athlete name, country (ISO code + flag image), club name, club logo, plus optional headshot for the VS card. -2. **Any field left empty hides its element.** Never render a placeholder string like "NOT SET". If no flag → hide the flag chip; no club logo → hide the logo slot; no athlete name → fall back to "RED" / "BLUE". -3. **Corners are Red and Blue** in the existing data. Karate labels (AKA/AO) or taekwondo (HONG/CHUNG) are a display option, not new data. -4. **A "Both" point event** awards to both corners — increment both scores and emit two ticker rows. - -### Binding to playback - -The overlay is a pure function of `video.currentTime`: - -- Scores = sum of point values for events with `at <= currentTime`, per corner. -- Round label = the round whose start time is the latest `<= currentTime`. -- Clock = `currentTime` formatted mm:ss (offset from the round start if round start times exist). It does **not** count down. -- Ticker = the last 4 events with `at <= currentTime`, newest on top; a new event animates in as playback crosses it. Scrubbing backwards removes them again. -- Timeline strip = one segment per point event across the video duration, red/blue, positioned by timestamp — clicking a segment can seek to that point (nice-to-have; keep `pointer-events` off otherwise). -- Slow-motion (¼× ½× ¾×) and playback speed must not affect the overlay: it reads `currentTime`, never a timer. - -### Pre-match VS card - -Rendered as a poster/intro layer at 16:9 over the player before playback starts (and available as an exportable share image at 1200×630 for the og-image). Content: event name, division line, both fighters' 3:4 photos with 104px circular club crests overlapping the inner corner, name, flag + country, club, the weight class under the VS mark, and a bout/tatami/date line. Background: two slow drifting red/blue radial glows plus a periodic light sweep — CSS animations only, no video. - -### Controls - -Everything toggles from the **gear menu** in the existing control bar, under a "Scoreboard" section: Score bar, Live scoring feed, Match info, Point timeline, Club logos, Country flags, Penalties. Penalties defaults **off** because the current data model has no penalty events; enable it when penalties are added to the Points panel. The overlay layer is `pointer-events:none` so the scrubber and buttons stay clickable, and the score bar sits above the 48px control band (bottom ≈ 56px) so nothing crosses the progress bar. - -The prototype in this folder uses the real point data from /videos/11vu7R (blue 1 @0:11, red 1 @0:11, red 2 @0:30, red 1 @0:51, blue 1 @1:52, blue 1 @2:39 → 4–3 red). - - -## VS intro before playback - -The VS card is part of the play experience, not a separate screen: - -- On load / on pressing play, the player renders the VS card **inside the video box** at 16:9, covering the frame, while the video is buffering/paused at frame 0. -- It holds for **2 seconds**, then fades out over ~0.5s and playback starts (`video.play()` fires as the fade begins, so the first frames are already moving as the card clears). -- The scoreboard overlay fades in after the card clears. -- The card is skippable: any click, key press, or tap on the frame ends it immediately and starts playback. -- Only on the first play of a session — a replay/scrub does not re-trigger it (the prototype's play button replays it for demo purposes). -- If match metadata is missing, skip the intro entirely rather than showing an empty card. diff --git a/drafts/unpacked/design_handoff_scoreboard_overlay/assets/mat.png b/drafts/unpacked/design_handoff_scoreboard_overlay/assets/mat.png deleted file mode 100644 index facd1ec..0000000 Binary files a/drafts/unpacked/design_handoff_scoreboard_overlay/assets/mat.png and /dev/null differ diff --git a/drafts/vs-screen.html b/drafts/vs-screen.html deleted file mode 100644 index 6a54902..0000000 --- a/drafts/vs-screen.html +++ /dev/null @@ -1,94 +0,0 @@ - - - - -VS screen — exact markup - - - - - - - -
- -
-
-
-
-
- - -
-
{{ eventName }}
-
- {{ category }}{{ division }}{{ roundName }} -
-
- -
- - -
-
-
FIGHTER PHOTO
-
CLUB
LOGO
-
-
-
{{ redName }}
-
- FLAG - {{ redCountry }} -
-
- {{ redClub }} -
-
-
- - -
- VS - {{ weightClass }} - {{ format }} -
- - -
-
-
FIGHTER PHOTO
-
CLUB
LOGO
-
-
-
{{ blueName }}
-
- {{ blueCountry }} - FLAG -
-
- {{ blueClub }} -
-
-
-
- - -
- {{ bout }}{{ tatami }}{{ dateVenue }} -
-
- - - diff --git a/resources/views/components/video-player.blade.php b/resources/views/components/video-player.blade.php index e2913c2..00252b8 100644 --- a/resources/views/components/video-player.blade.php +++ b/resources/views/components/video-player.blade.php @@ -220,23 +220,31 @@ background: #000; border-radius: 12px; overflow: hidden; - /* default aspect ratio; overridden per orientation */ + /* Always 16:9 — no max-height so the shape is never distorted. */ aspect-ratio: 16/9; - max-height: 70vh; /* Establish a size container so descendants can size themselves relative to the player width (used by the coach-note overlay to scale). */ container-type: inline-size; container-name: ytpwrap; } -.ytp-wrap.portrait { aspect-ratio: 9/16; max-height: 80vh; width: auto; max-width: 100%; margin: 0 auto; } -.ytp-wrap.square { aspect-ratio: 1/1; max-height: 75vh; max-width: 75vh; margin: 0 auto; } -.ytp-wrap.ultrawide { aspect-ratio: 21/9; max-height: 65vh; } +/* Orientation classes intentionally forced to 16:9 too, so the frame + shape never changes with the underlying media orientation. The video + element itself uses object-fit: contain and will letterbox as needed. */ +.ytp-wrap.portrait, +.ytp-wrap.square, +.ytp-wrap.ultrawide { + aspect-ratio: 16/9; + width: 100%; + max-width: none; + max-height: none; + margin: 0; +} -/* Theater mode */ +/* Theater mode — keep 16:9 shape, just remove rounded corners. */ .ytp-wrap.theater { - max-height: 80vh; - aspect-ratio: unset; - height: 80vh; + aspect-ratio: 16/9; + height: auto; + max-height: none; border-radius: 0; } @@ -604,10 +612,10 @@ /* ── Mobile ── */ @media (max-width: 768px) { - .ytp-wrap { border-radius: 0; max-height: 56vw; margin: 0; width: 100%; } - .ytp-wrap.portrait { max-height: 75vh; width: auto; max-width: 100%; } - .ytp-wrap.square { max-height: 85vw; max-width: 85vw; } - .ytp-wrap.ultrawide { max-height: 50vw; } + .ytp-wrap { border-radius: 0; margin: 0; width: 100%; aspect-ratio: 16/9; max-height: none; } + .ytp-wrap.portrait, + .ytp-wrap.square, + .ytp-wrap.ultrawide { aspect-ratio: 16/9; width: 100%; max-width: none; max-height: none; } .video-view-page .ytp-wrap ~ * { padding-left: 16px; padding-right: 16px; } }