Home › Forums › General Issues › Youtube Oembed field not working › Reply To: Youtube Oembed field not working
We have exactly the same problem and that’s because WordPress creates the player via the admin-ajax.php, resulting in that the request to the youtube oembed API comes from your server and not from your computer.
We host our WordPress Sites ourselves and we have 100+ sites running on our server. Some sites are heavily using ACF oEmbed.
Because WordPress handles the oembed request itself youtube gets a lot of requests from our server IP and we are hitting the quota limit.
This is the result of the curl:
curl https://www.youtube.com/watch?v=egSvdEJZRBk
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>302 Moved</TITLE></HEAD><BODY>
<H1>302 Moved</H1>
The document has moved
<A HREF="https://www.google.com/sorry/index?continue=https://www.youtube.com/watch%3Fv%3DegSvdEJZRBk&q=EhAqAQSIAGYQALAcDF4AAAABGPyv5fQFIhkA8aeDS54ikJN6T6hIAXwP4RDLMyzfx9vjMgFy">here</A>.
</BODY></HTML>
My take would be that ACF could enable an option to store the complete oembed response from google in the postmeta instead of only saving the entered url. With this, the frontend does not have to request the youtube oembed api everytime a uncached version of the site is loaded.
Is this realistic?
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.