Skip to content

Channel characteristics (Cocos)

Different channels allow different things: some let you open external links, some don’t; some support browser navigation, some trap the player inside the game. Read these flags before you wire a UI that depends on them.

const chars = FRVRSDK.instance.getChannelCharacteristics();
// An object with boolean-ish fields describing the channel's permissions.

if (FRVRSDK.instance.allowsExternalLinks()) {
  // Safe to show a "privacy policy" link, "about" link, etc.
  showExternalLinks();
}

if (FRVRSDK.instance.allowsNavigation()) {
  // Safe to push URL state / use the browser back button.
  enableLocationRouting();
}
if (FRVRSDK.instance.allowsExternalLinks()) {
  this.showPrivacyLink();
  this.showCreditsLink();
} else {
  // Channel is sandboxed — show an in-game privacy screen instead of a link out.
  this.showInGamePrivacyScreen();
}

Common “no external links” channels: Facebook Instant, some cloud‑streaming platforms. Common “yes external links” channels: web portals, native wrappers.

if (FRVRSDK.instance.allowsNavigation()) {
  history.pushState({ scene: 'shop' }, '', '/shop');
} else {
  // Stay in-scene; don't touch history.
  goToScene('shop');
}

Hardcoding a “Privacy Policy” button that fails silently on half your channels is worse than making the UI channel‑aware. These flags let you ship the same build everywhere and adapt at runtime.