@svta/common-media-library
Version:
A common library for media playback in JavaScript
22 lines • 740 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.decodeFairPlayLicense = decodeFairPlayLicense;
const decodeBase64_js_1 = require("../../utils/decodeBase64.js");
/**
* Decodes a FairPlay DRM license response.
*
* @param response - The license response, either a base64 string or ArrayBuffer
* @returns A Uint8Array containing the decoded license
*
* @group DRM
* @beta
*
* @example
* {@includeCode ../../../test/drm/fairplay/decodeFairPlayLicense.test.ts#example}
*/
function decodeFairPlayLicense(response) {
return typeof response === 'string'
? (0, decodeBase64_js_1.decodeBase64)(response)
: new Uint8Array(response);
}
//# sourceMappingURL=decodeFairPlayLicense.js.map