npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

kodenique-game-sdk

v1.2.5

Published

React SDK for real-time game streaming with WebSocket updates and WebRTC video player

Downloads

1,370

Readme

@kodenique/game-sdk

React SDK for real-time game streaming with WebSocket updates and WebRTC video player.

Features

  • 🎮 Real-time Game Updates - WebSocket integration with automatic reconnection
  • 📹 WebRTC Video Streaming - Ultra-low latency WHEP protocol support
  • 🎯 Winner Animations - Automatic full-screen animations when rounds finish
  • 📊 Live Score Overlays - Beautiful score displays with team logos and colors
  • 🌐 Network Monitoring - Real-time latency and bitrate tracking
  • Auto-Subscribe - Just pass a game object and SDK handles everything
  • 🎨 Customizable UI - Show/hide overlays, custom titles, and styling
  • 📱 Responsive - Works on desktop and mobile

Installation

npm install @kodenique/game-sdk
# or
yarn add @kodenique/game-sdk

Quick Start

import { GameProvider, GamePlayer } from '@kodenique/game-sdk';

function App() {
  return (
    <GameProvider
      access_token="your-access-token"
      socketToken="your-socket-token"
      environment="production"
    >
      <GamePlayer
        game={gameObject}
        showScoreOverlay={true}
        showWinnerAnimation={true}
        width="100%"
        height="600px"
      />
    </GameProvider>
  );
}

Props

GamePlayer

| Prop | Type | Default | Description | |------|------|---------|-------------| | game | Game | - | Game object (auto-subscribes to updates) | | gameId | string | - | Game ID (auto-subscribes to updates) | | streamUrl | string | - | Direct WHEP stream URL | | showScoreOverlay | boolean | true | Show score overlay | | showWinnerAnimation | boolean | true | Show winner animation when round finishes | | showNetworkIndicator | boolean | true | Show network quality indicator | | showGameTitle | boolean | true | Show game title | | showRound | boolean | true | Show round information | | gameTitle | string | - | Custom game title | | width | string | number | "100%" | Player width | | height | string | number | "600px" | Player height | | autoPlay | boolean | true | Auto-play video | | muted | boolean | true | Mute video by default | | controls | boolean | true | Show video controls |

Documentation

Features

Winner Animations

Automatically shows full-screen animations when rounds finish:

  • Trophy icon for wins, handshake for draws
  • Team color highlights
  • Confetti animation
  • Auto-dismisses after 5 seconds
  • Can be disabled with showWinnerAnimation={false}

WebSocket Integration

Real-time updates via SocketCluster:

  • Automatic decompression of messages
  • Supports multiple message formats
  • Auto-reconnection on disconnect
  • Subscribes to 3 channels per game

Video Streaming

WebRTC with WHEP protocol:

  • Ultra-low latency streaming
  • Automatic quality detection
  • Network stats monitoring
  • Retry on connection failure

TypeScript

Fully typed with TypeScript. All interfaces and types are exported.

import type { Game, Team, Round, GamePlayerProps } from '@kodenique/game-sdk';

Examples

Disable Winner Animation

<GamePlayer
  game={game}
  showWinnerAnimation={false}  // Disable winner animation
/>

Custom Title

<GamePlayer
  game={game}
  gameTitle="Championship Finals"
  showGameTitle={true}
/>

Hide Score Overlay

<GamePlayer
  game={game}
  showScoreOverlay={false}  // Hide all overlays
/>

Manual WebSocket Control

import { useGameStream } from '@kodenique/game-sdk';

function CustomComponent() {
  const { game, isConnected, subscribe, unsubscribe } = useGameStream({
    gameId: 'game-123',
    autoSubscribe: true
  });

  return (
    <div>
      <p>Connected: {isConnected ? 'Yes' : 'No'}</p>
      <p>Round: {game?.rounds.length}</p>
    </div>
  );
}

Browser Support

  • Chrome/Edge (latest)
  • Firefox (latest)
  • Safari (latest)
  • Mobile browsers with WebRTC support

License

MIT

Support

For issues or questions, please open an issue on GitHub.