Partilhar via


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

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Starts the process of creating a new decryptor.

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

Syntax

'Declaration
Protected Sub BeginDrmSetupDecryptor ( _
    DrmKeyRotationData As Byte(), _
    KeyId As Guid, _
    userState As Object _
)
protected void BeginDrmSetupDecryptor(
    byte[] DrmKeyRotationData,
    Guid KeyId,
    Object userState
)

Parameters

  • DrmKeyRotationData
    Type: array<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 nulla null reference (Nothing in Visual Basic).
  • KeyId
    Type: System.Guid
    The KeyID of the decryptor to create.

Exceptions

Exception Condition
ArgumentNullException

KeyId is Empty.

InvalidOperationException

The MediaStreamSource has not reached the MediaOpened state.

Remarks

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 nulla null reference (Nothing in Visual Basic), then the setup was successful; otherwise, the setup failed and the AsyncCompletedEventArgs.Error property will contain an Exception object.

Version Information

Silverlight

Supported in: 5

Platforms

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