Skip to content

Commit

Permalink
Update web embedding docs (rerun-io#8359)
Browse files Browse the repository at this point in the history
### What

* Add a line about what `RRD_URL` can be when used in an iframe

It's the same everywhere, but it's normal to assume that the iframe has
different limitations compared to embedding the web viewer directly.

Also bumped the version, as it was pretty ancient.
  • Loading branch information
jprochazk authored Dec 9, 2024
1 parent 48df87d commit 227e73c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docs/content/howto/integrations/embed-web.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ To implement this, fill in the placeholders:
- `RRD_URL` - The URL of the recording to display in the viewer.
- `RERUN_VERSION` - The version of the Rerun SDK used to generate the recording.

The `RRD_URL` can be a file served over `http` (e.g. `https://app.rerun.io/version/0.20.3/examples/arkit_scenes.rrd`), or a connection to an SDK using our [serve](https://www.rerun.io/docs/reference/sdk/operating-modes#serve) API (e.g. `ws://localhost:4321`).

For instance:

```html
<iframe src="https://app.rerun.io/version/0.14.1/?url=https://app.rerun.io/version/0.14.1/examples/arkit_scenes.rrd"></iframe>
<iframe src="https://app.rerun.io/version/0.20.3/?url=https://app.rerun.io/version/0.20.3/examples/arkit_scenes.rrd"></iframe>
```

## Using the JavaScript package
Expand Down Expand Up @@ -94,7 +96,7 @@ await viewer.start(null, parentElement);
The Viewer API supports adding and removing recordings:

```js,id=embed-web-viewer-api-js-open-close
const rrdUrl = "https://app.rerun.io/version/0.14.1/examples/arkit_scenes.rrd";
const rrdUrl = "https://app.rerun.io/version/0.20.3/examples/arkit_scenes.rrd";
// Open a recording:
viewer.open(rrdUrl);
Expand Down

0 comments on commit 227e73c

Please sign in to comment.