Skip to content

feat(blog): add lazy-loaded looping video shortcode - #173

Merged
gberenice merged 3 commits into
mainfrom
feat/loop-video-shortcode
Aug 31, 2026
Merged

feat(blog): add lazy-loaded looping video shortcode#173
gberenice merged 3 commits into
mainfrom
feat/loop-video-shortcode

Conversation

@oycyc

@oycyc oycyc commented Aug 31, 2026

Copy link
Copy Markdown
Member
  • Adds a loop-video shortcode for silent, looping demo clips, used on the click-ops post to show the skill in action. Documented in docs/videos.md.
  • Nothing is fetched until the reader scrolls to it, then it plays muted on repeat while on screen and pauses when it scrolls away or the tab is hidden.
  • Custom scrub bar with play/pause, elapsed time, and progress — click the picture to toggle, drag or arrow-key to seek.

Adds a `loop-video` shortcode for silent, looping demo clips, and uses it
to show the codify-clickops-iac skill in action on the click-ops post.

The clip stays inert until the reader scrolls to it: the sources carry
`data-lv-src` rather than a real `src`, so a reader who never reaches it
downloads zero video bytes. It then plays muted on repeat while on screen
and pauses when it scrolls away or the tab is hidden.

Includes a custom scrub bar (play/pause, elapsed time, played-over-buffered
progress) with click-to-toggle on the picture, drag and keyboard seeking,
and a poster that holds the frame's aspect ratio so nothing shifts on load.

H.264 MP4 only, audio stripped at encode time.

Documented in docs/videos.md.
@oycyc
oycyc requested a review from a team as a code owner August 31, 2026 17:15
@netlify

netlify Bot commented Aug 31, 2026

Copy link
Copy Markdown

Deploy Preview for masterpoint ready!

Name Link
🔨 Latest commit 6062adc
🔍 Latest deploy log https://app.netlify.com/projects/masterpoint/deploys/6a95be5da67f2100087a9bb5
😎 Deploy Preview https://deploy-preview-173--masterpoint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 43
Accessibility: 89
Best Practices: 92
SEO: 81
PWA: 70
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: dca2a886-8fd7-4ce1-9980-2a5b445c35f2


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

oycyc added 2 commits August 31, 2026 13:21
The two `text.replace` calls with inline arguments sat past 80 columns, where
oxlint's formatter wants them joined and prettier wants them wrapped, so
`trunk fmt` looped and `trunk check` failed the file. This predates the
shortcode change but only surfaced in CI once the file was touched.

Hoist the patterns to constants and the URL rewriter to a named function so
every line fits inside 80 columns and both formatters leave it alone.
Space and Enter now start and stop the clip while it has focus, matching how
video players behave. The video takes a tabindex so it can be focused, and a
click focuses it so click-then-space works without tabbing.

The key is only intercepted while the video holds focus, so space still
scrolls the page everywhere else. The focus ring is drawn inset, since the
frame clips overflow, and uses the teal highlight so it reads over both the
light and dark halves of a screen recording.
@gberenice
gberenice merged commit df1d417 into main Aug 31, 2026
8 checks passed
@gberenice
gberenice deleted the feat/loop-video-shortcode branch August 31, 2026 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants