Tell us what you are trying to do?
I'm building a Youtube gallery where users submit the Youtube Video ID/URL and it pulls the information into the <iframe> tags that are used to embed a Youtube video into a website.
Currently I am having users copy the Youtube video ID - however, I think this is a bit confusing. I would rather have them pull in the youtube URL. However; this works for the video itself but not the video thumbnail link. The thumbnail link uses the video ID. I'm wondering if I can use the actual Youtube URL then have some kind of function that pulls the actual video ID from the submitted URL and use it for the Thumbnail url?
Is there any documentation that you are following?
None
Is there a similar example that we can see?
None
What is the link to your site?
hidden link
Hello,
I assume we are talking about the custom embeded field created with Types plugin, see our document:
https://toolset.com/documentation/customizing-sites-using-php/functions/#embedded-media
There isn't such kind of feature as your request:
use the actual Youtube URL then have some kind of function that pulls the actual video ID from the submitted URL and use it for the Thumbnail url
So it needs custom codes, I have searched it in google, found some related threads, for your reference:
https://wordpress.stackexchange.com/questions/176360/get-youtube-video-id-from-url-in-a-custom-field