Video Players
Axinom DRM integrates well with all major players, both in browsers and on mobile devices.
The general concept for Axinom DRM integration is the same for all DRM-compatible players, and it is outlined below.
Additionally, we've included player-specific integration instructions and code samples for some of the players (see the navigation on the left). This is by no means a complete list - if your player is not mentioned, just follow the general instructions on this page.
NOTE: If you are a vendor of a player, and you would like to add or adjust the information about your player, please contact Axinom Support.
Prerequisitesβ
For the player:
- Make sure your selected player supports the DRM technology you would like to use (such as Widevine, PlayReady or FairPlay)
For Axinom DRM:
- Register on Axinom Portal.
- Start a free trial
- Go to
My Mosaic / DRM
and clickAcquire credentials
- For player integration you will need settings from the License Service config section
- Once you are ready to go to production, upgrade your Axinom account to a paid plan.
Integration in a nutshellβ
When using DRM, additionally to regular player behavior, it will request a DRM license from a DRM License Service. This license will allow the CDM (Content Decryption Module) to decrypt the video, but the license can also contain policies restricting the content use, such as only allowing a specific device security level, enforcing HDCP, or allowing storing the license persistently.
Players understand they need to send a license request if they recognize the content being encrypted.
To request a license, players need a license acquisition URL pointing to the DRM license service. For Axinom DRM, take the URLs from the License Service configuration section on the Portal (see above). Each DRM technology has its own license acquisition URL. For example, the default Axinom DRM URL for Widevine is https://drm-widevine-licensing.axprod.net/AcquireLicense.
DRM License Service doesn't know itself when to grant and when to deny the request. The player has to provide a token containing a so called Entitlement Message containing all the conditions.
In production, you will likely have some kind of an Entitlement Service verifying users and generating tokens. (Axinom provides a template you could use.) To create a token yourself, check Create entitlement message and Sign license service message. For testing purposes, you can create and sign a License Service Message using an Entitlement Message Tool.
There are three ways to pass a token to the license service:
- HTTP header
X-AxDRM-Message
. - HTTP query string parameter
AxDrmMessage
. - The
Custom Data
part of a PlayReady License Request (PlayReady only).
An example using a query string parameter:
https://drm-widevine-licensing.axprod.net/AcquireLicense?AxDrmMessage=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.
eyJ2ZXJzaW9uIjoxLCJjb21fa2V5X2lkIjoiNjllNTQwODgtZTllMC00NTMwLThjMWEtMWViNmRjZDBkMTRl
iwiZXhwaXJhdGlvbl9kYXRlIjoiMjAyMC0wMS0wMSIsIm1lc3NhZ2UiOnsidmVyc2lvbiI6MiwidHlwZSI6I
VudGl0bGVtZW50X21lc3NhZ2UiLCJjb250ZW50X2tleXNfc291cmNlIjp7ImlubGluZSI6W3siaWQiOiIyMT
hYzFkYy1jOGEyLTQ1NzUtYmFmNy1mYTRiYTU2YzM4YWMifV19fX0.
LbK1pATJaFJFnPhs-IiuEdj7IVsZaBIv3kwYwQgw0-U
All popular video players in use today allow to use one of the three options above. If your project-specific situation does not allow any of the above options, consider using the Proxy Mode.
FairPlay-specific considerationsβ
Axinom DRM expects the FairPlay Asset IDs of FPS content to be represented by a UTF-8 string in the format.
Please read Prepare FPS Content for Axinom DRM for more details.
The FairPlay License service expects the Asset ID to be present in the license requests. This is essential for license validation and secure content playback. Below are two recommended methods for handling Asset IDs in FairPlay requests:
- Passing Key IV via Entitlement Message. One approach is to pass the Key Initialization Vector (IV) in the entitlement message, as specified in the Axinom documentation on entitlement messages. However, managing the Key IV in each request can be time-consuming, especially for complex applications or high-frequency requests.
How to Implement: Follow the instructions on how to configure Key IV in entitlement messages.
- Configure Player to Pass Asset ID. Alternatively, configure your video player to pass the Asset ID directly in each license request. This simplifies request handling by embedding Asset ID metadata directly into the playback request. For player-specific configuration steps, refer to each playerβs FairPlay integration guide provided in the Axinom documentation.
If any specific player does not yet have FairPlay configuration guidance in the left pane of the documentation, please reach out to the respective player support team for assistance.
FairPlay Server Certificateβ
When using FairPlay DRM, you need to pass a FairPlay Server certificate with the license request. You can use the test certificate provided by Axinom for evaluation purposes.
But we strongly recommend you to acquire your own certificate for production purposes. Then you will need to manage your certificate hosting on your side.
In that case, you need to upload your FairPlay.cer
into a publicly available web server with CORS support.
Refer to FairPlay documentation for further information.
Error Handlingβ
In case of an error, the service returns an HTTP status code following HTTP conventions (e.g., 400 - invalid license request, 403 - license denied, 500 - server error).
Additionally, the service adds a human-readable explanation of the error in a custom HTTP header X-AxDRM-ErrorMessage.
See Troubleshooting for more information on possible errors and their reasons.
You can see the individual errors and their details in Axinom Portal - see Error log tool.
Testing playbackβ
The DRM Video Playback Tool shows a few of these players in action.
You can find the tool here:
If you are interested in materials regarding integration with these (and other) players, please contact Axinom Support.