utd_live_room_kit library

Classes

RoomSeatState
Full seat state from the backend _seats namespace.
SeatState
Represents one tile in the live room: index 0 = host, 1..N = guest tiles. (On the wire this is a backend "seat" — the tile IS the seat.)
SpeakerRequest
Represents a pending speaker request.
UTDApiClient
HTTP client for the UTD Stream Engine API.
UTDAvatarWaves
A circular avatar with animated "sound wave" pulse rings.
UTDBanApi
REST API client for the UTD Stream Engine user-ban endpoints.
UTDBanListPage
One page of the paginated bans list.
UTDBanManagementSheet
Default host/admin view of the project's active bans, with an unban action.
UTDBannedUser
A single active ban row from GET /api/v1/rooms/bans.
UTDBanNotice
A ban notice delivered to the local (banned) user.
UTDBanUserAttributes
Attributes snapshotted for a banned user (mirrors the participant attributes the client set: fr, frt, avatar, cn). All fields are optional — the whole object is null when the user was offline at ban time.
UTDChatController
UTDChatMessage
UTDConnectErrorView
Default view shown when the room fails to connect and the consumer did not supply onConnectError. Replaces the otherwise-infinite loader with a clear message and Retry / Exit actions.
UTDConstants
UTD Audio Room Kit constants.
UTDDataFrame
One data message delivered to the room, with the transport metadata the decoded payload cannot carry.
UTDDefaultAvatar
Default circular avatar for a seat occupant.
UTDDefaultControlsBar
The package's built-in role-aware controls bar (used when the consumer does not supply controlsBarWidget).
UTDDefaultRoomHeader
Built-in header shown when the host app does not supply its own config.headerWidget. It is intentionally minimal — a transparent bar with a top SafeArea holding just two affordances so a room is usable out of the box: a minimize button (left) and an exit button (right).
UTDEngineRefusal
Implemented by every exception this kit raises for an engine refusal, so one predicate can decide whether knocking again is worth a user's battery.
UTDLiveRoom
A UTD-media-based video live room.
UTDLiveRoomConfig
Configuration for UTDLiveRoom.
UTDLiveStage
The live video stage.
UTDLiveTile
A single live video tile.
UTDLiveTileActionSheet
Per-tile actions for a live room, opened by tapping a guest tile.
UTDMediaController
Controls mic, camera, and speaker state. Mic/camera/speaker controls.
UTDMemberListSheet
Default member list: every participant, with host/admin moderation actions (mute/unmute, remove from seat, invite, ban) and owner-only promote/demote.
UTDMemberRow
A single participant row used by the default member list / invite sheets: avatar + name + optional role badge + trailing action widgets.
UTDMessageBatcher
UTDMessageInputSheet
UTDMessageRouter
UTDMinimizeConfig
UTDMinimizeController
UTDMinimizeData
UTDMiniOverlayMachine
UTDMiniOverlayPage
UTDMiniPopScope
UTDParticipant
Represents a participant in the audio room. Replaces UTDParticipant.
UTDParticipantApi
REST API client for participant-level, server-authoritative media control.
UTDPipController
Drives Android OS-level Picture-in-Picture for the audio room, alongside the in-app minimize overlay (UTDMinimizeController).
UTDPipView
Compact, view-only content rendered inside the Android system PiP window while UTDRoomController.pip reports isInPip == true.
UTDPkApi
REST client for the PK battles endpoints (/api/v1/pk).
UTDPkBackdrop
The black band painted BELOW the two host panes during a battle.
UTDPkBattle
Immutable snapshot of a PK battle. Rebuilt from each _pk_update / _pk_score message and REST response — never mutated in place.
UTDPkBattleOverlay
UTDPkBattleSheet
The running battle, and the way out of it: both hosts, the time left, and — for the two hosts only — an End button.
UTDPkConfig
Configuration for the prebuilt PK battle UI (split layout + score bar + countdown + invite/accept dialogs). Pass one to UTDLiveRoomConfig.pkConfig to turn the feature on; null keeps it off.
UTDPkContributor
One gift sender's standing in a battle: who they are, and how much of a side's score is theirs.
UTDPkController
Drives the PK battle feature on top of a connected UTDRoomController.
UTDPkCrossRoom
The cross-room publish credential a host receives on accept — the token + URL to open a SECOND connection into the OPPONENT's room and publish their camera there (SFU-native dual-publish). Carried by the accept REST response (for the invited host) and the _pk_accepted data message (for the inviter).
UTDPkInviteListener
Invisible widget that watches UTDPkController.incomingInvite and pops the prebuilt accept/decline dialog for the invited host. Renders nothing itself.
UTDReconnectionHandler
UTDReconnectPolicy
How long to wait before the next attempt at re-establishing a session.
UTDRedialPacer
Paces repeated dials of the SAME room.
UTDRefusalCode
Refusal codes this kit acts on. Any other code is still honoured through utdRefusalRetryable — the kit does not need to know a code to obey retryable: false.
UTDRequestQueueSheet
Default host/admin queue of pending speak requests, with approve / reject.
UTDRoleApi
REST API client for the UTD Stream Engine role endpoints.
UTDRoleChangeEvent
The realtime _role_change data message, broadcast to ALL participants whenever a role changes.
UTDRoleChangeResult
Result of PUT .../role{ identity, role, previous_role }.
UTDRoleListPage
One page of the paginated list-by-role response.
UTDRoleUser
A single participant row from GET .../participants/by-role.
UTDRoleUserAttributes
Attributes returned for a participant by list-by-role (mirrors the participant attributes the client set: fr, frt, avatar, cn). Fields are empty strings if the user is not currently connected.
UTDRoomController
UTDRoomManager
Wraps the media engine Room and exposes a simplified API. The kit's central RTC engine + UI handle.
UTDRoomScope
Carries the room's theme, strings, controller and a few config flags down to the package's built-in default widgets via the element tree.
UTDRoomStrings
User-facing strings for the package's built-in default UI.
UTDRoomTheme
Color tokens for the package's built-in default UI (seats, controls bar, action sheets, dialogs, chat bubbles…).
UTDSeatController
Drives the live_stream stage: the host plus host-invited co-publishers.
UTDSheetAction
A simple tappable row used inside the default sheets: leading icon + label, with an optional destructive color.
UTDSheetInlineError
A compact, in-context error banner for use INSIDE a modal sheet that stays open after a failed action (member list, request queue, ban list). A snackbar there renders behind the sheet, so these sheets surface failures inline instead. Pair with a String? state field that you set on failure and clear after a few seconds.
UTDStageApi
REST client for the live_stream stage endpoints.
UTDSyncManager
UTDTokenApi
UTDTokenResponse
Response model returned by the UTD Stream Engine token generation API.

Enums

UTDBanSource
Where a forced-exit notice originated — affects how much info is available and which message is shown. (Most are bans; signedInElsewhere is a single-active-session takeover, surfaced through the same exit funnel.)
UTDConnectionState
Connection state for the room.
UTDMiniOverlayState
UTDPkMatchState
Random-match lifecycle for the "random PK" flow. Bind a matching dialog to UTDPkController.matchState: show it on matching, dismiss on any other state (matched continues into the normal battle flow via UTDPkController.battle).
UTDPkScoreBarPosition
Where the battle's score bar is drawn, relative to the two host panes.
UTDPkStatus
Lifecycle status of a battle. Mirrors the engine's pk_battles.status.
UTDPkWinner
Winner side of a finished battle.
UTDRole
The known engine roles, lowest → highest privilege.
UTDStageInvitationFailure
Why an accepted stage invitation did not put the user on stage.
UTDVideoQuality
Video publish quality for the local camera (host and guests).

Properties

utdPkBackdropIsMounted bool
Whether a UTDPkBackdrop is mounted anywhere in this app right now.
no setter

Functions

pkCountdownStep({required DateTime? startedAt, required DateTime now}) int?
How many whole seconds the start countdown still has to show, or null once it is over (and before the battle starts).
pkPaneFlex(UTDPkConfig config) int
The share of the screen height the two host panes occupy, as an integer flex weight out of 1000.
scoreFraction(int scoreA, int scoreB) double
Prebuilt PK-battle overlay: the split-screen layout (both hosts side by side), the score bar, the countdown, and the terminal win/lose/draw flash.
showUTDRoomSheet<T>(BuildContext context, {required WidgetBuilder builder}) Future<T?>
Shows a themed modal bottom sheet for the package's built-in default UI.
utdIsSuspensionCode(String? code) bool
True when code is one of the suspension codes — a refusal the DEVELOPER resolves (by paying), not the end user.
utdIsTerminalRefusal(Object error) bool
Whether error means "stop dialing", as opposed to "wait and try again".
utdRefusalCode(Object? body) String?
The engine's code, normalised (trimmed, lower-cased), or null when the body carries none — which is exactly how an engine that predates the contract answers, and the signal to fall back to the legacy text match.
utdRefusalRetryable(Object? body) bool?
The engine's retryable verdict, or null when it sent none.
utdRoleFromString(String? value) UTDRole?
Parses a wire role string to a UTDRole; returns null if unknown.
utdRoleToString(UTDRole role) String
Serializes a UTDRole to its wire string (e.g. UTDRole.admin'admin').
utdShowSnack(BuildContext context, String message) → void
Shows a brief snackbar using the nearest ScaffoldMessenger. Safe no-op if the context is no longer mounted or has no messenger.
utdShowSnackVia(ScaffoldMessengerState? messenger, String message) → void
Shows a snackbar via an already-captured ScaffoldMessengerState.

Typedefs

MessageHandler = void Function(Map<String, dynamic> data, BuildContext context)
MiniOverlayBuilder = Widget Function({required VoidCallback onClose, required VoidCallback onRestore})

Exceptions / Errors

UTDBannedException
Thrown by token generation when the engine refuses because THIS USER is banned — 403 with code: user_banned on engines that send the refusal contract, or the legacy 403 User is banned message on those that do not.
UTDProjectSuspendedException
The customer's project — or the customer account behind it — is SUSPENDED: code: project_suspended / code: client_suspended.
UTDRateLimitedException
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.
UTDServiceNotAvailableException
Thrown when the engine refuses for a reason no retry can change and that is NOT about this user: the project never enabled this product type, or it is suspended (see UTDProjectSuspendedException).
UTDTokenException
Thrown when token generation fails for a reason that is neither a ban nor a refusal the engine named: network/timeout, engine 5xx, malformed body.