← Back

C2PA

There is a JavaScript SDK for the current version of C2PA, documented here. As of June 2023, there are no officially released UI components, so a UI will have be designed by Starling ourselves.

Official Demo

Here is a simple demo without much of a UI, that pulls out manifest data. The demo was adapted from this official one, with changes to work directly in the browser without compilation. A simple official in-browser demo is provided here as well, but it only logs to the console.

Property Value
Loading…

Starling Demo

Here is another demo using an image injected with manifest information typical of Starling. In this demo the manifest is dumped directly.

Active manifest:
Loading...

Code Example

Extracting a specific piece of data such as the latitude, can be done like so:

const { manifestStore, source } = await c2pa.read(sampleImage2);
const activeManifest = manifestStore?.activeManifest;
const lat = activeManifest.assertions.get("stds.exif")[0].data["exif:GPSLatitude"]

As a demo, the latitude from the manifest above is: (loading).

To understand further how to pull information out using the API, this architecture diagram from the docs is very helpful.

Official UI

Although not properly released yet, there are some UI components from Adobe that are under development. For example, the cai-manifest-summary:

The source code for these components is available in the c2pa-wc package, but there essentially no documentation available yet. Importantly for Starling, there is the ability to add custom data sections to the widget.

Currently getting these UI components working requires editing the repo, but I am working on getting a PR merged for that.


The source of this page (and the demos it contains) can be seen here.