Actions
Feature #3163
openMake CloudFlare adapter for video uploads etc.
Start date:
09/29/2024
Due date:
10/15/2024 (about 7 months late)
% Done:
0%
Estimated time:
10.00 h
Description
Like Vimeo, CloudFlare supports:¶
- tus (resumable uploads) for video and other large files, with custom URLs allowing browsers to upload directly to an endpoint without needing to proxy through our server: https://developers.cloudflare.com/stream/uploading-videos/resumable-uploads/
- uploading, encoding, as well as streaming via signed URLs to make sure only we can play the videos https://developers.cloudflare.com/stream/
- playing in any player: https://developers.cloudflare.com/stream/viewing-videos/using-own-player/
- they have a standard stream player in an iframe: https://developers.cloudflare.com/stream/viewing-videos/using-the-stream-player/
What to do:¶
1. Refactor video upload/playback to Adapter Pattern, if needed. So Vimeo is just one adapter.
2. Make CloudFlare adapters, for:
- Resumable Uploads (tus) from browser
- Q/video player with their iframe player, play/pause/etc.
- Generating thumbnails on the fly
Thumbnails
Note that you can grab a thumbnail easily from any point in the video, this is excellent! Our Javascript can easily create an animated GIF, assuming that the files are served with CORS. Otherwise, we would need PHP to make an animated GIF.
Here are the docs: https://developers.cloudflare.com/stream/viewing-videos/displaying-thumbnails/
Updated by Gregory Magarshak 8 months ago
Wow, CloudFlare is so developer-friendly, they already generate animated GIFs themselves! We would just have to download and copy them from PHP. Specify the width, height and number of seconds in the following format:
https://customer-f33zs165nr7gyfy4.cloudflarestream.com/6b9e68b07dfee8cc2d116e4c51d6a957/thumbnails/thumbnail.gif?time=1s&height=200&duration=4s
Actions