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

@4players/odin

v1.4.4

Published

A cross-platform SDK enabling developers to integrate real-time VoIP chat technology into their projects

Readme

@4players/odin

npm npm npm

ODIN is a versatile cross-platform Software Development Kit (SDK) engineered to seamlessly integrate real-time voice chat into multiplayer games, applications, and websites. Regardless of whether you're employing a native application or your preferred web browser, ODIN simplifies the process of maintaining connections with your significant contacts. Through its intuitive interface and robust functionality, ODIN enhances interactive experiences, fostering real-time engagement and collaboration across various digital platforms.

You can choose between a managed cloud and a self-hosted solution. Let 4Players GmbH deal with the setup, administration and bandwidth costs or run our server software on your own infrastructure allowing you complete control and customization of your deployment environment.

Online Documentation · API Reference

Installation

NPM (Recommended)

npm install @4players/odin

Type definitions are included. The audio plugin (@4players/odin-plugin-web) is a dependency and is loaded automatically when needed (e.g. when calling ensurePlugin() or setOutputDevice()).

CDN (Browser)

For browser-only use you can load the SDK via CDN. Prefer pinning a specific version to avoid breaking changes:

  • IIFE: https://cdn.odin.4players.io/client/js/sdk/<version>/odin-sdk.js (global ODIN)
  • ESM: https://cdn.odin.4players.io/client/js/sdk/<version>/odin-sdk.esm.js

See the documentation for current version and usage.

Features

Advanced Audio Processing

ODIN enhances your audio experience during VoIP chats by offering a comprehensive set of filters beyond the basic audio processing features found in web browsers. These enhancements are activated by default, ensuring clear and interruption-free communication.

  • Voice Activity Detection
    When enabled, ODIN analyzes the audio input signal using a smart voice detection algorithm to determine the presence of speech. You can define both the probability required to start and stop transmitting.
  • Input Volume Gate
    When enabled, the volume gate measures the volume of the input audio signal, thus deciding when a user is speaking loud enough to transmit voice data. You can define both the root mean square power (dBFS) for when the gate should engage and disengage.

WebTransport (HTTP/3) support

We use the latest WebTransport API to transmit voice data in real time, with a seamless fallback to WebRTC for compatibility with older browsers.

End-to-End Encryption (Cipher)

ODIN supports end-to-end encryption (E2EE) through the use of a pluggable OdinCipher module. This enables you to secure all datagrams, messages and peer user data with a shared room password — without relying on the server as a trust anchor.

Quick Start

  1. Install the package and ensure audio is started after a user interaction (e.g. button click).
  2. Register event handlers before calling room.join() so you receive events that occur while joining (e.g. remote peers already in the room).
  3. Transmit audio only after room.addAudioInput(audioInput).
  4. Call setOutputDevice({}) to hear other peers (can be called anytime to set or switch the output device).

JavaScript / TypeScript Example

import {
  setOutputDevice,
  Room,
  DeviceManager,
} from '@4players/odin';

let room;
let audioInput;

async function joinRoom(token) {
  await setOutputDevice({});

  room = new Room();
  room.onJoined = (payload) => console.log('Joined', payload.room.id);
  room.onLeft = (payload) => console.log('Left', payload?.reason);
  room.onPeerJoined = (payload) => console.log('Peer joined', payload.peer.userId);
  room.onPeerLeft = (payload) => console.log('Peer left', payload.peer.userId);

  await room.join(token, { gateway: 'https://gateway.odin.4players.io' });

  audioInput = await DeviceManager.createAudioInput();
  await room.addAudioInput(audioInput);
}

async function leaveRoom() {
  if (audioInput && room) {
    room.removeAudioInput(audioInput);
    audioInput.close();
  }
  if (room) room.leave();
  room = undefined;
  audioInput = undefined;
}

// Call from a user gesture (e.g. button click).
joinRoom('__YOUR_TOKEN__');

Tokens must be generated server-side. See the documentation for authentication and gateway options.

Troubleshooting

  • No audio from peers: Ensure setOutputDevice({}) has been called to configure the output device.
  • Microphone not transmitting: Ensure room.addAudioInput(audioInput) is called after joining.
  • AudioContext not allowed: Start the flow from a user interaction (click/tap).
  • Events not firing: Register all event handlers before calling room.join() so you receive events that occur while joining (e.g. remote peers already in the room).

Discord

Join our official Discord server to chat with us and become part of the 4Players ODIN community.

Join us on Discord

X (formerly Twitter)

Tweet us at @ODIN4Players.

Email

[email protected]