THEOplayer Web SDK
    Preparing search index...

    Interface C2PAMetadataEvent

    Fired when the player encounters a C2PA (Coalition for Content Provenance and Authenticity) uuid box while buffering an ISOBMFF initialization or media segment.


    - Only fired if C2PA metadata extraction is enabled through BaseSource.c2paMetadata.
    - Only fired for fMP4/CMAF content played through the player's own HLS and MPEG-DASH pipelines. Not fired for native playback (see BaseSource.useNativePlayback), MPEG-TS content or HESP streams.
    - Every C2PA uuid box encountered is exposed, including boxes with identical contents, e.g. when the same initialization segment is buffered again after a quality switch. Deduplication is left to the application.
    - The player does not validate C2PA signatures. Pass the exposed data to a third-party C2PA validation library.
    - Timed C2PA event messages carried in emsg boxes are exposed separately, as cues of an emsg metadata text track.

    interface C2PAMetadataEvent {
        data: Uint8Array;
        date: Date;
        endTime: number | undefined;
        mediaType: C2PAMediaType;
        purpose: string;
        segmentType: C2PASegmentType;
        startTime: number | undefined;
        type: "c2pametadata";
    }

    Hierarchy (View Summary)

    • Event<"c2pametadata">
      • C2PAMetadataEvent
    Index

    Properties

    The raw contents of the C2PA uuid box following the purpose field.


    - For purpose 'manifest', this contains the merkle offset followed by the C2PA manifest store (JUMBF).
    - For purpose 'merkle', this contains the CBOR-serialized merkle row data.

    date: Date

    The creation date of the event.

    endTime: number | undefined

    The end time of the media segment in which the C2PA metadata was found.


    - Only available if C2PAMetadataEvent.segmentType is 'media'.

    mediaType: C2PAMediaType

    The type of media track in which the C2PA metadata was found.


    - When audio and video are carried in separate tracks, each track is a separate C2PA-signed stream with its own manifest and merkle data. Use this property to associate the metadata with the correct track.

    purpose: string

    The purpose of the C2PA uuid box, for example 'manifest' or 'merkle'.

    segmentType: C2PASegmentType

    The type of segment in which the C2PA metadata was found.

    startTime: number | undefined

    The start time of the media segment in which the C2PA metadata was found.


    - Only available if C2PAMetadataEvent.segmentType is 'media'.

    type: "c2pametadata"

    The type of the event.