Skip to main content

Integrate your player and prepare for production

This article is a part of the DRM Quick Start guide, DRM-only path.

You have played a test vector with your own token and requested a content key with your own packager. The remaining work is in your player and in your backend.

Configure your player​

Every player integration comes down to two settings:

  • the License Service URL for the DRM system, from your DRM Service page: Widevine and PlayReady for DASH, FairPlay for HLS
  • the token, a signed License Service Message that your player sends with each license request, as the X-AxDRM-Message header or as a query string parameter

Video Players explains the general pattern and links to player-specific instructions with code samples for Shaka Player, dash.js, hls.js, ExoPlayer, AVPlayer, Bitmovin, THEOplayer, and others.

For FairPlay, the player also needs the application certificate. During evaluation, use the Axinom test certificate; for production, see below.

Issue tokens from your backend​

In the previous steps the Playback Tool signed your tokens. In production your backend does it: for each playback request it builds an entitlement message that names the key IDs of the video and the rules you want, wraps it into a License Service Message, and signs it with your communication key.

Signing a License Service Message has examples in JavaScript, C#, Java, Python, Go, and other languages. Set a short expiration_date on every token.

Before production​

The trial environment is complete for evaluation. Four things change when you go live:

  1. FairPlay certificate. The Axinom test certificate is for evaluation only. Register your own FairPlay Streaming certificate under Admin Settings / DRM Service / FairPlay Credentials. Requesting a FairPlay certificate explains how to get one from Apple.
  2. Access. Grant the DRM Service permissions only to the people who administer content protection. Mosaic DRM Service lists the permissions.
  3. Environments. Keep development and production apart. Each environment has its own key seed, communication key, and endpoints, so create a production environment from My Mosaic rather than reusing the trial one.
  4. Agreement. Sign the licensing agreement under My Mosaic / Agreements to lift the trial limits and run services in production. DRM Pricing and DRM Billing explain what you pay for.

What's next?​

You have a working DRM integration with your own packager and player. Congratulations!

See also​

Was this page helpful?