SDK docs
Construct 3
Use the HTML5 export and invoke the browser SDK from a single JavaScript action or addon at natural breaks.
Export checklist
- Export the HTML5 build with all generated files included.
- Leave index.html and the exported scripts at the ZIP root.
- Do not add a second script tag for the PlayKovo SDK.
Bridge the SDK
Put browser calls in one reusable JavaScript action so the event sheet owns when a placement is requested and game logic owns the fallback.
// Construct 3 JavaScript action
await window.PlayKovoSDK?.showInterstitial({
placement: "level_complete",
onClose: () => runtime.callFunction("OpenNextLevel"),
onError: () => runtime.callFunction("OpenNextLevel"),
});Pause and sound
PlayKovo pauses your game during ads, while the app menu is open and when the tab or app is in the background, and mutes it from the player's sound button. Forward those events into the engine. The check for isMuted skips this on SDK 1.x, so the same build runs on both versions.
// Construct 3: run once on start of layout
const sdk = window.PlayKovoSDK;
if (sdk?.isMuted) {
sdk.on("pause", () => { runtime.timeScale = 0; });
sdk.on("resume", () => { runtime.timeScale = 1; });
sdk.on("audio", ({ muted }) => runtime.callFunction("SetMuted", muted ? 1 : 0));
}
// In level start / level end actions:
window.PlayKovoSDK?.gameplayStart?.();
window.PlayKovoSDK?.gameplayStop?.();Test before review
Trigger the event once after a level ends. Verify that a double click does not queue duplicate requests and that the next level opens when no ad is available.
One SDK, every web engine