MediaElement.LicenseAcquirer Property

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

Gets or sets the LicenseAcquirer associated with the MediaElement. The LicenseAcquirer handles acquiring licenses for DRM encrypted content.

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

Syntax

'Declaration
Public Property LicenseAcquirer As LicenseAcquirer
public LicenseAcquirer LicenseAcquirer { get; set; }

Property Value

Type: System.Windows.Media.LicenseAcquirer
The LicenseAcquirer associated with the MediaElement. The default is nulla null reference (Nothing in Visual Basic).

Exceptions

Exception Condition
ArgumentNullException

The LicenseAcquirer is null.

Remarks

The main scenario for using this property is if you are serving DRM-protected content and wish to override the LicenseAcquirer to provide custom license acquiring behaviors such as adding business data or authentication tokens to the license request. See Digital Rights Management (DRM) for more information.

A LicenseAcquirer can only be associated with one MediaElement at any given time. Attempting to set a LicenseAcquirer already associated with one MediaElement on another MediaElement will throw an error.

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

Platforms

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