[6.x] Support more video providers, including Cloudflare Stream - #11871
[6.x] Support more video providers, including Cloudflare Stream#11871edalzell wants to merge 45 commits into
Conversation
|
Might be worthwhile doing something similar to what I did with the embera tag - https://github.com/godismyjudge95/statamic-embera Embera is a oembed client that takes in a video url and spits out an iframe. It has a decent number of video providers supported - https://github.com/mpratt/Embera/blob/master/doc/02-providers.md |
This is a really nice idea. I'll chat w/ the team on how they'd like to approach, as it's another dependency. |
for augmenting maybe...
for backwards compat...
|
duncanmcclean
left a comment
There was a problem hiding this comment.
It looks like some of the tests are failing. Are you able to take a look?
Done |
# Conflicts: # resources/js/components/fieldtypes/VideoFieldtype.vue # routes/cp.php
jasonvarga
left a comment
There was a problem hiding this comment.
Findings from review (see inline comments). Cloudflare Stream preview is provably broken as written, plus a couple of warnings worth fixing before merge. Full writeup: the Cloudflare embed never renders because the Vue component sends a bare video ID while the backend expects a cloudflare:-prefixed string; the controller test only covers the prefixed form, so it doesn't catch this.
…tcher wiping the embed
|
Addressed all six. Cloudflare now sends the stored cloudflare: value as url, controller only reads url. Lazy-load gating restored, ID escaped with e(), .catch() toasts, Text tests removed. Also fixed a watcher bug where a lookup that changed the provider wiped the embed and URL input. Added Vitest coverage for the component, which is what the controller test couldn't catch. |
Closes statamic/ideas#1336