Skip to content

Function: getLicenseRequestFromMessage() ​

ts
function getLicenseRequestFromMessage(message, encoding?): ArrayBuffer;

Defined in: playready/getLicenseRequestFromMessage.ts:19

Gets the PlayReady license request from the MediaKeyMessageEvent.

Parameters ​

message ​

ArrayBuffer

An ArrayBuffer from the content decryption module.

encoding? ​

Encoding = UTF_16

The message encoding type. Default is UTF-16.

Returns ​

ArrayBuffer

The license request as an ArrayBuffer.

Example ​

ts
const result = getLicenseRequestFromMessage(message)
deepStrictEqual(result, decodeBase64('1beR1c0').buffer)

A Streaming Video Technology Alliance project.