The Mux Developer Hub

Welcome to the Mux developer hub. You'll find comprehensive guides and documentation to help you start working with Mux as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started

CDN Configuration for Request-Level Metadata

Mux has the capability to track each network request made by the player, in order to expose network-level metrics such as throughput and latency measurements. In addition, Mux is able to inspect certain response headers, allowing auto-detection of the CDN that was used to serve each manifest, segment, or fragment. Enabling these auto-detection features requires some minor configuration at each of your CDNs.

Note: This feature is available to customers with Pro subscriptions and higher.

Player Integration

Mux currently supports request metrics for the following players, with more being added as they are completed.

  • HLS.js
  • Dash.js
  • Shaka Player

Simply integrate the player as mentioned in Integration Guide: Web, and we'll automatically track each network request.

CDN Configuration

In order for Mux to automatically detect which CDN is serving the content to the player, you need to make a few configuration changes to each of your CDNs. These changes are necessary to expose two specific headers.

  • X-CDN - This is a custom header that you need to add to all responses from each of your CDNs. The value of this should be a name describing that specific CDN; you should lowercase the name and replace spaces with _s. For example: fastly, cloudfront, level3, etc.
  • Access-Control-Expose-Headers - This should be set on each response, with the value being a comma-separated string of headers to expose to the client. At the least, you should set this to X-CDN. It is also suggested that you add other identifying headers that your CDN may use, such as X-Cache, X-Served-By, Via, or similar headers. More information on Access-Control-Expose-Headers, see here:

Updated 5 months ago

CDN Configuration for Request-Level Metadata

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.