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.

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

Silverlight

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
)

Parameters

DrmKeyRotationData
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.
KeyId
Type: System.Guid
The KeyID of the decryptor to create.
userState
Type: System.Object
The user state that will be passed to the DrmSetupDecryptorCompleted event in the event arguments.

ExceptionCondition
ArgumentNullException

KeyId is Empty.

InvalidOperationException

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.

Silverlight

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

Show:
© 2014 Microsoft