---
title: Getting Started
url: https://docs.kaltura.com/docs/embeddable-kaltura-products/express-capture/getting-started
---

## Getting Started

You need:

- A **KS** (Kaltura Session string) that can create entries for your partner. See the [Session Guide](/docs/getting-started/authentication/ks-overview).
- Your **partner ID**.
- A **player uiConf ID**, used to play the recording back on the review screen. See the [Kaltura Player](/docs/embeddable-kaltura-products/kaltura-player/player-embed-overview).

Replace the three values in the file below and serve it over HTTPS (or from `localhost`), since browsers allow camera, microphone and screen capture only on secure pages.

```html
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8" />
  <title>Express Capture 2.0</title>
</head>
<body>
  <p id="status">Loading…</p>
  <div id="recorder" style="width: 800px; height: 450px;"></div>

  <script type="module">
    const ks = 'YOUR_KS_TOKEN';
    const partnerId = Number('YOUR_PARTNER_ID');
    const uiConfId = Number('YOUR_UICONF_ID');

    const status = document.getElementById('status');

    if (ks === 'YOUR_KS_TOKEN' || isNaN(partnerId) || isNaN(uiConfId)) {
      status.textContent = 'Replace YOUR_KS_TOKEN, YOUR_PARTNER_ID and YOUR_UICONF_ID with real values to get started.';
    } else {
      const { createWorkspace } = await import(
        'https://unisphere.nvp1.ovp.kaltura.com/v1/loader/index.esm.js'
      );

      const workspace = await createWorkspace({
        config: {
          appId: 'my-app',
          appVersion: '1.0.0',
          env: 'nvp1',
          experiences: {
            recorder: {
              recorder: {
                settings: {
                  ks,
                  partnerId,
                  uiConfId,
                  serviceUrl: 'https://www.kaltura.com',
                  playerUrl: 'https://cdnapisec.kaltura.com',
                },
              },
            },
          },
          ui: { theme: 'light', language: 'en' },
        },
        workspaceName: 'my-workspace',
      });

      const runtime = await workspace.getRuntimeAsync(
        'unisphere.widget.recorder',
        'recorder'
      );

      if (!runtime) {
        status.textContent = 'Failed to load the recorder runtime.';
      } else {
        status.textContent = '';

        runtime.mountVisual({
          type: 'contained',
          target: { type: 'element', elementId: 'recorder' },
          settings: {},
        });

        runtime.onUploadComplete.on((payload) => {
          const [first] = payload.entries ?? [payload];
          status.textContent = `Uploaded as entry ${first.entryId}`;
        });
      }
    }
  </script>
</body>
</html>
```

The recorder appears inside the `#recorder` element. Record, review, and click **Use This** to upload the recording to Kaltura as a new entry.

### What Just Happened

1. The **loader script** downloads the recorder widget from the Kaltura CDN.
2. `createWorkspace` registers the `recorder` runtime with your settings. `env` is required: the region the workspace runs in. The settings are validated, and the recorder fails to load if a required one is missing.
3. `getRuntimeAsync` resolves once the widget is ready.
4. `mountVisual` renders the recorder into the `#recorder` element.
5. `onUploadComplete` reports the new entry ID once the upload finishes. `payload.entries ?? [payload]` reads the entries from both the current and the coming event shape; see [Upload Results](/docs/embeddable-kaltura-products/express-capture/events#upload-results).

### Size the Container

The recorder fills the element you give it, so that element must have an explicit width and height. Keep it at the capture's aspect ratio: 16:9 for the default landscape orientation, 9:16 for portrait. If you let users switch orientation, resize the element when they do; see [Events](/docs/embeddable-kaltura-products/express-capture/events).

To remove the recorder later, keep the object `mountVisual` returns and pass its `id` to `unmountVisual`:

```js
const visual = runtime.mountVisual({ /* ... */ });
// later
runtime.unmountVisual(visual.id);
```

### Choose a Region

Use your account's region in three places: the loader URL, `env`, and `serviceUrl`. The loader and `env` must match, or the workspace fails to start. See [Endpoints & Regions](/docs/getting-started/general/api-endpoints-regions).

| Region | Loader host | `env` | `serviceUrl` |
|---|---|---|---|
| US | `unisphere.nvp1.ovp.kaltura.com` | `nvp1` | `https://www.kaltura.com` |
| Frankfurt (DE) | `unisphere.frp2.ovp.kaltura.com` | `frp2` | `https://api.de.kaltura.com` |
| Ireland (EU) | `unisphere.irp2.ovp.kaltura.com` | `irp2` | `https://api.eu.kaltura.com` |

`serviceUrl` is the API host without `/api_v3`.

### Next Steps

- [Settings](/docs/embeddable-kaltura-products/express-capture/settings) — Turn off capabilities, cap the recording length, rename entries
- [Saving & Uploads](/docs/embeddable-kaltura-products/express-capture/saving-uploads) — Keep recordings out of Kaltura, or replace an existing entry's media
- [Events](/docs/embeddable-kaltura-products/express-capture/events) — React to recordings in your page
- [Examples](/docs/embeddable-kaltura-products/express-capture/examples) — Ready-to-use configurations
