LicenseAcquirer.LicenseServerUriOverride Property

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Gets or sets a Uniform Resource Identifier (URI) value that overrides whatever the license server URI is in the content header.

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

Syntax

Public Property LicenseServerUriOverride As Uri
public Uri LicenseServerUriOverride { get; set; }

Property Value

Type: System..::.Uri
The URI that overrides the URI that is provided in the content header (if any). If this property is nullNothingnullptra null reference (Nothing in Visual Basic), the system uses whatever license server URI is in the content header. The default value is nullNothingnullptra null reference (Nothing in Visual Basic).

Remarks

If the LicenseAcquirer is created on demand (from the media element) and if the LicenseServerUriOverride property is nullNothingnullptra null reference (Nothing in Visual Basic), the system uses whatever license server URI is in the content. For Windows Media DRM content and PlayReady content where the header does not have a license server URI, the AcquiringLicense step fails (see Digital Rights Management (DRM) for Windows Phone 8 for more information about how DRM works). In this case, you need to provide a URI to the correct Licensing Server using this property.

The URI only needs to be non-nullNothingnullptra null reference (Nothing in Visual Basic) at the time of callback into the base OnAcquireLicense method. Therefore, if you overloaded OnAcquireLicense and you call the base implementation passing in a URI (but the URI set to the LicenseAcquirer instance is still nullNothingnullptra null reference (Nothing in Visual Basic)) then it would succeed.

If set, the value of this property is passed as the licenseServerUri parameter of the OnAcquireLicense method.

Examples

The following code shows how to override the URI of the PlayReady License Server that is used by a MediaElement.

myMediaElement.LicenseAcquirer.LicenseServerUriOverride = new Uri("http://myLicenseServer.asmx", UriKind.Absolute);

Version Information

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Platforms

Windows Phone

See Also

Reference

LicenseAcquirer Class

System.Windows.Media Namespace

Other Resources

Digital Rights Management (DRM) for Windows Phone 8