Freigeben über


Some Notes on DRM in Silverlight 4

Silverlight enables a number of online and offline media playback scenarios which can utilize DRM (both WMDRM and PlayReady), from live streaming and progressive download to offline download, rental, and subscription scenarios.   In this post I mostly want to highlight a few issues and best practices, but for a more in depth overview of DRM in Silverlight 4, see the DRM Overview in the MSDN Library. 

  “Silverlight Client Update Required” Error

If Silverlight is revoked, the application is notified that a Silverlight client update is required.    Application developers should handle this condition and take appropriate action.

The following scenarios and API can cause a AG_E_DRM_SILVERLIGHT_CLIENT_UPDATE_REQUIRED error to be returned to an application, either directly via an exception or indirectly via either a completion notification or a MediaFailed event.

Note that while most methods may return this error, not all of them do.  For example, no methods or properties on the MediaLicense class can return this error.

Best Practice for Subscription Renewal

When checking if subscription renewal is required, explicitly enumerate the MediaLicenses from the root license instead of enumerating based on the content file.

Completed Event Handler and Asynchronous License Acquisition

If the license acquisition Completed event handler attempts to start an asynchronous license acquisition on the same LicenseAcquirer instance, the LicenseAcquirer instance can be silently garbage collected before the new asynchronous operation completes.   For both license acquirers and domain acquirers, this behavior is explicitly blocked with an InvalidOperationException.

 --Brian

Comments

  • Anonymous
    April 19, 2010
    Hello Brian, I have been browsing through many articles, but didn't get a good solution. Hope you will help me. I am planning to use PlayReady DRM for my H.264 encoded content. This will be for offline viewing using Silverlight4. What is the best method to encrypt H264 content for PlayReady use? Do we need to convert the MP4 into PIFF format? If so, what is the way to convert? Are there any SDKs available? Please let me know your suggestions! Thank you for your time! Sasidhar