gitoria

components

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit8d2fb24c8d2fb24ccomponents: a standby container (port 45016, profile standby); deploy hands over through standby-swap.sh without a gapmre8d2fb24c/reports/MP-media-player.md

8.6 KB

  1. # MP — media player, first version (mobile first)
  2. Worker MP (Atlas). Mission: missions/MP-media-player.md (caramboleyo: "start a mobile first layout for a media player in components and
  3. layouts"). Branches: `mp-player` in both repos, worktrees under /media/STORAGE/claude-scratch/atlas/MP/. NOT merged, NOT deployed, NOT pushed.
  4. ## What was built
  5. **components.hybriel.worldapi.org, commit dd003e5 (branch mp-player)**
  6. - `components/media-player/media-player.hl` — the player, pure Hybriel (no JavaScript file): the browser's own `<video>` / `<audio>`
  7. element plays; the component draws its own controls around it. Video is 16:9 letterboxed (`object-fit: contain`); audio shows a cover
  8. image (`cover`) with the title and artist. Controls, all at least 44 px (the play / pause one 52 px, the largest): a seek bar you drag
  9. with a finger (pointer events, `setPointerCapture`, `touch-action: none`; the played part in the accent, the buffered part lighter,
  10. a thumb dot; the whole strip is a 44 px touch area with a thin visible bar), back 10 s, play / pause (two icons toggled by a class, so
  11. the DOM is not re-created), forward 10 s, current time / total time, mute (two icons), playback speed 1 / 1.25 / 1.5 / 2 (one button
  12. stepping through them), fullscreen on video (`requestFullscreen`). Keyboard: the video takes the focus (`tabindex = 0`), Space
  13. plays / pauses, ArrowLeft / ArrowRight jump 10 s; the seek bar itself takes the keyboard too (arrows, Home, End).
  14. - The queue under the player: `queue = [{ src, title, dur }]`, dense rows (44 px tap rows that look thin — the touch area is the
  15. padding, the visible rows hug their text), the item whose `src` plays marked with the accent colour on a surface, nothing else. A tap
  16. (and the end of an item) calls the host's `onPlay(src)` function (hybriel#87); the host hands a new `src` back and the player is built
  17. anew with it. `autoPlay = "true"` (the demo sets it after a pick) starts the new item at once.
  18. - The media element loads its metadata DURING the page parse, before the handlers bind: `loadedmetadata` / `durationchange` / the first
  19. `progress` have already fired when the component is live, so the total time and the buffered part would stay at 0. Fixed the code
  20. editor's way: a 100 ms CSS animation (`animationiteration`) on the video (and on the cover image — the audio element is `display:none`,
  21. where a CSS animation never runs) reads duration, buffered and mute state once the page is live, then turns itself off.
  22. - `components/icons/icons.hl` — the new icons `play`, `pause`, `skipBack`, `skipForward`, `volume`, `volumeOff`, `fullscreen`, in the
  23. same style (one path, stroke = currentColor). The volume and play paths were redrawn once to centre them optically.
  24. - `components/media-player/demo.hl` + route `/media-player` + `README.md` + an entry in `components/index.hl`. The demo's media files
  25. (public domain, made with ffmpeg here): a 30 s test video (testsrc2 + a sine, 320×180, 704 KB), a 45 s tone (mp3, 270 KB), a cover
  26. PNG (a music note drawn as SVG, rendered with rsvg-convert).
  27. - `lib/media.hl` — the demo's media served from `storage/media` as a **function route**: a Bytes body (a file route would hand a
  28. String; a media element needs the bytes), the right content type (video/mp4, audio/mpeg, image/png) and **HTTP Range answers**
  29. (206 + Content-Range), so the browser's media element can seek without downloading the whole file. Hybriel's own file routes
  30. cannot do ranges or Bytes bodies yet (WebFramework's `serveFile` notes it), which is why this is a function route.
  31. - Gate (`tests/browser.mjs`): 35 new checks in a "MP" block (the home link, the README, no .js file, the media files served with the
  32. right type, 16:9, the controls exist, play by a real click, the time and played bar follow, the buffered part, Space pauses, the
  33. seek bar dragged with real pointer events to 10% and 60% of a 30 s clip, back / forward 10 s by real clicks, the speed cycle
  34. 1.25 → 1.5 → 2 → 1, the queue rows with the current one marked, a real tap on the second queue item → the audio player with the
  35. cover, autoplay, no fullscreen button for audio, mute toggles icon and label, no console errors), then 390 px checks (every control
  36. ≥ 44 × 44 including the seek strip and both queue rows, the play button the largest, the video 16:9 inside the width, no horizontal
  37. scroll) and the new page in the mobile-first, base-look and offline lists (12 public component files now, 11 home entries).
  38. **Gate 605/0** (8740–8749). The MP checks fail on the old code (the old app 404s /media-player, the home has no link — verified on a
  39. git-archive copy of main on port 8750).
  40. **layouts.worldapi.org, commit 5b5dbf0 (branch mp-player)**
  41. - `tools/sync-components.sh` now also copies `media-player/media-player.hl` + README (25 files); ran it against components dd003e5, so
  42. `components/media-player/` is a byte-verbatim copy (components/SOURCE names the commit).
  43. - `components/showcase/media-player.hl` — `/components/media-player`: the player with the same queue inside the app shell (ContentFirst,
  44. site header, sidebar), and the README link (`/read/readme-media-player`). `lib/media.hl` (the same function route, storage/media) and
  45. the same media files. `lib/site.hl`: the page in the components overview and its README in the reader's list. `components/styles.hl`:
  46. the page root is a block.
  47. - `theme/theme.hl` section 3, the themed rules (no fork of the component): the video area a sunken surface with radiusLarge, the seek
  48. track sunken with radiusSmall, the buffered layer the border grey at 60% (the unbuffered end reads as the lighter end of one bar), the
  49. played part and the thumb the accent, the buttons the theme's plain ones (transparent, surface on hover, radiusSmall), the times muted,
  50. the current queue item the accent on a surface, its length the accent too.
  51. - `.check-theme-ignore` skips the verbatim copy folder.
  52. - Gate: the page added to the route list — **340/0** (8750–8759). `node theme/check-theme.mjs .` → **0 problems**.
  53. ## Screenshots (looked at, via a fresh reviewer each round)
  54. - `/media/STORAGE/claude-scratch/atlas/MP/shots/video-paused-{390,1280}.png` — the video paused: the colour-bar test clip 16:9, the seek
  55. bar at 0 with the thumb at the left, one row of controls (back, play, forward, "0:00/0:30", mute, "1×", fullscreen), the queue with
  56. "Test clip (video) 0:30" highlighted, the README link.
  57. - `video-playing-{390,1280}.png` — playing: the pause icon shows, the played part a short black bar with the thumb at ~5%, the time
  58. "0:01/0:30", the video frame advanced.
  59. - `audio-queue-{390,1280}.png` — after a tap on the second queue item: no video area, the cover (grey tile, music note) with "Test tone
  60. (audio)" and the artist line, the time "0:01/0:45", no fullscreen button, "Test tone (audio) 0:45" highlighted.
  61. - `layouts-video-paused-{390,1280}.png`, `layouts-video-playing-{390,1280}.png`, `layouts-audio-queue-{390,1280}.png` — the same in the
  62. dark theme: the video area dark, the played part blue (the accent), the current queue item blue on a surface, the shell (header,
  63. sidebar) around it.
  64. - Reviewed by a fresh reviewer in four rounds: the first found the control row wrapping at 390, misaligned icons (a wrong CSS selector
  65. — `.mp-buttons` class vs the `mp-buttons` element — let the site's button padding win), the speed button a long label, the total time
  66. 0:00 (the load-before-bind problem above), a seek thumb overhanging. All fixed; the last round found nothing left in the player.
  67. The one recurring note in the 1280 layouts shots (a header apparently mid-page) is an artifact of Chrome's full-page capture
  68. (`captureBeyondViewport`) painting at the page's scroll offset — measured in the live page: the sticky header sits at viewport y = 0.
  69. ## What is missing / not done
  70. - No captions track UI (the README says so); no volume slider (mute only); no picture-in-picture button (the browser's own menu on the
  71. video still has it). A longer real clip (the demo files are 30/45 s) and a real queue of more than two items would be the next test.
  72. - The layouts gate's own per-page screenshots live in `.scratch/gate-shots/` of the worktree (the gate's naming); nothing of the gate
  73. checks the player's behaviour inside layouts beyond the page answering 200 and the theme checks.
  74. - Both branches are unmerged and undeployed; Atlas reviews and deploys.
  75. ## Logs
  76. - Gates: components 605/0 (gate8.log), layouts 340/0 (layouts-gate2.log), check-theme 0 problems. Old-code proof: 6/6 MP checks fail on
  77. main (the page 404s).
  78. - Processes: every server, gate and Chrome this mission started was stopped by its saved PID; no port of 8740–8759 listens, no Chrome
  79. with a cwd under the scratch dir is left, the hl-browser-tier profile dirs are removed.

Branches

Latest commits

  • 8d2fb24ccomponents: a standby container (port 45016, profile standby); deploy hands over through standby-swap.sh without a gapmre
  • c2834dd3Merge mr-fixes: media player state after a queue pick, Range handling, cover-less audio, accessibility labelsmre
  • 354fe3c6Media player: audio without a cover starts and shows its time (the mount tick sits on the seek bar, which every item has); the speed button names the current speed, the seek slider says its time in words; a gate page for the first render on cover-less audio and a fourth demo queue item without a covermre
  • ee4aee1eMedia player: a new queue item shows its own speed, mute, play state and time and starts when asked, also for two videos in a row; the media route reads suffix ranges and ignores range lists and garbage instead of answering 500; stronger gate checks (the 10 percent drag, the played bar, the queue tap)mre
  • 9a4f9b31Merge mp-player: media served from the committed filesmre
  • ab96e686Media route: serve the demo's media from the committed files in components/media-player (storage/ is not in git, the deploy gate found no files)mre
  • b2980734Merge mp-player: the media player (components/media-player), its demo and the media iconsmre
  • 1c41293eMediaPlayer: back / forward 10 s as replay / forward 10 icons (circular arrow with a 10), the play button keeps its surface background on audio and video, the media route's range end is a letmre
  • 9e1ab228MP: report, LOG line, STATUS entrymre
  • dd003e5dMediaPlayer: audio and video in one phone-first player (components/media-player), its demo /media-player with a queue, the media icons in components/icons, the demo's media files served with ranges (lib/media.hl), 35 gate checksmre
  • e54f83adMdEditor: text typed before the editor is built is kept (the build takes it in once, the input handler no longer writes it to the field first), tickets#35mre
  • 8c920932gate: the 11 old drop-zone checks now test the one-box pick mode (drop anywhere in the box, Choose files button inside it, no drop zone)mre
  • 626de199MdEditor: copy and cut put the selection's Markdown on the clipboard, a clipboard with HTML only pastes its text, gate checks for copy, cut and paste (components#20)mre
  • 5228126dUX: components synced from the tickets/layouts UX mission (comments: State select in the footer and button words; files-upload: one-box pick mode; modal: footer rule for its own footer). WIP: the gate's #18 pick-mode checks still expect the old drop zone (11 fail), see the UX2 reportmre
  • 0a9216fbMdEditor: a Table button in the toolbar, a typed pipe row fills the cells, tables take the page theme's look; gate checks updated for 12 toolbar buttonsmre
  • f9d405c8comments: reactions row half as far from its comment (creator 2026-10-24: 'half this distance please'); the 44 px tap targets staymre
  • 4922f9cfsessions last 99 years (creator 2026-10-23: logins never expire; only sign out ends them)mre
  • 0355975areports/MC-mobile.md, LOG, STATUS (MC)mre
  • 3f0a7229Month view, date picker, range picker: names follow the page language (English by default, not the browser's), weekday/month names formatted in UTC (a UTC+12 zone showed Tue first), 44 px day cells and buttons, Send row air; gate checks at 390 px for every page, popup and dialog (MC)mre
  • 29eb07eaPhone: 44 px targets on the site (brand, home links, buttons), comments, modal and pagination; the header is the brand alone on a phone; comments demo: labelled 'You are' group with the chosen user pressed (MC)mre