Mux EE Module Docs

for ExpressionEngine

Video On-Demand

screenshot

Video On-Demand (VOD) files are for playing back uploaded videos or live stream recordings.  Mux calls these Assets.  These are most like regular YouTube videos.

There are three ways of creating an Asset:

Important Notes:

Uploads

Uploads are sent directly to the cloud physically close to your location making transfers fast and avoiding congestion to your web server.  Video files are usually available very quickly, usually seconds, after upload with Mux's Just-In-Time delivery.  Some types of files, the more unique or professional codecs, may need additional encoding time.  See Mux's Documentation on how to reduce those times.

Decoupled Player

What makes Mux different than other services like YouTube is that only the streaming link is provided, and nearly any player can be used.  With Mux you have the ability to customize what player is used, how it looks, and how it behaves. The advantage is much more flexibility and customization, but does require some additional work in setting up the player.  Mux comes with a simple EE tag that embeds a simple player to get started, and includes a number of examples of players.

Mux also has a brand new shinny player that uses native web components.

IDs & Playback

Each Asset has a unique Mux ID to identify the video, and to get metadata such as duration, and resolution.  Playback IDs are used in a URL to play the video, or get images.  With separate IDs, this means the video's playback links can be freely changed for security without needing to re-upload the video.

Secured/Signed Playback

MuxEE supports signed playback as of v2.  This is great for subscriptions or protected video content from being distributed outside your website.  Each link has an expiration time, default is 24 hours, and can be locked to a domain.  This also includes all image links.

This option is currently a global setting for all video, both assets and live streams, and can be changed at any time.  

Mux's Guide on Assets: https://docs.mux.com/guides/video/stream-video-files

HLS

Each playback link will be to an Http Live Streaming (HLS) file.  HLS is a protocol for streaming video.  The video is cut into usually 3 second chunks and linked in a file for the player to download when needed.  HLS can also include video quality levels for the player to jump to when bandwidth is low or for a small screen size.

Players

HLS needs a compatible player able to play the stream.  The only browser to natively play HLS is Safari (gasp!), so javascript players are used to make HLS work in other browsers.  Any video player that can support HLS should be able to play Mux's stream.  HLS.js is a great open-source chromeless player that is used in this add-on for simple playback of HLS files. Other players like JWPlayer, Video.js, and THEOplayer are options.

Several examples are included as templates with the module.  We can help with basic implementations, but advanced player needs would best be handed by the player's support teams.

Mux Guide on Playback: https://docs.mux.com/guides/video/play-your-videos

Test Mode

When getting started, you will need test uploads.  So Mux provides a ‘test’ parameter when creating Assets.  This includes all Assets (uploads, clips, live stream recordings) as well as Live Streams.  Tests are FREE and incur no per-minute charge.

When first installing the add-on, all media is set as tests in the MuxEE Settings. Tests are a global setting for assets, and a separate global setting for live streams.

About Test Assets:

The blog post on Tests https://mux.com/blog/new-test-mux-video-features-for-free/

Creating Your First Upload - The Super Fast Way

The shortest possible way to upload a video.

1. Upload Video

Head to the Addon Settings - MuxEE - Upload page. Drag and drop a short test clip (15sec or so).

screenshot

2. Open Video Inspector

Click the play button to open the player inspector.

screenshot

3. Copy the Playback Link

At the bottom, copy the playback HLS link.

screenshot

4. Paste into Player

HLS requires a compatible player. Open Safari and paste the link. Alternatives are Quicktime and VLC's "network play" option.

screenshot

Creating Your First Upload - In Entries

Normally you would want to upload videos directly in an entry.  The Assets Fieldtype is designed to help with this.

1. Add Field Type to Channel

Add the Mux Assets field to a channel just like any custom field.

screenshot

2. Upload a Video

Open an entry and you should see the drag and drop area for video uploads. File a video file, something 15 seconds or so to test, and add it.

screenshot

3. Save Entry

Make sure to save the entry. This saves the IDs to the entry. If an entry is not saved, don't panic! Videos remain in Mux, and accessible in the MuxEE - Recent Assets area. Simply copy their IDs into the entry using the manual add button.

screenshot

Clips and Live Stream Recordings are covered in their own guides.

To show videos in templates, head to the template guide.

Recomendations