voxera_room_core

Shared models, policies and helpers for the Voxera room kits.

Apps don't depend on this package directly: voxera_audio_room_kit and voxera_live_room_kit re-export its public API. An app that uses both kits gets one VoxeraTokenResponse, one VoxeraJoinFailure, one VoxeraRoomMusic and so on, instead of a copy from each kit.

Error codes

Every error the kits report is a VoxeraError with a code from one table, errors/catalog.json. The kits print one line per error:

[Voxera] E40303 SERVICE_NOT_ENABLED: Type 'audio_room' is not enabled for this project · https://voxerastream.com/docs/errors/40303 · req 3f2a…

and deliver it on VoxeraErrors.stream, for analytics or the app's own message. doc/errors.md lists every code. To add one, edit the catalog and run dart run tool/generate_errors.dart; the engine's codes must match the catalog (the engine's errorCodes.test.js checks).

Code for both kinds of room

Both kits' VoxeraRoomController implement VoxeraRoomSession, so code that does the same thing in an audio room and a live room is written once:

final session = VoxeraRoomSession.active;
if (session != null && session.isConnected) {
  await session.music.pause();
}

The minimized room

Put one VoxeraMiniOverlayHost in a Stack above the navigator. It shows the floating window of whichever room is minimized, audio or live:

MaterialApp(
  builder: (context, child) => Stack(
    children: [
      child!,
      VoxeraMiniOverlayHost(
        // Optional: your own window for some rooms; null keeps the kit's.
        builder: (context, session) => null,
      ),
    ],
  ),
);

package:voxera_room_core/internal.dart holds the building blocks the kits use (logging, connect budget, device id, session resume, token refresh). It is not part of the app-facing API.

Libraries

internal
Building blocks for the Voxera room kits. Not part of the app-facing API: apps should import a kit instead.
voxera_room_core
Shared API of the Voxera room kits. Both kits re-export it.