-
-
Notifications
You must be signed in to change notification settings - Fork 587
[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
[6.x] Support more video providers, including Cloudflare Stream #11871
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
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.
- 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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like some of the tests are failing. Are you able to take a look?
It looks like some of the tests are failing. Are you able to take a look?
Done
Closes statamic/ideas#1336