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
Copy file name to clipboardExpand all lines: docs/js-sdk/getting-started/overview.mdx
+3-4Lines changed: 3 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,8 +25,7 @@ The JavaScript library uses several modern browser technologies, including:
25
25
26
26
The JavaScript library is a monorepo containing the following packages intended for client use:
27
27
28
-
-[**c2pa**](https://opensource.contentauthenticity.org/docs/js-sdk/api/c2pa) is the main package used for loading and verifying manifests. This package runs all of the processing
29
-
logic on the client using a [WebAssembly](https://webassembly.org/) module and exposes a [TypeScript](https://www.typescriptlang.org/)-compatible API for easy integration.
28
+
-[**c2pa**](https://opensource.contentauthenticity.org/docs/js-sdk/api/c2pa) is the main package used for loading and verifying manifests. This package runs all of the processing logic on the client using a [WebAssembly](https://webassembly.org/) module and exposes a [TypeScript](https://www.typescriptlang.org/)-compatible API for easy integration.
30
29
-**c2pa-wc** provides UI components designed with input from the C2PA UX working group. It enables users to get up and running with standard UI patterns quickly and easily in any front-end environment.
31
30
-**@contentauth/react** provides a hooks interface for React components to quickly get manifest and thumbnail data in your React app.
32
31
@@ -59,7 +58,7 @@ Because of these requirements, **the library is not supported on any version of
This chart is accurate as of June, 2024. For the most up-to-date browser support information, see [caniuse.com](https://caniuse.com/wasm,webworkers,cryptography,typedarrays,fetch).
61
+
This chart is accurate as of December, 2024. For the most up-to-date browser support information, see [caniuse.com](https://caniuse.com/wasm,webworkers,cryptography,typedarrays,fetch).
63
62
:::
64
63
65
64
## Debugging
@@ -72,7 +71,7 @@ To view debug messages in the console, use your browser's inspector, go to the C
72
71
localStorage.debug='c2pa:*';
73
72
```
74
73
75
-
The debuging information includes millisecond timing differences so you can get an idea of how long different events take.
74
+
The debugging information includes millisecond timing differences so you can get an idea of how long different events take.
76
75
77
76
:::note
78
77
Debug calls and statements are stripped out of minified production builds to reduce file size.
The version numbers provided in the CDN URLs _must_ match in all of the places you reference the
48
-
library. To make it easy, use a variable that provides the version as shown in the example.
47
+
The version numbers provided in the CDN URLs _must_ be the same in all of the places you reference the library. To make it easy, use a variable that provides the version as shown in the example.
You can also bring in the library with a package manager, such as `npm`, `pnpm`, or `yarn`. This way, all of the client side code is hosted with your app and there are no external dependencies. For example, using `npm`:
@@ -71,24 +68,30 @@ Be sure to configure your server to send proper `Content-Type` headers for these
71
68
72
69
Examples for common build systems are shown below. They are also available in the [c2pa-js-examples repository](https://github.com/contentauth/c2pa-js-examples).
73
70
74
-
exportconst ExampleLink = ({ example }) => {
75
-
const linkText =`examples/${example}`;
76
-
const link =`https://github.com/contentauth/c2pa-js/tree/main/${linkText}`;
77
-
return (
78
-
<divclassName="example-link">
79
-
An example project is available here: <ahref={link}>{linkText}</a>
This example is from [c2pa-js-examples/minimal-ts-vite/](https://github.com/contentauth/c2pa-js-examples/blob/main/minimal-ts-vite/). To view and execute this example in a live [code sandbox](https://codesandbox.io/docs/learn/legacy-sandboxes/overview), see [Code Sandbox: Vite example](../guides/sandbox-qs-vite.mdx).
80
+
81
+
<CodeBlocklanguage="ts">{ViteExample}</CodeBlock>
82
+
</TabItem>
83
+
84
+
<TabItemvalue="rollup"label="Rollup">
85
+
86
+
This example is from [c2pa-js-examples/minimal-ts-rollup/](https://github.com/contentauth/c2pa-js-examples/blob/main/minimal-ts-rollup/). To view and execute this example in a live [code sandbox](https://codesandbox.io/docs/learn/legacy-sandboxes/overview), see [Code Sandbox: Rollup example](../guides/sandbox-qs-rollup.mdx).
This example is from [c2pa-js-examples/minimal-ts-webpack/](https://github.com/contentauth/c2pa-js-examples/blob/main/minimal-ts-webpack/). To view and execute this example in a live [code sandbox](https://codesandbox.io/docs/learn/legacy-sandboxes/overview), see [Code Sandbox: Webpack example](../guides/sandbox-qs-webpack.mdx).
0 commit comments