I'm trying to use the "Embedded Assets" Craft plug-in to embed Youtube and Vimeo videos in a matrix field, but I can't figure it out. I've read through the instructions on the Github page but I can't make sense of it.
I have successfully installed the plug-in, and it seems to be "grabbing" the videos correctly since I can see the video in the assets section and the json files are in the folder on my disk.
I put this twig code from the instructions of the plugin provider in my template:
{% for asset in assets %}
{% set embed = craft.embeddedAssets.fromAsset(asset) %}
{% if embed %}
{{ embed.safeHtml|raw }}
{% endif %}
{% endfor %}
but it breaks my page.
This is the error message I get, saying the variable "assets" does not exist:
52 <div class="video">
53 {% for videoEmbed in videoEmbed %}
54 {% set embed = craft.embeddedAssets.entry. (videoEmbed) %}
55 {% if embed %}
56 {{ embed.safeHtml|raw }}
57 {% endif %}
58 {% endfor %}
59 {% endif %}
60
61 </div>
62
63
64 {% endfor %}
I work locally and have dev mode turned on.
I am trying to use the plugin inside a matrix field with "videoEmbed" as block and field handle.
I created an asset source/ folder called "videos".
And I am on the personal licence.