SBCanvas.platform

interface ConnectedPlatform {
  provider: 'kick' | 'rumble' | 'blaze';
  channel_id: string;
  channel_name: string;
  channel_slug?: string;
  avatar_url?: string;
  features: string[];
}

Usage

const platform = SBCanvas.platform;

console.log(platform.provider);      // 'kick'
console.log(platform.channel_name);  // 'MyChannel'
console.log(platform.channel_slug);  // 'mychannel'
console.log(platform.features);      // ['chat', 'subscriptions', 'raids', ...]

Conditional Logic

if (SBCanvas.platform.provider === 'rumble') {
  // Rumble-specific behavior (e.g., rants instead of tips)
  showRantUI();
} else {
  showTipUI();
}

Availability

Platform data is available after session:ready:
SBCanvas.on('session:ready', () => {
  const { provider, channel_name } = SBCanvas.platform;
  document.title = `${channel_name} Overlay (${provider})`;
});