How we built Cloudflare TV

Cloudflare TV showcases many of the technologies powering the Cloudflare Developer Platform. Every page, video, search query, and editor tool behind this site runs on products any developer (or agent) can use.

Right now the library holds 157 videos across 7 shows, about 67 hours total.

BindingsStorage and search
D1R2Workers KVAI Search
One WorkerRuns Astro and EmDash
Workers CacheSaves copies of pages
StreamVideo, thumbnails, and player
Your browser
One Worker builds web pages and connects to Cloudflare storage and search through Bindings, while Workers Cache serves repeat visits faster. Video skips the Worker altogether and streams straight from Cloudflare Stream to your browser.

Video and playback

Every recording streams straight from Cloudflare's network.

Video storage, encoding, and playback

Every video on Cloudflare TV is hosted in Cloudflare Stream. We upload a recording once, and Stream encodes it into versions sized for different screens and internet speeds, then delivers it over Cloudflare's global network. The embedded player comes from Stream too, with its controls styled in Cloudflare orange.

Preview thumbnails are pulled straight from each video on demand, usually 35 seconds in so you see the actual program instead of an opening title card.

How On air works

The On air channel feels like a continuous TV broadcast, but there's no live video feed or schedule behind it. Instead, imagine the active playlist looping nonstop since midnight UTC on January 1, 2026.

Because the site saves the exact duration of every video, your browser checks the current clock to see where that loop would be right now and jumps straight to that video and timestamp. Every viewer's browser runs the same calculation, so everyone lands on the same moment. Editors pick which shows belong in the loop, and once the last video finishes, it rolls back to the first.

Pages and design

Code, caching, and interface components behind each page.

Serverless code on Cloudflare's network

The entire site runs inside a single Cloudflare Worker, a small program deployed across Cloudflare's network instead of on a central server. That one Worker builds the web pages, powers the editor dashboard, and handles search requests.

It connects to storage and search through Bindings, the platform's built-in links between a Worker and other Cloudflare services. A Cron Trigger runs on a schedule every minute to publish updates queued for a future time, and a Rate Limiting Binding keeps any single visitor from flooding search.

Saved page copies stored close to visitors

After the Worker builds a public page, Workers Cache saves a copy near visitors for up to two minutes. When someone else opens the same page, that cached copy loads right away without running the Worker again.

Each saved page is labeled with Cache-Tags showing which shows and videos it depends on. When an editor publishes an update, the site clears the affected pages from the cache so changes appear on the next visit.

Web framework for fast, content-focused sites

Astro builds each page inside the Worker and sends plain HTML to your browser, keeping pages fast to load. Interactive pieces like the video player and collapsible sidebar are the only parts that load JavaScript in the browser.

The Astro team joined Cloudflare in January 2026, and the same framework powers Cloudflare's developer documentation.

Cloudflare's open-source UI component library

The sidebar, buttons, links, and the cards you're reading right now are all Kumo components, with keyboard navigation and accessibility built in.

Its color tokens, the reusable color values shared across every component, handle light and dark themes automatically. The site follows your device setting by default, or you can switch themes with the button in the top right.

Content management

How editors add shows, publish updates, and sign in securely.

Cloudflare's open-source content management system (CMS)

Built on Astro, EmDash gives editors a web dashboard for managing shows, video details, and the sidebar menu without touching code. To add a new video, an editor pastes its Stream ID and fills in a title and description. A custom EmDash plugin automatically checks Stream for the video's length on save, so nobody has to look up or type in the duration by hand.

Cloudflare uses EmDash to run the Cloudflare Blog too.

Serverless SQL database

While Stream holds the video files, D1 stores the catalog data behind the site: show lists, video titles, descriptions, speaker names, menus, settings, and edit history. Whenever a page isn't already saved in Workers Cache, the Worker queries D1 to build it.

Object storage with no egress fees

R2 is Cloudflare's object storage for hosting files and images without egress fees, meaning there are no bandwidth charges when files are downloaded. Here, it backs EmDash's media library for any images or files editors upload, while the videos themselves stay in Stream.

Zero Trust login for internal tools

Rather than managing separate CMS usernames and passwords, editors sign in with their company identity through Cloudflare Access. That follows a Zero Trust model, verifying a signed login token on every request to the editor dashboard instead of trusting anyone just for being on a corporate network. From there, site administrators decide who can edit or publish.

Global key-value storage

Workers KV stores small pieces of data by key, much like a fast global lookup table distributed across Cloudflare's network. After Access confirms who an editor is, EmDash keeps their active session details in Workers KV so the dashboard stays quick from anywhere.

Search and analytics

Finding videos by topic and measuring traffic without cookies.

Managed semantic and keyword search

The search button at the top of every page covers the entire published library. An EmDash plugin adds every published show, plus each video's title, description, and speakers, to the search index. AI Search pairs keyword matching with semantic search, which considers meaning as well as exact words. Even if a video describes a topic in different terms, it still shows up.

The search popup itself is one of AI Search's prebuilt UI snippets, a ready-made search window restyled to match Cloudflare TV.

Privacy-first, cookie-free analytics

Cloudflare Web Analytics counts visits and page views without setting cookies or fingerprinting browsers, which means it never tracks visitors by their device details.

Its lightweight script, called a beacon, only loads on the live cloudflare.tv domain so internal previews and test copies never skew the numbers.

Build something like it

Workers has a free plan, and Astro, EmDash, and Kumo are open source.