Enabling your application to play content under the protection of Primetime DRM is described in the following sections, using ActionScript 3 (AS3) code samples. The nuanced departures from this workflow for native apps on mobile platforms are presented where appropriate. The Primetime DRM workflows are very similar across all platforms, however, so your understanding of the AS3 code will make extrapolation to other plaforms fairly straightforward.
License Acquisition Process:
Get the protected content’s DRM metadata.
Check if a license is available locally:
Check if authentication is required:
If device domain registration is required, join the device domain.
If authentication was needed and is now complete, download the license from the license server.
Play the content.
If no errors occured and the user was successfully authorized to view the content, Primetime dispatches a
DRMStatusEvent object and the application begins playback. The
DRMStatusEvent object holds the related license information, which identifies the user’s policy and permissions. For example,
DRMStatusEvent may hold information regarding whether the content can be made available offline, when the license expires, and so on.
The application can use the license information to inform the user of the status of their policy. For example, the application can display the number of remaining days the user has for viewing the content in a status bar. If the user is allowed offline access, the license is cached, and the encrypted content is downloaded to the user’s machine. The content is made accessible for the duration defined in the license caching duration. The detail property in the event contains
DRM.voucherObtained. The application decides where to store the content locally in order for it to be available offline. You can also preload licenses using the