Init options
Every option Playgent.init() accepts.
const player = Playgent.init({
containerId: "playgent-host",
game: "sudoku",
mode: "daily",
player: "plyr_acme",
// …
});
Required
containerIdrequiredThe id of the host <div>. Must exist before init.
gamerequiredGame ID, e.g. sudoku, trivia, wordsearch.
moderequiredHow content is fed. See Content modes.
playerrequiredPlayer ID (plyr_…). Bundles origins, theme, features, CTA, and analytics stream. The embed will only load on origins this player allows.
Content
contentPublication ID (pub_…) for pinned mode, or channel ID (cha_…) for daily / random. Required for content-driven games (trivia, wordsearch, memoji, cluefinder, …); omitted for algorithmic games (sudoku, slider, …).
languagedifficultyTheme
themeBuilt-in theme slug (e.g. pop-minimal, editorial-noir) or a custom theme ID (thm_…). Overrides whatever theme is set on the player.
navStyleDimensions
widthheightmaxWidthmaxHeightFeatures
disableHintsdisableLeaderboardsdisableArchivedisableRestartdisableSharedisablePausedisableShowErrorsmutedhintCountfirstPlayInstructionsIdentity
externalUserIdexternalUsernameEnd screen
Optional call-to-action shown after the game ends. When the button is pressed, the game fires an onEnd event.
ctaTextctaButtonTextctaUrlplayButtonTextIn-view tracking
viewOnceviewThresholdview fires.Callbacks
onReadyonViewonStartonCompleteonEndonError