SDK docs

Cocos Creator

Ship the web-mobile or web-desktop export and isolate SDK calls in a TypeScript service used by your scene logic.

Export checklist

  • Build for Web Mobile or Web Desktop, as appropriate for the game.
  • ZIP the output containing index.html and all generated folders.
  • Keep third-party analytics and ad packages out of the export.

Bridge the SDK

Wrap the global bridge in a small TypeScript service. Your gameplay code should react to callbacks, never assume an ad is guaranteed.

TypeScript
declare global { interface Window { PlayKovoSDK?: any } }

export async function showInterstitial(placement: string) {
  const sdk = window.PlayKovoSDK;
  if (!sdk) return { status: "unavailable" };
  return sdk.showInterstitial({ placement });
}

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.

TypeScript
// Same TypeScript service
export function listenToPlatform(onPause: () => void, onResume: () => void, onAudio: (muted: boolean) => void) {
  const sdk = window.PlayKovoSDK;
  if (!sdk?.isMuted) return; // SDK 1.x
  sdk.on("pause", onPause);   // e.g. director.pause()
  sdk.on("resume", onResume); // e.g. director.resume()
  sdk.on("audio", ({ muted }: { muted: boolean }) => onAudio(muted));
}

Test before review

Exercise the service from a real browser build, not the editor preview. Confirm your scene resumes normally after close and unavailable outcomes.

One SDK, every web engine

PlayKovo uses the same versioned browser SDK for approved hosted games. Engine pages explain the integration point; they do not require an engine-specific provider key or SDK download.

We use optional cookies for site analytics and site advertising. You can change your choice later. Privacy policy.