Developers     Developer center

Developer center

under hero banner

Working with eBooks

This section describes the special cases where eBooks are concerned, including additional parameters when using the REST API for token requests and the mediastream API for ebook decryption when using a custom player UI.

An example illustrating the use of the MediaStream API can be found in the ExpressPlay SDK.

Media Stream API

MediaStream interface supports decryption of file based encrypted data other than the typical Marlin-protected audio/video media. This could be media of the type eBook, where many container formats exist, including a Marlin-defined ePub container. In this scenario, either the whole eBook or specific elements of the ebook container can be encrypted and packaged into a type supported by this new interface. The application would then parse the container, and use the interface combined with a Marlin license to decrypt the content.

The MediaStream interface can be accessed in both the source and binary (Express) flavors of the SDK and on all platforms, via the C MediaStream API on Mac OS X, Windows and iOS, and the Java MediaStream API on Android.

The following types of encrypted data containers are supported:

  • Encrypted payloads in DCF container (Customer can use the bento4 DCF packaging tools like mp4dcfpackager to create these)
  • Raw AES 128 CBC encrypted byte streams (See the API reference for the encryption specification)

License Requests for eBooks

Note: A “special” license flag is required for ExpressPlay SDK to be able to use this interface. With the use of this flag, the license issuer explicitly allows the application to release the encrypted content outside the constraints of the default Marlin Compliance Rules. Without these special flags, license evaluation and content decryption will fail.

To generate the licenses from ExpressPlay Service (http://www.expressplay.com/developer/restapi) with the correct extension/permissions:

add the following request parameters to the ExpressPlay Service MS3 license request:

&extensionType=wudo&extensionCriticalFlag=false&extensionPayload=AAAAAA==

add the following request parameters to the ExpressPlay Service BB license request:

&outputControlOverrideId=urn:marlin:organization:intertrust:wudo&outputControlOverrideParameter=ImageConstraintLevel
&outputControlOverrideValue=0

Using Playlist Proxy with eBooks

The MediaStream interface is also integrated into the Playlist Proxy. The input URL to the Playlist Proxy must be of the file:/// type and for use by Playlist Proxy it must be packaged as a DCF file. The Playlist Proxy then makes the decrypted data available as a generic binary HTTP stream. The decrypted byte stream Content-Type HTTP header contains the value found in the DCF file, by default, or the value specified through the Playlist Proxy API, if provided.

The key to decrypt the content can be acquired either via a Marlin Broadband license or a MS3 URL. Note that the broadband license or MS3 license will require to carry the output control override/extension mentioned earlier.