Function findCencContentProtection

  • Beta

    Finds and returns the ContentProtection element for MP4 Common Encryption.

    Parameters

    Returns null | ContentProtection

    The Common Encryption content protection element, or null if not found.

    const cpArray = [
    {
    schemeIdUri: 'urn:some:other:schema',
    value: 'cenc',
    },
    {
    schemeIdUri: MP4_PROTECTION_SCHEME,
    value: 'other',
    },
    ];

    const result = findCencContentProtection(cpArray);