Skip to content

Function: getLicenseServerUrlFromContentProtection() ​

ts
function getLicenseServerUrlFromContentProtection(contentProtectionElements, schemeIdUri): string | null;

Defined in: cenc/getLicenseServerUrlFromContentProtection.ts:15

Extracts a license server URL from an array of ContentProtection elements.

Parameters ​

contentProtectionElements ​

ContentProtection[]

Array of ContentProtection nodes from the manifest.

schemeIdUri ​

string

schemeIdUri we are searching for.

Returns ​

string | null

The license server URL, and if not found then null.

Example ​

ts
it('should return license server URL', () => {
	const result = getLicenseServerUrlFromContentProtection(contentProtection, schemeIdUri)
	strictEqual(result, 'license-server-url')
})

A Streaming Video Technology Alliance project.