ServiceRequestedEventArgs ServiceRequestedEventArgs ServiceRequestedEventArgs ServiceRequestedEventArgs Class

Definition

Contains event data for a MediaProtectionManager object when a service is requested.

public : sealed class ServiceRequestedEventArgs : IServiceRequestedEventArgs, IServiceRequestedEventArgs2public sealed class ServiceRequestedEventArgs : IServiceRequestedEventArgs, IServiceRequestedEventArgs2Public NotInheritable Class ServiceRequestedEventArgs Implements IServiceRequestedEventArgs, IServiceRequestedEventArgs2// 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)

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. ```javascript

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("

Components:

");

// List the failing components for (var i = 0; i < e.information.items.size; i++) { logMsg("

" + e.information.items[i].name + "

" + "

Reasons=0x" + e.information.items[i].reasons.toString(16) + "

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);

```

Remarks

This object is not instantiated directly. It is created by the MediaProtectionManager.ServiceRequested event and is returned as an argument to the ServiceRequestedEventHandler delegate.

Properties

Completion Completion Completion Completion

Returns an indication of the completion of the service request.

public : MediaProtectionServiceCompletion Completion { get; }public MediaProtectionServiceCompletion Completion { get; }Public ReadOnly Property Completion As MediaProtectionServiceCompletion// You can use this property in JavaScript.
Value
MediaProtectionServiceCompletion MediaProtectionServiceCompletion MediaProtectionServiceCompletion MediaProtectionServiceCompletion

An object that contains an indication of the completion of the service request.

MediaPlaybackItem MediaPlaybackItem MediaPlaybackItem MediaPlaybackItem

Gets the MediaPlaybackItem associated with the service request.

public : MediaPlaybackItem MediaPlaybackItem { get; }public MediaPlaybackItem MediaPlaybackItem { get; }Public ReadOnly Property MediaPlaybackItem As MediaPlaybackItem// You can use this property in JavaScript.

Request Request Request Request

Contains the service request.

public : IMediaProtectionServiceRequest Request { get; }public IMediaProtectionServiceRequest Request { get; }Public ReadOnly Property Request As IMediaProtectionServiceRequest// You can use this property in JavaScript.

Remarks

This object will probably implement other properties and methods which are specific to the content protection system being used. In order to successfully process the request, these properties and methods must be understood and acted upon by the application.