VoIP

Community

Voice chat with no media server: rooms and proximity voice that run inside your module. Opus packets travel through an event table, and row-level security delivers each one only to its listeners.

    npm i @pogly/spacetimedb-voip

    Voice chat built entirely on SpacetimeDB, with no media server. Clients encode audio as Opus in the browser and send small packets through a reducer. The module routes them through an event table, and row-level security makes sure each packet only reaches the people who should hear it.

    It supports regular rooms and proximity rooms, where only players within range of the speaker hear them. Positions come from your own movement code, so clients can't teleport to eavesdrop, and the client fades and pans each voice in 3D. Server mute and join/leave handling are included.

    • Multiplayer games and virtual spaces that want voice without running a separate media or WebRTC server: party and lobby chat, proximity chat in a shared world, or small group calls in a collaborative app.
    • Everything stays in one backend, so who can hear whom follows your own game state and permissions.

    Mount it, add one row-level-security rule with voip.packetFilterSql('voip'), and connect the lifecycle hooks with voip.onConnect / voip.onDisconnect. Create rooms in init with voip.newRoom(...) (with { spatial: true, range: 30 } for proximity), and call voip.setPosition(...) from your movement reducer.

    Clients join a room, send packets with the voip.send reducer, and play what arrives on voip.packet. The repo includes a browser demo client. Rust and C# versions share the same schema.

    Related submodules

    Resend

    Sends transactional email through Resend and stores delivery status in your database. Webhook events update each message's state from queued through delivered, bounced, or failed.

    SpacetimeDB0/wk

    Authz

    Roles, scopes and grants for multi-user modules: wildcard permissions, role inheritance, scope trees, expiring grants, invite links, an audit log and row-level security, with no privilege escalation.

    Lethalchip0/wkCommunity

    Cron

    Schedules recurring tasks in a SpacetimeDB module using calendar expressions or fixed intervals. Supports time zones, per-job arguments, failure limits, and runtime schedule changes.

    SpacetimeDB0/wk
    Submodule

    Edit details

    One short paragraph describing the submodule.

    A few bullets for scenarios where this is a good fit.

    A few short paragraphs at the conceptual level.