Answers.Body: <p>Worked it out - just needed to use the right syntax, for example:</p>
  
  <pre><code>{% set embed = craft.videoEmbedder.getEmbedUrl(entry.videoEmbed) %}
  
  {% if embed | length %}
  &lt;div class="embed-responsive embed-responsive--mb-l embed-responsive-16by9"&gt;&lt;iframe src="{{ embed }}" width="100%" height="600" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen&gt;&lt;/iframe&gt;&lt;/div&gt;
  {% endif %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-07-05T13:49:01.930Z
Answers.LastActivityDate: 2018-07-05T13:49:01.930Z
Answers.UserDisplayName: MGX
Answers.Body: <p>Unfortunately, it has causes a big PHP error if 'empty'...If you don’t have any content (i.e. it’s an optional field for someone to add a video embed to the page and the user chooses not to embed a video) it triggers a big PHP error:</p>
  
  <pre><code>Embed\Exceptions\InvalidUrlException
  
  &lt;url&gt; malformed
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-07-11T15:37:49.610Z
Answers.LastActivityDate: 2018-07-11T15:37:49.610Z
Answers.UserDisplayName: MGX
Body: <p>In the example from the documentation on Craft 3 '<strong>Video Embedder</strong>' plugin:</p>
  
  <pre><code>{% set embed = craft.videoEmbedder.getEmbedUrl('https://www.youtube.com/watch?v=6xWpo5Dn254') %}
  
  {% if embed | length %}
      &lt;iframe src="{{ embed }}"&gt;&lt;/iframe&gt;
  {% endif %}
  </code></pre>
  
  <p>Can someone please give me full (i.e. total beginner!) instructions on how to get the URL to load. </p>
  
Tags: <plugins><embed>
Title: Embedding video using Craft 3 'Video Embedder' plugin
ThreadText: # Embedding video using Craft 3 'Video Embedder' plugin
  
  (Asked by: username_0 on 2018-07-05)
  
  In the example from the documentation on Craft 3 '**Video Embedder**' plugin:
  
  ```
  {% set embed = craft.videoEmbedder.getEmbedUrl('https://www.youtube.com/watch?v=6xWpo5Dn254') %}
  
  {% if embed | length %}
      <iframe src="{{ embed }}"></iframe>
  {% endif %}
  
  ```
  
  Can someone please give me full (i.e. total beginner!) instructions on how to get the URL to load.
  
  **Tags:** plugins, embed
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2018-07-05. Score: 1
  
  Worked it out - just needed to use the right syntax, for example:
  
  ```
  {% set embed = craft.videoEmbedder.getEmbedUrl(entry.videoEmbed) %}
  
  {% if embed | length %}
  <div class="embed-responsive embed-responsive--mb-l embed-responsive-16by9"><iframe src="{{ embed }}" width="100%" height="600" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe></div>
  {% endif %}
  
  ```
  
  
  ---
  
  ### Answer by username_0 on 2018-07-11. Score: 1
  
  Unfortunately, it has causes a big PHP error if 'empty'...If you don’t have any content (i.e. it’s an optional field for someone to add a video embed to the page and the user chooses not to embed a video) it triggers a big PHP error:
  
  ```
  Embed\Exceptions\InvalidUrlException
  
  <url> malformed
  
  ```
  
  
  ---
  
  