socrits_express

Socrits Express — the low-level voice & video media engine (self-hosted LiveKit), without the hosted call invitations, chat, or prebuilt UI.

Use this when you want to build your own ringing/invitation flow and call UI, and only need Socrits for the media. Billed on participant-minutes only.

Want ring/accept + chat + a prebuilt call screen included? Use the socrits UIKit package — it's built on top of this one.

Usage

import 'package:socrits_express/socrits_express.dart';

// 1) Your backend returns { url, token } from Socrits POST /v1/token (with your sk_ key).
final t = await SocritsTokenClient(
  'https://your-backend/socrits/token',
  headers: {'Authorization': 'Bearer <your-user-jwt>'},
).fetch(room: 'room-123', identity: 'alice');

// 2) Join (publishes mic; add video:true for camera).
final room = await SocritsRoom.join(url: t.url, token: t.token, video: true);

// 3) Render `room` with the re-exported livekit_client widgets, then:
await SocritsRoom.leave(room);

API

  • SocritsRoom.join({url, token, video, audio}) → connected Room
  • SocritsRoom.leave(room)
  • SocritsTokenClient(endpoint, {headers}).fetch({room, identity, name}) → (url, token)
  • Re-exports livekit_client (Room, tracks, renderers, widgets).

Libraries

socrits_express
Socrits Express — the low-level media engine.