PlayReadyLicenseSession PlayReadyLicenseSession PlayReadyLicenseSession PlayReadyLicenseSession Class

Definition

Creates a media session and binds license acquisition to that media session.

public : sealed class PlayReadyLicenseSession : IPlayReadyLicenseSession, IPlayReadyLicenseSession2public sealed class PlayReadyLicenseSession : IPlayReadyLicenseSession, IPlayReadyLicenseSession2Public NotInheritable Class PlayReadyLicenseSession Implements IPlayReadyLicenseSession, IPlayReadyLicenseSession2// You can use this class in JavaScript.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

You must maintain the PlayReadyLicenseSession instance until playback has completed. If the app fails to do this, the garbage collector may, at its discretion, release the object. This can cause playback to fail.

Constructors

PlayReadyLicenseSession(IPropertySet) PlayReadyLicenseSession(IPropertySet) PlayReadyLicenseSession(IPropertySet) PlayReadyLicenseSession(IPropertySet)

Initializes a new instance of the PlayReadyLicenseSession class.

public : PlayReadyLicenseSession(IPropertySet configuration)public PlayReadyLicenseSession(IPropertySet configuration)Public Sub New(configuration As IPropertySet)// You can use this method in JavaScript.
Parameters
configuration
IPropertySet IPropertySet IPropertySet IPropertySet

The configuration data for the license session.

Remarks

In order for you to make use of the PlayReadyLicenseSession class, you must construct it with an IPropertySet to be used in the configuration parameter. The IPropertySet must contain the following:

  • The property must be set to a valid instance of the MediaProtectionPMPServer class.
  • That instance of the Windows.Media.Protection.MediaProtectionPMPServer class must have been initialized with an IPropertySet that includes the following properties: + set to the string value "{F4637010-03C3-42CD-B932-B48ADF3A6A54}".
    • set to another IPropertySet. That last IPropertySet must have the property set to the string value "Windows.Media.Protection.PlayReady.PlayReadyWinRTTrustedInput".

The following JavaScript code demonstrates this process.

    var cpsystems = new Windows.Foundation.Collections.PropertySet();       
    cpsystems["{F4637010-03C3-42CD-B932-B48ADF3A6A54}"] = "Windows.Media.Protection.PlayReady.PlayReadyWinRTTrustedInput"; // PlayReady

    var pmpSystemInfo = new Windows.Foundation.Collections.PropertySet();
    pmpSystemInfo["Windows.Media.Protection.MediaProtectionSystemId"] = "{F4637010-03C3-42CD-B932-B48ADF3A6A54}";
    pmpSystemInfo["Windows.Media.Protection.MediaProtectionSystemIdMapping"] = cpsystems;
    var pmpServer = new Windows.Media.Protection.MediaProtectionPMPServer( pmpSystemInfo );

    var licenseSessionProperties = new Windows.Foundation.Collections.PropertySet();
    licenseSessionProperties["Windows.Media.Protection.MediaProtectionPMPServer"] = pmpServer;

    var licenseSession = new Windows.Media.Protection.PlayReady.PlayReadyLicenseSession( licenseSessionProperties );

Methods

ConfigureMediaProtectionManager(MediaProtectionManager) ConfigureMediaProtectionManager(MediaProtectionManager) ConfigureMediaProtectionManager(MediaProtectionManager) ConfigureMediaProtectionManager(MediaProtectionManager)

Updates the media protection manger with the appropriate settings so the media foundation can be used for playback.

public : void ConfigureMediaProtectionManager(MediaProtectionManager mpm)public void ConfigureMediaProtectionManager(MediaProtectionManager mpm)Public Function ConfigureMediaProtectionManager(mpm As MediaProtectionManager) As void// You can use this method in JavaScript.
Parameters

CreateLAServiceRequest() CreateLAServiceRequest() CreateLAServiceRequest() CreateLAServiceRequest()

Creates a license acquisition service request whose license will be tied to the media session.

public : IPlayReadyLicenseAcquisitionServiceRequest CreateLAServiceRequest()public IPlayReadyLicenseAcquisitionServiceRequest CreateLAServiceRequest()Public Function CreateLAServiceRequest() As IPlayReadyLicenseAcquisitionServiceRequest// You can use this method in JavaScript.
Returns

CreateLicenseIterable(PlayReadyContentHeader, Boolean) CreateLicenseIterable(PlayReadyContentHeader, Boolean) CreateLicenseIterable(PlayReadyContentHeader, Boolean) CreateLicenseIterable(PlayReadyContentHeader, Boolean)

Creates a PlayReadyLicense class iterator that supports in-memory-only PlayReady licenses in addition to persisted licenses.

public : PlayReadyLicenseIterable CreateLicenseIterable(PlayReadyContentHeader contentHeader, bool fullyEvaluated)public PlayReadyLicenseIterable CreateLicenseIterable(PlayReadyContentHeader contentHeader, Boolean fullyEvaluated)Public Function CreateLicenseIterable(contentHeader As PlayReadyContentHeader, fullyEvaluated As Boolean) As PlayReadyLicenseIterable// You can use this method in JavaScript.
Parameters
contentHeader
PlayReadyContentHeader PlayReadyContentHeader PlayReadyContentHeader PlayReadyContentHeader

The content header used to locate associated licenses.

fullyEvaluated
bool Boolean Boolean Boolean

Indicates whether evaluated license chains should be enumerated or if all licenses (including those that are unusable) should be enumerated. Set this parameter to true if evaluated license chains should be enumerated. Set this parameter to false if all licenses should be enumerated.

Returns
Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)