This project is read-only.

PlayReady DRM Sample Code

Topics: Windows Phone 8
May 4, 2013 at 3:52 AM
Is there a working sample for PlayReady DRM including smooth streaming on Windows Phone 8.

We have one for Windows 8 but only smooth streaming sample working on WP8.

The code for Windows 8 has a bunch of compile errors when ported to WP8, just wondering where to look, thanks.
May 17, 2013 at 5:44 PM
Here's a smooth streaming PlayReady snippet for WP8. Note, this code looks very different than Win8 because it uses the Silverlight LicenseAcquirer instead of the PlayReady SDK.
<mmppf:MediaPlayer x:Name="player" Source=""/>
and in code behind:
public MainPage()

    player.LicenseAcquirer = new System.Windows.Media.LicenseAcquirer()
        LicenseServerUriOverride = new Uri("")
Jul 3, 2013 at 3:52 PM

I am having a problem at the moment. I have written the code below:
LicenseAcquirer aquirer = new LicenseAcquirer();
aquirer.LicenseServerUriOverride = new Uri("LicenceURI", UriKind.Absolute);
aquirer.AcquireLicenseCompleted += aquirer_AcquireLicenseCompleted;
player.LicenseAcquirer = aquirer;
When my video attemps to play, the AcquireLicenceCompleted event has a 6002 error, which from my understanding means the license acquisition failed. However the MediaFailed event throws a 6010 error, which means a DRM protocol error occurred.

Any ideas what may be wrong?


Sep 13, 2013 at 8:38 AM
In Silverlight,when i play the protected stream,it can automatically obtain KID,contentID,and acquisition Url from the DRM header,so I do not have to assign "LicenseServerUriOverride" property.
When i did on wp8, the AcquireLicenseCompleted event return no error ,but the protected content still could not be played .
My code:
            Acquirer = new LicenseAcquirer();
            Acquirer.AcquireLicenseCompleted += (s, e) => 
                if (e.Error != null)
                else if (e.Cancelled)
            player.LicenseAcquirer = Acquirer;
thank you.
Jul 4, 2014 at 10:15 AM
Edited Jul 4, 2014 at 10:16 AM
Same problem in my project. I used manual license acquirer, but sometimes player is not able to play video. Player received successfully response (license) from server, but is not able to play video. After few sent requests it is possible to play video. I have no idea why player is sending multiple requests to the server in a row.

Can you help me or give mi hint?


EDIT: I did it on WP8.