You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The legacy JavaScript library is deprecated and the repository has been renamed to [c2pa-js-legacy](https://github.com/contentauth/c2pa-js-legacy). The new JavaScript web library is now in the <https://github.com/contentauth/c2pa-js> repository. The old package will no longer be updated or supported.
3
+
4
+
If you're starting a new application, use the new library instead.
Copy file name to clipboardExpand all lines: docs/js-sdk/getting-started/overview.mdx
+6-2Lines changed: 6 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,12 @@
1
1
---
2
-
id: overview
3
-
title: JavaScript library
2
+
id: old-js-overview
3
+
title: Legacy JavaScript library
4
4
---
5
5
6
+
importDeprecationfrom'../deprecation-notice.md';
7
+
8
+
<Deprecationname="deprecation" />
9
+
6
10
The CAI JavaScript library (sometimes referred to as the "JavaScript SDK") enables client JavaScript applications to view and verify [C2PA](https://c2pa.org/) data. It performs only **read** operations on C2PA manifests, unlike the [Rust library](../../rust-sdk/), and the [prerelease libraries](../../other-langs) which can both read and write manifests.
Copy file name to clipboardExpand all lines: docs/js-sdk/guides/examples.mdx
+13-10Lines changed: 13 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,23 +3,27 @@ id: examples
3
3
title: JavaScript examples
4
4
---
5
5
6
+
importDeprecationfrom'../deprecation-notice.md';
7
+
8
+
<Deprecationname="deprecation" />
9
+
6
10
JavaScript examples are in **[contentauth/c2pa-js-examples](https://github.com/contentauth/c2pa-js-examples)**. The examples are mirrored from the [examples directory in the contentauth/c2pa-js repository](https://github.com/contentauth/c2pa-js/tree/main/examples).
7
11
8
12
:::note
9
13
As noted in the [overview](../getting-started/overview#technologies-that-the-library-uses), the JavaScript library uses a number of modern JavaScript technologies such as WebAssembly (Wasm) and Web Workers. To understand the JavaScript examples, you should be familiar with these technologies, [TypeScript](https://www.typescriptlang.org/) and at least one bundler tool such as [Webpack](https://webpack.js.org/), [Rollup](https://rollupjs.org/), or [Vite](https://vitejs.dev/).
10
14
:::
11
15
12
-
Additionally, the JavaScript examples use TypeScript for type safety.
16
+
Additionally, the JavaScript examples use TypeScript for type safety.
|[esm-imports](https://github.com/contentauth/c2pa-js/tree/main/examples/esm-imports)| None | None | The simplest example using vanilla JavaScript (ECMAScript).|
|[esm-imports](https://github.com/contentauth/c2pa-js/tree/main/examples/esm-imports)| None | None | The simplest example using vanilla JavaScript (ECMAScript).|
Copy file name to clipboardExpand all lines: docs/js-sdk/guides/selectors.mdx
+9-5Lines changed: 9 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,10 @@ id: selectors
3
3
title: Selectors
4
4
---
5
5
6
+
importDeprecationfrom'../deprecation-notice.md';
7
+
8
+
<Deprecationname="deprecation" />
9
+
6
10
[Selectors](https://github.com/contentauth/c2pa-js/tree/main/packages/c2pa/src/selectors) are convenience functions that return useful data from manifest objects. The selector functions are:
7
11
8
12
-[`selectEditsAndActivity`](../../js-sdk/api/c2pa.selecteditsandactivity) - Returns a formatted list of manifest edits and activity.
@@ -42,19 +46,19 @@ The result is an `editsAndActivity` object such as this:
Copy file name to clipboardExpand all lines: docs/js-sdk/guides/validation.mdx
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,10 @@ id: validation
3
3
title: Validation & errors
4
4
---
5
5
6
+
importDeprecationfrom'../deprecation-notice.md';
7
+
8
+
<Deprecationname="deprecation" />
9
+
6
10
Part of processing an asset involves [validating the manifests](https://c2pa.org/specifications/specifications/1.4/specs/C2PA_Specification.html#_validation) that it contains. During validation, errors can occur in the active manifest and in ingredients.
0 commit comments