UNPKG

@svta/common-media-library

Version:
19 lines 586 B
import { decodeBase64 } from '../../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} */ export function decodeFairPlayLicense(response) { return typeof response === 'string' ? decodeBase64(response) : new Uint8Array(response); } //# sourceMappingURL=decodeFairPlayLicense.js.map