cloudflare / templates

A collection of starter templates and examples for Cloudflare Workers and Pages
https://cloudflareworkers.com
MIT License
1k stars 638 forks source link

Add Cloudflare Stream Video Player Examples #95

Closed irvinebroque closed 2 years ago

irvinebroque commented 2 years ago

Adds the following examples to a new directory, /stream:

To be merged in advance of https://github.com/cloudflare/cloudflare-docs/pull/5555 — we plan to link directly to these examples in updated Stream developer docs, using the workers.new/stream/video-js shortlinks. These examples help people getting started with Stream understand how Stream integrates with popular video players.

These examples use wrangler pages dev --local, to make it easy to serve a simple html file, and avoid having to introduce the concept of Cloudflare Workers to someone just trying to add Stream to their webpage. The 3rd party javascript players are intentionally imported as <script> tags to enable someone just adding videos to their webpages to copy and paste code, without dealing with NPM.

These are a different flavor of example content than what exists today in this repository. To avoid polluting the root directory with tons of examples, this creates a separate /stream directory for Cloudflare Stream examples.

cc @eidam