DRM protection
MKPlayer supports Widevine, PlayReady, and FairPlay DRM. You configure DRM by adding a drm property to your MKSourceConfig before calling player.load(). The player selects the first key system supported by the current platform.
To support playback across browsers and devices, it is recommended to provide both a Widevine and a PlayReady configuration. FairPlay applies only to HLS sources on Apple devices.
Prerequisites
You have an initialised MKPlayer instance and a loaded source. See Installation and setup and Loading and playing content.
Configure DRM
Add a drm object to your source configuration. Each key system is optional: include only the ones your licence server supports:
Widevine and PlayReady options
Both widevine and playready accept the same core properties:
PlayReady on smart TVs
Most smart TV platforms require plaintextChallenge and utf8message to be set for PlayReady licence requests to succeed:
FairPlay options
FairPlay requires a certificateURL in addition to the licence server URL. It applies only to HLS sources on Apple devices.
Common DRM errors
See Events and error handling for how to listen for and respond to DRM errors at runtime.