Playback DRM content
FastPix Player supports secure playback of DRM-encrypted content using industry-standard systems like Widevine (for Chrome, Firefox, edge, Brave, and other browsers) and FairPlay (for Safari and iOS).This allows you to protect premium or licensed video content while delivering a seamless playback experience across devices.
What is DRM?
Digital Rights Management (DRM) is a technology that controls access to copyrighted or licensed content. It ensures that only authorized users can decrypt and view protected video streams.FastPix Player integrates with DRM license servers to manage encryption keys and licenses, allowing playback in browsers that support Widevine or FairPlay.
How DRM works with FastPix player
When you load a DRM-protected video into FastPix Player, two secure JSON Web Tokens (JWTs) are required:
token
: Authenticates the user for video playbackdrm-token
: Grants access to the DRM license used to decrypt the stream
During playback:
- The player sends a license request to the appropriate DRM license server.
- The server validates the drm-token and returns the decryption key.
- FastPix Player securely decrypts and plays the content in the browser.
Enabling DRM in FastPix player
To enable secure playback of DRM-protected videos:
-
Generate a playback token (
token
) and a DRM token (drm-token
)
You can use the FastPix JWT Generator to create both. -
Add both tokens to your player embed
The tokens must be added as attributes to the<fastpix-player>
component.
Required player attributes:
When using DRM-protected streams, the <fastpix-player>
element must include the following attributes:
Attribute | Description |
---|---|
playback-id | Unique identifier for the video asset. |
token | Playback authorization token (JWT). |
drm-token | DRM license authorization token (JWT used for decryption). |
Example integration
Here’s a minimal HTML example for DRM playback using FastPix Player:
<fastpix-player
playback-id="YOUR-PLAYBACK-ID"
token="YOUR-PLAYBACK-TOKEN"
drm-token="YOUR-DRM-TOKEN">
</fastpix-player>
Replace these with your actual values:
YOUR-PLAYBACK-ID
: The unique ID of your video assetYOUR-PLAYBACK-TOKEN
: JWT authorizing playback for the userYOUR-DRM-TOKEN
: JWT authorizing DRM license access
PLEASE NOTE
If you're using the FastPix token generator and have enabled the “DRM License” feature, you can reuse the same token for both token and drm-token.
How FastPix handles token validation
FastPix Player includes built-in logic to handle encrypted streams gracefully:
- It automatically detects DRM-protected videos.
- If either the
token
ordrm-token
is missing, the player will trigger a clear error message. - Playback will fail safely, helping you debug quickly.
Both tokens are mandatory for successful DRM playback.
Supported browsers
FastPix Player supports the most widely used browser DRM systems:
DRM System | Browser Support |
---|---|
Widevine | Chrome, Firefox, Edge, Brave, and others |
FairPlay | Safari on macOS and iOS |
This covers all major platforms - desktop and mobile.
How to generate DRM tokens
When generating tokens via the FastPix Dashboard:
- Visit the JWT Generator.
- Under Features, enable the “DRM License” option.
- Generate the token.
- Use it for both
token
anddrm-token
if applicable.
FastPix takes care of license requests, secure decryption, and adaptive playback - so you don’t have to manage the low-level mechanics. Read detailed guide.
Related guides
If you're looking for more control over video security and playback, here are few resources:
Updated about 10 hours ago