PlayReadyContentHeader PlayReadyContentHeader PlayReadyContentHeader PlayReadyContentHeader PlayReadyContentHeader Constructors

Definition

Overloads

PlayReadyContentHeader(Byte[]) PlayReadyContentHeader(Byte[]) PlayReadyContentHeader(Byte[]) PlayReadyContentHeader(Byte[]) PlayReadyContentHeader(Byte[])

Initializes a new instance of the PlayReadyContentHeader class.

PlayReadyContentHeader(Byte[], Uri, Uri, String, Guid) PlayReadyContentHeader(Byte[], Uri, Uri, String, Guid) PlayReadyContentHeader(Byte[], Uri, Uri, String, Guid) PlayReadyContentHeader(Byte[], Uri, Uri, String, Guid) PlayReadyContentHeader(Byte[], Uri, Uri, String, Guid)

Initializes a new instance of the PlayReadyContentHeader class.

PlayReadyContentHeader(Guid, String, PlayReadyEncryptionAlgorithm, Uri, Uri, String, Guid) PlayReadyContentHeader(Guid, String, PlayReadyEncryptionAlgorithm, Uri, Uri, String, Guid) PlayReadyContentHeader(Guid, String, PlayReadyEncryptionAlgorithm, Uri, Uri, String, Guid) PlayReadyContentHeader(Guid, String, PlayReadyEncryptionAlgorithm, Uri, Uri, String, Guid) PlayReadyContentHeader(Guid, String, PlayReadyEncryptionAlgorithm, Uri, Uri, String, Guid)

Initializes a new instance of the PlayReadyContentHeader class.

PlayReadyContentHeader(UInt32, Guid[], String[], PlayReadyEncryptionAlgorithm, Uri, Uri, String, Guid) PlayReadyContentHeader(UInt32, Guid[], String[], PlayReadyEncryptionAlgorithm, Uri, Uri, String, Guid) PlayReadyContentHeader(UInt32, Guid[], String[], PlayReadyEncryptionAlgorithm, Uri, Uri, String, Guid) PlayReadyContentHeader(UInt32, Guid[], String[], PlayReadyEncryptionAlgorithm, Uri, Uri, String, Guid) PlayReadyContentHeader(UInt32, Guid[], String[], PlayReadyEncryptionAlgorithm, Uri, Uri, String, Guid)

Initializes a new instance of the PlayReadyContentHeader class.

PlayReadyContentHeader(Byte[]) PlayReadyContentHeader(Byte[]) PlayReadyContentHeader(Byte[]) PlayReadyContentHeader(Byte[]) PlayReadyContentHeader(Byte[])

PlayReadyContentHeader(Byte[], Uri, Uri, String, Guid) PlayReadyContentHeader(Byte[], Uri, Uri, String, Guid) PlayReadyContentHeader(Byte[], Uri, Uri, String, Guid) PlayReadyContentHeader(Byte[], Uri, Uri, String, Guid) PlayReadyContentHeader(Byte[], Uri, Uri, String, Guid)

Initializes a new instance of the PlayReadyContentHeader class.

public : PlayReadyContentHeader(Byte[] headerBytes, Uri licenseAcquisitionUrl, Uri licenseAcquisitionUserInterfaceUrl, Platform::String customAttributes, Platform::Guid domainServiceId)
PlayReadyContentHeader(Byte[] headerBytes, Uri licenseAcquisitionUrl, Uri licenseAcquisitionUserInterfaceUrl, winrt::hstring customAttributes, Guid domainServiceId) const;
public PlayReadyContentHeader(Byte[] headerBytes, Uri licenseAcquisitionUrl, Uri licenseAcquisitionUserInterfaceUrl, String customAttributes, Guid domainServiceId)
Public Sub New(headerBytes As Byte[], licenseAcquisitionUrl As Uri, licenseAcquisitionUserInterfaceUrl As Uri, customAttributes As String, domainServiceId As Guid)
var playReadyContentHeader = new playReadyContentHeader(headerBytes, licenseAcquisitionUrl, licenseAcquisitionUserInterfaceUrl, customAttributes, domainServiceId);

Parameters

headerBytes
Byte[] Byte[] Byte[]

Raw data bytes representing a legacy WMDRM header.

licenseAcquisitionUrl
Uri Uri Uri

The URL for the silent (no user interaction) license acquisition Web service.

licenseAcquisitionUserInterfaceUrl
Uri Uri Uri

The URL for a non-silent license acquisition Web page.

customAttributes
String String String

Contains custom data used by the content provider. The content author can add arbitrary XML inside this element. Microsoft code does not act on any data contained inside this element.

domainServiceId
Guid Guid Guid

Service identifier for the domain service.

Remarks

This constructor should be used to convert a legacy WMDRM header to a PlayReady header.

The domainServiceId parameter is sensitive to the underlying platform's endianness. Carefully test your app on all platforms you intend to support to ensure that correct endianness is used on each platform.

See also

PlayReadyContentHeader(Guid, String, PlayReadyEncryptionAlgorithm, Uri, Uri, String, Guid) PlayReadyContentHeader(Guid, String, PlayReadyEncryptionAlgorithm, Uri, Uri, String, Guid) PlayReadyContentHeader(Guid, String, PlayReadyEncryptionAlgorithm, Uri, Uri, String, Guid) PlayReadyContentHeader(Guid, String, PlayReadyEncryptionAlgorithm, Uri, Uri, String, Guid) PlayReadyContentHeader(Guid, String, PlayReadyEncryptionAlgorithm, Uri, Uri, String, Guid)

Initializes a new instance of the PlayReadyContentHeader class.

public : PlayReadyContentHeader(Platform::Guid contentKeyId, Platform::String contentKeyIdString, PlayReadyEncryptionAlgorithm contentEncryptionAlgorithm, Uri licenseAcquisitionUrl, Uri licenseAcquisitionUserInterfaceUrl, Platform::String customAttributes, Platform::Guid domainServiceId)
PlayReadyContentHeader(Guid contentKeyId, winrt::hstring contentKeyIdString, PlayReadyEncryptionAlgorithm contentEncryptionAlgorithm, Uri licenseAcquisitionUrl, Uri licenseAcquisitionUserInterfaceUrl, winrt::hstring customAttributes, Guid domainServiceId) const;
public PlayReadyContentHeader(Guid contentKeyId, String contentKeyIdString, PlayReadyEncryptionAlgorithm contentEncryptionAlgorithm, Uri licenseAcquisitionUrl, Uri licenseAcquisitionUserInterfaceUrl, String customAttributes, Guid domainServiceId)
Public Sub New(contentKeyId As Guid, contentKeyIdString As String, contentEncryptionAlgorithm As PlayReadyEncryptionAlgorithm, licenseAcquisitionUrl As Uri, licenseAcquisitionUserInterfaceUrl As Uri, customAttributes As String, domainServiceId As Guid)
var playReadyContentHeader = new playReadyContentHeader(contentKeyId, contentKeyIdString, contentEncryptionAlgorithm, licenseAcquisitionUrl, licenseAcquisitionUserInterfaceUrl, customAttributes, domainServiceId);

Parameters

contentKeyId
Guid Guid Guid

Identifier of the content encryption key.

contentKeyIdString
String String String

String representation of the content key. If the contentKeyId parameter is specified, then this parameter is ignored.

contentEncryptionAlgorithm
PlayReadyEncryptionAlgorithm PlayReadyEncryptionAlgorithm PlayReadyEncryptionAlgorithm

Encryption algorithm type used to encrypt the content.

licenseAcquisitionUrl
Uri Uri Uri

The URL for the silent (no user interaction) license acquisition Web service.

licenseAcquisitionUserInterfaceUrl
Uri Uri Uri

The URL for a non-silent license acquisition Web page.

customAttributes
String String String

Contains custom data used by the content provider. The content author can add arbitrary XML inside this element. Microsoft code does not act on any data contained inside this element.

domainServiceId
Guid Guid Guid

Service identifier for the domain service.

Remarks

The contentKeyId and domainServiceId parameters are sensitive to the underlying platform's endianness. Carefully test your app on all platforms you intend to support to ensure that correct endianness is used on each platform.

Starting with Windows 10, version 1709, you can specify PlayReadyEncryptionAlgorithm.Aes128Cbc, for AES128CBC encryption, or PlayReadyEncryptionAlgorithm.Unspecified, to allow the server backend to determine the encryption type, as the value for the contentEncryptionAlgorithm parameter. On previous versions of Windows 10, specifying either of these values will cause an exception to be thrown. For this reason, you should check for the presence of the enumeration value by calling ApiInformationIsApiContractPresent and specifying major contract version 5 before using the new enum values in the constructor call.

bool supportsAes128CbcAndUnspecified = ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 5);

if (supportsAes128CbcAndUnspecified)
{
    // Guid and URL below are known by app, obtaining them is out of scope
    PlayReadyContentHeader header = new PlayReadyContentHeader(
        new Guid("{6591a70e-06fc-4d1f-862a-80bb569f07da}"),
        null,
        PlayReadyEncryptionAlgorithm.Unspecified,
        new Uri("http://www.contoso.com/rightsmanager.aspx"),
        null,
        null,
        new Guid("{215304E7-9263-446A-B150-0754D5E18973}"));
  
    var request = PlayReadyContentResolver.ServiceRequest(header);
    await request.BeginServiceRequest();
}
else
{
    // Application chooses behavior, for example, picks different content
    // or tells user that their system doesn’t support the selected content
}
See also

PlayReadyContentHeader(UInt32, Guid[], String[], PlayReadyEncryptionAlgorithm, Uri, Uri, String, Guid) PlayReadyContentHeader(UInt32, Guid[], String[], PlayReadyEncryptionAlgorithm, Uri, Uri, String, Guid) PlayReadyContentHeader(UInt32, Guid[], String[], PlayReadyEncryptionAlgorithm, Uri, Uri, String, Guid) PlayReadyContentHeader(UInt32, Guid[], String[], PlayReadyEncryptionAlgorithm, Uri, Uri, String, Guid) PlayReadyContentHeader(UInt32, Guid[], String[], PlayReadyEncryptionAlgorithm, Uri, Uri, String, Guid)

Initializes a new instance of the PlayReadyContentHeader class.

public : PlayReadyContentHeader(unsigned int dwFlags, Platform::Guid[] contentKeyIds, Platform::String[] contentKeyIdStrings, PlayReadyEncryptionAlgorithm contentEncryptionAlgorithm, Uri licenseAcquisitionUrl, Uri licenseAcquisitionUserInterfaceUrl, Platform::String customAttributes, Platform::Guid domainServiceId)
PlayReadyContentHeader(uint32_t dwFlags, Guid[] contentKeyIds, winrt::hstring[] contentKeyIdStrings, PlayReadyEncryptionAlgorithm contentEncryptionAlgorithm, Uri licenseAcquisitionUrl, Uri licenseAcquisitionUserInterfaceUrl, winrt::hstring customAttributes, Guid domainServiceId) const;
public PlayReadyContentHeader(UInt32 dwFlags, Guid[] contentKeyIds, String[] contentKeyIdStrings, PlayReadyEncryptionAlgorithm contentEncryptionAlgorithm, Uri licenseAcquisitionUrl, Uri licenseAcquisitionUserInterfaceUrl, String customAttributes, Guid domainServiceId)
Public Sub New(dwFlags As UInt32, contentKeyIds As Guid[], contentKeyIdStrings As String[], contentEncryptionAlgorithm As PlayReadyEncryptionAlgorithm, licenseAcquisitionUrl As Uri, licenseAcquisitionUserInterfaceUrl As Uri, customAttributes As String, domainServiceId As Guid)
var playReadyContentHeader = new playReadyContentHeader(dwFlags, contentKeyIds, contentKeyIdStrings, contentEncryptionAlgorithm, licenseAcquisitionUrl, licenseAcquisitionUserInterfaceUrl, customAttributes, domainServiceId);

Parameters

dwFlags
UInt32 UInt32 UInt32

Reserved. Set to 0.

contentKeyIds
Guid[] Guid[] Guid[]

Identifiers of the content encryption keys.

contentKeyIdStrings
String[] String[] String[]

String representations of the content keys. Each string must be a Base-64 encoded 16 byte value.

contentEncryptionAlgorithm
PlayReadyEncryptionAlgorithm PlayReadyEncryptionAlgorithm PlayReadyEncryptionAlgorithm

Encryption algorithm type used to encrypt the content.

licenseAcquisitionUrl
Uri Uri Uri

The URL for the silent (no user interaction) license acquisition Web service.

licenseAcquisitionUserInterfaceUrl
Uri Uri Uri

The URL for a non-silent license acquisition Web page.

customAttributes
String String String

Contains custom data used by the content provider. The content author can add arbitrary XML inside this element. Microsoft code does not act on any data contained inside this element.

domainServiceId
Guid Guid Guid

Service identifier for the domain service.

Remarks

The contentKeyIds and domainServiceId parameters are sensitive to the underlying platform's endianness. Carefully test your app on all platforms you intend to support to ensure that correct endianness is used on each platform.

Starting with Windows 10, version 1709, you can specify PlayReadyEncryptionAlgorithm.Aes128Cbc, for AES128CBC encryption, or PlayReadyEncryptionAlgorithm.Unspecified, to allow the server backend to determine the encryption type, as the value for the contentEncryptionAlgorithm parameter. On previous versions of Windows 10, specifying either of these values will cause an exception to be thrown. For this reason, you should check for the presence of the enumeration value by calling ApiInformationIsApiContractPresent and specifying major contract version 5 before using the new enum values in the constructor call.

bool supportsAes128CbcAndUnspecified = ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 5);

if (supportsAes128CbcAndUnspecified)
{
    // Guid and URL below are known by app, obtaining them is out of scope
    PlayReadyContentHeader header = new PlayReadyContentHeader(
        new Guid("{6591a70e-06fc-4d1f-862a-80bb569f07da}"),
        null,
        PlayReadyEncryptionAlgorithm.Unspecified,
        new Uri("http://www.contoso.com/rightsmanager.aspx"),
        null,
        null,
        new Guid("{215304E7-9263-446A-B150-0754D5E18973}"));
  
    var request = PlayReadyContentResolver.ServiceRequest(header);
    await request.BeginServiceRequest();
}
else
{
    // Application chooses behavior, for example, picks different content
    // or tells user that their system doesn’t support the selected content
}
See also