Replace the VIDEO_UID and ACCOUNT_SUBDOMAIN
to load your Stream video
UID from Stream dashboard · Subdomain from embed URL (e.g. customer-abc123)
Stream provides a ready-to-use iframe embed. You can customise autoplay, loop, mute, controls, start time, and brand colour directly in the iframe URL.
Cloudflare can auto-generate captions via AI for any language, or you can upload a WebVTT/SRT file. Once added, enable them in the player with defaultTextTrack.
Enable MP4 download links for a video. Two types: default (full video MP4) and audio (audio-only). Downloads must be explicitly created — they are not on by default.
Restrict video access by requiring signed JWT tokens. Enable "Require Signed URLs" on the video, then generate short-lived tokens server-side. Use in the embed src instead of the plain video UID.
Every Stream video exposes a public JSON endpoint and a public details page. Useful for structured data, VideoObject schema, and programmatic video metadata access.
Two options — Pages (recommended) or a Worker. Both give you a clean subdomain on your account.
Cloudflare Pages (easiest): Put this HTML file in a repo or upload directly. Go to Workers & Pages → Create → Pages → Upload asset. Deploy, then add Custom domain → stream.smthingy.com. Cloudflare auto-provisions the DNS + TLS.
Worker with HTML response: Create a Worker that returns this page as an HTML response. Attach it to a Custom Domain: stream.smthingy.com. Good if you want server-side token signing in the same Worker.
Set VIDEO_UID: Replace YOUR_VIDEO_UID in the page with your actual Stream video UID from the dashboard JSON tab.
Set ACCOUNT_SUBDOMAIN: From your embed URL — e.g. customer-abc123def.cloudflarestream.com → subdomain is customer-abc123def.
For Signed URL demo: Add a Worker binding or a backend endpoint that issues JWT tokens. Store signing keys as Worker Secrets (wrangler secret put STREAM_SIGNING_KEY).