Set up DRM encryption
Digital Rights Management (DRM) is an essential security feature for video content streamed via FastPix. By integrating DRM, you can prevent unauthorized content usage through methods like:
- Screen recording
- Screen sharing
- Downloading tools
With DRM, video segments are encrypted using MPEG Common Encryption in CBCS mode, employing AES symmetric encryption. Additionally, a license request is required to deliver a decryption key, enabling video playback.
FastPix supports the industry-standard DRM protocols for secure video delivery:
- Google Widevine: Android devices and Chrome browsers
- Microsoft PlayReady: Windows platforms, including Xbox
- Apple FairPlay: Apple devices (Safari browsers on macOS, iOS, and iPadOS)
PLEASE NOTE
If you haven’t yet obtained a FairPlay certificate, we can provide guidance on how to obtain one. Please reach out to FastPix support for more details.
Configure DRM for your videos
Step 1: Create a Workspace for DRM Testing
For the best results during our beta phase, we recommend creating a new, isolated workspace for testing DRM-protected content.
- Navigate to the Workspace tab in your dashboard to create a workspace.
- Copy your workspace key (e.g., 1049319898967698465).
- Send this key to FastPix support, and we’ll onboard you when slots are available.
Step 2: Receive your DRM configuration ID
After onboarding, we’ll send you a DRM configuration ID for your workspace. This ID can also be found in the Settings tab of your dashboard. You’ll need this ID when creating media with a DRM playback policy.
Example of a DRM configuration ID: 1fd649fe-b84e-494d-b4b3-118ad6c5e4d7
PLEASE NOTE
This is an example, and you will receive a unique ID.
FairPlay DRM on Apple devices
To ensure DRM-protected content plays on Apple devices (Safari on macOS, or any browser on iOS/iPadOS), you must obtain a FairPlay certificate from Apple. Without this certificate, DRM-protected content will not be playable.
Once you’ve obtained the FairPlay certificate (.cer file), upload it to the DRM section under the Settings tab of your FastPix dashboard.
If you need help obtaining a FairPlay certificate, Please contact FastPix support for assistance.
Creating media with a DRM playback policy
Currently, DRM can only be applied to Video on Demand (VOD) content.
To create DRM-protected media, follow these steps:
- Obtain your DRM configuration ID: Make sure you have the DRM configuration ID from the previous step.
- Create media with DRM protection: Use the DRM configuration ID and set the accessPolicy to drm in your media creation request. Below is an example of the required JSON format for creating a DRM-protected media:
Integrating DRM with a third-party player
If you’re not using the FastPix player, you can still integrate DRM-protected playback into third-party players that support industry-standard DRM systems like Widevine and FairPlay.
FastPix streams are fully compatible with any player that can handle HLS with CBCS encryption, and most players that implement Encrypted Media Extensions (EME) and Media Source Extensions (MSE) will work out of the box.
DRM License URL Formats
When integrating, you’ll need to use FastPix’s license and certificate endpoints, inserting the playbackId of your asset and a drmToken generated for the current session or user.
Widevine
FairPlay
Before using FairPlay, confirm that FairPlay support is enabled on your FastPix account.
- License URL:
- Certificate URL:
Integration examples
Below are working configurations for popular third-party players.
HLS.js (For Web)
Video.js (with videojs-contrib-eme) - For Web
Shaka Player (For Web)
iOS Native (AVPlayer with FairPlay)
To use FairPlay on iOS, configure AVURLAsset and implement AVAssetResourceLoaderDelegate to handle SPC (Server Playback Context) and CKC (Content Key Context) exchange. Use the following endpoints:
-
Certificate URL:
-
License URL:
Refer to Apple’s FairPlay documentation for detailed implementation.
VersaPlayer (For iOS)
ExoPlayer (For Android)
Supported & tested players
FastPix DRM is tested and confirmed to work with:
- HLS.js
- Video.js (with videojs-contrib-eme)
- Shaka Player
- iOS AVPlayer (FairPlay)
- VersaPlayer
- ExoPlayer (Android)
If your player supports Widevine, PlayReady, or FairPlay with CBCS encryption, there’s a strong chance it will work with FastPix DRM as well. We’re always expanding our test coverage - let us know if you’ve successfully integrated with another player so we can add it to our compatibility list.
Playback DRM Content with FastPix Player
If you’re using FastPix Player, the integration process is even simpler. FastPix Player handles license requests, decryption, and browser compatibility for you - with minimal setup.
How it works:
FastPix Player supports both Widevine and FairPlay natively. During playback, it:
- Automatically detects whether the video is encrypted.
- Sends a license request using the provided DRM token.
- Decrypts the video securely and plays it in the user’s browser.
Required tokens:
To play DRM-protected videos, you’ll need two secure JSON Web Tokens (JWTs):
token: Grants permission to stream the video.drm-token: Authorizes access to the DRM license server.
You can generate both tokens using the JWT Token Generator.
If you enable the “DRM License” feature during generation, you can use the same token for both fields.
Embed example
Here’s a minimal HTML snippet using FastPix Player for DRM-protected playback:
Replace the placeholders with:
YOUR-PLAYBACK-ID: The unique ID of your video assetYOUR-DRM-TOKEN: The token authorizing both playback and license access
Both token and drm-token are required. If either is missing or invalid, the player will display a clear error message to help you debug.
Browser support
FastPix Player’s DRM integration works across:
Testing DRM protection
To verify that DRM is functioning correctly, take a screenshot of the video playback. If DRM is properly enforced, the video should either be replaced by a black screen or display a single frame from the beginning of the video (instead of the actual content).
Need help?
Whether you’re using FastPix Player or a third-party player, we’re here to help you set up DRM right.
Email [email protected] for token generation tips, license configuration, or FairPlay certificate assistance.