Giter Club home page Giter Club logo

cloudflare-stream-video-upload's Introduction

๐ŸŽฅ Cloudflare Stream Upload Demo

Demo

Background

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.

What is tus?

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

What Are Creator Uploads?

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.

Getting Started

This repo leverages the following tools:

Running Cloudflare Worker Locally

  1. Login to your Cloudflare account with wrangler login
  2. cd server && npm i
  3. wrangler dev --port 5500
  4. 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

Deploying To The Web

Deployment to the world-wide-web is simple.

  1. cd server && npm i
  2. wrangler deploy

Running The Client

This demo intentionally uses vanilla Javascript to keep things simple. Everything can be loaded by simply opening the index.html file in your browser.

cloudflare-stream-video-upload's People

Contributors

alamriku avatar schachte avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.