Test DRM Playback
After creating a content key policy and streaming locator, test that your encrypted streams play correctly. MK.IO provides the MKPlayer testing page for quick validation. For integration into your own application, use the MKPlayer SDK.
Test with MKPlayer
Get the playback and license URLs
-
Navigate to the Assets page and select your asset.
-
Select the streaming locator and a running streaming endpoint.
-
Select Apply to generate the URLs.
-
Copy the playback URL for your chosen protocol (HLS or DASH).
-
Copy the license acquisition URL for your DRM system (Widevine, PlayReady, FairPlay, or ClearKey).
Configure MKPlayer
-
Navigate to the MKPlayer page.
-
Select the protocol (HLS or DASH).
-
Select the DRM system that matches your content key policy.
-
Paste the playback URL in Source URL.
-
Paste the license acquisition URL in License URL.
Add authorization (token-protected content)
If your content key policy uses token restriction, add the JWT token in the License request headers field:
See JWT token authentication to generate a token.
Play
Troubleshooting playback errors
Configure the MKPlayer SDK
For integration into your own application, use the MKPlayer SDK to configure DRM playback programmatically.
Prerequisites
Install the latest version of MKPlayer SDK.
- Complete the Getting Started steps in the MKPlayer documentation.
Build the source configuration
Create a source configuration object with your playback URLs and DRM license URLs. You can include multiple DRM systems in the configuration. The player automatically selects the most suitable one for the current platform.
Each platform or browser has a preferred DRM system. If you are uncertain which DRM to use, include all applicable systems in the configuration. The player selects the best match for the current environment.
Remove the headers objects if your content key policy does not use token restriction.
Load and play
Pass the source configuration to the player:
Refer to the MKPlayer documentation for additional configuration options and event handling.