Windows apps
Collapse the table of content
Expand the table of content
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.

MediaStreamSource.BeginDrmSetupDecryptor Method (Byte[], Guid, Object)


Starts the process of creating a new decryptor.

Namespace:  System.Windows.Media
Assembly:  System.Windows (in System.Windows.dll)

protected void BeginDrmSetupDecryptor(
	byte[] DrmKeyRotationData,
	Guid KeyId,
	Object userState


Type: System.Byte[]
A byte array that contains the DRM license data needed to setup the decryptor. DrmKeyRotationData is optional. If it is not required, pass in null.
Type: System.Guid
The KeyID of the decryptor to create.
Type: System.Object
The user state that will be passed to the DrmSetupDecryptorCompleted event in the event arguments.


KeyId is Empty.


The MediaStreamSource has not reached the MediaOpened state.

BeginDrmSetupDecryptor provides a mechanism to dynamically create decryptors.

BeginDrmSetupDecryptor can be called any time after the MediaOpened state has been reached.

If the initial call to BeginDrmSetupDecryptor does not throw an exception, then there will be exactly one DrmSetupDecryptorCompleted event per call to BeginDrmSetupDecryptor.

A DrmSetupDecryptorCompleted event is raised when the operation is complete. If the AsyncCompletedEventArgs.Error property is null, then the setup was successful; otherwise, the setup failed and the AsyncCompletedEventArgs.Error property will contain an Exception object.


Supported in: 5

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

© 2017 Microsoft