To test this feature and view the example code, please see the Example Code Quick Setup guide.
The OpenTV Player SDK provides tools to enable playback of PlayReady-encrypted streams. Typically, PlayReady is supported on Android TV devices but not handheld Android devices.
Enabling playback of PlayReady protected streams is very similar to enabling playback for Widevine protected streams. Follow the instructions for Widevine, and then modify the changes according to the instructions here. The changes required involve setting up the DRM callback class (usually
OTVHttpMediaDrmCallback) slightly differently:
- The HTTP headers (the key request properties) are different
- The DRM type needs to be set explicitly to PlayReady
Add the dependency:
Configure the DRM handler using the
setKeyRequestProperty()method. The values below are typical for PlayReady systems. However, you are advised to consult the providers of the PlayReady licence server.
drmCallback.setKeyRequestProperty("Accept", "text/xml"); drmCallback.setKeyRequestProperty("Content-Type", "text/xml");
For NAGRA-provided licence servers, the
Content-Typevalues must be set to
text/xml. Binary and JSON format are not supported.
Explicitly set the DRM type of the
OTVHttpMediaDrmCallback) to PlayReady:
As for Widevine, PlayReady protection is for DASH streams only.
The following features are not yet supported for PlayReady:
- Offline playback
- Session control (SSM). The provided
OTVSSMHttpMediaDrmCallbackclass currently only works with Widevine streams. However, you can implement session control according to the specifics of the Session Management server they use. See the supplied example code for customising the DRM callback class (
- Key-rotation and Temporal Licence Pre-delivery.