Mux EE Module Docs

for ExpressionEngine

:get & Fieldtype

The primary tag for displaying audio, video, and images is the asset and live custom fields loop along with the identical get tag. For the purpose of these docs, the custom field and :get will be referred to just as the :get tag.

Usage

:get

{exp:mux:get mux_id="{your_mux_id}"}
    {playback_url}
     ....
{/custom_mux_asset_field}

Custom Field Loop

{custom_mux_asset_field}
    {playback_url}
     ....
{/custom_mux_asset_field}

get: Parameters

Name Description
mux_id Unique identifier for the Asset or Live Stream. Max 255 characters.
prefix A string of characters to append to each tag. Used when nesting get loops.

Deleted assets are not returned.

get: Single Variables

These are the most used tags when creating videos.

Tag Type Description
mux_id Live, Asset Unique identifier for the Asset or Live Stream. Max 255 characters.
type Live, Asset Possible values are ‘asset’ ‘live_stream’ ‘upload’
filename Asset Uploaded filename with extension.
asset_title Asset A short (256ch) description of the asset. Defaults to filename.
created Live, Asset Time the item was created, defined as a Unix timestamp (seconds since epoch).
playback_id Live, Asset First public ID for playing HLS feed. Useful for creating custom URLs to video assets like gif, jpg…
playabck_token Live, Asset JWT including parameters. Required for playback when using signed urls.
playback Live, Asset Playback ID, plus Token if required.
playback_url Live, Asset Full URL with all parameters included.
dvr_id Live The video ID of the live stream recording. Also known as the ‘recent asset id.’
dvr_token Live JWT including parameters. Required for playback when using signed urls.
dvr_playback Live Playback ID, plus Token if required
dvr_url Live Full mux URL to the ‘recent asset id’ that will enable DVR and be available after the live stream concludes.
jpg_token Live, Asset JWT for getting image. Note that transformations are not allowed.
storyboard_token Live, Asset JWT for getting image. Note that transformations are not allowed.
thumbnail_url Live, Asset Returns the full Mux URL to a JPG thumbnail at a random timecode. Mux also supports additional query parameters to modify the image. Mux Image Docs
thumbnail_gif Live, Asset URL to gif image
timeline_url Asset Returns the full Mux URL to Timeline Hover Previews. Mux Timeline Hover
timeline_vtt Asset URL to VTT file.
timeline_json Asset URL to JSON that describes the Storyboard image sprites.
mux_status Live, Asset Asset: Possible values: preparing ready errored Live: Possible values: active idle disabled Idle indicates that there is no active broadcast, active indicates that there is an active broadcast and disabled status indicates that no future RTMP streams can be published.
aspect_ratio Asset Example 16/9
aspect_ratio_css Asset Intended for the CSS property. Example 16:9
duration_seconds Asset Duration of the asset in seconds. Example: 5412
duration Asset Human readable duration. Examples: 5 sec 5:32
max_stored_frame_rate Asset Example 59.938
max_stored_resolution Asset Audio only SD HD FHD UHD
test Asset, Live bool If asset or live stream was created with the test flag.
enviroment Asset, Live Which Mux enviroment the item belogs to.
act_url Asset, Live The full path to the EE Action URL for accessing the API methods.
act_full Asset, Live The full path to the EE Action URL for accessing the API methods.
act_read Asset, Live The full path to the EE Action URL for accessing the API methods.
act_write Asset, Live The full path to the EE Action URL for accessing the API methods.
audio_only Asset, Live boolean if the item is audio-only with no video.
signed Asset, Live If settings are using signed playback
env_key Asset, Live The Mux Data environment key.
real_time_views Asset, Live Full URL to the Mux realtime views.
stream_key Asset, Live RTMP stream key for live streams. Keep this secure!
static_renditions_status Asset Current status of creating mp4 renditions. Options are pending ready or errored
json Live, Asset JSON-formatted string of the items data. Useful for API requests, or javascript.

Variable Pairs

Recordings

Loops over the live stream recordings (assets) with each video having the same group of template tags appended with the word “recording”. Deleted or errored assets are not returned.

{exp:channel:entries...}
{mux_live} // Your custom field.

     {recordings}
         {exp:mux:player mux_id="{recording_mux_id}"}
         {recording_mux_id}
         {recording_duration}
         Created {recording_created format="%M %d, %Y at %h:%m%a"}
         ...etc.
     {/recordings}

{/mux_live}
{/exp:channel:entries}

Clips

Loops over the clips made from the parent asset with each video having the same group of template tags appended with the word “clip.” Deleted or errored assets are not returned.

{exp:channel:entries...}
{mux_asset} // Your custom field.

     {clips}
         {exp:mux:player mux_id="{clip_mux_id}"}
         {clip_mux_id}
         {clip_duration}
         Created {clip_created format="%M %d, %Y at %h:%m%a"}
         ...etc.
     {/clips}

{/mux_asset}
{/exp:channel:entries}