Skip to content

[6.x] Support more video providers, including Cloudflare Stream #11871

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

edalzell
Copy link
Contributor

@godismyjudge95
Copy link
Contributor

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

@edalzell
Copy link
Contributor Author

Might be worthwhile doing something similar to what I did with the embera tag - godismyjudge95/statamic-embera

This is a really nice idea. I'll chat w/ the team on how they'd like to approach, as it's another dependency.

@duncanmcclean duncanmcclean changed the base branch from ui to master June 30, 2025 18:42
@edalzell
Copy link
Contributor Author

edalzell commented Jul 1, 2025

  • 3 fields - url for pasting, dropdown for provider, video id
  • if you paste into the url, we'll extract the id and populate provider/id
  • save the provider/id

for augmenting maybe...

  • have a Video class with provider and id
  • the Video class would know how to get the regular and embed urls
  • __toString could output the non-embed url so {{ video_field }} on its own would continue to work
  • the embed_url modifier could handle a Video instance, so it could get the embed url from that

for backwards compat...

  • if your field has a url, it doesnt get augmented to a Video instance. it stays as a string.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants