: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. |
mux_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... |
playback_url | Live, Asset | Full mux URL to the HLS video feed. |
dvr_id | Live | The video ID of the live stream recording. Also known as the 'recent asset id.' |
dvr_url | Live | Full mux URL to the 'recent asset id' that will enable DVR and be available after the live stream concludes. |
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 | Returns the full Mux URL to a GIF thumbnail at a random timecode. Mux also supports additional query parameters to modify the image. Mux Image Docs |
timeline_url timeline_vtt timeline_json |
Live, Asset | Returns the full Mux URL to Timeline Hover Previews. Mux Timeline Hover |
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 | The full path to the EE Action URL for accessing the API methods. | |
json | Live, Asset | JSON-formatted text response of the most recent webhook. |
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:hlsplayer 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:hlsplayer 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}