Add both tags to the <head> of your HTML. Do notasync or defer them — the SDK must be ready before any of your game scripts run. Load them off FRVR’s CDN (don’t self‑host):
<head> <script src="https://cdn.frvr.com/sdk/frvr-sdk.min.js"></script> <script src="https://cdn.frvr.com/sdk/frvr-channel-dev.min.js"></script> <!-- …your own scripts come after these --></head>
The dev channel bundle ships fake ads, IAP, and storage providers so you can click through flows without a live backend.
FRVR.lifecycle.* hooks are required. The SDK calls into your game to pause the game loop and audio whenever an ad is shown (or the channel demands it). Not wiring these is a shipping bug — ads will talk over your music and your game will keep running under an interstitial.
<script> FRVR.config = { gameId: 'my-awesome-game', }; // REQUIRED — implement all five. Even if a hook is a no-op in your game, // set it explicitly so you remember to revisit later. FRVR.lifecycle.onSuspend = () => game.pauseLoop(); FRVR.lifecycle.onResume = () => game.resumeLoop(); FRVR.lifecycle.onAudioSuspend = () => audio.mute(); FRVR.lifecycle.onAudioResume = () => audio.unmute(); FRVR.lifecycle.onGamePause = () => game.showPauseMenu(); FRVR.init();</script>
FRVR.init() wires up every module (FRVR.ads, FRVR.tracker, FRVR.iap, …). Nothing has been sent over the wire yet.
The bootstrapper renders a channel‑appropriate splash screen while your game loads:
<script> FRVR.bootstrapper.init() .then(() => loadGame(progress => FRVR.bootstrapper.setProgress(progress))) .then(() => FRVR.bootstrapper.complete()); function loadGame(onProgress) { // …download assets, warm up audio, etc. Call onProgress(0..1) as it advances. onProgress(1); return Promise.resolve(); }</script>
That’s a complete local integration. From here, reach into any module (FRVR.ads, FRVR.iap, FRVR.tracker, …) as you need it — each has its own page with live demos in the sidebar.
Next: wire up ads, IAP, and analytics. When you’re ready to ship, talk to your FRVR contact — FRVR handles the production build matrix and channel injection for you.