CML
    Preparing search index...

    Function validateC2paMerkleSegment

    • Validates a fragmented MP4 VOD media segment against the init manifest's merkle maps (§15.12.2.2). Pure: the caller persists nextState and resets state after a seek.

      merkleMaps must be non-empty; the caller is responsible for only calling this in VOD Merkle mode (i.e. after InitSegmentValidation.merkleMaps came back non-empty).

      Parameters

      Returns Promise<{ nextState: MerkleSegmentState; result: MerkleSegmentValidation }>

      it('validates a segment with a correct Merkle proof', async () => {
      const validated = await validateC2paMerkleSegment(segments[0], merkleMaps)

      strictEqual(validated.result.isValid, true)
      strictEqual(validated.result.location, 0)
      strictEqual(validated.result.errorCodes.length, 0)
      })