internal library

Building blocks for the Voxera room kits. Not part of the app-facing API: apps should import a kit instead.

Classes

AuxMicGainControl
What the coordinator does to the song's microphone gain.
AuxMicTrack
What the mic coordinator does to the real microphone track.
AuxMusicMicCoordinator
Runs the mute-while-music state machine (planAuxMic) against the real track and the aux mix. Pure enough to test without a room.
VoxeraConnectBudget
How long one media-connect attempt may take.
VoxeraConnectHistory
Moving average of successful connect times per media host, kept across app starts. Only feeds VoxeraConnectBudget; losing it costs nothing but a default budget on the next join.
VoxeraCoreConstants
Timings both room kits share. Each kit's VoxeraConstants points at these.
VoxeraDataFrame
One data message delivered to the room, with the transport metadata the decoded payload cannot carry.
VoxeraDeviceId
Stable per-install device identifier for the backend's single-active-session enforcement ("one token per user & device", newest-wins). The engine keys the kick/takeover decision on this id, so it MUST be stable across app restarts: we generate a random UUIDv4 once and persist it in SharedPreferences (no extra native deps). The host app may override it by passing deviceId explicitly to VoxeraRoomController.generateToken.
VoxeraErrorCode
One entry of the Voxera error table. Every VoxeraError carries one.
VoxeraErrors
Where every error the kits report goes: one line in the console and an event on stream.
VoxeraJoinFailure
An onConnectError error reduced to a kind the room screen can act on.
VoxeraMessageBatcher
VoxeraMinimizeController<C extends VoxeraMinimizeOptions>
Minimizes one room into the app's floating window and brings it back.
VoxeraMinimizeData
VoxeraMinimizeOptions
The part of a kit's VoxeraMinimizeConfig that the shared minimize and PiP controllers read. Each kit's config adds its own overlay look.
VoxeraMiniOverlayHost
The floating window of whichever room is minimized, from either kit.
VoxeraMiniOverlayMachine
The one mini-overlay state for the app, shared by the audio and live kits: at most one room is minimized at a time, and minimizedSession says which.
VoxeraPipController
Drives Android OS-level Picture-in-Picture for a room, alongside the in-app minimize overlay (VoxeraMinimizeController).
VoxeraReconnectionHandler
VoxeraReconnectPolicy
How long to wait before the next attempt at re-establishing a session.
VoxeraRedialPacer
Paces repeated dials of the SAME room.
VoxeraRoomBatchMessage
One message of a room.batch frame.
VoxeraRoomMessageChannel
The kit's room messaging socket: chat, app messages and likes for the room go through the engine, which caps and batches them for everyone.
VoxeraRoomMessagingInfo
What the engine's token response says about room messaging (room_messaging). Null when the engine or the project does not use it; the kit then sends chat and room messages on the data channel as before.
VoxeraRoomMusic
Room music from this phone, in either VoxeraRoomMusicMode.
VoxeraRoomSession
A room joined through either kit: the audio kit's and the live kit's VoxeraRoomController both implement it.
VoxeraRoomSessionRegistry
Where the kits record VoxeraRoomSession.active. Not for apps.
VoxeraSessionPrefetch<S extends VoxeraRoomSession>
A join token minted before the room screen opens, on the controller the room will use. Each kit names its own as VoxeraRoomPrefetch.
VoxeraTokenRefresher
Owns re-minting the user token: once on an expiry refusal, and ahead of time at 80% of the token's life.
VoxeraTokenResponse
Response model returned by the Voxera Engine token generation API.
VoxeraVideoEffectsContext
What the video-processor factory knows about this session.
VoxeraVideoEffectsHost
What a VoxeraVideoEffectsPlugin can ask of the room it serves.
VoxeraVideoEffectsPlugin
A video-effects provider (DeepAR, Snap Camera Kit, ...) for the live room.

Enums

VoxeraAudioQuality
Human-facing quality tiers corresponding to ITU-T MOS boundaries.
VoxeraConnectFailure
What a failed connect attempt tells the retry loop.
VoxeraConnectionState
Connection state for the room.
VoxeraDeviceClass
How much video work this device can be asked to do.
VoxeraJoinFailureKind
What a failed join means for the app: retry soon, retry after a wait, or stop. The same enum and rules ship in the audio and live kits.
VoxeraMiniOverlayState
VoxeraMuteStrategy
Strategy for muting remote audio playback (speaker-off and mute-all).
VoxeraNoiseCancellation
AI noise cancellation of the local microphone (on the device, Android).
VoxeraRoomMusicMode
How a song from this phone reaches the room.
VoxeraRoomSendResult
The outcome of a send on the room socket.

Constants

voxeraRefreshJitterMax → const Duration
Longest random wait before a reconnect token fetch.

Functions

voxeraAwaitResumed(ValueNotifier<VoxeraConnectionState> state, {required Duration timeout}) → Future<bool>
Waits for state to settle on VoxeraConnectionState.connected, up to timeout.
voxeraCanResumeSession({required String? currentRoomName, required String targetRoomName, required VoxeraConnectionState state}) → bool
Whether the session already in hand can serve a join request for targetRoomName, instead of dialing a new one.
voxeraClassifyConnectFailure(Object error) → VoxeraConnectFailure
voxeraClientOs() → String
Platform name in the engine's os vocabulary.
voxeraComputeMos({double? latencyMs, double? jitterMs, double? packetLossFraction}) → double?
Mean Opinion Score (MOS) estimated from transport metrics via the ITU-T G.107 E-model (simplified VoIP form).
voxeraEffectsPluginFor(List<VoxeraVideoEffectsPlugin> plugins, VoxeraVideoEffectsContext context) → VoxeraVideoEffectsPlugin?
The plug-in among plugins (in priority order) that serves context.
voxeraIsTokenExpiredResponse({int? statusCode, Object? body, Map<String, List<String>>? headers}) → bool
Recognises the engine's "this user token has expired" refusal.
voxeraLog(String message()) → void
Debug-only logging for the kit's hot paths.
voxeraProactiveRefreshDelay(int? expiresInSeconds) → Duration?
When to renew a user token that lives expiresInSeconds seconds.
voxeraRefreshJitter([Random? random]) → Duration
Random wait, 0 to voxeraRefreshJitterMax, before a reconnect token fetch.
voxeraRetryAfterFrom(Map<String, List<String>>? headers) → Duration?
Reads the wait a 429 asks for. Retry-After (seconds) wins; express-rate-limit sends RateLimit-Reset (seconds until the window resets) on every response.
voxeraRttMsFromStats(List<StatsReport> reports) → double?
Round-trip time, in milliseconds, read from a peer connection's WebRTC stats — or null when the connection has not measured one yet.
voxeraShouldRefreshCredentials(int attempt) → bool
When to fetch a fresh token while the SDK is still retrying a dropped session on its own.
voxeraTokenFailure(DioException e) → VoxeraError
The error a failed token request throws: VoxeraBannedException, VoxeraRateLimitedException and VoxeraServiceNotAvailableException for the refusals apps handle by type, a VoxeraTokenException otherwise. Each carries the engine's code.

Typedefs

VoxeraMiniOverlayBuilder = Widget? Function(BuildContext context, VoxeraRoomSession session)
Builds a floating window for session, or returns null for the kit's default one.

Exceptions / Errors

VoxeraBannedException
Thrown by token generation when the server returns 403 User is banned.
VoxeraError
An error from a Voxera room kit, with a code from the Voxera error table.
VoxeraRateLimitedException
Thrown on a 429 from the token endpoint — either the per-(project, identity, device) issuance rate limit, or the single-session takeover cooldown (a session is already active on another device and was claimed too recently to supersede). Callers should back off and retry, NOT hammer the endpoint.
VoxeraServiceNotAvailableException
Thrown on a non-ban 403 from the token endpoint — the project has NOT activated this service (e.g. Type 'audio_room' is not enabled for this project, or live_stream) in the dashboard. Distinct from VoxeraBannedException so the UI can say "not available" (retrying can't help) instead of showing the ban flow.
VoxeraTokenException
Thrown when token generation fails for a non-ban reason (network/timeout, engine 5xx, malformed body). Carries the HTTP statusCode when available so callers can tell a transport failure apart from an engine error.