From Cloudflare
Cloudflare Stream is a live streaming and on-demand video platform, which can ingest, encode, record, and play videos from one unified product.
Cloudflare Stream will handle the heavy lifting when it comes to video. Cloudflare manages authenticated streams, encoding, live streaming, storage and more all through their simple API or easy to use web dashboard.
Historically it stood for Transloadit Upload Server, later repurposed to The Upload Server. tus
provides a universal spec for how resumable uploads and large file uploads should work. tus
is built on top of HTTP/HTTPS, making it widely available on most platforms we use today.
tus is great if you:
- Need to handle large file uploads
- Have users with potentially unreliable network connections
- Want to provide pause and resume capabilities to your users
Cloudflare Stream offers many ways to upload videos. Of these methods available, creator uploads is one of the most unique and useful methods.
From Cloudflare Docs:
Direct creator uploads allow users to upload videos without API tokens. A common place to use Direct creator uploads is on web apps, client side applications, or on mobile apps where users upload content directly to Stream.
This repo leverages the following tools:
- Login to your Cloudflare account with
wrangler login
cd server && npm i
wrangler dev --port 5500
- Your endpoint is now available on
http://localhost:5500
Note: There are two secrets used in this repository. You can view these secrets in wrangler.toml
To add a secret to Cloudflare using wrangler
, you can run the following:
wrangler secret put ACCOUNT_ID_DEMO
wrangler secret put TOKEN_DEMO
Deployment to the world-wide-web is simple.
cd server && npm i
wrangler deploy
This demo intentionally uses vanilla Javascript to keep things simple. Everything can be loaded by simply opening the index.html
file in your browser.