Skip to content

docs(readme): commit overview MP4 + serve via raw.githubusercontent.com#47

Merged
sathyaprakash000 merged 1 commit into
mainfrom
docs/inline-video-via-raw-url
May 26, 2026
Merged

docs(readme): commit overview MP4 + serve via raw.githubusercontent.com#47
sathyaprakash000 merged 1 commit into
mainfrom
docs/inline-video-via-raw-url

Conversation

@sathyaprakash000
Copy link
Copy Markdown
Contributor

Why

The previous video PR (#46) shipped this <video> tag pointed at the v1.0.0 release-asset URL:

<video src="https://github.com/Forgemind-git/ForgeChat/releases/download/v1.0.0/ForgeChat.overview.mp4" ...>

On render, GitHub's HTML sanitizer stripped the <video> element entirely. Only the fallback caption ("▶ 30-second tour — also on YouTube…") survived. Reason: release-asset URLs aren't in GitHub's media-src CSP allowlist for inline video.

What changed

  1. Commit the MP4 to docs/forgechat-overview.mp4 — same file (identical SHA-256 a73f66af…) we already attached to the v1.0.0 release.
  2. Point <video src> at raw.githubusercontent.com — that domain IS in GitHub's media-src CSP, serves with proper Content-Type: video/mp4, and the <video> element survives sanitization.
-<video controls width="720" preload="metadata" src="https://github.com/Forgemind-git/ForgeChat/releases/download/v1.0.0/ForgeChat.overview.mp4" poster="...">
+<video controls width="720" preload="metadata" src="https://raw.githubusercontent.com/Forgemind-git/ForgeChat/main/docs/forgechat-overview.mp4" poster="...">

Trade-off

Adds ~31 MB to git history once — bounded, doesn't grow on future releases. This is the only way to get a reliable inline-playing video in a GitHub README without per-visitor friction (issue drag-drop URLs work too but require manual upload via the GitHub UI). Most large OSS demos (llama.cpp, ollama, etc.) take the same approach.

The v1.0.0 release asset stays attached for direct download.

2 files changed, 1 insertion(+), 1 deletion(-)
docs/forgechat-overview.mp4 added (31 MB binary)

Test plan

  • CI green
  • Open the rendered README in an incognito window → <video> element appears under the badges with the YouTube thumbnail as poster
  • Click play → video plays inline on github.com

GitHub's HTML sanitizer strips <video src=\"...releases/download/...\"
...> tags from rendered markdown — release-asset URLs aren't in the
CSP allowlist for inline video. The previous PR (#46) shipped the
right markup but the <video> element silently disappeared on render;
only the fallback caption survived.

Commit the same MP4 (identical sha256
a73f66af6ae3fd5899e406dda4fedb20da8e9f387de5d87e0c334110e6220417) to
docs/forgechat-overview.mp4 and point the <video> element at the raw
URL:

  https://raw.githubusercontent.com/Forgemind-git/ForgeChat/main/docs/forgechat-overview.mp4

raw.githubusercontent.com IS in GitHub's media-src CSP, serves the
file with the correct Content-Type: video/mp4, and renders inline in
the README. Adds 31 MB to git history once.

The v1.0.0 release asset stays attached for users who want a direct
download link (also useful for the README to fall back to if the raw
URL ever caches stale).

Signed-off-by: KingArthur000 <sathyaprakashelango@gmail.com>
@sathyaprakash000 sathyaprakash000 merged commit 9b271a3 into main May 26, 2026
11 checks passed
@sathyaprakash000 sathyaprakash000 deleted the docs/inline-video-via-raw-url branch May 26, 2026 09:26
sathyaprakash000 added a commit that referenced this pull request May 26, 2026
GitHub's README sanitizer strips <video src=...> elements whose src
isn't on the user-attachments allowlist — even when the URL is a
trusted github.com/.../raw or raw.githubusercontent.com path. That
left the previous embed (#46, #47) rendering as just the fallback
caption.

Fix: switch the inline preview to an animated GIF (<img>), which
github.com's sanitizer trusts from any raw/relative URL and which
auto-plays / auto-loops on scroll-into-view in every markdown
renderer (web, GitHub mobile, IDE previews). Keep the YouTube link
right under it for viewers who want audio + full quality.

Files
- Add docs/forgechat-overview.gif — 14 MB, 640×310, 12 fps, palette-
  optimized with bayer dither. Visually equivalent to the MP4 for a
  screen-recording tour.
- Remove docs/forgechat-overview.mp4 from the working tree. The same
  MP4 stays attached to the v1.0.0 release for direct download. Git
  history still holds the blob (added in #47), so this only shrinks
  the working-tree size for clones from main forward.
- README block becomes <img> wrapped in <a href=YouTube>, with a
  caption below pointing at YouTube for the full audio version.

Signed-off-by: KingArthur000 <sathyaprakashelango@gmail.com>
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.

1 participant