@contentauth/c2pa-js
    Preparing search index...

    A collection of functions that permit the creation of Reader objects from various sources.

    interface ReaderFactory {
        fromBlob: (format: string, blob: Blob) => Promise<null | Reader>;
        fromBlobFragment: (
            format: string,
            init: Blob,
            fragment: Blob,
        ) => Promise<null | Reader>;
    }
    Index

    Properties

    fromBlob: (format: string, blob: Blob) => Promise<null | Reader>

    Create a Reader from an asset's format and a blob of its bytes.

    Type Declaration

      • (format: string, blob: Blob): Promise<null | Reader>
      • Parameters

        • format: string

          Asset format.

        • blob: Blob

          Blob of asset bytes.

        Returns Promise<null | Reader>

        A Reader object or null if no C2PA metadata was found.

    fromBlobFragment: (
        format: string,
        init: Blob,
        fragment: Blob,
    ) => Promise<null | Reader>

    Type Declaration

      • (format: string, init: Blob, fragment: Blob): Promise<null | Reader>
      • Parameters

        • format: string

          Asset format.

        • init: Blob

          Blob of initial fragment bytes.

        • fragment: Blob

          Blob of fragment bytes.

        Returns Promise<null | Reader>

        A Reader object or null if no C2PA metadata was found.