Closed bkmorse closed 3 years ago
I'd raise this on the embed/embed
package this is where those fields come from
I wanted to mention one thing I did: I downloaded the wordsmith plugin which has a “youtubeId” parsing so you can do: {{ entry.field.media.url | youtubeId }} to pull that part. My page loads a bit slow with this, but I don’t know if it’s the oEmbed plugin, the wordsmith plugin, or something else.....
I use this embed method which really speeds up page load: https://css-tricks.com/lazy-load-embedded-youtube-videos/
There are similar ones out there, and having direct access to that media.id seems to be the key to inserting it.
oEmbed uses embed/embed
which fetches the data using a network request so that's why its slow this can be improved by using the "Caching" option in the plugin's settings. This should still work with wordsmith, in future their is an idea to make the plugin cache the last fetched / "on saved" snapshot of the object to help with speed and if the service website is down for some unknown reason.
That’s very helpful information as I figure out when to use the plugin and when to just use a URL field - weigh performance vs the features I need in each case. Thanks!
No issues I'll close the issue for now but glad I could provide you the information you need.
In addition to these already available variables
entry.field.media.title entry.field.media.description entry.field.media.url entry.field.media.type entry.field.media.tags entry.field.media.images entry.field.media.image entry.field.media.imageWidth entry.field.media.imageHeight entry.field.media.code entry.field.media.width entry.field.media.height entry.field.media.aspectRatio entry.field.media.authorName entry.field.media.authorUrl entry.field.media.providerName entry.field.media.providerUrl entry.field.media.providerIcons entry.field.media.providerIcon entry.field.media.publishedDate entry.field.media.license entry.field.media.linkedData entry.field.media.feeds
Could you add:
entry.field.media.id entry.field.media.embed_url
The reason I think it would be helpful is if someone wanted to build their own iframe element, they can build their own iframe tag and apply params like &rel=0 to it