I'm trying to use the "Embedded Assets" Craft plug-in to embed Youtube videos in my content, but I can't figure it out. I've read through the instructions on the Github page, and I've looked at other resources online, but it's not working and I can't make sense of it.
I have successfully installed the plug-in, and it seems to be "grabbing" the videos correctly because a thumbnail for the video appears when I enter the URL for it in the "Embed link" Asset selection. These are also saving in their respective fields when I enter them into an Entry.
Where I'm having trouble is understanding how to integrate them into my templates; the only configuration I changed was the 'extraAllowedFileExtensions' => 'json' setting in the general.php file. It said something else about configurations in the documentation, but it was very vague and said their should already be defaults in place. I tried dropping the code in that they suggested, as well, and played with the values a bit, but it's just empty space when I preview the page (or it breaks the page altogether).
Here is the code I tried to put into my template in different forms (tried the given loop, not looping, and etc.):
{% for asset in assets %}
{% set embed = craft.embeddedAssets.fromAsset(asset) %}
{% if embed %}
{{ embed.safeHtml|raw }}
{% endif %}
{% endfor %}
If you care to write an example, the handle for the field I'm using is embeddedMediaUrl and the embed links are stored in assets/mediaEmbeds (not sure if this info is needed or not.)
Any and all help with this will be greatly appreciated. I apologize if this is vague, but I've been messing around with it long enough that it seemed time to reach out to the community to see if someone could give me some help. Thank you.
{siteurl}/mediaEmbeds
.