{% assign video_url = include.src %} {% assign title = include.title %} {% assign poster_url = include.poster %} {% assign types = include.types | default: '' | strip | split: '|' %} {% unless video_url contains '://' %} {%- capture video_url -%} {% include media-url.html src=video_url subpath=page.media_subpath %} {%- endcapture -%} {% endunless %} {% if poster_url %} {% unless poster_url contains '://' %} {%- capture poster_url -%} {% include media-url.html src=poster_url subpath=page.media_subpath %} {%- endcapture -%} {% endunless %} {% assign poster = 'poster="' | append: poster_url | append: '"' %} {% endif %} {% assign attributes = 'controls' %} {% if include.autoplay %} {% assign attributes = attributes | append: ' ' | append: 'autoplay' %} {% endif %} {% if include.loop %} {% assign attributes = attributes | append: ' ' | append: 'loop' %} {% endif %} {% if include.muted %} {% assign attributes = attributes | append: ' ' | append: 'muted' %} {% endif %}
{% if title %} {{ title }} {% endif %}