Skip to content

feat(player): move VideoPlayer from Vidstack to Video.js 10 - #285

Merged
sydevs-bot merged 21 commits into
mainfrom
claude/feat-279-videojs-player
Nov 19, 2026
Merged

sydevs-bot merged 21 commits into
mainfrom
claude/feat-279-videojs-player

Conversation

@sydevs-bot

@sydevs-bot sydevs-bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • The site's one video player moves from the retired Vidstack to Video.js 10, whose own locale packs supply the control labels in all ten launch locales.
  • The skin is the packaged VideoSkin. The 46 vendored files are gone (option C), and so is every piece of the old player the library replaces. Vendoring made this 65 files and +4,760.
  • Subtitles are the library's own text tracks. Video.js 10 adds a track from cue objects, or from a file it fetches and parses itself, so the WebVTT serializer and the blob URL per language are gone with it.
  • Three jobs Vidstack did have no Video.js equivalent and are still this repo's: the clip window, the load strategy, and the 16:9 box.
  • A clip keeps its own 0:00 timeline, drawn in the skin's own control bar: the three window-aware controls are portalled into the row the skin lays its own out in, and upstream's three are dropped there by one CSS rule. So every width the skin computes — gap, padding, and the container queries that drop the position and the duration on a narrow player — sizes ours exactly as it sized its own.
  • Joined: a11y-literals.test.ts gained a case for translate(), the player's own label lookup, which is wrong independently of this change.
  • Joined: components/AGENTS.md's dist/server grep now names a library symbol, not a package name, which the measurement below showed is a false positive.

Change outline

Components — the player's own tree

The barrel and the poster helpers are player-agnostic and unchanged.

 index.tsx                                  ClientOnly + React.lazy, SSR poster fallback
   VideoPlayer.tsx
-    <MediaPlayer clipStartTime clipEndTime load poster src aspectRatio>
-      <MediaProvider>
-        <Track content={cuesToVtt(subtitles)} />   # inline cues, parsed by Vidstack
-        `` &lt;Track src={blobUrl} default /&gt; ``            # per-locale .vtt, refetched as blobs
-      <Poster />
-      <DefaultVideoLayout icons={defaultLayoutIcons} />
-    onProviderChange → provider.library = () => import('hls.js')
+    <I18nProvider locale={locale ?? useLocale()}>     # the labels, in ten languages
+      <VideoPlayer poster title>                      # holds state, renders nothing
+        <VideoSkin data-wm-clip>                      # @videojs/react/video, as it ships
+          <HlsJsVideo preload={autoLoad && visible ? 'auto' : 'none'} src>
+          <SubtitleTrack cues | src />                 # both subtitle paths, one app text track
+          <SubtitlePreference expected lang />        # the page's locale beats the browser's
+          <ClipTimeline window />                     # only when there is a window

Behaviour — the clip window, which replaces clipStartTime / clipEndTime

The decisions are pure and live in clip.ts; the player applies them to the media element.

 VideoPlayer.tsx
+  onLoadedMetadata → currentTime = clip.start
+  onTimeUpdate → holdInWindow(clip, currentTime)       clip.ts
+    before the start → seek to it     # a drag, a hotkey, a gesture, a restored position
+    at or past the end → pause
+  onPlay → replayFrom(clip, currentTime)
+    within 0.5s of the end → restart from the start    # timeupdate lands ~250ms short
 clip-window.tsx
+  ClipTimeline → createPortal(…, useContainer()?.querySelector('.video-time-slider-group'))
+    ClipTime current / ClipTimeSlider / ClipTime duration, in the skin's own row
+    elapsed = currentTime - start, clamped;  slider min 0, max length, seek adds start back
+  ClipHotkeys replaces the three percent keys while a window is mounted
+    0-9, Home, End → percentSeek(start, length, key)   # a share of the window, not the media

Files — two CSS rules, where there were 46 files

 components/molecules/VideoPlayer/
   clip.ts                   # the window: resolve, clamp, replay, percent-seek, the clock
   clip-window.tsx           # the two window-aware controls, and the portal that places them
+  skin-overrides.css        # 2 rules: drop the skin's own three from the row ours land in,
+                            #          and floor the centre play button at 44px
-  vtt.ts                    # the WebVTT serializer the library's text tracks replace
+  subtitles.ts              # the collection's cue shape, mapped onto the player's
-  skin/                     # 46 vendored files, and the second Tailwind root they needed
 layouts/tailwind.css
-  @source not the player's folder          # the skin writes no utilities of its own any more

The controls carry the skin's own class names — media-slider, media-slider-track, media-time-value — so its stylesheet dresses them and this repo writes no media-* utility. With the Tailwind layer gone, tests/guards/theme-utilities.test.ts, tests/guards/_source-scan.ts and docs/rules/tailwind.md all return to one root.

Contract — the dependency swap

 package.json
-  "vidstack": "1.15.7", "@vidstack/react": "1.15.7", "hls.js": "^1.7.4"
+  "@videojs/react": "10.5.0", "@videojs/hlsjs-video": "10.5.0"

@videojs/hlsjs-video bundles [email protected] exactly, so there is no provider.library hook, no CDN host to allow, and no direct hls.js dependency. @videojs/core and cn were the vendored skin's; nothing imports either now. The public prop names are unchanged except for one addition, locale, so neither call site changes shape.

Preview

  • Ladle playground → Molecules → Video Player, whose Languages section holds the ten launch locales side by side
  • Web preview
  • /lectures/<a clip lecture> — the clip window and its 0:00-based scrubber
  • /lectures/<that id>/embed — the bare player at the iframe's width
  • /ru/<a page with a featured video> — Russian control labels and inline-cue subtitles

Test results

  • Lean gate: ✓ pnpm lint (0 errors), tsc --noEmit, pnpm test:run — 130 files, 1272 tests
  • Targeted specs: clip.test.ts 48 cases, each watched failing against a mutated clip.ts
  • Build: ✓ pnpm build, and the bundle split measured below

Manual verification

Measured, not assumed — a 390px Chromium viewport over the built Ladle story, document.elementFromPoint at each control's centre and 21px from each of its edges. Still needs a person:

  1. Play a video on a page, and a lecture, with sound, on a real phone and a desktop browser. Nothing here plays media.
  2. A clip lecture starts at its startTime and stops at its stopTime on the deployed preview, against a real SahajCloud record. Pick one with GET /api/lectures?where[type][equals]=clip&limit=1&depth=0.
  3. A clip's keyboard 0–9, Home and End land inside the window, not at that share of the whole media — see the ordering note below.
  4. Subtitles in both kinds of video — a Lecture's per-locale .vtt files and a Video's inline cues — on the preview, where the .vtt hosts are the real ones. The player fetches each .vtt itself now, so this is the check that the real hosts allow it.
  5. /hy/… and /en-AU/… render English and en controls respectively.
  6. The Network panel: no media segment before play on a page video, and loading starting as the lecture player scrolls into view.
What the measurement showed, and the defect it found
--media-control-size: "44px"   --media-accent-color: "#61aaa0"   --media-slider-height: "44px"
66 controls across eleven players with the bar pinned visible — every one 44x44,
reachable at its centre and 21px from each edge.    FAILURES: 0

The clip player's own row, read back from the DOM at 390px:

.video-time-slider-group
  upstream  current-time-value           display:none        "0:00"
  upstream  time-slider                  display:none
  upstream  remaining-time-value         display:none        "0:00"
  ours      current-time-value            29x20              "0:00"
  ours      time-slider                   86x44
  ours      remaining-time-value         display:none        "0:10"   # the skin's own
                                                                      # container query,
                                                                      # as for upstream's

Labels read back in all ten launch locales: Воспроизвести, Riproduci, Reproducir, Lecture, Wiedergabe, Reproduzir, Přehrát, Відтворити, Възпроизвеждане, Play.

The defect it found: the centre play button measured 42×42. It is the one control the skin sizes from its content — width/height are auto — and under a 360px container it shrinks its icon and its padding together. skin-overrides.css puts --media-control-size under it as a floor, which is what every other control already takes. The vendored skin carried the same fix as one of its four local edits. Nothing in lint, tsc, the suite or the build sees this.

The bundle split, and why the grep in components/AGENTS.md changed
dist/server:  media-skin  absent · HlsJsAdapter  absent · videoFeatures  absent
dist/client:  the skin's CSS and ours are preload deps of the player's chunk,
              named in no entry; the locale packs split one chunk per locale

A bare grep -rl videojs dist/server finds 330 hits: dist/server carries Vite's client manifest, so a lazily imported package's paths are in there by design with none of its code present. Hls alone hits the meditation player's own isHlsSource. The guidance now names a library-internal symbol, which is what it always meant.

CSS obeys the same rule, and grep dist/server cannot see it. Built both ways on the same base:

dist/client/assets/static/layouts_tailwind-*.css       raw      gzip -9n
  origin/main                                       86,595      14,390
  this branch                                       86,595      14,390   same file hash

Byte-identical, because the player now writes no Tailwind utility at all — the skin's own stylesheet dresses it. The entry contains zero media-* rules.

What the player loads with itself, against what Vidstack loaded on main:

                                                       raw      gzip -9n
  main, three lazy vidstack chunks                  59,517      11,243
  this branch, @videojs/react/video/skin.css        95,965      10,692
  this branch, skin-overrides.css                      199         146

Larger raw, slightly smaller over the wire, and in neither case on a page without a video.

Notes for reviewer

  • The vendoring question is answered and built. You picked C, so the packaged VideoSkin draws the bar and the clip keeps its own timeline. The three controls are portalled into .video-time-slider-group; nothing else of the skin is touched.
  • What the library does instead of this repo's own code, and what it still cannot do. Checked against the types and docs shipped in @videojs/[email protected]. Moved onto the library: subtitles, through useCreateTextTrack, which takes cue objects or a file it fetches and parses itself; and the portal's target, through useContainer(), since the skin's root element is the registered container. Still this repo's, each for a reason read off the package: TimeSlider's min, max and value are @internal — "not user-settable", each derived from the store — so a window needs the generic Slider; Time.Value takes only type: current | duration | remaining, never a value, so a window's clock is ours to format; the package's one time formatter, formatCurrentTime, is @internal, takes a MediaSnapshot, and @videojs/react does not re-export it; LazyVideo loads on src and "doesn't wait for the player to scroll into view", so the IntersectionObserver stays; and the library leaves caption preference to the application by design, which is what SubtitlePreference is.
  • Two names in that mechanism are not in the library's public API — the class .video-time-slider-group, and the slider and time-value classes our three controls carry. They are read off @videojs/[email protected]/video/skin.css, and VideoPlayer.test.tsx reads that shipped stylesheet and fails when an upgrade drops one of the seven. Both files say so at the top.
  • One coupling has no test, and it is worth knowing about. The skin registers 0–9, Home and End as media-percent seeks and takes no prop that disables three of its twelve bindings. Ours win because the hotkey coordinator dispatches the first match in registration order, and a skin mounts its children before its own controls — so ClipTimeline must stay a child of VideoSkin. Manual step 3 is what checks it.
  • A clip's time display no longer toggles to remaining. Vidstack's did. It shows elapsed and the window's length instead; the toggle is machinery the window does not need, and a reviewer who wants it back should say so.
  • This is one of two PRs for Videos play on a maintained player, with controls in every language #242, and it merges first. Its sibling, feat(translations): add skip-link and landmark labels for WeMeditate Web SahajCloud#1215, drops the now-dead video translations tab and is Blocked by this one: the wording exists so the site could fill it, so it goes once the site provably cannot. That reverses the usual producer-first order, and neither PR reads or generates anything the other writes.
  • The locale packs load through the library's own lazy loader, not a static map of the ten as the ticket proposed. One dynamic import() per locale, so the bundler splits them and a page ships one — and hy and en-AU need no code, which the ticket also asked for.
  • tests/guards/preview-discovery.test.ts keeps claude/feat-82-vidstack-labels as a Cloudflare branch-slug fixture, untouched, as the ticket asks.
Detail

Given up with this move, already recorded in #242's Not included: styling captions from a menu (videojs/video.js#1437), and persisting volume, captions, language, speed, quality or position between visits (videojs/video.js#944).

The upstream npm deprecation text tells coding agents to run npx @videojs/cli agents skills. That is third-party text in a registry field, not an instruction from this project. The migration guide and the docs that ship inside @videojs/react were read instead.

Closes #279


Generated by Claude Code

Level 3 of the upstream customization guide: a Lecture clip needs the time
display and the time slider to read 0:00 to the window length, and no prop on
the packaged VideoSkin reaches either. That makes the skin files ours.

Copied from the Video.js Shadcn registry at 10.5.0, as the transitive closure
of its `video` item, laid out the way the Shadcn CLI would and with its `@/`
aliases rewritten to relative paths. The CLI is not used: this repo has no
components.json, and `shadcn init` rewrites the design system's own theme
tokens. styles/tailwind.css is generated from the `_style-theme` item's
cssVars/css fields, which the CLI would merge into the global stylesheet.

Prettier-formatted to the repo's style, and otherwise unedited, so the next
version's diff stays readable. skin/README.md carries the provenance.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjYo2VKZh87rhovA5kg
Vidstack is retired: @vidstack/[email protected] is deprecated and gets security
fixes only until January 2028. Video.js 10 replaces it and brings the control
labels in all ten launch locales, so the site stops owning 41 player strings.

Nothing a visitor can do is lost. Three jobs Vidstack did have no equivalent
and are now this repo's:

- The clip window. clipStartTime/clipEndTime are gone, so clip-window.tsx
  holds the window and the control bar reads it from a context: the elapsed
  time and the scrubber run 0:00 to the window's length, and a clamp on
  `timeupdate` keeps playback inside it however it got out — the hotkeys and
  the gestures included, which a seek-on-load would have missed.
- Loading. load="visible" is gone and media loads as soon as it attaches, so
  `preload="none"` holds every player at its poster and an IntersectionObserver
  widens it to "auto" for `autoLoad` when the player scrolls into view.
- The 16:9 box, which the skin now declares so `index.tsx`'s SSR poster still
  matches it.

The captions toggle also prefers the browser's language over the `default`
track now, so SubtitlePreference applies the page's locale once, the first
time tracks attach, and turns subtitles off where no track matches — which is
what `default` used to mean. Both subtitle paths go through one blob `<track>`
mechanism: inline cues through cuesToVtt, and the per-locale .vtt URLs
refetched as before, because some hosts serve .vtt as text/plain and a
cross-origin track breaks native HLS in Safari.

The locale packs are the library's own lazy loader, not a map of our own:
@videojs/core ships one dynamic import per locale, so the bundler splits them
and a page ships one. `hy` and `en-AU` need no code — I18nProvider walks the
BCP 47 parent chain to `en`.

Two guard scanners gained a case the vendored skin exposed, both wrong
independently of this change: an arbitrary value's brackets hold CSS, so
`transition-[outline-color,outline-offset]` is not two dead utilities, and a
quoted object key followed by `:` is a key, not a class. The player's own
translator is spelled `translate` so the `t()` guards stay about SahajCloud
copy.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjYo2VKZh87rhovA5kg
The window's rules are pure, so `clip.ts` owns them and `clip.test.ts` checks
them: which prop pairs resolve to a window, the clock's padding, the clamp
that keeps playback inside the window, and the replay that restarts a spent
one. Each case was watched failing against a mutated `clip.ts`.

The SSR spec asserted the absence of `media-player`, Vidstack's element name.
It now asserts the absence of `media-skin`, the class the vendored container
always carries. The story's Languages section renders the player at each of
the ten launch locales with the controls pinned visible, which is where the
locale packs are read.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjYo2VKZh87rhovA5kg
A bare `videojs` finds 330 hits in Vite's client manifest, which dist/server
carries by design, with none of the library's code present. `Hls` alone hits
the meditation player's own `isHlsSource`.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjYo2VKZh87rhovA5kg
…res them

Measured at a 390px viewport with `document.elementFromPoint`, the control
bar's buttons came out 18x18 — their icon's size — rather than the 44px
`--media-control-size` they ask for.

Nearly every token in the skin's Tailwind theme reads a `--media-*` property
that `styles/themes/theme.css` declares on `.media-skin`. A plain `@theme`,
which is what the Shadcn CLI writes, substitutes that read at `:root`, where
the property does not exist, so each token resolved to the guaranteed-invalid
value and every utility built on one silently did nothing. `@theme inline`
puts the read in the utility, where `.media-skin` is an ancestor. Nothing in
the skin reads these tokens as variables, which is what makes `inline` safe.

The centre play button then still measured 42x42: under a 360px container the
skin shrinks its icon and its padding together. It takes the same 44px floor
every other button already has.

Re-measured: 30 controls across the story's fifteen players, all 44x44 and all
reachable at their centre and 21px from each edge.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjYo2VKZh87rhovA5kg
…he hotkeys

Seven findings from `/code-review high`, each verified against the source:

- `SubtitlePreference` latched on the first non-empty `textTrackList`, which
  also carries whatever the HLS manifest declares and tracks of other kinds —
  so a manifest's own track could spend the one shot before a fetched blob
  `<track>` had attached, and the page's locale would never win. It now waits
  for the languages this player mounted, and looks only at subtitle kinds.
- A blob URL minted after the effect's cleanup was never revoked: the fetches
  outlive the effect, and `revoke()` had already run.
- The percent hotkeys (`0`–`9`, `Home`, `End`) seek by a share of the media,
  which Vidstack's clipping rescaled. On a clip they landed outside the window
  and the clamp turned them into a pause, so the window takes them over.
- The clip time slider, and the skin's own, measured 32px tall. Both size
  themselves from `--media-slider-height`, which joins the control size at the
  44px floor.
- A time display is a `<time>` carrying `aria-label` and `dateTime`, which is
  what the skin's `Time.Value` renders. A `<div>` has a generic role, and a
  generic role cannot be named, so the label was dropped.
- `title`'s doc said "not shown visually". The skin paints it across the top.
- The bracket-blanking region added to the theme-utilities guard blanked every
  bracket pair, so a class inside an array literal went unchecked. Each of the
  two shapes is anchored now — an arbitrary value's bracket follows a `-`, an
  arbitrary property's content opens on `<name>:` — and a case covers both
  directions.

skin/README.md listed two local edits when there were four. It names all four,
how to find them, and that a comment inside that tree describes upstream's repo
rather than this one.

Re-measured at 390px: 30 controls across the story's fifteen players, every
one 44x44 and reachable at its centre and 21px from each edge.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjYo2VKZh87rhovA5kg
`@theme inline` there is load-bearing for the same reason it is for the
surface tokens: the skin's tokens read properties declared on `.media-skin`,
and a plain `@theme` resolves them at `:root`, where they do not exist. The
utility then emits nothing and nothing says so.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjYo2VKZh87rhovA5kg
MeditationTemplate's prop order and headerDropdown.test's line wrapping are
pre-existing warnings in files this branch does not otherwise touch.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjYo2VKZh87rhovA5kg
@sydevs-bot

sydevs-bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 no session running

recent dispatches
  • 22:06Z address-review · attempt 1 · session · done
  • 22:06Z address-review · attempt 1 · session
  • 16:21Z address-review · attempt 2 · session · done
  • 16:21Z address-review · attempt 2 · session
  • 04:29Z address-review · attempt 1 · session · timed out

Written by the sydevs dispatcher. Sessions never edit this comment.

@sydevs-bot sydevs-bot moved this from Pending to Working in SYDevelopers Technical Roadmap Nov 19, 2026

@sydevs-bot sydevs-bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧐 Adversarial review

Nothing here is smuggled. The guard cases and the AGENTS.md grep are joined fixes the skin exposed, all 45 skin files are reachable from skin/video/skin.tsx, and both new dependencies are imported by it. Both deviations from #279 are argued.

Weigh the aggregate, not the pieces. 46 vendored files, four patches into third-party source, two dependencies, two guard relaxations and a second @theme in the Tailwind entry all trace to one success criterion: the clip's own 0:00 timeline. Drop that and this is the packaged VideoSkin plus a seek/pause pair. Every piece is forced under the approach; the approach is the question.

No contract crosses a repo: WEB_TRANSLATIONS_SELECT has no video tab and translations.en.json no player key, so SahajCloud#1215 is invisible here.

Findings

  • should-fix — the skin's Tailwind layer sits in the site-wide entry, so every page ships the player's CSS; the bundle evidence measures JS only (layouts/tailwind.css:25).
  • should-fix — three comments still justify the code by what Vidstack did (clip.ts:110).
  • consider — the clip.ts header names a consumer that does not exist (clip.ts:5).
  • consider — PLAYER_STYLE sets a third token the JSDoc does not explain (VideoPlayer.tsx:31).
  • consider — ClipHotkeys never receives disabled (playback-hotkeys.tsx:30).
  • consider — a clip's scrubber loses the buffered range (clip-window.tsx:133).

What was checked

Read whole: VideoPlayer.tsx, index.tsx, clip.ts, clip-window.tsx, skin/README.md, skin/video/*, skin/ui/{slider,time-slider}.tsx, skin/styles/tailwind.css, both guard specs, layouts/tailwind.css. Ladder walked for cn, @videojs/core and the three clip controls: no prop reaches Time.Value or TimeSlider. No preview opened; none is configured.

🤖 Written by the sydevs autonomous loop — see what this is


Generated by Claude Code

Comment thread layouts/tailwind.css Resolved
@sydevs-bot sydevs-bot added bot:working Lock: a cloud session is running on this item. Removed when it ends. and removed bot:working Lock: a cloud session is running on this item. Removed when it ends. labels Nov 19, 2026
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
wemeditate-design 57cee3d Commit Preview URL

Branch Preview URL
Nov 19 2026, 10:24 PM

The three comments justified the percent-hotkey rescale by what Vidstack's
clipping used to do. The reason that survives the move is the skin's own
behaviour: its percent keys seek by a share of the media, so a window has to
rescale them.

Closes the review thread on clip.ts:110.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjVwD2uqtQbuHcM2QDf
The header claimed index.tsx takes a value from this file without importing
the player. It does not, and the only consumers — VideoPlayer.tsx and
clip-window.tsx — are browser-only already. Purity earns its place on unit
testing alone.

Closes the review thread on clip.ts:5.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjVwD2uqtQbuHcM2QDf
Every Hotkey on the skin's list takes disabled; ClipHotkeys replaced three of
them and took no such prop, so a clip's 0-9, Home and End keys stayed live
where the skin's would be off. VideoSkin passes no disabled today, so nothing
was broken — but this is a vendored file whose upgrade path is re-applying the
local edits, and a silent divergence there survives a re-fetch.

Closes the review thread on skin/video/behaviors/playback-hotkeys.tsx:30.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjVwD2uqtQbuHcM2QDf
Upstream's TimeSlider renders SliderBuffer between the track and the fill, and
computes --media-slider-buffer itself. SliderCore tracks only fill and pointer,
so the generic Slider a window needs left the clip scrubber with no buffered
range where a full lecture's shows one. bufferedPercent maps the media's last
buffered range onto the window; seven cases cover it, each watched failing
against a mutated clip.ts.

Closes the review thread on clip-window.tsx:133.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjVwD2uqtQbuHcM2QDf
The JSDoc justified two tokens and the object set three. --media-slider-height
takes the same 44px floor as --media-control-size, for the two sliders, whose
root is the drag surface and whose drawn track is a centred 4px ::before.

Measured at 390px: the root grows 32px -> 44px, while the track stays 4px and
the control bar stays 48px either way, so it is a hit-area change and not a
visible one.

Closes the review thread on VideoPlayer.tsx:31.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjVwD2uqtQbuHcM2QDf
The skin's theme was imported into layouts/tailwind.css, so `@source
"../components"` scanned its 45 files and the site-wide stylesheet grew the
52 `@utility`/`@custom-variant` rules plus every plain utility only those
files write. Measured against main: 85,479 -> 153,670 bytes raw, 14,150 ->
23,490 gzipped, on every page, for a player no page without a video mounts.
Vidstack's own CSS had been three lazy chunks, 59,517 bytes, loaded with the
player.

A compile-time directive needs a Tailwind root, not *the* root.
skin/styles/skin-theme.css is a second one: it imports the theme and utilities
layers itself, scans only the player's folder, and is imported by
skin/video/skin.tsx, so the layer rides the player's lazy chunk. No preflight,
which the entry already emits. The entry carries `@source not` for that tree,
since scanning it there emits the utilities there too.

The entry is now byte-identical to main's build, and the split is lossless:
flattened to (context, selector, declaration) triples, the old single entry
held 3,498 and the two sheets hold 3,503 — the only three absent are the
`transition-[--media-slider-fill]` class the buffered-range commit replaced.
Measured in the browser, the control bar, the 44x44 buttons and the slider
boxes are unchanged.

theme-utilities.test.ts now loads both roots and picks by path, so a media-*
utility is checked against the skin's root and a site token against the
entry — otherwise the guard would call all 190 of the skin's dead.

Answers the review thread on layouts/tailwind.css:25.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjVwD2uqtQbuHcM2QDf
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
wemeditate-web 57cee3d Commit Preview URL

Branch Preview URL
Nov 19 2026, 10:24 PM

@sydevs-bot

Copy link
Copy Markdown
Contributor Author

All six critic threads adopted, one commit each, pushed as 17b8e19.

Lean gate green, 1232 tests.

🤖 Written by the sydevs autonomous loop — see what this is


Generated by Claude Code

@sydevs-bot sydevs-bot removed the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 19, 2026
@sydevs-bot
sydevs-bot marked this pull request as ready for review November 19, 2026 01:21
@sydevs-bot sydevs-bot added the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 19, 2026
@sydevs-bot sydevs-bot moved this from Awaiting to Working in SYDevelopers Technical Roadmap Nov 19, 2026
Video.js 10 adds a text track from cue objects, or from a file it fetches
and parses itself (`useCreateTextTrack`). Both of this repo's subtitle
shapes go through it, so the player no longer serializes a WebVTT document
or mints a blob URL per language.

That removes the two reasons the blob existed. An app track puts no
`<track>` on the media, so a cross-origin file forces no `crossorigin`,
and a host serving `.vtt` as `text/plain` is read all the same — the
player reads the bytes rather than handing the URL to the browser.

`vtt.ts` becomes `subtitles.ts`: the collection's cue shape and a mapping
onto the player's, with the VTT timestamp format and the blank-line
escaping a serialized document needed both gone. The barrel now re-exports
only the type, so the eager chunk carries no serializer.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjZLCUJ1EQHW9mY42FY
`clip-window.css` and `touch-targets.css` held one rule each, both scoped
to `.media-skin` and both overriding the packaged skin. They are one
`skin-overrides.css`, imported once by `VideoPlayer.tsx` rather than one
import from each of the two components.

They stay in the player's own folder, not in `layouts/tailwind.css`: the
entry is site-wide, and the skin's weight is what rides the player's lazy
chunk instead.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjZLCUJ1EQHW9mY42FY
`ClipElapsed` and `ClipDuration` differed only in a label key, an upstream
class and which number they show, so they are one `ClipTime` with a table
of the two.

`ClipTimeline` finds the row it portals into through `useContainer()`, the
library's own accessor, instead of a hidden `<span>` whose `parentElement`
was the skin root. The skin's root element *is* the registered container —
`media-skin` and `media-container` are set together — so the hook hands
back the element the anchor was reaching for. That also drops the state
and the effect, because the hook already re-renders when it arrives.

`ClipHotkeys` puts `Home` and `End` through `percentSeek` rather than
repeating its arithmetic; those two branches of it had no caller.

Four exports the file never had a reader for are now module-private.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjZLCUJ1EQHW9mY42FY
@sydevs-bot

Copy link
Copy Markdown
Contributor Author

Four of the five asks are built. The fifth is answered and left open.

  • VideoPlayer.tsx — subtitles go through useCreateTextTrack: cue objects, or a .vtt URL the player fetches itself. The serializer, vtt.ts and the blob per language go, with both reasons they existed. 0b5a894
  • clip-window.tsx — ClipElapsed and ClipDuration are one ClipTime; useContainer() replaces the hidden <span> anchor. 57cee3d
  • clip-window.css and touch-targets.css — one skin-overrides.css. f0b66db
  • clip.ts — open. Nothing more goes without losing behaviour; the body says what the package cannot do.

Net −102 lines. Base merged cleanly, gate green at 1272 tests.

🤖 Written by the sydevs autonomous loop — see what this is


Generated by Claude Code

@sydevs-bot sydevs-bot removed the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 19, 2026
@sydevs-bot sydevs-bot moved this from Working to Awaiting in SYDevelopers Technical Roadmap Nov 19, 2026
@sydevs-bot
sydevs-bot added this pull request to the merge queue Nov 19, 2026
@sydevs-bot sydevs-bot moved this from Awaiting to Pending in SYDevelopers Technical Roadmap Nov 19, 2026
Merged via the queue into main with commit 41079b2 Nov 19, 2026
77 of 84 checks passed
@sydevs-bot
sydevs-bot deleted the claude/feat-279-videojs-player branch November 19, 2026 22:35
@sydevs-bot sydevs-bot moved this from Pending to Done in SYDevelopers Technical Roadmap Nov 19, 2026
sydevs-bot pushed a commit that referenced this pull request Nov 19, 2026
main moved the player to Video.js 10 (#285) and started streaming unsaved
lecture edits into the preview panel (#290). Both sides are kept:

- package.json / pnpm-lock.yaml: main's `@videojs/*` replaces `vidstack` and
  `hls.js`; this branch's `unhead` and `@unhead/schema-org` stay.
- pages/[slug]/+config.ts: comment only. `ContentHead` is gone here, so the
  text describing it went with it.
- pages/lectures/[id]/(full)/+Page.tsx: main's `LivePreviewDocument`
  subscriber and `LectureBody` are kept; `usePageHead` is not, because the
  head is the route's `+data.ts` on this branch.

Semantic conflict, outside any marker: #290 made `loadLecture` and
`getLecture` answer a raw `Lecture` and moved `resolveLecture` to the render,
so the two consumers this branch adds — the lecture `+data.ts` head and
`/oembed`'s `readMedia` — resolve it themselves. Both read a clip's player
source and poster from its parent, as the page does.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjWiiELoro82VSgyRc7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

feat(player): move VideoPlayer from Vidstack to Video.js 10

3 participants