Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

MediaProtectionManager class

Applies to Windows and Windows Phone

Contains a content protection manager object, for an application that handles protected media content.

Syntax


public ref class MediaProtectionManager sealed 

Attributes

[MarshalingBehavior(Agile)]
[Threading(MTA)]
[Version(0x06020000)]

Members

The MediaProtectionManager class has these types of members:

Constructors

The MediaProtectionManager class has these constructors.

ConstructorDescription
MediaProtectionManager Initializes a new instance of the MediaProtectionManager class.

 

Events

The MediaProtectionManager class has these events.

EventDescription
ComponentLoadFailed Fires when the load of binary data fails.
RebootNeeded Fires when a reboot is needed after the component is renewed.
ServiceRequested Fires when a service is requested.

 

Methods

The MediaProtectionManager class inherits methods from the Object class (C#/VB/C++).

Properties

The MediaProtectionManager class has these properties.

PropertyAccess typeDescription

Properties

Read-onlyGets a PropertySet object containing any properties attached to the protection manager.

 

Remarks

The MediaProtectionManager can be passed to the media playback infrastructure in either of two ways:

or . The MediaProtectionManager object is notified of content enabler objects. These objects must be processed by the application, to establish access to protected content. Each MediaProtectionManager object is associated with a single instance of playback.

Examples

The following example shows how to create a MediaProtectionManager, set the Properties property, and add event listeners for ComponentLoadFailed and ServiceRequested. See the How to use pluggable DRM topic for the full example.



mediaProtectionManager = 
    new Windows.Media.Protection.MediaProtectionManager();

function ServiceRequested(e) {
   logMsg("Got Enabler - system/type: {" + e.request.protectionSystem + "}/{" + e.request.type + "}");
   e.completion.complete(true);
}


function ComponentLoadFailed(e) {
   logMsg(e.information.items.size.toString() + " failed components");
   logMsg("<h2>Components:</h2>");

   //  List the failing components
   for (var i = 0; i < e.information.items.size; i++) {
      logMsg("<h3>" + e.information.items[i].name + "</h3>" +
             "<p>Reasons=0x" + e.information.items[i].reasons.toString(16) +
             "<p>Renewal Id=" + e.information.items[i].renewalId);
   }

   e.completion.complete(false);
}

function RebootNeeded(e) {
   logMsg("Reboot Required");
}

mediaProtectionManager.addEventListener("servicerequested", ServiceRequested, false);
mediaProtectionManager.addEventListener("componentloadfailed", ComponentLoadFailed, false);
mediaProtectionManager.addEventListener("rebootneeded", RebootNeeded, false);
 


Requirements

Minimum supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Namespace

Windows.Media.Protection
Windows::Media::Protection [C++]

Metadata

Windows.winmd

 

 

Show:
© 2014 Microsoft