Players
A reusable bundle of allowed origins, theme, features, end-screen CTA, and analytics stream. One per brand or surface — referenced from every embed.
A player solves a real problem: production code shouldn't be where you change colors, toggle features, or tweak end-screens. Move that configuration into a player and your call site shrinks to a single ID.
Playgent.init({
containerId: "playgent-host",
game: "sudoku",
mode: "daily",
player: "plyr_acme_blog",
});
When the SDK boots, it fetches https://plyr.playgent.com/<player_id>.json and merges that configuration with anything set on Playgent.init. Init values always win — handy for one-off overrides (a different theme on a single page, etc.).
What a player bundles
| Field | Why it's on the player |
|---|---|
| Allowed origins | The domains where this player is allowed to load. Everywhere else gets rejected. Wildcards apply to the host part (*.acme.com). |
| Allow WebViews | Required for in-app embeds on iOS / Android. Off by default. |
| Analytics stream | Every event from this player flows into the linked stream. |
| Theme | Built-in slug or a custom theme ID. Customer code doesn't need to know which. |
| Features | Pause, leaderboards, archive, restart, share, hints (with optional count), start with sound. |
| End-screen CTA | Headline, button label, URL — surfaced after completion. |
| Watermark | On Sandbox plan, always on. Starter+ can turn it off per player. |
Where to create one
In the Hub: Configuration → Players → New player. Give it a name you'll recognize on dropdowns later — Acme.com, Acme app, Acme staging.
Multiple players
Use one player per surface. Common patterns:
- One per brand (the marketing site vs. the consumer app).
- One per environment (separating staging origins from production).
- One per audience (a kid-safe player with hints on, leaderboards off).
Players are cheap. Cloning is one click in the Hub.
Per-embed overrides
Override the theme just for one campaign page:
Playgent.init({
containerId: "playgent-host",
game: "trivia",
mode: "pinned",
content: "pub_holiday_quiz_2026",
player: "plyr_acme_blog",
theme: "thm_holiday_red", // overrides the player's default
});
Override the end-screen CTA per article:
Playgent.init({
containerId: "playgent-host",
game: "trivia",
mode: "pinned",
content: "pub_article_quiz_42",
player: "plyr_acme_blog",
ctaText: "Subscribe to read more",
ctaButtonText: "Subscribe",
ctaUrl: "https://acme.com/subscribe?ref=playgent",
});
Player ID format
plyr_ followed by alphanumeric characters and dashes/underscores.
plyr_acme_blog
plyr_42abc_test