Project

General

Profile

Actions

Feature #3163

open

Make CloudFlare adapter for video uploads etc.

Added by Gregory Magarshak 8 months ago. Updated 8 months ago.

Status:
New
Priority:
High
Category:
External APIs
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:

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/

Actions #1

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

https://customer-f33zs165nr7gyfy4.cloudflarestream.com/6b9e68b07dfee8cc2d116e4c51d6a957/thumbnails/thumbnail.gif?time=1s&height=200&duration=4s

Actions

Also available in: Atom PDF