Skip to content

mux Antlers Tag

Injects the available Mux video data so you can render custom markup.

antlers
{{ mux src="assets::video.mp4" }}
  <mux-video
    playback-id="{{ playback_id }}"
    poster="{{ thumbnail }}"
  ></mux-video>
  <noscript>
    <img src="{{ gif }}">
  </noscript>
{{ /mux }}
html
<mux-video
  playback-id="85g23gYz7NmQu02YsY81ihuod6cZMxCp017ZrfglyLCKc"
  poster="https://image.mux.com/85g23gYz7NmQu02YsY81ihuod6cZMxCp017ZrfglyLCKc/thumbnail.jpg"
></mux-video>
<noscript>
  <img src="https://image.mux.com/85g23gYz7NmQu02YsY81ihuod6cZMxCp017ZrfglyLCKc/animated.gif">
</noscript>

Parameters

ParamTypeDescription
src / path / assetstring|AssetThe local video asset or its id/path

Available data inside the tag pair

VariableTypeDescription
thumbnailstringThe URL to a full-resolution thumbnail image of the video
placeholderstringThe data URI of a small blurry placeholder image of the video
gifstringThe URL to an animated GIF version of the video
mux_idstringThe unique Mux id of the video
playback_idstringA playback id that allows streaming the video
playback_urlstringA playback url pointing to an encoded video playlist
playback_tokenstringA signed playback token to enable secure playback
is_publicboolWhether the video can be viewed without restrictions
is_signedboolWhether the video requires a signed playback url

Unlicensed commercial plugin