Skip to content
Jami3D
Developer docs menu

Theming

Match the player to your site with tokens — mode, accent, radius, font, caption size — never with CSS.

The theme option

theme is a mode alone ("dark", "light", "auto" — the viewer's own setting) or the tokens you want to set. The Live Room lives in its own document: your page's CSS never reaches it, and the SDK never hands it CSS text — only these names.

TokenValues
accentAny #rrggbb colour.
mode"dark" | "light" | "auto"
radius"none" | "small" | "medium" | "large"
font"inter" | "system" | "serif" | "rounded"
captionSize"small" | "medium" | "large" | "xlarge"
lesson.ts
import { createPlayer } from "jami3d";

const dark = matchMedia("(prefers-color-scheme: dark)");

const player = createPlayer("#stage", {
  projectId: "0199c4a0-0000-7000-8000-0000000000a1",
  publishableKey: "pk_test_…",
  theme: {
    mode: dark.matches ? "dark" : "light",
    accent: "#0b6bcb",
    radius: "large",
    font: "rounded",
    captionSize: "large",
  },
});

// Follow the page's own dark mode as it changes: the live player is told, nothing reloads.
dark.addEventListener("change", () => {
  void player.setTheme(dark.matches ? "dark" : "light");
});

Your option wins over the project's own accent, which wins over the platform's. setTheme changes the live player without a reload, and so do the React and Vue components when their theme prop changes.

Accents and contrast

An accent is a colour the design system did not choose, so the player derives the rest from it for contrast: text on accent buttons at 4.5:1 or more, accent-coloured text at 4.5:1 on the player's panels, and focus rings at 3:1. The facade picks black or white for its Play button the same way.

Controls and captions

controls shows all of them (true), none (false), a minimal transport ("minimal"), or part by part: transport, chapters, conversation, share, fullscreen and reportButton (a part left out is shown). captions starts captions on, off or as the viewer prefers ("auto"); the viewer can change both.

In plain HTML

<jami3d-player> takes the mode as an attribute; its options property takes the full theme object.

lesson.html
<script type="module">
  import { defineJamiPlayerElement } from "jami3d/element";

  defineJamiPlayerElement();
</script>

<jami3d-player
  project-id="0199c4a0-0000-7000-8000-0000000000a1"
  publishable-key="pk_test_…"
  theme="light"
  captions="auto"
></jami3d-player>