embed_url Object

Data about a media URL to embed within an <audio> or <video> tag.

Attributes

Attribute Required Description
url Yes string URL where media file is stored.
content_type Yes string MIME type of media. For example, audio/mpeg3.
extension Yes string Media file’s extension. For example, mp4.

Category

Block Objects

Description

embed_url cannot be set as a block type directly but is referenced from several content template blocks (e.g., audio and video).

You will often want to reference embed_url data to build out HTML tags pointing to web-safe versions of media like audio and video.

HTML5 <video> tag with web-friendly embed URLs
      <video controls preload="auto">
        {% for embed_url in video.embed_urls %}
          <source type="{{ embed_url.type }}" src="{{ embed_url.url }}">
        {% endfor %}
      </video>
      
HTML5 <audio> tag with web-friendly embed URLs
      <audio controls preload>
        {% for embed_url in audio.embed_urls %}
          <source type="{{ embed_url.content_type }}" src="{{ embed_url.url }}">
        {% endfor %}
      </audio>