Skip to content

Overview

FRVR SDK is a single JavaScript bundle that handles the non‑gameplay parts of shipping an HTML5 game: ads, payments, analytics, auth, storage, leaderboards, push, consent, deep links — and then adapts itself to whichever channel (distribution platform) you’re running on.

                     ┌───────────────────────────┐
 your game.js ───►   │   window.FRVR (one bundle) │
                     └───────────────┬───────────┘

              ┌──────────────────────┼────────────────────────┐
              ▼                      ▼                        ▼
         FRVR.ads             FRVR.tracker              FRVR.iap, …
     (interstitial,          (events, FTUE,           (products, receipts,
      rewarded, banner)       level funnels)           consumables)
              │                      │                        │
              └──────────────────────┼────────────────────────┘

                        ┌───────────────────────┐
                        │   Channel package     │   e.g. frvr-channel-web,
                        │  (platform adapter)   │   -facebook-instant, -ios, …
                        │ (injected by FRVR)    │
                        └───────────────────────┘
  • The core bundle (frvr-sdk.min.js) is always the same. It’s what your game talks to.
  • A channel bundle (frvr-channel-*.min.js) plugs in provider‑specific behavior — Facebook Instant’s ads, Google Play billing, iOS native bridges, etc. You load frvr-channel-dev locally; FRVR injects the right channel bundle for you at release time, per platform.

One game build ships to many channels. You don’t branch your game code per platform, and you don’t pick the channel bundle yourself in production.

A single configuration object drives every module. Each module reads only its own key, and any omitted key is safe — that module just uses defaults or stays inert.

FRVR.config = {
  gameId: 'my-awesome-game',
  ads:       { /* ... */ },
  iap:       { catalog: { /* ... */ } },
  auth:      { /* ... */ },
  tracker:   { /* ... */ },
  consent:   { providerName: 'tcfv2' },
  // etc.
};

See the configuration reference.

The calls line up roughly like this:

  1. Set FRVR.config and wire every lifecycle hook — onSuspend, onResume, onAudioSuspend, onAudioResume, onGamePause. Missing any of them is a shipping bug.
  2. Call FRVR.init() — builds all modules.
  3. Call FRVR.bootstrapper.init(), load your game, then FRVR.bootstrapper.complete() — shows a channel‑appropriate splash while you load.

Step 1 is the one that takes actual work. On raw HTML5 (no engine) you need to wire each hook into your own update loop, audio mixer, and UI — there isn’t a generic “pause everything” API in the browser. Unity and Cocos plugins make this lighter because those engines already have pause/resume and audio mixers you can forward to.

Full walkthrough: see the lifecycle page for your engine — Web, Unity, Cocos, Construct 3.