Conversation
edalzell
force-pushed
the
feature/video-oembed-lookup
branch
from
September 14, 2026 23:10
29f66c6 to
e05f376
Compare
edalzell
force-pushed
the
feature/video-oembed-lookup
branch
from
September 14, 2026 23:16
e05f376 to
9e595ca
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The video fieldtype only understands YouTube and Vimeo, because those are the two providers
CoreModifiers::embedUrl()knows how to rewrite by hand. This adds oEmbed lookup viampratt/emberaso Loom, Wistia, TikTok, Streamable, Rumble, Vidyard, SproutVideo, DailyMotion, Coub, Ted and Bunny work too, resolved through a new CP endpoint as you type.On the dependency, since that was the open question. Embera can resolve a URL to an embed URL from rules built into the library rather than calling the provider's API, so YouTube, Vimeo, DailyMotion, Loom, Streamable, Rumble, Coub and Ted make zero HTTP requests — there's a test asserting that under
Http::preventStrayRequests(). Only Wistia, TikTok, Vidyard and SproutVideo need a request, and those are cached for an hour. So the runtime cost for the common case is nothing; the dependency earns its keep for the long tail.Embera's own HTTP client sets
CURLOPT_SSL_VERIFYPEER => 0and no timeout, so it isn't used —Statamic\Fieldtypes\Video\HttpClientimplements Embera'sHttpClientInterfaceover Laravel'sHttpclient instead, with verification on and 5s connect / 10s total timeouts. Embera's oEmbedhtmlis never rendered: thesrcis extracted, validated as anhttpsURL, and the iframe is built in Vue, so no provider-supplied markup reaches the CP. Lookups are debounced, aborted on change, and discarded if they resolve after the value has moved on.