Function: findCencContentProtection()
ts
function findCencContentProtection(cpArray): ContentProtection | null;Defined in: cenc/findCencContentProtection.ts:17
Finds and returns the ContentProtection element for MP4 Common Encryption.
Parameters
cpArray
Array of ContentProtection elements.
Returns
ContentProtection | null
The Common Encryption content protection element, or null if not found.
Example
ts
const cpArray = [
{
schemeIdUri: 'urn:some:other:schema',
value: 'cenc',
},
{
schemeIdUri: MP4_PROTECTION_SCHEME,
value: 'other',
},
]
const result = findCencContentProtection(cpArray)