-
Notifications
You must be signed in to change notification settings - Fork 744
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Vidstack stream template (#4134)
- Loading branch information
Showing
2 changed files
with
28 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
# Template: Cloudflare Stream + Video.js Playback | ||
# Template: Cloudflare Stream + Vidstack | ||
|
||
[![Deploy to Cloudflare Workers](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/cloudflare/templates/tree/main/stream/playback/vidstack) | ||
|
||
Example of Video.js playback with Cloudflare Stream | ||
A very simple CDN example of HLS playback with Cloudflare Stream and Vidstack. You can find more | ||
installation options and examples at: | ||
|
||
- [Vidstack Site](https://www.vidstack.io) | ||
- [Vidstack Examples Repo](https://github.com/vidstack/examples) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,31 @@ | ||
<html> | ||
<head> | ||
<link | ||
rel="stylesheet" | ||
href="https://cdn.jsdelivr.net/npm/vidstack@next/player/styles/default/theme.min.css" | ||
/> | ||
<link | ||
rel="stylesheet" | ||
href="https://cdn.jsdelivr.net/npm/vidstack@next/player/styles/default/layouts/video.min.css" | ||
/> | ||
<script | ||
src="https://cdn.jsdelivr.net/npm/vidstack@next/cdn/with-layouts/vidstack.js" | ||
type="module" | ||
src="https://cdn.jsdelivr.net/npm/@vidstack/player@next/cdn/bundle.js" | ||
></script> | ||
</head> | ||
<body> | ||
<vds-media> | ||
<vds-hls | ||
controls | ||
poster="https://customer-m033z5x00ks6nunl.cloudflarestream.com/b236bde30eb07b9d01318940e5fc3eda/thumbnails/thumbnail.jpg" | ||
> | ||
<video | ||
controls | ||
src="https://customer-m033z5x00ks6nunl.cloudflarestream.com/b236bde30eb07b9d01318940e5fc3eda/manifest/video.m3u8" | ||
preload="none" | ||
></video> | ||
</vds-hls> | ||
</vds-media> | ||
<!-- See https://vidstack.io and https://github.com/vidstack/examples for more options. --> | ||
<media-player | ||
title="Cloudflare Stream Demo" | ||
src="https://customer-m033z5x00ks6nunl.cloudflarestream.com/b236bde30eb07b9d01318940e5fc3eda/manifest/video.m3u8" | ||
> | ||
<media-provider> | ||
<media-poster | ||
class="vds-poster" | ||
src="https://customer-m033z5x00ks6nunl.cloudflarestream.com/b236bde30eb07b9d01318940e5fc3eda/thumbnails/thumbnail.jpg" | ||
></media-poster> | ||
</media-provider> | ||
<media-video-layout></media-video-layout> | ||
</media-player> | ||
</body> | ||
</html> |