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
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.
<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>
<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>