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

@panaudia/lasa-client

v0.1.0

Published

LASA TypeScript client SDK: live spatial audio over Media-over-QUIC (WebTransport, WebCodecs, AudioWorklet)

Readme

@panaudia/lasa-client

The TypeScript client for LASA, live spatial audio over Media over QUIC. It runs in the browser and speaks to a LASA space over WebTransport: it publishes object audio with pose, plays rendered sinks, follows the presence feed, and synchronises the space's distributed state store.

The protocol lives one directory up, in lasa-core.md and lasa-base-profile.md. This package is the browser half of it. The server half is Panaudia LASA.

Requirements

The client uses four browser platform features, and every one is mandatory:

  • WebTransport, for the QUIC connection.
  • WebCodecs, for Opus encode and decode (AudioEncoder and AudioDecoder).
  • AudioWorklet, for capture and playout on the audio thread.
  • SharedArrayBuffer, for the lock-free rings between the audio thread, the transport worker and the page.

SharedArrayBuffer needs cross-origin isolation. Your page MUST be served with these two headers, or capture and playout refuse to start:

Cross-Origin-Opener-Policy: same-origin
Cross-Origin-Embedder-Policy: require-corp

Chromium is the engine the interop suite runs against. Other engines work as their WebTransport and WebCodecs support allows.

The package is ESM only and targets ES2022. There are no runtime dependencies.

Install

npm install @panaudia/lasa-client

The transport worker is inlined into the bundle as a Blob, so there is no worker file to copy and nothing for your bundler to resolve.

A first session

import { LasaClient } from '@panaudia/lasa-client';

const client = await LasaClient.connect({
  url: 'https://lasa.example.com:4443/lasa',
  spaceId: 'main',
  clientId: 'alice',
  entities: [{ id: 'alice-voice', name: 'Alice' }],
});

// Capture: the microphone into the entity, five-millisecond Opus
// frames, each stamped with the freshest pose.
const mic = await navigator.mediaDevices.getUserMedia({ audio: true });
const ctx = new AudioContext({ sampleRate: 48000 });
const source = ctx.createMediaStreamSource(mic);
const capture = await client.startCapture('alice-voice', { source });
capture.setPose({ x: 0, y: 0, z: 0, yaw: 0, pitch: 0, roll: 0 });

// Playout: the space renders a binaural mix for this entity, the
// client decodes it in the worker and plays it through a worklet.
const player = await client.playSink('alice-voice', 'binaural');
player.setVolume(0.8);

// Presence: who else is here, and where.
const roster = await client.subscribeRoster(() => {
  for (const entry of roster.snapshot()) {
    console.log(entry.id, entry.pose, entry.loudness);
  }
});

// Later.
await client.close();

playSink builds an AudioContext, so on browsers that gate audio behind a user gesture, call it from a click or key handler.

Guides

  • Connecting covers tickets, entities and setups, certificate pinning for development servers, rejection codes, and the session lifecycle.
  • Audio covers capture, playout, sink formats, quality and redundancy, microphone selection, and the raw packet API underneath.
  • Presence covers the roster and the receive rules it applies.
  • State covers the store, synchronisation, writes, reconnects and cursors.
  • Base profile covers the typed helpers over the lasa. vocabulary: personal mutes and solos, moderation, channels, rendering parameters, and the entity view.
  • Coordinate systems covers the LASA pose and the converters for Three.js, Babylon, A-Frame, PlayCanvas, Unity, Unreal and Pixi.

The API reference is generated from the source with TypeDoc, as markdown, and committed. npm run docs:api regenerates it after a change to the exported surface.

Working with Claude Code

The repository ships a skill, .claude/skills/lasa-client/SKILL.md, that points Claude at the verified examples and the details client code must get right. Copy that directory into your own project's .claude/skills/ to use it there.

Examples

  • minimal is the starting point to copy: join a space, send the microphone, play the binaural render, list who is there. It depends on the built package the way a published dependency would.
  • test-page is the development instrument: every subsystem on one page, consuming the SDK from source.

Both need a running space; each README says how to start one.

Development

npm install
npm run typecheck      # tsc
npm test               # vitest unit suite
npm run test:interop   # Playwright, against a server built from ../../panaudia-lasa
npm run build          # dist/index.js + declarations

The interop suite builds and launches the Go server itself, one instance in unticketed dev mode and one ticketed, and drives a real Chromium against both. npm run dev serves the same interop page with the isolation headers set.

PROVENANCE.md records what this package inherits from the earlier Panaudia SDK and what was pruned on the way.

Licence

MIT. See LICENSE.