SDK Development Guide for OSX and Windows
What the SDK can do
The ExpressPlay SDK for OSX and Windows is designed to make it simple to build secure media players and ebook reader applications for Marlin protected audio, video and ebook content on OSX and Windows platforms. The ExpressPlay SDK shares a common core API set across all platforms. On some platforms the SDK includes an extended set of APIs unique to that platform.
For development of media applications on OSX and Windows, the SDK offers simple APIs providing access to DRM control and media playback functions, sufficient to credential an application, acquire DRM licenses and trigger playback of Marlin-protected content. Content may be a contiguous media file or an adaptive bit rate (ABR) stream. The SDK works in conjunction with the ExpressPlay Service for device initialization (Marlin personalization) and token processing for playback (Marlin content license acquisition) while meeting the compliance and robustness rules of the MTMO (Marlin Trust Management Organization).
What are the steps to play
The steps below are a high-level view of the steps required to play content. However, the exact sequence of steps to play content in your application may vary due to the requirements of your specific application.
- Start the DRM engine
- Get a unique player ID (personalization)
- Get the content URL
- Get a token for playback
- Instantiate a WSB_Player object, and set its inputs to the content reference to be played
- Start the player
What are the steps for ebooks
- Initialize the DRM Engine
- Get a unique player ID (Personalization)
- Get a BB license for the content ID of the ebook, and store that license in the license store
- Instantiate a MediaStream object (passing it a reference to the encrypted ebook file)
- Read bytes from the mediastream object until there are none remaining. Now you have a decrypted ebook.
- Instantiate a webview object, and pass it the decrypted ebook
Key Concepts
Below is a list of key concepts that a developer should know before using the ExpressPlay SDK. It’s a good idea to go through all the concepts before using the SDK as they are reference frequently throughout the SDK documentation.
SDK Usage Guidelines
In addition to the key concepts above, the ExpressPlay SDK Usage Guidelines is an overview of best practices when using the ExpressPlay SDK. The major sections of the guidelines are listed below for convenience.
Personalization
Personalization is a Marlin term for device initialization. When an app requests to be personalized by ExpressPlay, it provides a unique fingerprint. The ExpressPlay service, responds by providing the client a credential which is unique to that application copy running on a given device. Without this unique Marlin credential, the device will not be able to request tokens for playback.
For additional information on Personalization click here.
Content License Acquisition
There are two ways to obtain a Marlin content license, using SAS (via MS3) or using a Marlin Broadband (BB) license. Either may be obtained from the ExpressPlay service. You can obtain additional information for MS3 and Marlin BroadBand licenses
here.
Media Player for Desktop
ExpressPlay SDK for OS X and Windows contains:
- The ExpressPlay library/framework for building downloadable A/V Marlin-enabled media players on Microsoft Windows and Apple OS X.
- A sample application for media playback.
Binaries for Audio Visual Media Application Development
The functionality provided by the ExpressPlay binaries includes the following.
- Media Player Engine functionality for playback of Marlin protected media files and adaptive bit-rate streams. The player engine provides typical playback controls, accepts files or URLs as inputs, and produces decrypted and decoded output (decoding is only performed on the desktop version) to a video window provided by the application.
- Marlin DRM support for typical functions such as “personalizing” or credentialing an application, processing DRM triggers.
- Note that the above player/DRM engine is also usable in a specially built browser enabling you to reference Marlin content in an HTML5 video tag.
ExpressPlay binaries meet the Marlin Robustness Rules, namely, the requirements set forth by the Marlin Trust Management Organization (MTMO). You are not required to engage with the MTMO or sign any MTMO Agreement.
Built-in Access to Personalization and DRM Services
The ExpressPlay binary includes burnt-in credentials to access a Personalization Service (SPS). Also, it is configured to (only) use DRM triggers generated by ExpressPlay Service (for example, license triggers that are then redeemed into content licenses by the SDK binary).
Access to the ExpressPlay Service DRM Services may be denied in certain special circumstances, such as when a mandatory software update to the ExpressPlay binaries has not been applied to the application. In general, the application should periodically check whether the version of the ExpressPlay binary requires an update.
ExpressPlay version information is obtained via the WSB_GetComponentInfo() method of the WSB_Component Class.
SPS access requires a token that the application provides to the SDK when attempting to personalize. SPS provides no user or application-level interface and no other information other than this token is required to use it.
The value of the token is the string:
<PersonalizationToken xmlns='https://www.expressplay.com/sushi/schemas/personalization/2'>
<ServiceUrl>https://perserv-test.seacert.com</ServiceUrl>
<BusinessToken>qgih</BusinessToken>
</PersonalizationToken>
MediaStream (MS) for ebooks
MediaStream interface supports decryption of HTTP or file based encrypted data other than the typical Marlin protected audio/video media. Which could consist of the eBook media type, 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 then parses the container, and uses the interface combined with a Marlin license to decrypt the content.
Additional information for ebooks can be found here.
Other DRM Functions
The Extended DRM functionality is accessible to applications using the source sdk. Including such functions as the ability to access content keys, or query the consequences of a license evaluation (to assess for instance if some form of output controls must be applied and do so as a result). This greater functionality however requires that these applications provide their own security and hardening mechanisms to prevent the loss of key and content material.