utd_audio_room_kit 4.3.0
utd_audio_room_kit: ^4.3.0 copied to clipboard
Real-time live audio room for Flutter: seat management, real-time chat, mic/speaker controls, speak requests, moderation, and minimize/PiP.
Changelog #
4.3.0 #
Closing the app takes the user out of the room at once (Android). Until now a user who swiped the app away stayed in the room for about 20 seconds, and a guest kept the seat about 34 seconds (measured on a Samsung, Android 17), because the system destroys the Flutter engine and kills the process about 150 ms later: the leave frame and the seat release the kit sends on detached never got out. The kit now keeps the engine's leave request, POST {engine}/api/v1/rooms/{room}/leave with the user's newest bearer, set on the room's foreground service (UTDForegroundService.setLeaveRequest of utd_stream_sdk); when the task is removed the service stays alive for at most 3 seconds and sends it, and the engine drops the user: seat and picture go away at once.
- Nothing to call and no new option. The request is set on every token the kit adopts (mint, renewal, redial), and cleared when the user leaves on purpose or the controller is disposed.
- Android only, and only while the foreground service runs (
UTDAudioRoomConfig.foregroundService, on by default; a listener needskeepListening). If your app turned the service off there is nothing alive to send it and the media server's timeout applies, as before. iOS: not available, the timeout applies. - The bearer must carry the device (
did). The engine's leave route accepts a token with a session (sid), or one without asidwhosedidis the device of the live session of the same identity. A token your server mints with thedevice_idthe kit sends in the request has thedid; a server that dropsdevice_idwhen it forwards the request gets a 401session_requiredfrom the leave route (handled quietly: the media server's timeout applies, as before). Forward the wholerequest.toJson()['body']. - An engine without the
/leaveroute answers 404 and the request is dropped quietly: behavior as today. - Needs
utd_stream_sdkwithsetLeaveRequestandutd_media_client2.14.0 (the floors move at the release). - Tests:
test/leave_request_test.dart.
4.2.2 #
Fix: somebody who leaves the room leaves his seat on every screen at once, the owner's seat included. A patch on 4.2.1: no API is added, removed or changed, and nothing needs to be changed in your app.
- What was wrong. The list of people dropped a person the moment the connection reported that he left, but his seat waited for the engine's
_seat_update. When that message was late (an app closed or a network lost is only seen as gone after the connection's grace time) or lost, the picture of the person stayed on the seat on the other screens, the room owner's seat too, until some other seat operation happened. - What it does now. When a participant leaves, the kit empties his seat on this screen at once (a mic seat or the owner's seat; a locked or reserved seat keeps its lock and its reservation). A
_seat_updatethat was sent before the engine saw the leave, and still lists him, does not bring him back. When he joins the room again the seat follows the engine as usual: the next snapshot that shows him on a seat is applied. After a reconnection the room state read from the engine replaces this. While this device's own connection restarts (the media client then reports everybody as gone and back), nobody is emptied. The local user is never emptied by this. - Works with the engine of today and with older ones (the engine's own cleanup and its
_seat_updateare unchanged; this only makes the screen follow the list of people). - Test:
test/seat_leaver_clears_seat_test.dart(the owner leaves, a mic seat leaves, a locked seat stays locked, a late push does not bring him back, he comes back and sits, the local user is untouched).
4.2.1 #
Security fix: the internal messages of the engine and the roles of the participants are now verified as coming from the server. Upgrade recommended. A patch on 4.2.0: no API is added or removed. The 3.x line has the same fix in 3.18.1. Needs utd_stream_sdk ^0.6.0 (0.6.0 carries the same check in the SDK, and UTD Spaces).
What you may notice:
- The message types that start with
_are reserved for the engine and are accepted from the server only. The only messages of this family a participant may send are_cosmetic_update(a changed avatar or frame), only about himself, and the SDK's room commands (_utd_cue, and_utd_giftof the older package), only in his own name. If your app sends its own message types that start with_from one participant to the others, rename them (a type that does not start with_is not affected). - The role of a participant (host, admin) comes from the engine: the
GET participants/by-rolelist and the_role_changemessage. It is not read from the participant's own data. When a participant claims host or admin,getParticipantRoleanswersnull(unknown) until the engine has answered, usually within a few seconds; a device whose question fails asks again a few times, and the number of questions a device asks is bounded. Somebody in the room the engine said nothing about has the roleaudience, as before. Guest and visitor roles are not read at the join any more: they follow the_role_changemessages, so somebody who enters the room after a role was granted does not show that badge until the next_role_change(or, for host and admin, until the engine's list is read). An answer of the engine that was made before a later_role_changeis not used for the participant that message was about, and the local user's own claim is asked outside the limit on questions. - Needs an engine that answers
GET participants/by-roleto a participant's token (the engine of today does). An engine older than the one that stamps the sender on the messages an app's user sends through RESTsend-datacannot tell those from the server's: keepsend-dataaway from end users there. Apps on older kit versions stay exposed until they upgrade. - Tests:
test/security_regression_test.dart,test/reserved_frames_and_roles_test.dartandtest/role_seeder_test.dart.test/participant_registry_scale_test.dartandtest/roster_on_sdk_feed_test.dartchanged: they asserted that a participant's own data is a role.
4.2.0 #
A minor release on 4.1.0: how a seat shows the role of its occupant, an optional music sheet of your own (new public API: musicSheetBuilder and UTDMusicController), and the AiRes processor numbers in the quality report. Nothing is removed and no signature changed; the only thing you can SEE changing is where the role mark is (below). Needs utd_media_client ^2.12.0 and utd_stream_sdk ^0.5.4, as 4.1.0.
- The role mark moved from the avatar to the name. The default seat drew the room owner's house and the admin's shield on the corner of the avatar. Now the owner has a house and the admin has a person, each in a 16 dp circle of the theme color, beside the name on the same line, 4 dp before it (the reading order of either direction: on the left of the name in a left-to-right language, on the right in a right-to-left one), and the avatar keeps only the mute badge (now 20 dp with a 2 dp ring, 11 dp glyph, on the avatar edge at the end side). The colors are the theme's
badgeHost/badgeHostInkandbadgeAdmin/badgeAdminInk(nothing is hard-coded). The name of an occupied seat is 12 sp semi-bold, 6 dp under the avatar; a long name is cut with an ellipsis and the mark stays. WithshowSeatNames: falsethe mark is drawn alone, so the owner stays recognizable. A seat with your ownavatarBuilderorseatContainerBuilderis untouched; if you want the old corner badge, draw it inseatFrontBuilderfromseat.member?.role. Three new optional strings (UTDRoomStrings.roleHostLabel,roleAdminLabel,micMutedLabel, English and Arabic, all with defaults) are what a screen reader says for the marks, so the role is not told by an icon and a color only. Tests:test/seat_role_mark_test.dart(who gets a mark, where it is in both directions, the sizes, the long name, the theme colors, the screen reader words). - Neutral wording in the comments and the documentation (no code change): the kit no longer names the vocabulary of any one app in its sentences (the examples say a shop, an unread message). The repository now runs the stream dictionary script on every push and pull request (
tool/stream-dictionary/,.github/workflows/stream-dictionary.yml, not part of the published package): it must find zero. - Documentation fixes for the published pages: the Installation line of the README says the current version (
^4.2.0, it said^4.0.0); the section about theflutter_webrtcfork override is replaced by "Android build and the fork (no override needed)" (sinceutd_media_client2.12.0 the fork is not needed, an existing override keeps working, and the one repository line some apps need is written there);doc/upgrading-from-3.x.mdno longer listsallowAppKeyFallback(it says "the app-key fallback option": the old way is closed); anddart docgives 0 warnings on the public API (four doc references fixed). - New, optional:
UTDAudioRoomConfig.musicSheetBuilder, andUTDMusicControlleris public. The music player of the room (seemusicFilePicker, 4.1.0) opens the kit's sheet. WithmusicSheetBuilder: (context, music) => YourSheet(music)the host sees YOUR sheet instead, in the same bottom sheet.UTDMusicController(exported by the package) is the whole player:status(what the audio library reports: state, error, position, duration),fileName,sendToAll,localVolume,roomVolume,pick(yourPicker),open(pathOrUrl),togglePlay(),stop(),seekTo(ms),setLocalVolume,setRoomVolume,setSendToAll, andUTDMusicController.isAvailable(Android). With no builder (the default) nothing changes. Tests:test/music_player_ui_test.dart(the builder is called instead of the kit sheet with the room's controller, it can drive the player, no builder keeps the kit sheet). - The quality report carries the three AiRes processor numbers when the audio library has them:
ai_res_cpu_norm_us_per_10ms,ai_res_cpu_raw_us_per_10ms,ai_res_clock_percent. A number that is negative (not measured yet, -1) or a clock above 100 percent is dropped, never sent; 0 is a measurement. Test:test/quality_ns_keys_test.dart. If a column stays empty whileai_res_stateis 1, the audio library answered "not measured" (-1) at the moment of the report. - A user the host removes is told so: "Removed from the room". The engine now sends
{"type":"_removed","reason":"kicked"}just before it removes a user (a kick). Until now the user saw the ban dialog ("You have been banned"), because a removal says nothing about the reason. New:UTDBanNotice.fromRemoved()/UTDBanNotice.isRemovedByHost(the notice keepssource == UTDBanSource.disconnectand hasreason == 'kicked', so aswitchoverUTDBanSourcedoes not change),UTDSeatController.onRemoved, and the built-in dialog says "Removed from the room" / «تمت إزالتك من الغرفة». Needsutd_stream_sdk ^0.5.5(this release depends on it): the SDK waits 1.5 s for the reason before it reports a removal asbanned, and reports the kick asUTDForceExitReason.kicked; a seat the host muted now readsUTDSeat.muted. Works with an engine that does not send_removed(the fallback as before, 1.5 s later). Test:test/removed_by_host_test.dart. - Fix: with your own
headerWidgetand your ownPopScope(canPop: false)around the room, the back button no longer opens the kit's exit sheet over your drawer. The kit'sPopScopeis tolddidPop == falsewhen YOURPopScopeblocks the pop, and it opened the sheet anyway; with aheaderWidgetthe app owns the back button (as the README says), so now it does nothing. The default header is unchanged. Test:test/default_room_header_test.dart. - Documentation: the README says what of a seat the app can change (
UTDRoomTheme,seatLayout,seatBuilder,avatarBuilder,seatFrontBuilder,seatBackBuilder,seatContainerBuilder) with a small example, and shows the music sheet builder.
4.1.0 #
One release: the new default room page (the default look is DARK), UTD Stream's own echo cancellation and noise suppression on every Android device, the mute like ZEGO's, the muted capture that opens when the seat is confirmed, and the host's music player. Read "Upgrading" before you upgrade. Needs utd_media_client ^2.12.0 and utd_stream_sdk ^0.5.4 (pub upgrade brings them). There is no 4.0.5: its changes are in this version.
Upgrading #
From 4.0.x (4.0.0 to 4.0.4):
pubspec.yaml:utd_audio_room_kit: ^4.1.0, thenflutter pub upgrade utd_audio_room_kit. This movesutd_media_clientto 2.12.0 andutd_stream_sdkto 0.5.4.- Android build (one line in your app). With
RepositoriesMode.PREFER_SETTINGSadd theexclusiveContentblock forhttps://maven.udt-stream.com/(groupio.utdstreamonly) that is in theutd_media_client2.12.0 changelog to yoursettings.gradle; a Flutter app cannot useRepositoriesMode.FAIL_ON_PROJECT_REPOS. The first build downloads about 53 MB.compileSdkis 36. - What your users will see, with no code from you: the room page is dark and has a header, a controls bar and a chat of its own (below, "If you want your old look" turns each off); the microphone is muted like ZEGO's (the system microphone indicator stays on while the user is muted, say so in your privacy policy and in the Play Store Data safety form); the host is seated by the kit; a user on a seat has the microphone capture open, muted, from the moment the seat is confirmed.
- Delete these lines if you have them (removed):
UTDAudioMode.extraPlatformEchoCancellerModels,builtInPlatformEchoCancellerModels,usePlatformEchoCanceller(only if you importedutd_stream_sdkor the kit'ssrc/directly: the kit does not exportUTDAudioMode), andAudioCaptureOptions(stopAudioCaptureOnMute: ...)(removed fromutd_media_client2.12.0: the mute is one, ours). - Optional, additive:
autoSeatHost: false(a host who only manages the room),headerWidget: const SizedBox.shrink()(your own header),exitPopUntil,memberMenuItems,musicFilePicker(the music player).
From 3.x (3.8 to 3.17): go to 4.0 first by the steps of "Upgrade guide (3.x to 4.0)" below and doc/upgrading-from-3.x.md. The one change you must make is the tokenProvider (doc/upgrade-4.0-token-provider.md): 4.0 mints nothing with your app key, and the engine refuses that path. Then do the steps for 4.0.x above. If you are on 3.x and do not want 4.x yet, utd_audio_room_kit 3.18.0 has the same echo, noise, mute and music, and its own steps from 3.8.
The default room page now looks and behaves as the README always said, and its default look changes: it is DARK. Read this before you upgrade.
Until 4.0.4 UTDAudioRoom declared several defaults and mounted none of them. An app that installed the kit as documented and had a LIGHT app theme got white seats and white text on a white page, a controls bar behind the Android navigation bar, a tap on a seat that did nothing, a host who was not on a seat, no header. (Found by the first test of the UTD Stream Demo app on a phone, 2026-11-22.) What was declared and is now wired:
- The room paints its own page from
UTDRoomTheme(useDefaultBackground, true by default): a dark gradient (#1D1547to#080817). The status bar and navigation bar icons follow the theme (brightness), the bars are transparent over the page, and the page does not resize with the keyboard. - A tap on a seat with no
onSeatTapopens the kit seat sheet (take, leave, step down, host moderation). An app that passesonSeatTapis unchanged. autoSeatHost(true by default): after connecting, the host takes seathostSeatIndex(0) when it is free, else the first free seat; nothing is sent when the engine already seated them. A server that does not forwardhost_seatin the token no longer leaves the host standing in their own room.- The default header (
UTDDefaultRoomHeader): a capsule with the room picture or initial, the name andID: <roomId>(UTDAudioRoom.roomTitle,roomAvatarUrl; without a title the room key is shown), the number of people (it opens the member list: read-only for a listener, with the moderation actions for a host or admin), minimize, and an exit button that opens a sheet ("Minimize the room" / "Leave the room"). The system back button opens the same sheet. With your ownheaderWidgetyou keep the back button and the header yourself. - The default controls bar (
UTDDefaultControlsBar, replacing the old three-circle bar, which is now@Deprecated): a chat capsule, the microphone, the speaker, the speak-request queue for host and admin, yourextraActions, and More. Every button has a word under it (showControlLabels, true by default; the bar is 74 dp high with the words and 60 dp without), a tooltip, a screen-reader label and a 48 dp touch area. The microphone tells on / muted by icon, fill and word, never by a color alone. A user who is not on a seat sees Take the mic (puts them on the first free seat); inrequestseat mode that place holds Apply to speak. More is a grid: members, music mode (showMusicModeButton), lock comments, banned members, minimize, and your actions placed there. - The seats are drawn from the theme: a chair (not a microphone) with an outline for an empty seat, a lock for a locked one, the host seat says "Host", role badges are icons (home for the host, shield for an admin; the letters H/A/G are gone), a red mic-off badge for a muted person (a muted person is never drawn as speaking), the speaking ring is steady under reduce-motion, and everything mirrors in right to left.
theme,showSeatNames,hostSeatIndexand the live mute now reach the seat grid (they were not passed before). - The chat: the newest line at the bottom, bubbles as wide as their text (78% at most) on the start side, system lines not italic, the empty hint at the start corner; the composer is a themed sheet that stays open after a send. The placeholder seats before the connection use the theme.
- Strings follow the app language: with no
config.stringsthe room uses Arabic when the app locale is Arabic, English otherwise (before: always English).
New API (all optional, nothing breaks):
UTDRoomTheme:brightness,backgroundGradient,onSurfaceMuted,outline,onPrimary,onDanger,dangerOnSurface,seatIcon,scrim,bubbleText,badgeHostInk,badgeAdminInk, andUTDRoomTheme.light(measured contrast: text 15:1, secondary text 6.4:1, seat outline 3.4:1, speaking ring 4.5:1). The default colors changed (dark violet page, a darker red#D93025for danger, a lighter sender color): an app that set its ownthemekeeps its colors for the tokens it set; the new tokens take their defaults.UTDAudioRoomConfig.memberMenuItems(optional): the app's own entries of the menu of a person in the member list (report, block...), shown in the SAME menu as the kit's moderation entries, below a divider. The member list now has ONE menu button per row (it had two when an app added its own), and the hammer button at the top of the list is gone (the banned list is in More). A user who is neither host nor admin gets the button only when the app supplies entries.UTDAudioRoomConfig.exitPopUntil(optional): where leaving the room lands. The default (null) is the first route of the app, as before; an app that opens the room from a list passes(route) => route.settings.name == 'rooms'(the name it gave that page). Used by the exit button, the exit sheet and the system back button.UTDAudioRoom.roomTitle,roomAvatarUrl;UTDAudioRoomConfig.showControlLabels,extraActions(UTDRoomAction(icon, label, onTap, placement: bar | more, badgeCount)).UTDRoomStrings:messageHint,sendLabel,hostSeatLabel,takeMic,micLabel,mutedLabel,speakerLabel,requestsLabel,moreLabel,musicModeLabel,musicModeOffLabel,bannedMembersLabel,leaveRoomTitle,minimizeRoom,exitRoom,roomIdLabel,membersCount, andUTDRoomStrings.forLocale.UTDAudioRoomConfig.resolveStrings([context]).UTDAudioRoomConfig.onMessageLongPress(UTDMessageSlotData): a press and hold on a chat line of the default bubble (not a system line): where an app puts "report this message" and "block this person" (the app stores ask for both in any app with user-generated content).UTDSeatController.firstFreeSeatFor(identity),takeFirstFreeSeat(identity),seatHostIfEmpty(index, identity);UTDRoomController.autoSeatHost(index).
If you want your old look: pass UTDAudioRoomConfig(theme: UTDRoomTheme.light) for a light room, or useDefaultBackground: false to paint the page yourself, headerWidget: / controlsBarWidget: to keep your own header and bar, autoSeatHost: false, onSeatTap: for your own seat tap.
If your app has its own AppBar or header around the room and you pass no headerWidget: the room now adds its own header and an exit button, and the system back button opens the exit sheet. Pass headerWidget: const SizedBox.shrink() to remove the kit header; that also lets the system back button pop your page as before.
autoSeatHost and the microphone permission: a host who is seated by the kit makes the app ask for the microphone permission when the room opens. An app whose host only manages the room and does not speak should pass autoSeatHost: false.
Fixed after the first device run (emulator, 2026-11-22), still part of 4.1.0:
onControllerReadyis called after the first frame, with a mounted check. It used to be called frominitState, so asetStatein it (the usual use) threw "setState() called during build" and no room could open. Apps that only store the controller are unaffected; code that relied on the callback having run before the first frame now runs one frame later.- The mute badge on a seat follows the muted set. It was read once inside builders that did not listen to it, so the red crossed microphone stayed after the microphone was opened, until something else rebuilt the page. Both seat layouts (the default grid and an app's
containerBuilder) listen now. - A custom
memberBuilderrow is drawn inside the room theme, not the app's. The kit's own member sheet and rows useUTDRoomTheme; a row you build yourself sits on that same dark or light sheet, so take its colors fromUTDRoomScope.of(context).theme(notTheme.of(context)), or your text can be dark on a dark sheet. - The room name in the header is not cut with room to spare. The capsule shared the free width with a spacer and got half of it; it takes all of it now (still at most 190 and ending in an ellipsis for a long name).
- The speaker-invitation and ban dialogs use the room theme (background, text, accept and decline, danger and primary colors;
theme:parameter onshowUTDSpeakerInvitationDialogandshowUTDBannedDialog; the room hands its theme to the controller,UTDRoomController.dialogTheme). Their text is still fixed English and Arabic.
Not changed in 4.1.0 (known): autoHostMic is still declared and not read (a host who takes the seat gets the microphone through the seat take, as before); the picture-in-picture view and the minimized overlay keep their own colors; the text of the invitation and ban dialogs is not taken from UTDRoomStrings. Names: the kit shows participant.name, and falls back to the identity only when the engine returns none (an app whose token server sends the name under the wrong key sees identities: the engine reads the person's name from user_name / name; display_name is the ROOM's title).
Tests: test/default_room_look_test.dart, default_room_theme_test.dart, default_room_header_test.dart, default_controls_bar_test.dart, default_chat_test.dart (each written against the 4.0.4 behavior first: red there, green here).
Documentation added to 4.1.0 (describes 4.0.4 behavior; no code change) #
-
Android:
INTERNET(andRECORD_AUDIO,BLUETOOTH_CONNECT) must be in the MAIN manifest of your app; the README now says why and how to check. The manifest of a new Flutter app declaresINTERNETonly for debug and profile, so a release build has no network until you add it. Found by a test of a demo app on 2026-11-22: it worked in debug and had no internet in release. The plugin declares the foreground-service permissions,POST_NOTIFICATIONSandWAKE_LOCKitself; the other three are the app's to declare (as the media client README says). -
A seat the engine released while the connection was down: what your app sees, and the microphone (4.0.4 with
utd_stream_sdk0.5.3). After a drop longer than the seat hold (60 seconds), the engine frees the seat, the kit shows it empty,onSeatLost(released, seatIndex)fires once (andonErrorgetsseat_lost), and the microphone is switched OFF: a user without a seat does not publish. Take a seat again to speak (takeSeat); rely ononSeatLost, not on the microphone button, to know it happened. Before 4.0.4 (4.0.3 withutd_stream_sdk0.5.2) the microphone stayed ON and kept sending audio from a user who had no seat (measured on a handset: three drops of 80 seconds, three times "publishing without a seat"); that stops when the app updates. An app still on 4.0.3 / SDK 0.5.2 keeps that behavior until it upgrades. A drop shorter than the hold keeps the seat and the microphone. -
What the device measurements of 4.0.4 / SDK 0.5.3 do and do not show (a handset round of 2026-11-22, reviewed by Amr; the limits as he wrote them):
- The gain in the 18-second cut is about 1.7 seconds, not more (the 3-second grace plus about 4 seconds of redial). The 17.4-second case seen once before was not repeated (the maximum was 9.0 seconds), so the
engineStuckpath, therepublishFailedpath and the microphone check after the engine's recovery were not exercised on a device; they are covered by tests only. - The guard "a resume whose signal is connected is not cut" was not exercised on a device: in all 8 takeovers
engineSignalConnectedwas false, so the field measurement neither proves it right nor wrong. - The grace did not cut a resume that would have worked (0 of 8). The comparison is not paired (different runs), but the 0.5.2 distribution is two-valued (2.1 to 2.2 seconds, or 8.6 to 9.0 seconds, nothing in between), which supports the conclusion. One sample: one network, one room, one device.
- The effect is not isolated between the three packages (kit, SDK, media client), and the microphone state is the app's state, not audio that was heard.
- The gain in the 18-second cut is about 1.7 seconds, not more (the 3-second grace plus about 4 seconds of redial). The 17.4-second case seen once before was not repeated (the maximum was 9.0 seconds), so the
-
Watch
UTDRoom.takeoversin the field. It says why the SDK dialed instead of waiting for the engine. The share ofengineStuck, and any takeover withengineSignalConnected == true, are what to look at. AnengineStuckafter 25 seconds on a healthy network means an older media client (^2.10.1without the 2.10.2 fix) or a new case: report it.
Echo cancellation, noise suppression and the mute (from utd_media_client 2.12.0) #
These changes were prepared as 4.0.5 and ship inside 4.1.0: there is no separate 4.0.5.
- Echo cancellation and noise suppression are now UTD Stream's own, on every Android device.
utd_media_client2.12.0 builds the Android app with the UTD audio library (io.utdstream:rtc) instead of the stock WebRTC one: the AI noise suppression, the software echo canceller and the music mode come from our library, and they no longer need a fork offlutter_webrtc. Nothing to call. How to check that an app has it:UtdmAudioProcessing.aiNsState()answers a number instead of null. (iOS is unchanged in this release.) The kit's own tests measure no audio on a handset; the measurements are those ofutd_media_client2.12.0 (see its changelog). - The server's kill switches reach the audio engine. The token answer's
audio_profile.disabled_trials(a list; every element exactlyUTD-<Name>/Disabled/, forUTD-AiRes,UTD-AiNs,UTD-MuteKeepsMic,UTD-MusicPlayer,UTD-RouteRealign) is put into the field trials BEFORE the audio engine is built, and it beats any default orEnabledvalue of the same key (the noise suppression of the device profile included). It is read from every token answer (join, renew, redial), but the engine is built once per process, so only the answer that comes before the first dial counts; a key that cannot be applied is not an error. Anything in the list that is not exactlyUTD-<Name>/Disabled/(another prefix, anEnabledvalue, extra pairs, a non-string, a non-list) is dropped, at most 16 keys: the server cannot put another trial into the engine through it. The list of the latest answer is also kept on the device (shared_preferences, keyutd_disabled_trials) and read when the engine is built before any answer of that process, so the lock starts, at the latest, the next time the app is opened; an answer with no list, or with noaudio_profileat all, clears it (that is the engine's contract: no field means no lock). During a staged deploy of the engine, an answer from an older node that does not send the field lifts the lock until the next answer from a newer node. The engine build waits for that read (a few milliseconds). A project that sends none changes nothing. - The quality report carries more of the audio library's numbers (
audioblock; each key is left out when the library has none or the number is not measured yet, -1):ns_cpu_raw_us_per_10msandns_clock_percent(the raw processor time of the noise suppression at the clock the cores really ran at, and that clock as a percentage of the maximum), and for the residual-echo layer (AiRes)ai_res_state(0 not running, 1 running, 2 closed by the CPU guard until the process ends, 3 paused for the music player, 4 switched off by the server kill switchUTD-AiRes/Disabled/; it is read for every report because it can change in the middle of a call),ai_res_cpu_norm_us_per_10ms(its time at the maximum clock: the number the guard compares with its limit),ai_res_cpu_raw_us_per_10ms(at the clock it ran at) andai_res_clock_percent. - After the sound moves between outputs (Bluetooth, a wired headset or the speaker), the echo is much shorter, because the echo canceller learns the new path again. (audio library patch 0019,
UTD-RouteRealign.) - When the sound moves to the earpiece, the microphone is lowered for about 4 seconds (the same re-learning). The server can switch both off with the field trial
UTD-RouteRealign/Disabled/; it is read when the audio engine is built, so it applies to the next room, not to one already open. Not measured yet on a real Bluetooth device (the numbers are from wired and speaker routes), so a Bluetooth headset may behave differently from what is written here. - Removed:
UTDAudioMode.builtInPlatformEchoCancellerModels,UTDAudioMode.extraPlatformEchoCancellerModelsandUTDAudioMode.usePlatformEchoCanceller(public API ofutd_stream_sdk0.5.4, which this kit needs; the kit itself does not exportUTDAudioMode, so this concerns an app that importsutd_stream_sdkdirectly or the kit'ssrc/core/audio_mode.dart, an implementation import). UTD Stream's own echo canceller and noise suppression now run on every handset with no exception, so an app has no choice of the device's canceller any more. Upgrade step: if your app uses any of them (for exampleUTDAudioMode.extraPlatformEchoCancellerModels.add('SM-A045F')), delete that line. The only built-in entry was the Redmi Note 9 (M2004J7AC), which now runs ours too. - Mute now works like ZEGO's
muteMicrophone. A mute keeps the microphone capture open and sends silence, so an unmute is instant, it cannot fail while the microphone is opened again, and the echo canceller keeps learning. The capture is really closed only in two cases: the user leaves the room, or the user is muted and the app goes to the background (the system microphone indicator goes off); when the app comes back to the foreground the capture is opened again, still muted. Before, every mute stopped the capture and every unmute started it again (slower, and it could fail). This is howutd_media_client2.12.0 mutes, for everybody: the kit has nothing to do with it and there is no option for the app to choose the old mute (only UTD Stream can go back, from the server). The system microphone indicator stays on while the user is muted in the foreground: say so in your privacy policy and in the Play Store Data safety form. A seat that the engine released while you were muted behaves as in 4.0.4 (the microphone is switched off). - The microphone capture opens MUTED as soon as the seat is confirmed, so the first unmute is clean (like ZEGO). The echo canceller needs two to four seconds of capture to learn; opening the microphone only when the user taps it gave an echo of about half a second at the first words. Now, the moment the user is on a seat AND the server has granted publish (
canPublish), the kit publishes the microphone track disabled and muted: the user stays muted exactly as before (taking a seat still does not open the microphone), and the unmute that follows is instant. Nothing is captured before that: a listener, and a host or admin who is not on a seat, have no capture and no microphone indicator; nothing is published before the permission arrives. The capture is closed for real when the user leaves the seat, leaves the room, loses the right to publish, or the app goes to the background while muted (the media client's guard). A seat refused or failed leaves nothing open. The system microphone indicator is on from the moment the seat is confirmed until one of those happens, also while muted: say so in your privacy policy and in the Play Store Data safety form. A mute badge may show on the seat at once, which is right: the user is muted. Needsutd_stream_sdk0.5.4 (publishMicrophoneMuted,releaseMicrophone). Known limit: if the user opens the microphone in the first five seconds or so after sitting down, a short echo (under a second) can still be heard (the echo canceller has not finished learning); the same short echo can follow an unmute right after the app comes back from the background while muted. - Android build: add one repository line to your app. The plugin downloads the audio library from
https://maven.udt-stream.com/. It adds the repository and replaces the stock dependency by itself, but a Flutter app cannot useRepositoriesMode.FAIL_ON_PROJECT_REPOS; withPREFER_SETTINGSadd theexclusiveContentblock shown in theutd_media_client2.12.0 changelog tosettings.gradle. The first build downloads about 53 MB (all four ABIs; the APK keeps the ABIs it targets). The native library inside the APK is nowlibutdstream_rtc.so; an app that names the stock library file in ProGuard rules or scripts must follow.compileSdkis 36 (an app on the current Flutter already needs it). - A user the host muted sees it (4.1.0 page). The mic button stays on the bar, filled with the danger color, with the label "Muted by host" (
UTDRoomStrings.mutedByHostLabel, keybar-muted-by-host), and a short message (mutedByHostMessage) says what happened; before this the button just looked like the user's own mute. Strings in English and Arabic, with defaults; no API changed.
The host's music player (Android) #
New, additive: the host's music player (Android). The host picks a song and plays it into the room. The song goes into the echo canceller's reference, so it does not come back as an echo; an option mixes it into the audio everybody in the room hears (off by default, with a limiter in front of the mix). It needs utd_media_client 2.12.0 (it carries UtdmMusicPlayer) and the audio library build that carries the player.
- Nothing changes for an app that does not opt in. The player exists only when the app passes
UTDAudioRoomConfig.musicFilePicker: a function that shows the app's own file chooser and returns a path, acontent://URI or anhttp(s)://URL (or null when the user chose nothing). The kit does not bring a file-picker package. - Where it is: a Music item in the More sheet (icon
queue_music_rounded) for the host and the admins, and a Music button in the bar between the speaker and More only while a song is loaded (filled with the primary color while it plays, plain while paused), so the host reaches the stop in one tap. A listener sees neither. On a platform without the player (iOS) nothing is offered. - The sheet: the song (its file name, with a Change button), the progress with the time (always left to right), play or pause, stop, the volume on this phone, the volume in the room, and the "Send it to everyone" switch (the room volume is disabled until it is on).
UTDRoomController.music(UTDMusicController) holds the state;UTDMusicSheetis the sheet. - Leaving the room stops the song and turns "Send it to everyone" off.
- The music stays in the room while the host is muted. The mute silences the microphone only: a song that is sent to the room ("Send it to everyone" on) keeps playing for everybody, and no microphone sample is sent until unmute. To make that true the mute is NOT told to the media server while a song is sent (a muted track stops the audio of the track, and the song with it): the native microphone is silenced in the audio library, the host stays muted here, and the data topic
utd.mic_stateis RESERVED for this (a message{"muted": true|false}, reliable): the host sends it each time the state changes (at most about three times a second) and sends it again, to that participant alone, to anybody who joins while it is true; the receiver believes it only from the participant the server stamped on the packet and only about that participant (a message cannot mark somebody else, and the server API cannot inject one); it never reaches the app's data stream, its events or the chat. What changes on screen: the other participants see the host as muted (the seat icon, the member list) through that message; a kit that does not read it (3.x before 3.18.0, 4.0.x,utd_live_room_kit) shows the host as NOT muted while the host is muted and playing a song, although no microphone sample is sent; the host's own screen always shows the real state. When the song stops or the sending is switched off while the host is still muted, the track mute is sent as usual. A mute from the room's admin or the server is a full mute: the song that was sent stops too. In the background a muted host who sends a song keeps the capture open (the song runs on it), so the system microphone indicator stays on and the foreground service of type microphone stays up until the song stops; the microphone itself stays silenced in the audio library. Muting the host does not pause, stop or lower the song; the song's own pause, stop and volume are the only controls of it. - Copyright is yours. The kit plays the file your user chooses and sends it to everybody in the room. UTD Stream does not check, license or filter the songs: the developer of the app is responsible for the licenses of the songs that users can play into a room (public performance and streaming rights), and for telling the host so.
- The existing "Music mode" item (the singing mode of the noise suppression) is now called "Singing mode" / "وضع الغناء", so it is not confused with the player; its icon is unchanged. An app that reads
UTDRoomStrings.musicModeLabelsees the new default word (set your ownmusicModeLabelto keep the old one). - New strings in
UTDRoomStrings(English and Arabic, all with defaults):musicTitle,musicPickHint,pickMusicFile,changeMusicFile,musicLocalVolume,musicRoomVolume,musicSendToAll,musicSendToAllHint,musicPlayLabel,musicPauseLabel,musicStopLabel, and four error texts. - Known limit: the song itself is not measured against the echo canceller on a handset by this release's tests (the numbers are
utd_media_client's). - Tests for the kill switches and the report:
test/disabled_trials_test.dartandtest/quality_ns_keys_test.dart. - Tests for the mic state:
test/mic_muted_by_message_test.dart(a muted host shows muted, the unmute clears it, a message about someone else or with no stamped sender changes nobody, another topic does nothing); the message itself is tested inutd_stream_sdk(test/mic_state_test.dart). - Tests:
test/music_player_ui_test.dart(who sees it, the sheet in each state, the volumes and the room choice, the bar button, the name of a file).
Tests added in this release #
test/default_room_look_test.dart, default_room_theme_test.dart, default_room_header_test.dart, default_controls_bar_test.dart, default_chat_test.dart (the default page), muted_mic_preparer_test.dart and muted_mic_wiring_test.dart (the muted capture), muted_by_host_test.dart, exit_pop_until_test.dart, member_menu_test.dart, music_player_ui_test.dart, seat_mute_badge_test.dart, controller_ready_test.dart, kit_dialogs_theme_test.dart; aec_path_test.dart changed (no per-model choice of canceller). The mute and echo changes themselves are tested in utd_media_client 2.12.0.
4.0.4 #
Needs utd_stream_sdk ^0.5.2; the recovery fixes below come with utd_stream_sdk 0.5.3, which pub upgrade picks up by itself (nothing to change in your pubspec.yaml).
- Fix (SDK 0.5.3): the room comes back faster when the network returns, and never stays
reconnectingon a working network. The media engine's backoff and its 10 s wait for ICE made the return take 2 to 17 s after the network was back, and once the state stayedreconnectingfor more than 100 s while the media connection was up. The room now acts on the network coming back and on an engine that is back but silent. Details and the measured numbers:utd_stream_sdkCHANGELOG 0.5.3. - New:
onErrorgetsno_seat_gridwhen a seat take is refused because the room has no seats. The engine closes a room when it is empty and opens a NEW one when someone joins again (a long drop of everyone, or one user's 80 s outage in a small room); the new room starts withseat_count0 until somebody callsseatController.setupSeats(...), and everytakeSeatis refused (HTTP 400 "This room has no seat grid"). The kit returnedfalseand onlylastSeatErrorhad the reason, so an app that shows its own "could not take the seat" never knew why, and it looked like a kit bug that went away after leaving and joining again (the app set the seats up on that first join).onErrornow carriesno_seat_grid(message in the catalog:en,ar,hi), and so doesonKitError. What your app should do: the host (or an admin) callssetupSeats(...)on EVERY join as host, not only the first one; other users wait for the host. The kit does not set seats up by itself: a seat grid is a decision of the room's owner (count, mode, policy). - Tests:
test/seat_no_grid_test.dart(red on 4.0.3:onKitErrorstayed silent).
4.0.3 #
- Fix: a seat take no longer waits for ever behind the Bluetooth dialog, and the microphone is a condition of the take. Before it sends
POST /seats/N/take,takeSeatasks for the microphone (RECORD_AUDIO) and, on Android 12+, for Bluetooth (BLUETOOTH_CONNECT), one dialog after the other, and waited for both. On a handset nobody touches (an emulator, a test rig) a dialog stays up for ever and the take sent nothing: seen on an Android 14 emulator (API 34, both dialogs) while an Android 9 one, which has no Bluetooth dialog, took the seat. Now:- Microphone: the take WAITS for the answer, as long as the dialog is up (that is the user's own time, no timeout). If the user refuses it (or had refused it for good), the take is NOT sent:
takeSeatanswersfalse,lastSeatErrorismic_permission_denied, andonErrorgets the codemic_permission_deniedwith a message in the catalog (en,ar). A seat without a microphone is a seat nobody can speak from, so it is not taken. (Before: the seat was taken with or without the microphone.) A request that merely FAILED (another dialog of your app was running) is not a refusal: the take goes on and the OS asks again when publishing starts, as in 3.16. - Bluetooth: never holds the take. It is asked in parallel after the microphone, only matters for a paired headset, and a refusal leaves the sound on the phone's own speaker.
- The log (debug builds) says when the kit asks the user and what the answer was.
- Microphone: the take WAITS for the answer, as long as the dialog is up (that is the user's own time, no timeout). If the user refuses it (or had refused it for good), the take is NOT sent:
4.0.2 #
Fixes for a drop of the connection (the net goes off and comes back). Needs utd_stream_sdk ^0.5.2.
- "Reconnecting" comes at once.
utd_stream_sdk0.5.2 sets the connection state toreconnectingfrom the first moment the media engine starts to save the session (before: 45 to 50 s later, when it gave up), so your "reconnecting..." bar shows on the first lost packet's worth of trouble, andtakeSeat/ seat actions wait for the session instead of failing on a dead one. When the session is back after more than 15 s the room re-reads the seats (a full sync), which a drop the engine resumed never did before. - New:
UTDAudioRoom(onSeatLost: (reason, seatIndex) {...})(andcontroller.seatController.onSeatLost). Called ONCE when the user held a seat before the drop and, after the session is back and the room state was read again, the seat is not theirs any more:UTDSeatLostReason.released(the engine freed it while the connection was down) or.taken(someone else sits there).onErroralso gets the codeseat_lostwith a message in the catalog (en,ar). When the engine still shows the user on a seat (the same or another) nothing is called and the seat is shown again. A seat the user left on purpose (leaveSeat) or lost because they were kicked or banned during the outage is not reported as lost. The microphone is your call: a user without a seat cannot publish. - The token of a redial is marked
rejoin. Since 4.0.0UTDTokenRequest.rejoinwas documented as "true on a redial" but the kit never set it, so atokenProviderthat caches or replays a token could not tell a redial from the first join. A redial after a drop now asks your provider withrequest.rejoin == true(forwardX-UTD-Reason: rejointo the engine): mint a fresh token for it; do not reuse the one of the first join (the media token can have expired during the outage). Renewals of the user token are not marked.
4.0.1 #
Docs-only patch on 4.0.0. No code change, nothing to do on your side. The 4.0.0 notes below said "not yet published" and described utd_stream_sdk as unpublished; 4.0.0 and utd_stream_sdk 0.5.0 are on pub.dev.
4.0.0 #
Breaking: tokenProvider is required; app_key minting removed. The token comes from ONE place, your server. The kit holds no app key and has no call that mints with one. A project still on the old way stops joining until it updates (the engine refuses it; there is no grace period). Upgrade guide, with the endpoint to build on your server and an example: doc/upgrade-4.0-token-provider.md.
UTDAudioRoom(appKey:)is removed;UTDAudioRoom(tokenProvider:)is required and takes aUTDTokenRequest(Future<UTDTokenResponse> Function(UTDTokenRequest), the new typedefUTDTokenProvider).UTDAudioRoom(allowAppKeyFallback:)is removed.UTDRoomController(tokenProvider:)is required at construction (without a provider nothing could join, redial or renew);controller.tokenProvideris no longer nullable.controller.initApi(appId:)no longer takesappKeyortokenBaseUrl;controller.appKeyis gone.controller.generateToken(...)is removed.controller.requestToken(...)(same arguments) asks YOURtokenProviderand applies the answer; it mints nothing. A redial and a renewal ask the provider again with the same arguments.UTDTokenRequest(public now): what the kit needs from your server.request.toJson()is what to send to your server (kind,rejoin, the enginepath, the enginebody);toTokenBody()andengineHeadersare the engine call.UTDTokenApiis removed;utdTokenErrorFromResponse(status, body)turns the engine's refusal that your server forwards into the kit's exceptions (a ban, a suspension, a service not enabled, a rate limit), so a final answer still stops the kit's loops.UTDRoomController.warmUp/warmForRoomListlosetokenBaseUrl,UTDConnectionPrewarm.prewarmTokenHostandUTDApiClient.defaultTokenBaseUrlare removed: the device no longer calls a token host, so the warm-up covers the RTC edge only.- New:
UTDTokenDeniedException, a way for yourtokenProviderto say "no, and do not ask again" without any screen. Throw it when your own rule refuses the user (a blocked account, a closed room): the kit asks the provider once, does not retry, does not redial, shows no ban dialog and no error screen. The widget reports it throughonConnectError(when set) andonErrorwith yourcode, and when there is noonConnectErrorit leaves the room like the error screen's exit button does.UTDBannedExceptionstays what it was (the ban flow). - An answer without a media token or url is the join's error (
UTDTokenException), not a dial. - Tests:
test/no_app_key_test.dartfails if any file oflib/names an app key,X-App-Key,generateTokenor the app-key fallback, and if any request carriesX-App-Key.
The connection now runs on utd_stream_sdk (S-12 d). The kit's room manager is a thin layer over an SDK session
(UTDRoom): the dial and its budget, the pacing of repeated dials, the engine's final answer, the recovery after a drop, the
force-exit, the de-duplication of repeated deliveries and the data plane are the SDK's code. 3.15.x (and 3.14.2) stay as they are for
current customers; 4.0 is the major version because the recovery table changed and some 3.x properties are gone. Needs
utd_stream_sdk ^0.5.0 and utd_media_client ^2.10.1 (both published).
Release order: utd_stream_sdk 0.5.0, then this kit. The connection-drop report (ICE state, network type) and the two extra noise-suppression numbers of the 3.17 line need utd_media_client 2.12.0, so they are NOT in 4.0.0 and come back in 4.1 with it. Everything that 3.15.0 brought (the foreground service for the listener and the
speaker with the 10-hour background limit, the device audio profile and the AI noise suppression flag, the music seat, the loudspeaker route
keeper, the quality fields) and what 3.16.1, 3.16.0 and 3.14.2 brought (the route keeper and the test-only guard on the device list) is in 4.0.0 as well, on top of the SDK. The step-by-step migration is in doc/upgrading-from-3.x.md.
-
Includes 3.16.0: a seat take never throws the
permission_handler"A request for permissions is already running"PlatformException, andUTDAudioRoomConfig(requestPermission: ...)/controller.seatController.requestPermissionroute the kit's permission requests through your app's own queue (see 3.16.0 below and the README, "Permissions"). -
The seat grid is the SDK's
UTDRoomState.UTDSeatControllerno longer parses_seat_update, the_seatsmetadata or_mode_changeitself, and no longer keeps its own order guard: the grid, its revision rule and the generation that stops an old REST read from overwriting a newer push are the SDK's. The kit keeps what is its own on top: the occupant enrichment from the live participant (cosmetics), the raw-map callbacks (onModeChange, the speaker events,onBanned,onKicked, ...), and every seat action. No public member of the controller changed. -
The order of a join is the SDK's
UTDJoinFlow.UTDRoomController.connectno longer carries its own cancel-by-leave, resume-the-session-in-hand and bounded-teardown logic; it calls the SDK flow and keeps only what the UI resets and wires. Behavior is the same. -
Behavior change (also in 3.16.1): a failing
tokenProviderno longer falls back to the app_key mint. Fixes an intermittent "can't enter the room" error: when the provider you pass toUTDAudioRoom(or set oncontroller.tokenProvider) failed for a moment, 3.15.0 and earlier minted with the publishable app_key behind its back, which an engine withappkey_identity_mint_disabledrefuses with a 403 that the user saw as the error screen. Now the provider is asked again twice (after 0.4 s and 1.2 s) and, if it still fails,onConnectErrorgets the provider's own error; a provider set only on the controller is used by the widget too. With no provider at all the widget mints with the app_key as before. To get the old fallback back, passUTDAudioRoom(allowAppKeyFallback: true)(defaultfalse). -
controller.foregroundis still there (the SDK session's foreground service, same object as in 3.x), next toonBackgroundLimitReachedandonBackgroundMicrophoneRefused. -
Token source and expiry rules are the SDK's. The replay of the last mint, the "can we mint at all" rule and the final-refusal hook are
UTDTokenSourceinutd_stream_sdk;utdIsTokenExpiredResponseandutdProactiveRefreshDelaymoved there too (the kit still re-exports them). The mint itself, with the device id and device facts, stays in the kit. Behavior is the same, except the text of the error when nothing can be minted is now the SDK's. -
Deprecations that said "removed in 4.0" now say 5.0.
UTDBanUserAttributes.fr/.frt,UTDRoleUserAttributes.fr/.frtandUTDAudioRoomConfig.pkWidgetstill work in 4.0 (use the participant attributes andsectionWidget); nothing is removed without a full major version of warning. -
Upgrade note:
controller.roomManageris deprecated. Read the connection fromcontroller.session(the SDKUTDRoom), the dialing stop fromcontroller.dialingStoppedByand clear it withcontroller.resumeDialing().roomManagerandUTDRoomManagerkeep working in 4.0 and are removed in 5.0.
Slots (S-10). Places where your app draws, each handed the member's data (UTDMemberData.attributes): seatContainerBuilder,
seatFrontBuilder, seatBackBuilder, messageBuilder, memberBuilder, pageBackBuilder, pageFrontBuilder, emptyAreaBuilder
(and the existing avatarBuilder). Additive: a room with no slot looks and behaves as before. New: controller.memberData(identity),
the data classes (UTDMemberData, UTDSeatSlotData, UTDMessageSlotData, UTDMemberSlotData, UTDPageSlotData, UTDRoomSlots).
A fix found on the way: UTDAudioRoom never provided the UTDRoomScope the default sheets (member list, invitations, bans)
read, so opening one asserted; the room provides it now. See the README, "Slots".
Background audio (Android). A voice room runs a foreground service for as long as the user is in the room (mediaPlayback while they
listen, microphone|mediaPlayback on the microphone), so Android no longer silences it when the app goes to the background; the limit is
10 hours in the background (UTDForegroundServiceConfig.maxDuration), then the kit takes the user out of the room and calls
controller.onBackgroundLimitReached. It stops when they leave and stays up through a recovery. UTDAudioRoomConfig.foregroundService changes the notification (title, text, icon) or turns it off (an app with its own
service). For your Play Console: an app targeting Android 14 must declare the Microphone foreground-service type; the SDK's
doc/staying-alive-in-the-background.md has the manifest, the permissions order and the answers. iOS: add UIBackgroundModes audio.
After a recovery the audio routing is re-applied.
Upgrade guide (3.x to 4.0) #
- Recovery after a drop is the SDK's, ONE recovery, on the published table: waits of 4, 10, 20, 40 s, then 60 s (each x0.5 to
x1.5, doubled after a 429/5xx/timeout), a fresh token every attempt,
onRejoinFailedafter 20 minutes (3.x: 10 attempts, 151 s).UTDRoomRecoveryis gone. Removed:rejoinPolicy,autoRejoinEnabled,autoRejoinMaxAttempts(setcontroller.reconnectScheduleinstead, see below). Kept, same signatures:rejoin()(now: get back now and answer true/false;maxAttemptsis ignored),isRejoining,onRejoinFailed(fired when the SDK gave up or the engine refused for good),tokenProvider,generateToken,adoptTokenResponse,onDialingStopped. - New:
controller.reconnectSchedule(aUTDReconnectSchedule, exported by the kit): the waits, the jitter and the give-up of the recovery are the app's to set, beforeconnect(a change applies to the next recovery, not to one running).UTDReconnectSchedule.disabledturns recovery off. The default is the published table. rejoin()keeps its 3.x rules: it answers false, and mints nothing, afterleave(), after a ban or a takeover, and after the engine's final refusal (a suspended project); only a newconnectarms recovery again. Aconnectreplaces a recovery that is running (no double dial). The engine's final refusal stays the originalUTDEngineRefusalinroomManager.dialingStoppedBy.- The microphone and camera run on the SDK session (4.0).
UTDMediaControllerpublishes throughUTDRoom.setMicrophone/setCamera/switchCameraand listens to the session's events (mute/unmute, permissions, subscriptions) instead of the raw media-engine room, so it keeps working when the SDK's recovery replaces that room. Same public API and flags (isMicEnabled,canPublish,mutedByAdmin...). Behavior changes: (1) enabling the mic or camera while the server has not yet granted publish now waits up to 8 s for the grant (before: it tried at once and the engine refused); (2) the media operation is bounded at 10 s by the SDK (same value as before); (3)switchCamera()now really flips front/back (the old call restarted the same camera); (4) after a recovery the SDK restores a mic that was on when the connection dropped. Speaker, Bluetooth and "mute all" routing moved to the SDK too (media profile). The logic that was proven in production in this kit (the iOS recipe, the AndroidMODE_NORMAL+forceHandleAudioRoutingconfiguration, the Bluetooth fix, the speaker-off that silences the room) is nowUTDAudioMode/UTDRoominutd_stream_sdk, and the kit calls it from there: one code path, so an SDK-only app is no longer put in phone-call mode (the SDK used to ask forMODE_IN_COMMUNICATION).UTDAudioModeandUTDDeviceIdentitykeep their names and members. No behavior change in the kit. - Force-exit moved from 60 s to 20 minutes of outage (the SDK's table). An app that relied on
onForceExitfiring after a minute of no network now gets it after 20 minutes; a short outage is re-synced (seats are re-read) instead of ending the room.UTDReconnectionHandleris no longer exported. - A failed
connectthrowsUTDStreamException(codenetwork) instead of the raw media-client exception; the engine's final refusal is still rethrown as is.connectionStatekeeps its values (errorafter a dial that gave up). controller.roomManagerkeepsroom,connectionState,dialingStoppedBy,stopDialing,resumeDialing,lastDisconnectReason,transportRttMs,onParticipantRemoved; it addssession(the SDK'sUTDRoom).- Unchanged for your app: every other public member of
UTDRoomController, the widgets, the join timings (first dial 4 s signal budget, retries 7 s, 25 s backstop, pacing 1 s up to 30 s), the writing-ban behavior (the SDK refuses to send while banned). - Two data-plane details: a repeated delivery of one message is dropped in the SDK (as the kit always did), and a send while the
writing ban is on is refused by the SDK (
_cosmetic_updatestops during a ban).
3.16.2 #
Patch on 3.16.1. No API change, nothing to do on your side.
- Fix: a room closed while the token request waits to retry no longer asks your
tokenProvideragain. Since 3.16.1 a provider that fails is asked again after 0.4 s and 1.2 s; the wait did not check that the widget was still on screen, so after the user left the kit asked your server again (an extra fetch per retry), and for a banned user the ban dialog could show twice (at once and 700 ms later). The kit now stops at the end of every wait, and also does not seat or dial when the room was closed while the token was on its way. WithallowAppKeyFallback: truea room closed while the provider was being asked no longer falls back to the app_key mint either. 3.15.0 and earlier asked once.
3.16.1 #
Patch on 3.16.0. One parameter added (UTDAudioRoom.allowAppKeyFallback), one behavior change (the first point). Same dependencies as 3.16.0
(utd_media_client ^2.10.0, utd_stream_sdk ^0.4.0): nothing new to install.
- Behavior change: a failing
tokenProviderno longer falls back to the app_key mint. Fixes an intermittent "can't enter the room" error: when the provider you pass toUTDAudioRoom(or set oncontroller.tokenProvider) failed for a moment, 3.15.0 and earlier minted with the publishable app_key behind its back, which an engine withappkey_identity_mint_disabledrefuses with a 403 that the user saw as the error screen. Now the provider is asked again twice (after 0.4 s and 1.2 s) and, if it still fails,onConnectErrorgets the provider's own error; a provider set only on the controller is used by the widget too. With no provider at all the widget mints with the app_key as before. To get the old fallback back, passUTDAudioRoom(allowAppKeyFallback: true)(defaultfalse). - Fix (tests only, no change on a device): the loudspeaker route keeper no longer lets the media client's device list read fail as an unhandled error in a run without the plugin (a widget test of your own app that joins a room could fail on it).
3.16.0 #
One parameter added, nothing removed or renamed. Same dependencies as 3.15.0 (utd_media_client ^2.10.0, utd_stream_sdk ^0.4.0).
Upgrading from 3.15.0 needs no code change.
- Fix: taking a seat no longer throws
PlatformException(PermissionHandler.PermissionManager, A request for permissions is already running).permission_handlerruns one request at a time. When your app asked for a permission of its own (Bluetooth when the room opens, for example) at the moment the user tapped a seat, the kit's microphone request failed, the exception came out oftakeSeat(and out of the default seat sheet) and the user was not seated. Now a failed request is logged and the seat is taken as if the prompt had been skipped:takeSeatreturnstruewhen the engine seats the user, and the operating system asks for the microphone itself when publishing starts. The kit's own requests also wait for each other (one at a time across every room controller of the kit). - New:
UTDAudioRoomConfig(requestPermission: ...)(andcontroller.seatController.requestPermissionwhen you use the controller without the widget). Give the kit your app's permission requester, aFuture<PermissionStatus> Function(Permission)(UTDPermissionRequester), and the kit's microphone and, on Android, Bluetooth requests go through it, so they wait in your app's queue instead of colliding with your own dialogs. The kit calls it only for a permission whose status is stilldenied, one permission at a time, and if it throws the kit carries on as above. Not given: the kit asks by itself, as in 3.15.0. A requester set on the controller is kept when the widget's config has none. See the README, "Permissions".- Your requester must complete: the take waits for its answer. The kit's next permission request (in any room) waits for it at most 60 seconds, then goes ahead.
- The type uses
PermissionandPermissionStatusofpermission_handler(the kit's^12.0.1). A later major version ofpermission_handlerwill come with a new major version of this kit.
3.15.0 #
Phase 0 of the voice-room plan. No public signature changed, but two behaviors change (the foreground-service notification is on by
default, and utd_media_client 2.10.0 merges foreground-service entries into your Android manifest: see the first point). Needs utd_media_client ^2.10.0 (published).
- The voice no longer breaks when the app goes to the background (Android). A voice room runs a foreground service
(a low-importance notification) while the user is in the room:
mediaPlayback("Listening in the room") for a listener, andmicrophone|mediaPlaybackwhile they are on the microphone, switching inside the same running service. A listener keeps hearing the room, and a speaker keeps being heard, for hours with the app in the background. Time limit: 10 hours counted from the moment the app goes to the background (UTDForegroundServiceConfig.maxDuration,nullfor none); then the kit turns the microphone off, frees the seat, leaves the room, removes the notification and callscontroller.onBackgroundLimitReachedso you can close the screen or show a message. If Android refuses the microphone type (the app is in the background, orRECORD_AUDIOis missing) the user keeps hearing the room, the kit turns the microphone off and callscontroller.onBackgroundMicrophoneRefused. The service also holds a partial wake lock and a Wi-Fi lock while it runs. Without one Android silences the microphone and cuts the network of a backgrounded app after about 5 seconds (measured on a Samsung A17): going to a chat app or minimizing the app made the voice break. The notification is removed when the user leaves, is removed from the room, swipes the app away, the kit is disposed, or the kit gives up reconnecting, and it stays up while the kit re-establishes a dropped session.UTDAudioRoomConfig.foregroundServicechanges the notification (title, text, icon) or turns it off (an app with its own service);controller.foreground.configdoes the same when you use the controller without the widget. Behavior change: it is ON by default, and an app that targets Android 14 must declare the Microphone and Media playback foreground-service types in the Play Console; the SDK'sdoc/staying-alive-in-the-background.mdhas the manifest, the permissions order and the answers. iOS: addUIBackgroundModes audio. The manifest entries come withutd_media_client2.10.0 and are merged into your app automatically, also if you turn the service off: an app that targets API 34 must complete the foreground-service declaration in the Play Console, or remove them withtools:node="remove"(see the SDK'sdoc/staying-alive-in-the-background.mdand the media client changelog). Needsutd_media_client ^2.10.0(it carries the service) andutd_stream_sdk ^0.4.0. After a recovery in 3.x the microphone is not turned back on by the kit (the user turns it on), so after a recovery the notification goes back to "Listening" until they do. - The audio settings the engine chose for this handset are applied (
audio_profile), starting with the AI noise suppression. The token request sendsdevice_manufacturerandandroid_sdk(Android), and every token the kit adopts (the kit's own mint, or one your backend minted and you passed toadoptTokenResponse) is read for the engine'saudio_profile.ns.model: rnnoisebecomes the field trialUTD-AiNs/Enabled,model:rnnoise,floor:N/before the audio engine is built (UTDAudioMode.fieldTrials; the engine is built once, at the first dial, so a profile that arrives later changes nothing; a trial you already set forUTD-AiNswins). A model this build does not have (df3,gtcrn) falls to the first supported rung; no profile means nothing changes. Needs the audio library ofutd_media_client2.10.0 that carries the noise-suppression stage to have an effect; with any other build the trial is ignored. - The room stays on the loudspeaker: it no longer drops to the earpiece when a speaker leaves a seat, a charger or a headset comes
and goes, or the connection comes back. Measured on a Samsung A17 with
dumpsys audio: stepping down from the seat set the audio mode and the speakerphone back (the output went to the earpiece), and a listener, who never sets the speaker, then heard the room low from the ear piece; plugging in a charger moved it to the loudspeaker for a moment and back. The kit now re-asserts the route (the loudspeaker, with a connected Bluetooth, wired or USB headset ahead of it) after a local track is published or unpublished, after a remote track is subscribed or unsubscribed (the first speaker arrives or the last one leaves while you only listen), after a reconnect, as soon as the connection is up (the join: a listener who joins a room where somebody already speaks has that track subscribed inside the connect, before any listener of the kit exists), and on every device change, twice (right away and 2 s later), and never moves the room to the earpiece by itself. The earpiece is an explicit choice:mediaController.setAudioOutput(UTDAudioOutput.earpiece)(kept through seat changes, devices and reconnects) andUTDAudioOutput.speakerto go back;mediaController.audioOutputshows the choice, andleave()resets it. The volume button (setSpeakerOn(false)) still mutes the room and the kit then leaves the route alone. The Bluetooth / wired / USB headset preference was reviewed in the code but not tested with a real headset. Together with the fix inutd_media_client2.10.0 (the cause of the reset). Published 3.14.x has the same problem: see 3.14.2. - A music / singing seat:
mediaController.setVoiceMode(UTDVoiceMode.music). In music mode the noise suppression leaves the voice alone; without it a singer is processed as speech and the song is clipped.mediaController.voiceModefollows what the audio library answered (it stays on speech with a library that has no such control), andleave()puts it back to speech (the native switch is process-wide).UTDAudioRoomConfig(showMusicModeButton: true)adds a music-note toggle to the default controls bar for a user who can speak; it is off by default. - Quality reports carry
profile_id,ai_ns_stateandns_cpu_us_per_10msin theaudioobject when the audio library has them (a library without the stage sends none of the three; the engine ignores a key it does not know). - Fix:
mediaController.isMicEnabledis false afterleave(). It used to stay true (the mute listener is detached when the user leaves, so nothing cleared it) for as long as the controller lived, so a screen reading it showed a microphone that no longer existed, and a controller that joined again started with a microphone it did not have.leave()now clears it. - A room closed and opened again no longer hides its seats. The engine counted
revper room and started again at 0 when a room reopened under the same name, so a kit that remembered a higher number threw every snapshot of the new room away. The engine now keepsrevgoing and sendsroom_epoch(which opening of the room). The kit forgets its rememberedrevwhenroom_epochchanges, and accepts the FIRST snapshot after a reconnect whatever itsrev(the guard is back on right after it): this also protects the kit from an engine that does not sendroom_epoch. Older engines keep working as before. - "Muted by the host" no longer blinks away.
mediaController.mutedByAdminwas cleared by the 3 s recovery tick whenever the local mic read as live, so about 8 seconds after a host mute it could disappear while the user was still muted. It now holds until the engine really unmutes the user: the host's unmute message, the local track's unmute event, or, after a RECONNECT (once), a live mic. Leaving the seat and changing room clear it as before. A mute event never sets it. - A writing ban is enforced at the engine, and the kit says so (S-05).
PUT /rooms/:room/chat-bansnow takescanPublishDataaway from the banned member at the media server. That stops ALL the data of his device, not chat alone: chat,_cosmetic_updateand anything the app sends withsendRoomMessage/sendTargetedMessage. He still hears, sees, holds his seat and his mic. The media server drops the packets WITHOUT an error, so the kit reads the permission at the device before it sends:sendMessageadds nothing to the sender's own list (before, the banned user saw a message nobody received), publishes nothing, and says why onchatController.lastSendReason(chat_banned);_cosmetic_updateis not sent while banned (UTDRoomController.dataSendBlocked). The room's_chat_banslist still silences him at every receiver (both layers work together). The comment lock stays at the receiver, as before.canPublishDatais read only once the permissions are loaded (canSubscribetrue): the media client's default all-false object never counts as a ban, and a send before that goes out as usual. Limits: a message over 500 characters is refused at the SENDER (sendMessagereturnsfalse,lastSendReason=message_too_long, nothing appears locally) and dropped at every receiver; a member's sixth message inside one second is dropped at the receiver (chatController.inboundLimits). The rate applies to a PROVEN sender only: a line from your backend orsystemhas no proof of a sender and is judged on length alone. The window runs on a stopwatch, so a wall-clock change cannot silence anybody. Chat goes straight between devices and the engine stores nothing, so the receiver is where a limit can be enforced. If your app sends longer messages than 500 characters, shorten them. - A server-owned project says so. New projects start with
participant_attrs_server_owned=true, so the media server refuses the kit writing a user's avatar, frame or name from the device (userAttributesofconnect,updateSelfAttributes). That used to be a debug log line only; now the first refusal in a session is an integration error (level SEVERE, also in release builds) that says to sendattributesfrom your backend when it mints the token. Once per session (a redial after a drop is the same session). Other write failures stay quiet.generateToken(attributes:)(the development tool) sends them underattributes; the engine accepts them only from a server withX-App-Secret, so a real app does this in its backend. With only an App Key it fails with a clear integration error ("needs your server secret") and aUTDTokenExceptionwith codeattributes_require_server_secret, not a "service not available". - The kit now runs on
utd_stream_sdk(S-12 a). Recovery after a drop, user-token renewal, quality reports and the seat actions are the SDK's code; the kit keeps its own HTTP stack and hands it over. No public signature changed (rejoinPolicy,autoRejoinMaxAttempts,onRejoinFailed,takeSeat/moveSeat/leaveSeatreturningbool,lastSeatError,UTDTokenRefresher,UTDQualityReporter). Needsutd_stream_sdk ^0.4.0(published). Two things you can see:lastSeatErrorcarries the engine's code for every refusal. Before: onlyconflict,timeout,engine_busy,connecting,not_connected,permissions_pending, andnullfor a 403 or a locked seat. Now a 409 "Seat is not available" isseat_taken, a locked seatseat_locked, a reserved oneseat_reserved, "Already seated"already_seated, a 403forbidden, and so on (the list is in the engine's error-codes reference; an engine that sends nocodegets the same codes worked out from the message). A bare 409 with no message is stillconflict. If your app branches onconflict, also handleseat_taken,seat_locked,seat_reservedandalready_seated.lock,unlock,kick,muteandunmutepublish their reason onlastSeatErrortoo.- The first send of a take / move / leave has its own 5 s timeout (it used the client's 8 s, which left no room
in the 14 s budget for a repeat after a first timeout). Three sends that all time out end at about 11 s.
Recovery after a drop keeps the 3.x table exactly: with the default policy (1 s to 30 s, 10 attempts) the dials
span 151 s whether the dial or the token mint fails (a test measures it). What changed, as improvements: two 401s
in a row on the mint end recovery; a 403, 404 or 422 from the mint is final at once (it used to be repeated);
Retry-Afteron a 429 is honoured; a dial that returns without the room being connected counts as a failed attempt and the loop goes on (it used to stop).leaveSeatgoes at once and cancels a take / move that is still waiting (for the connection, a permission dialog or its turn): nobody is seated after asking to leave. New transitive dependency:utd_stream_sdkbringsweb_socket_channel ^3.0.0(the SDK's realtime plane; the kit does not use it).takeSeatandmoveSeatof different seats made at the same moment now run one after the other. Same-seat double taps are still one request. Quality reports are the SDK's reporter (same wire, golden files). The double report of an app that runs an SDK session AND the kit on one identity ends only when the kit runs on the SDK's session (S-12 b).
UTDRoomControlleris split into one class per job (S-12 b, internal; no public signature changed). The speaker flow, bans, roles and the chat lock now run in the SDK'sUTDRoomOps(needsutd_stream_sdk ^0.4.0, same order as above); the invitation flow, token minting, participants/roles, mute tracking, session wiring and the API clients are kit classes of their own. Same wire, same return values, same callbacks. The controller file went from 2722 lines to 1645 (876 lines of code without comments and blank lines). Upgrade guide: nothing to change. One thing for apps that test against the kit's source: the "comment-lock loop" tests used to read the controller's text; they now assert the behavior (utdIntegrationErrorSinkfires once for a long loop and never on normal use). Details: README, "SDK or UIKit?".- Internal, no public change (S-12 c, first steps): the participant list and the chat now depend on a small interface
(
UTDRoomFeed) instead of the room manager, and a second implementation over autd_stream_sdksession exists (UTDSdkRoomFeed). It is not used yet: the kit still connects through its own room manager; the list and chat move onto the SDK's connection only when the connection itself does (a later step). A shared contract test runs the same cases on both. Also: a renewal or a redial now mints through the publicgenerateToken, so an override of it is honored. - The speaker stays on the media audio profile (Android). The kit passes
UtdmClient.initialize(mediaProfileWhilePublishing: true). Until nowutd_media_clientmoved anyone holding the microphone toMODE_IN_COMMUNICATION(a phone call) and the kit put it back afterwards. Trade-off: the echo canceller must cope with the music-path output delay itself; check ERL/ERLE per handset after upgrading. iOS is unchanged. Mute stops the capture (pinned by a test inutd_media_client), it does not send silence. - Why a seat action failed.
UTDSeatController.lastSeatErrorcarries a reason code for every failure: the six classic ones (connecting,not_connected,conflict,timeout,engine_busy,permissions_pending) and the engine's own (seat_taken,seat_locked, ...; see above).takeSeat/moveSeatstill returnFuture<bool>exactly as before. - Safe repeats. A take / move / leave that gets no answer or a 408/500/502/503/504 is sent again (two more sends,
400 ms then 1.2 s apart, inside 14 s) with the same
Idempotency-Key. 4xx and 429 are never repeated. On a final timeout the kit resyncs the seats.UTDSeatApi.takeSeat/moveSeat/leaveSeatgot an optionalidempotencyKey;UTDApiClient.postan optionalheaders. If the first send of a take ran but its answer was lost, and an engine without Idempotency-Key support answers the repeat409 Already seated, the take counts as success after the seat list confirms it (without an earlier send the same 409 staysconflict). The 14 s budget caps the whole action (a repeat's network timeout is cut to the time left). 408 is the one 4xx that is repeated.mediaProfileWhilePublishingis a process-wide setting: the lastUtdmClient.initializewins. An engine that does not know the header ignores it, and repeating against it is harmless (take on the seat you hold, move to the seat you are on: no-ops). - Seated but cannot publish. After a take the kit checks that the media server lets the local user publish. If it
does not within 2 s (or the engine answered
permissions_pending: true) the kit calls the newPOST /api/v1/rooms/:name/seats/reassert(up to 3 times, 2 s apart), then reportspermissions_pending. An engine without that route (404 with no JSON body, 405, 501) is remembered and not asked again, so an old engine changes nothing. Needs enginestream/phase0-stabilityor later for the route itself. - Permission dialogs wait for the connection. The microphone and Bluetooth prompts used to be raised BEFORE the
kit waited for the room to connect. They now come after, only while the app is in the foreground
(
utdMayPromptForPermission). Same rule as the host app guard that existed since 2026-09-22; any app can drop its own copy. - Tests:
test/seat_phase0_test.dart. - Neutral wording (C-02).
UTDAudioRoomConfig.sectionWidgetis the generic name of the slot between the seats and the messages;pkWidgetstill works as a deprecated alias (effectiveSectionWidgetis what the room shows) and is removed in 4.0. Doc comments and examples no longer name any app business concept. The old attribute key names (fr,frt,name_color_name) are only READ, inattribute_keys.dartand the two published model files; the kit writes the short colour keyncoloras decided on 2026-11-16.
3.14.2 #
Hotfix. No API change, nothing to do on your side.
- The room no longer drops to the earpiece after a speaker leaves a seat, or when a charger or a headset comes and goes. The audio
library re-applies its own audio configuration whenever the number of audio tracks changes (a speaker takes or leaves a seat, you
included) and the phone moves the output when a charger is plugged in or a headset is removed. Each of those could leave the room on the
earpiece, low, until the next join (a listener heard the room quietly from the ear piece after somebody stepped down). The kit now puts the
route back (the loudspeaker, with a connected Bluetooth or wired headset ahead of it) after each of those, and also when the first speaker
arrives or the last one leaves while you only listen (a remote track subscribed or unsubscribed: the same reset happens there), twice: right away and once more
two seconds later, when the native side has finished. The check also runs as soon as the connection is up (the join and every reconnect), because a listener who joins a room where somebody is already speaking has that track subscribed inside the connect, before any listener of the kit exists. On the audio library of
utd_media_client2.9.9, which remembers the device it selected and ignores a request for the same one, the check that follows a change of tracks or of the connection takes one short step through the other device and back (the sound is on the earpiece for about 0.2 to 0.4 seconds, measured on a Samsung A17: 166 to 226 ms on the earpiece, 176 to 374 ms between the two calls; it is put back even if the step fails) so that the route is really applied; a device coming or going is checked without the step. The Bluetooth / wired headset preference was reviewed in the code but not tested with a real headset. It does nothing while the room is muted with the volume button.
3.14.1 #
Hotfix, published on 2026-11-17 and carried here. No API change, nothing to do on your side.
- The default sheets (member list, speaker invitations, ban management) opened with an assertion.
UTDAudioRoomnever provided theUTDRoomScopethose sheets read their theme and strings from, so tapping the member list in the controls bar threw ("No UTDRoomScope found in context"). The room now provides it (theme, strings, controller, seat-name flag, host seat, room owner). Apps that supplied their own sheets, or wrapped the room in their ownUTDRoomScope, are unaffected.
3.14.0 #
Join latency. Additive API; the one behaviour change is the first dial's signal budget (below). Needs
utd_media_client ^2.9.9 as before. Upgrade guide: add one call where your rooms list appears; nothing else is
required (see "Upgrading").
- Room list warm-up:
UTDRoomController.warmForRoomList()/stopWarmingRoomList(). Call the first when the rooms list appears (again on refresh: it only extends the window). It warms DNS + TCP + TLS of the token host and of the RTC edge, renews that every 12 s while the list is up, and stops by itself after 45 s without another call, onstopWarmingRoomList(), or when the app leaves the foreground. It sends unauthenticated HEAD requests only: no token, no room, no participant, no audio. The RTC engine dials its own WebSocket and builds its own peer connection from the join response, so the signal socket and ICE cannot be opened before the tap; what is removed is the cold handshake of both hosts.warmUp()gainedrtcUrl:(also onwarmForRoomList) to name the edge on a first launch, before any join has taught the kit one; an edge remembered from a join always wins. - Warm-ups are no longer repeated: the same host is not warmed again within 10 s, and concurrent calls share one request.
- First dial gives up at 4 s instead of 7 s (
UTDConstants.rtcFirstSignalTimeout). The SDK applies the budget to each connect phase; a first dial that was going to fail sat out the full 7 s before the retry began. Retries keep 7 s. Trade-off: a first dial whose single phase takes 4-7 s on a very slow network now fails and is retried instead of finishing. It is not raced against a second dial: both would carry one identity and the engine closes the older participant of an identity, so a late winner could evict the dial that had already won. - Join timeline in release builds.
UTDJoinTimeline.enabled = true(default: debug only) prints ONE line per join:[JOIN_TT] summary room=<id> tokenReq=..ms tokenResp=..ms dial1=..ms [dial1Failed=..ms dial2=..ms] connected=..ms firstAudio=..ms.connectedcovers signal socket + join response + ICE together: the media client does not expose them apart.UTDJoinTimeline.sinkredirects the line. - Name colour key is now
ncolor. The engine accepts participant-attribute keys of at most 8 characters in what the server writes, andname_color_nameis 15. The kit publishesncolor(aname_color_nameentry inuserAttributes/updateSelfAttributesis renamed on the way out; an explicitncolorwins) and readsncolor, falling back toname_color_name, so peers on older kits still show their colour. New getternameColorNameonUTDParticipantandSeatState, andUTDAttributeKeys.fr,frt,avatarandnameare unchanged. Apps that readattributes['name_color_name']directly should switch tonameColorName.
Upgrading from 3.13.0: no code change is needed and nothing was removed. To get the faster join, call
UTDRoomController.warmForRoomList() when the rooms list appears and stopWarmingRoomList() when it closes (safe
from main() before runApp; it never throws). The one visible change without that call: the FIRST connection
attempt of a join now gives up after 4 s per phase instead of 7 s and is retried at once with the previous 7 s
budget. If your users are on networks where one phase regularly takes 4 to 7 s, stay on 3.13.0 until you have
measured with UTDJoinTimeline.
3.13.0 #
New, additive: a stable error-code catalog and an onError(code, message) callback. Nothing that
existed changes meaning: no exception type, status code or message the kit produced before is different, and
an app that ignores all of this behaves exactly as on 3.12.0. Needs utd_media_client ^2.9.9 as before.
What is new:
UTDErrorCode: every code in the engine's Error Reference (section 20 of the integration guide), spelled as the engine sends it, plusnetwork_error(no HTTP response at all) andunknown.utdErrorInfo(code)returns aUTDErrorInfo:message(lang)(safe for the end user),hint(lang)(for the developer),action(fixIntegration,retryWithBackoff,doNotRetry,refreshToken,contactSupport) andretryable.langisen,arorhi; anything else gives English. Hindi currently answers in English: the Hindi texts are written but not yet reviewed by a Hindi speaker, andUTDErrorCatalog.hindiReviewedstaysfalseuntil they are.utdErrorCodeOf(error): the stable code of any error the kit raised,unknownwhen it carried none.UTDAudioRoom(onError: (code, message) { ... }): called IN ADDITION toonConnectError(never instead of it) when the room fails to connect, and withuser_bannedwhen the user is banned.messageis the catalog text in the app's locale. Look the code up withutdErrorInfofor the hint and the action. An exception thrown by youronErroris caught and logged; it never stops the kit's own retry/exit UI.UTDProjectSuspendedException.reason: the cause (balance_exhausted,unpaid_invoice,manual_admin,abuse) when the engine sent one. The engine sends it only to a request that proved the project's Server Secret, so a build running in your app normally seesnull. Never show it to an end user.
What changes in behaviour, stated precisely:
project_suspended_balance|unpaid|manual|abuseare treated as the suspension they are: aUTDProjectSuspendedException, terminal, with the same end-user text. Before, an engine that sends them would have been classified as an ordinary 403.- A refusal that carries one of the codes new in the catalog and that no retry can fix (
invalid_credentials,missing_credentials,client_secret_disabled,invalid_parameter,device_id_required,room_full) now stops the redial instead of backing off forever (origin_not_allowedandfeature_not_enabledare not in that list: a 403 was already final for them). Codes the kit already handled (token_expired, the 403 family, ...) behave exactly as before. Rate limits (429) and 5xx stay retryable, with ONE exception:max_concurrent_roomsandmax_concurrent_recordingsnow stop the redial (the engine and the catalog say do-not-retry: they only clear when the user ends another room, so redialing on a schedule can never succeed and only adds load). Every other 429, including the genericrate_limited, keeps backing off.rate_limitedandmedia_update_failed(502, retry after a short backoff) are in the catalog. - Intended change from 3.9.0: three more codes stop the redial instead of retrying.
session_superseded(401, another device took the session),idempotency_key_reused(409) andmissing_room_or_user_id(422) were retried with backoff in 3.9.0, but the engine's Error Reference says do not retry them (retrying cannot succeed and only adds load). They are now final like the six codes above. The error still arrives as the same exception type with the samecode, andonErrorreceives it. An engine that sends nocodeis unchanged. - Engines that predate the codes send no
code: nothing changes, the legacy text fallback still applies.
Upgrading from 3.12.0: bump to ^3.13.0. Nothing else is needed. To use the codes, pass onError and branch
on code, never on the message text (it is translated and can be reworded). The engine side of the table is in
the integration guide, section 20.
3.12.0 #
-
Fix:
leave()now cancels a join that is still in progress.leave()closed only the session that existed when it was called. A join still between its token and its dial went on to dial AFTER the leave, and re-armed automatic recovery (_rejoinStopped = false), so the session the user had just left came back and the engine sawDUPLICATE_IDENTITY(measured on one user: new entries 2.4 s, 4 s and 9.9 s after the leave, the old one not yet active). Now:leave()during the token mint (afterprepareConnect(), beforeconnect()): theconnect()that follows returns without dialing and without re-arming recovery.leave()during the dial: the dial is cancelled. It is not retried, does not reporterror, the session it was opening is closed, and none of the room state (seats, listeners, active room) is installed.- A new join after a
leave()works as before: the widget callsprepareConnect()for every join, and a directconnect()with noprepareConnect()is never cancelled. UTDAudioRoomno longer reportsonConnectionChanged(true)(nor arms PiP) whenconnect()returned becauseleave()cancelled the join.- No API change. If you call
prepareConnect()yourself and thenleave()beforeconnect(), callprepareConnect()again when you start the next join.
-
Fix: taking a seat while the connection is re-dialing no longer fails instantly.
takeSeatandmoveSeatreturnedfalsethe moment the state wasconnectingorreconnecting, without asking the engine. On networks that re-dial often (a measured case: users in Pakistan) people saw "Could not take the seat" although the engine had refused nothing. Both now wait for the session, up to 8 seconds, then make the request.connectedis unchanged: no wait, no extra delay.disconnected/error: stillfalseimmediately (a session that is gone will not come back by waiting).- Wait ran out:
false, and the engine is not called. - New, additive:
UTDSeatController.connectWait(defaultUTDConstants.seatConnectWait= 8 s) sets the limit.Duration.zerorestores the old no-wait behaviour. - New, additive:
UTDSeatController.lastSeatError(ValueNotifier<UTDSeatError?>). After afalsecaused by the connection it holdsUTDSeatError.code=connecting(still dialing after the wait) ornot_connected(session ended), withmessage/messageAr/retryable. It isnullwhen the call succeeded. (Engine refusals carry their own code too: see "The kit now runs onutd_stream_sdk" above.) - The built-in seat sheet now shows
UTDRoomStrings.seatConnecting("Connecting… please try again" / "جارٍ الاتصال… حاول مرة أخرى") forconnecting. The new string has an English default, so code that buildsUTDRoomStringsdirectly keeps compiling. - One request in flight per take / move: if
takeSeat(1, u)is called again while the first call is still waiting or in flight, the second call gets the first call's result and only one POST is sent. - If the controller is disposed or the room is switched while a call is waiting, it returns
falseand sends nothing. - Public signatures are unchanged (
Future<bool>). Upgrade: nothing to do; to show your own message, readseatController.lastSeatError.valuewhentakeSeatreturnsfalse. utd_live_room_kitis not affected: its stage requests have no pre-connect gate.
-
Fix: a late
leave()of an old room no longer cancels the PiP, or closes the minimize overlay, of the room the user joined next. The system PiP registration (Floating, Android 12+) and the minimize overlay are one object for the whole process.leave()/dispose()of room A, arriving after room B was already active, calledcancelOnLeavePiP()and dismissed the overlay: B lost PiP although the user never left it. NowUTDPipController.disarm()/dispose()andUTDMinimizeController.dismiss()act on that shared state only when their controller is the active room, or no room is active. Their own per-controller state is reset either way. A normalleave()still cancels PiP and dismisses the overlay. New read-only getterUTDRoomController.ownsProcessWideState. No other API change.
3.11.0 #
-
New, additive: a user the server banned from writing is silent in the room, and every chat message now says who the room can prove sent it. The new behaviour is the ban itself, and it applies on top of anything an app configured. What changes for existing code is listed below, including the one thing that does (the way
canReceiveChatFromis stored).What is new:
UTDChatMessage.senderIdentity(nullable): who the ROOM proved sent the message. For a message a participant published and the SDK resolved, that is the identity the transport authenticated, and a_senderinside that payload is ignored (only in that case, because only then does the kit know who the sender is). For a frame with no participant (a user's RESTsend-data, which the engine stamps) it is the_senderthe engine wrote.nullmeans the room has no proof of a sender, which is what a message from your own backend looks like. It is not part of the wire payload andfromJsonnever reads it.senderUserIdis untouched: still exactly what the sender wrote, so an app whose room identity differs from its user id (user_123vs123) keeps reading the id it always did.UTDDataFrame.verifiedSenderexposes the same value on the raw frame.UTDChatController.canReceiveChatFromSender(senderIdentity, senderUserId): a new, extra incoming gate that is given both ids.- The backend can list identities that may not write in the room's metadata (
_chat_bans, written through the engine'sPUT /rooms/:name/chat-bans, server secret only). The kit drops chat from a listed sender, host included, refuses to publish for the local user while he is listed, and exposesUTDRoomController.chatBanned(aValueNotifier<bool>) so the composer can disable itself;canICommentincludes it. UTDChatBanListis exported for apps that want to read the list themselves.
What does not change:
senderUserId, the message wire format, and the behaviour of any room whose backend never writes_chat_bans(the list is empty and nothing is dropped). If your app usesUTDChatController.canReceiveChatFrom: it is still called withsenderUserId, and an app that sets it still REPLACES the kit's own comment-lock gate (you decide what is shown in a locked room, including everything). Two things differ, both worth knowing:- The kit used to store its comment-lock gate in that field; it now keeps it in a separate kit-owned hook
(
commentLockGate) andcanReceiveChatFromis a getter/setter. Reading it still never givesnull: with no app gate the getter returns the kit's comment-lock gate (wrapped to the one-argument shape), so code that chains onto it (final prev = chat.canReceiveChatFrom; chat.canReceiveChatFrom = (id) => prev!(id) && mine(id);) works as before. Assigningnullputs the kit's gate back. - The writing ban applies on top of your gate, always (
banGate, kit-owned): a callback that shows everything can no longer show a banned sender. That is the only thing your callback can no longer override. If you set bothcanReceiveChatFromand the newcanReceiveChatFromSender, a message must pass both.
Minimum
utd_media_client2.9.9. This kit requires it (utd_media_client: ^2.9.9inpubspec.yaml), because it readsDataReceivedEvent.senderIdentity, which 2.9.9 added. The SDK must be published before this kit can resolve.Behaviour changes for existing code, stated as such:
UTDDataFrame.senderIdentity(and with itUTDChatMessage.senderIdentity) can now be filled for a participant's frame the SDK did not resolve (it came through withparticipant == null, and this field used to benullfor it). It is now the identity the packet itself names. It is stillnullfor data sent from the Server API, andUTDDataFrame.verifiedSenderfalls back to the engine's_senderstamp only when it isnull.UTDChatController.canReceiveChatFromin the audio kit returns a gate instead ofnullbefore the room is connected (it used to benulluntil the kit wired its own gate at connect). The getter now exists from construction and returns the kit's comment-lock gate while the app has set none, so reading it is nevernulland chaining onto it still works.
What it needs, and where it falls short, said plainly:
- The ban is enforced only by kits that include this change, and a REST frame is attributable only when the
engine stamps
_sender. Against an engine without the stamp such a frame has no proof of a sender and is treated as a message from your backend. _senderis a reserved name on the engine's bearersend-datapath: the engine replaces whatever an end user sends in it.- A participant the SDK cannot resolve at that moment (the join race, just after he left, the first moments of a
(re)connected session) arrives with no
participant. This kit readsDataReceivedEvent.senderIdentity(utd_media_client2.9.9+), the identity the packet itself names, so such a message is still attributed to its real sender and a_senderhe writes is never consulted: the gap is closed once the kit runs on SDK 2.9.9 or later. On an older SDK there is no such identity and the kit falls back to the_senderin the payload, which the sender chose: he can then name anyone, escape the ban for those messages and write in another user's name. The kit'spubspec.yamlrequiresutd_media_client: ^2.9.9, so the SDK must be published first. - The server secret must never be shipped inside a client app: anyone who has it is your backend, and nothing in the room can tell otherwise.
Why it lives where it does: the SFU cannot filter a data-channel message and
canPublishDataalso carries gifts and reactions, so the ban is enforced where the message lands. The list is in ROOM metadata, which only the engine writes (a participant can rewrite his own participant metadata, so it could not hold a ban). An end date that cannot be read is a ban without an end; a list that cannot be read at all leaves the list as it was. See the engine'sdocs/chat-bans.md.
3.10.12 #
-
Reports now carry the audio ROUTE the sample was captured on —
bluetooth,wired-headset,speaker,earpiece, orother.The first hour of
mic_rmsdata raised a question it could not answer on its own: the same handset reported a 0.020 microphone floor in one window and 0.181 in another, minutes apart, in one session. The only thing separating the two in the row was the jitter figure — which happens to fingerprint the capture path. That is an accident of the data, not a measurement, and no query should lean on it.The route turned out to be a Bluetooth headset for BOTH regimes, which killed the obvious reading: the same headset gave the cleanest floor of the session AND the worst. Something else decides which, and without the route on the row that question cannot be asked at all.
🔒 The device LABEL is deliberately not sent — headset names carry people's names. The category answers the question; the name does not.
-
Note on reading
mic_rms: it is the mean over the whole window, so a window that contains speech reads high no matter how quiet the room is. A noise floor means averaging it over windows wherebitrateis low — i.e. where the encoder had nothing but silence to send. Reading it ungated says "this person talks", not "this microphone is noisy".
3.10.11 #
-
A microphone-floor number that survives on the platform branch.
When a handset is on the platform's voice processing, WebRTC's canceller stands down and
erl/erlearrive null on every sample. Measured across two hours of live traffic: the software branch reported figures on 186 of 242 samples, the platform branch on 0 of 161. The branch where we hand the work to the device was the branch with no instrument on it — a phone whose built-in processing does nothing looked exactly like one where it works, and the first sign either way was a user complaining. Which is how it surfaced.Reports now carry
mic_rms: the mean microphone amplitude over the whole window, silences included, from the cumulative energy counters. Read it as a noise floor — a suppressor that works lets the microphone go quiet between words; one that is not running carries the room into every sample. It works on both branches, so the two are finally comparable. -
Requires
utd_media_client ^2.9.6— the release that stops a failed subscriber connection from resuming in a ~1 s loop forever, and gives the video renderer a single writer for its track. The floor is raised rather than left at^2.9.4because a trackedpubspec.lockotherwise holds an app on the old resolution while itspubspec.yamlsays it is current.
3.10.10 #
-
A host who muted and unmuted their microphone was never heard again. "Speaker off" had two independent implementations: one disabled tracks and kept its own flag, the other disabled publications and kept another. Neither read the other, so a room muted through one path and unmuted through the other left a speaker silenced with every flag reading "unmuted" — permanently, because nothing touched that publication again. There is now one owner, and it works at the publication level: a publication that has not been subscribed yet has no track to disable, which is how a newcomer's audio escaped the mute entirely.
-
With the speaker off, anyone who started talking afterwards was heard at full volume. Subscribing was handled and the toggle was handled; the event in between — a participant already in the room who unmutes — was handled nowhere. It is now, in both directions: it applies the mute, and it heals a publication left disabled by an earlier one.
-
Remote camera and microphone state updates on the event, instead of on a 2-second poll. A camera going on or off used to take up to two seconds to appear, which on two devices side by side reads as not appearing at all. The poll stays as the backstop for an event that never arrives.
3.10.9 #
- A minimised room could become unreachable.
restore()left the minimised state before validating the route, so a missing route name gave: floating window gone, no room opened,isMinimizingfalse so the window never returned — with the connection still live underneath, audio playing, and the user unable to see the room, reach it, or leave it. The check now runs first. (Found inutd_live_room_kit, which ships this file byte-identically.)
3.10.8 #
-
Requires
utd_media_client2.9.4, which asks the audio engine for hardware echo cancellation and noise suppression off while keeping Android's call capture path — the combination that lets the software canceller converge on handsets where it previously did nothing. Measured across one live room on three phones: 8-12 dB cancelled on a Samsung, nothing at all on a Redmi Note 9, and both failing phones transmitting room noise continuously because the suppressor was not running either.This needs one line in your app (the option lives in our fork of the webrtc plugin; without it the build simply falls back to the platform canceller):
dependency_overrides: flutter_webrtc: git: url: https://github.com/UTD-Stream-Engine/webrtc-utd.git
3.10.7 #
-
Echo cancellation moves back to the platform's own canceller, via
utd_media_client2.9.3. A publisher already runs in Android's communication audio mode, which is where the built-in canceller lives, so the module now keeps its hardware AEC and hardware noise suppressor instead of handing the job to software.Why, in one line: measured across one live room on three phones on the same build, the software canceller cancelled 8-12 dB on a Samsung, nothing at all on a Redmi, and reported nothing on a third. Software cancellation depends on the device's audio delay, which is not ours to fix. The platform path is the one every phone vendor tests for its own call app. A device that reports no built-in canceller still gets the software one automatically, so every handset ends up with exactly one.
3.10.6 #
- Voice is published at 48 kbps again, not 24. We had halved it to save a listener's data — an eight-seat room costing ~100 MB an hour instead of ~200. Measured on a live broadcast on 2026-09-20: 20-23 kbps out, zero packet loss, and the person listening reporting the voice was not clear. A clean network and a thin voice is an encoder ceiling; nothing downstream recovers what was never encoded. A voice room is not the place to economise on the voice. DTX still stops transmission during silence, so a mostly-listening room does not pay the full rate.
3.10.5 #
- Every quality report now says which handset produced it —
device_model,os_name,os_version, read from the device itself and cached once per process. The echo telemetry added earlier today caught two handsets in one live battle, on one build, with opposite results: one cancelling 6-9 dB, the other cancelling nothing for its whole session. Nothing in the report said what either device was, so the obvious next question — which handsets fail — had no answer. Your app can still pass these togenerateToken; this is what answers when it does not.
3.10.4 #
-
Two more causes of "echo" in a PK battle, both measured on a live Egypt ↔ Bangladesh battle.
Each host was receiving the other one twice. A battle makes every host join the opponent's room to publish into it — and the kit was also SUBSCRIBING there, to a microphone and camera it already receives at home, where both panes render from. Two copies of one voice over two connections with two jitter buffers: the second arrives tens of milliseconds late and sounds exactly like echo. No echo canceller can remove it, because it is not echo. The cross-room session is now publish-only, which also stops pulling the opponent's video stream down a second time.
The publisher's audio profile. Requires
utd_media_client2.9.2: a device with a microphone open now runs on Android's voice path, where the canceller can align to the delay, instead of the music path, where on some handsets it cannot and cancels nothing. -
PK, from an integrator's report on the 3.6.1 build:
- the battle backdrop was painting OVER the chat, the gift rail and the controls bar — the widgets were mounted and taking taps behind an opaque rectangle, so for the length of a battle nobody could send a gift. It is now a separate layer, below the chrome.
- host names and pictures arrive with the battle. A missing name is now empty instead of the host's identity: invites read "48 invited you to a PK battle" and camera-off tiles drew a circle with "4" in it.
- the End-battle control is an icon on the controls bar, shown only to the two hosts in the battle, instead of a text button over the chat.
- a 3 · 2 · 1 · GO countdown at the seam, anchored on the engine's start time so both rooms count together. The VS badge clears with it.
3.10.3 #
-
Echo, on every Android 10+ device with a microphone open. The kit runs the media audio profile so a room is not treated as a phone call — and on Android 10+ that left NO echo canceller running at all: the native audio module announced a built-in AEC (so libwebrtc's AEC3 stood down) while the built-in one never engaged under the profile's
MODE_NORMAL. Measured on a live PK on 2026-09-20: 112 quality samples, microphone live,echoReturnLossreported on zero of them. Fixed inutd_media_client2.9.1, which this release requires.Rebuild your app against this version. No code change on your side, and nothing to configure. If your app reports quality telemetry,
audio_erl_dbstarting to arrive is the proof the canceller is running.
3.10.2 #
A ban was something the user could decline by not tapping.
The banned dialog was awaited BEFORE the room was left, so a banned user stayed connected — hearing the room, and on a seat still able to speak — for as long as the dialog sat there. Tap nothing and leaving never happened at all.
A ban is not a confirmation. The room is left, the route popped and the host's
onClose teardown run FIRST; the notice then reports what already happened,
over whatever screen the user landed on. The notice is shown on a context that
outlives the pop — the app's navigator key when one is wired, otherwise the
room navigator captured before teardown.
Covers the minimized case too, which had the same order.
3.10.1 #
One more echo field: level.
The first real handset to report from 3.10.0 was a host alone in a room for nine minutes — every report from its own microphone, publishing — with the media audio profile applied and both echo figures null on all 28 reports.
That reads two ways: either the software echo canceller is not running (which
would be the echo itself), or the media-source stats report never arrives and
the echo figures were measuring nothing. From the outside they look identical.
audioLevel rides that same report. A level with no ERLE means the report
arrives and the canceller is silent; neither means the report never came. One
field, and the ambiguity is gone.
It is worth having anyway: a microphone capturing nothing reads zero here, which is the first thing to check when someone says nobody can hear them.
Also exposed on UTDQualityReporter.reportSample as audioLevel.
3.10.0 #
A quality report was resetting the token renewal it depended on, four times a minute, for as long as a user stayed in a dead session.
Measured on production over three days: 17,553 expired-token refusals, 17,506
of them on POST /api/v1/quality — this package's own 15-second telemetry
timer — across 41 identities. One identity was refused 2,879 times over 44
hours without a single re-mint ever reaching the engine.
UTDTokenRefresher's backoff spreads five attempts over ~2.5 minutes, but every
privileged refusal calls it directly. A caller knocking every 15 seconds
restarted the chain from zero before it could space anything out: the backoff
existed and never ran. The report that could not matter was starving the
renewal that could.
- Telemetry no longer asks for a token.
UTDApiClient.posttakesbackground: true, and an expired token is not renewed for such a request. A call the user is waiting on still renews immediately, every time, and anything that does not declare itself counts as a user call. UTDQualityReporterstands down when it keeps failing — the gap doubles per consecutive failure up to five minutes, and one success restores the 15-second cadence. A dead session now costs ~12 refused requests an hour instead of 240, on the user's battery and data. New:consecutiveFailures,isBackingOff,nextAttemptIn.- A failed renewal is now visible. It happens in the host app's mint path
(
tokenProvider, or your backend) and never reaches UTD's servers, so it appeared in no log anyone owned. Reported once per chain throughutdIntegrationError— SEVERE, and it survives a release build.
setCommentsLocked() had no protection against a UI loop. On 2026-09-18 one
device sent 10,568 lock/unlock calls in nine minutes — 19 a second,
alternating — every one refused 429, every one swallowed by a debug-only log.
Nobody could see it. There is now a floor of one call per second, and after ten
dropped calls the loop is reported through utdIntegrationError.
The floor is on the rate, never a no-op on the value: commentsLocked
mirrors the server, so if a _chat_lock broadcast is missed it is stale here,
and a host pressing "unlock" on a room that really is locked must still be able
to unlock it. A dropped call returns false.
The echo canceller now reports on itself. Echo has been reported for a week
and every diagnosis so far was read off the source, never measured on a
handset. Each quality report now carries profile_is_media (did the media
audio profile actually reach the native engine), plus erl_db and erle_db
from RTCAudioSourceStats while publishing — ERLE being how many dB of echo
the canceller actually removed. Joined against the device facts the engine
already stores, that answers "is echo cancellation running, and on whose
handsets" as a measurement rather than an inference.
No API removed. No behaviour change for a call a user is waiting on.
3.9.0 #
Speakers on the loudspeaker echoed — asking for the media audio profile was also switching every echo canceller off.
UTDAudioMode.enableMediaMode() calls UtdmClient.initialize(mediaAudioProfile: true)
for one reason: keep the OS out of the telephony profile so listeners are never
"in a call" — other apps keep the microphone (a WhatsApp voice note works with
the room open) and audio routes like music rather than to the earpiece. In the
SDK that flag also disabled the native hardware echo canceller and noise
suppressor, swapped the capture source to a raw microphone, and forced WebRTC's
own software AEC/NS/AGC off — so an on-seat speaker was publishing a completely unprocessed
microphone into the room.
Requires utd_media_client 2.9.0, where routing and processing are separated.
Nothing in this kit's own routing or session recipes changes: listeners keep the
media profile exactly as before.
- A dropped audio profile is no longer invisible. The media engine is built
once per process: if anything touches WebRTC before this kit, the profile is
silently discarded and the whole session behaves as a phone call, with nothing
able to repair it.
UTDAudioMode.engineAudioProfileIsMedianow exposes whether it was actually applied,UTDAudioMode.onAudioProfileResolvedreports it to the host app's analytics, and a failure is logged at SEVERE in release builds instead of only in a debug console.
3.8.1 #
Every request now says which kit sent it.
The kits identified themselves with nothing — Accept, Content-Type, X-App-Id,
X-App-Key and no more — so the engine could not tell a device on the current
release from one on a build from June.
That gap blocks a specific decision. The publishable app_key mint is the
impersonation path we are retiring, and it can only be closed per project,
after that project's app has actually moved to a server-signed token. Closing it
on an app that still mints with the key stops that app instantly. Without a
version on the wire, deciding which projects have moved is a guess — and a wrong
guess costs a paying customer their app.
Every request from both HTTP clients (the token host and the engine host) now carries:
X-UTD-Kit: utd_audio_room_kit/3.8.1
It is a label, never a credential: it names the library, and nothing about
the app, the user, or the project — those already have their own headers. That
is what makes it safe to keep in a server log, which matters here: the header
that used to answer this question, X-App-Key, had to be dropped from our access
logs because it was leaking live credentials.
Sent unconditionally on both clients on purpose. A device that only ever mints and a device that only ever acts in-room must both be countable; a header present on some calls and not others would undercount exactly the apps we most need to see. And a request arriving without it is itself the finding — that is an old kit.
Nothing else changed. Both authentication paths keep working exactly as
before: appKey is still accepted and still required by the widget, and
tokenProvider is still the optional server-signed alternative. No app needs to
change anything to upgrade.
kitVersion is pinned to pubspec.yaml by a test that reads the pubspec and
fails when the two disagree, so the version on the wire can never quietly drift
from the version that was published.
3.8.0 #
The kit now understands "no", and it stops knocking.
Two gaps, one root: the kit read the engine's refusals as prose instead of as a contract, and it had no way to say "this answer is final".
A suspended project is no longer knocked on forever #
The engine answers a suspended project with
{ "message": "...", "code": "project_suspended", "retryable": false }
and this kit read neither field. A 403 was classified by searching its
message for the word "ban" — "Project is suspended" contains none, so the
refusal became a generic "not available", the redial schedule kept its
30-second ceiling, and the client went on asking: 120 requests an hour per
device, forever. One suspended project produced 5,489 token requests.
Refusals are now classified on code and retryable:
project_suspended/client_suspended→UTDProjectSuspendedException(a subtype ofUTDServiceNotAvailableException, so code that already handles "not available" keeps working untouched).isClientSuspensiontells the two apart.user_banned→UTDBannedException, even when the message never says "ban".- Any
retryable: false, on any status and with a code this kit has never seen, is final too. 429and5xxare unchanged: they back off and retry, because backing off IS the answer to a rate limit.
code is read before the status code, so an engine that moves suspensions
off 403 needs no new kit.
An engine that sends neither field behaves exactly as it did. The old text
match still runs, but only when there is no code at all — so an app on a
not-yet-updated engine sees the same exceptions as before, and a not-yet-updated
app on the new engine still catches everything through
UTDServiceNotAvailableException.
Final means stopped, not slowed #
UTDRedialPacer could only ever slow down. A ceiling is the right answer to a
network that is down and the wrong one to an engine that has already given its
final answer, so the pacer can now be halted: halt() / isHalted /
clearHalt(), cleared automatically by a dial that connects.
The stop lives in the room manager, at the one place a session is opened — so an
app that calls connect() in its own loop is stopped by the same line that
stops the kit's own recovery. UTDRoomManager.dialingStoppedBy exposes the
refusal, resumeDialing() clears it (for the app that knows the bill was paid).
Recovery stops on the first final refusal instead of spending its remaining
attempts on an answer already in hand.
The user is told the truth, and the developer gets the details #
UTDRoomController.onDialingStopped fires once with the refusal, so the app
can leave the room instead of holding a spinner over a room that is never
coming.
The engine's suspension message is written for the developer — it explains
that settling the invoice restores service immediately. It is never shown to an
end user: the built-in connect-error view shows the new
UTDRoomStrings.serviceSuspended ("This room is temporarily unavailable. Please
try again later.", localised) with no Retry button. Showing an account's billing
state as if it were a personal block is exactly what the old contains('ban')
match did.
The user token renews itself before the engine starts refusing #
The renewal machinery shipped in the previous release but nothing armed it on
the kit's own minting path: only an app that adopted its own token ever
scheduled anything. An app_key room therefore ran until the engine began
refusing — 715 refusals for one user in a day, with zero renewal attempts
among them.
generateToken()now arms the ahead-of-time renewal for the token it just minted, in every mode.- A widget-level
tokenProvideris forwarded to the controller, so a server-signed app can be re-minted for by its own backend instead of falling through to "no mint source". - A failed renewal backs off (5s, 10s, 20s, 40s, 60s) and stops at five, rather than either giving up on the first failure or hammering. A refusal the engine called final is not retried at all.
Kit parity #
UTDRoomController.roomManager is now exposed here too. The live kit has always
exposed it; the two kits differing on it was drift, not design — and the new
dialingStoppedBy / resumeDialing() are read through it.
3.7.0 #
Staying in the room is now the kit's job, not your app's.
Four days of production logs say the same thing in four different ways: when a session is interrupted, the kit hands the problem to the host app, and the host app does the only thing it can — try again, immediately, forever. Every item below is one of those loops moved inside the kit, where it can be paced, measured and stopped.
Reconnects back off instead of hammering — and stop exhausting TURN #
One user produced 100 session attempts in 45 seconds. The engine grants a user twelve TURN allocations; every attempt builds a new PeerConnection and claims one. The quota was gone in the first few seconds, and every attempt after that was refused before it could reach the room — the retry loop was the outage.
Re-establishing now follows a schedule: 1s, 2s, 4s … capped at 30s, with
±20% jitter so a fleet knocked offline by one SFU restart does not come back in
lockstep and re-create the outage. The schedule is enforced where the dialing
happens (UTDRedialPacer inside the room manager), so an app that calls
connect() in its own loop is paced too. Dialing a different room is a new
intent, not a retry — a user switching rooms never waits.
- New:
UTDReconnectPolicy(the schedule) andUTDRedialPacer(the enforcement). - Removed:
UTDConstants.retryDelay. The delay is no longer a single number;UTDConstants.reconnectInitialDelay/reconnectMaxDelay/reconnectJitterFractiondescribe the schedule instead. If you referenced the old constant, this is the one line you need to change.
An expired user token is renewed once, and the refused call is replayed #
The engine answers an expired user token with 401 {"code":"token_expired"} and
WWW-Authenticate: Bearer error="invalid_token", error_description="expired".
The kit read neither and kept sending the dead token: 715 refusals for a single
user in one day, with every seat, role and moderation call in that window
failing silently while the room looked fine.
Now: the refusal is recognised (body and header), the token is re-minted once, and the refused request is replayed with the fresh bearer. Concurrent failures share one mint rather than each triggering their own. A 401 that is not an expiry — a revoked token, the wrong project — is passed through untouched, because re-minting for those is a loop, not a fix.
The kit also renews ahead of time, at 80% of user_token_expires_in, so a
long visit never reaches the point where the engine starts refusing.
- If your backend mints tokens: set
controller.tokenProviderso the kit has a way to get a fresh one. Without it, renewal is not possible and refusals surface exactly as they did before. - If you mint through
controller.generateToken(): nothing to do — the last request is replayed. UTDTokenResponse.userTokenExpiresIncarries the lifetime through (numbers or numeric strings).
Returning from the background resumes the session instead of evicting it #
The engine allows one session per identity. Re-joining the room you are already
in therefore kicks your own session out — DUPLICATE_IDENTITY, 374 times
in one day on a single project, each one an audio cut for the user it happened
to.
connect() now recognises a join for the room already in hand: the existing
session gets up to 8 seconds to come back (keeping its PeerConnection and its
TURN allocation), and only if it does not is a fresh session dialed. A join for
a different room tears the old one down exactly as before. A session that ends
for good is detected immediately — nobody waits out the timeout for a session
that is already gone.
Every quality report carries latency_ms #
Latency came from sender stats, which only exist while publishing — so listeners, most of any room, reported none: 3,711 reports a day on one project with the field empty, and latency is the first number anyone asks for when a room feels slow.
RTT is now read from the transport's selected ICE candidate pair, which exists whether or not the user publishes, with the sender's own RTT kept as a fallback and an RTCP-reported round trip behind that. Unknown latency is still sent as null — never a fabricated zero.
A re-established session asks the engine where the room is #
A room lives on a media node the engine assigns, and the engine can move it. A client that reconnected to its remembered node was observed landing on a different node than the one hosting its room — connected, and alone.
UTDRoomController.rejoin() mints a fresh token for the room on every
attempt and dials the url that answer carries. It resumes first (above),
re-mints second, and is bounded by maxAttempts (defaulting to
autoRejoinMaxAttempts).
// The kit re-establishes the session by itself; you decide when to ask.
final back = await controller.rejoin();
The kit gets the user back into the room by itself #
Everything above still needed an app to notice the drop and ask. Now the kit
does it: when a session ends without the app asking - a network change, an SFU
restart, a carrier handoff - it resumes the existing session if it can, and
otherwise asks the engine where the room is and re-establishes on the same
schedule (1s, 2s, 4s ... capped at 30s, with jitter). One attempt at a time,
never two, however many drop events or rejoin() calls arrive at once.
After autoRejoinMaxAttempts (10 by default) it stops and calls
onRejoinFailed - one verdict, not one per attempt. That is your cue to show an
error and leave the room; the kit will not try again on its own until the next
connect().
Recovery stops immediately - including an attempt that is mid-backoff - when:
- your app calls
leave(), or disposes the controller; - the user was banned or signed in on another device (coming back would fight a decision made about that user);
- you set
autoRejoinEnabled = false.
controller
..autoRejoinMaxAttempts = 10 // default
..onRejoinFailed = () => showError(); // the kit has stopped trying
// controller.autoRejoinEnabled = false; // your app owns recovery instead
// controller.isRejoining // true while it is trying
// controller.rejoinPolicy // the backoff schedule, if you must tune it
If your backend signs tokens, set controller.tokenProvider - recovery mints
a fresh token on every attempt and cannot work without a way to get one. With no
token source the kit does not dial blindly; it calls onRejoinFailed.
3.6.1 #
Quality telemetry stops polling an endpoint that rejects every request.
Found in production logs: 995 rejected quality reports in a single day — 29% of all
quality traffic — every one from a Flutter client sending no Authorization header
at all.
The privileged in-room routes authenticate with a per-user bearer, and that bearer only
lands when the host app hands its token response to adoptTokenResponse (apps using
this kit's own generateToken get it automatically). An app that mints tokens on its
own backend and skips that call had no bearer — so the reporter posted into a 401
every ten seconds, for the whole session, forever.
Two costs, both silent:
- The telemetry was empty. Packet loss, jitter and RTT only exist client-side; if the report never lands, nobody has those numbers — which is exactly the data an integrator would go looking for when a room sounds bad.
- Users paid for it. A request every ten seconds out of a phone's battery and metered data, with a guaranteed-zero result.
The reporter now checks for a bearer before starting, and logs one clear line naming
the call to make instead of failing quietly on a timer. UTDApiClient.hasUserToken is
exposed so an integrator can assert the same thing in their own tests.
If you mint tokens on your own backend, check your integration — the bearer gates every privileged route, not just this one: kick, ban, role changes and seat management go through the same door.
3.6.0 #
An hour in an audio room now costs a listener about half what it did.
This is the room type most users are in, on metered data, for hours at a time — and two things were costing them for nothing. Neither was visible from the code, because both were engine defaults this kit simply never set.
Audio publishes as speech, not music #
Unset, the engine falls back to its 48 kbps music preset. That is what this kit shipped — for a room that carries nothing but people talking. Opus carries a voice at 24 kbps mono with no audible loss.
In a room with eight speakers this is the difference between roughly 200 MB and 100 MB an hour of a listener's mobile data.
DTX (stop sending during silence, which a seat room mostly is) is on by default and is now set explicitly, so a default moving underneath us fails a test instead of quietly doubling everyone's data.
Remote video is never subscribed #
autoSubscribe defaults to true and cannot filter by kind, so this kit subscribed to
any video track anyone published into an audio room — allocating a transceiver and a
decoder for a picture it has no widget to render. Video subscriptions are now dropped
the moment they appear.
This helps the sender too: the SFU stops forwarding a layer nobody is subscribed to, so refusing the subscription also stops the upload.
Turning autoSubscribe off wholesale would have taken the audio with it — which is
the entire room. A test pins that distinction so nobody reaches for the blunt fix
later.
The camera trap is closed #
UTDMediaController exposes setCameraEnabled / toggleCamera and any host app can
call them, but this kit set no capture or publish options. A camera turned on inside an
audio room would have published the engine default — 720p at 30 fps with a full
simulcast ladder, about 2.3 Mbps. It is now capped at 180p / 15 fps / 120 kbps with
simulcast off, and uses hardware H.264 rather than software VP8.
No UI in this kit turns a camera on. This is a ceiling, not a feature.
Migration #
Nothing to change. If your app deliberately published or rendered video inside an audio room, it will no longer receive remote video here — use the live room kit for that.
3.5.0 #
Crowded rooms cost what a small room costs. Every participant event — a join,
a leave, an avatar change — used to rebuild the whole room: jsonDecode over every
participant's metadata, a new object and a copied attribute map for each. One person
walking in paid for all 300. Filling a room to 300 cost 1+2+…+300 ≈ 45,150
operations, quadratic in room size and paid in bursts exactly while the room filled.
The log line itself called participants.length, so every event paid it twice.
A participant index now absorbs each event into a single entry. Measured, same room:
fill a room of 300 45,150 → 300 decodes, 45,150 → 300 builds
one avatar change 300 → 0 decodes
mute state ~1,000 reads/sec → 22 on a mic event
- Mic state is event-driven. The 300ms sweep of every participant is gone; the
index rides
TrackMuted/TrackUnmuted(already being received) and tracks only the identities whose mute icon is actually rendered — the local user and the seat occupants. A 3s recovery pass over those same identities covers a dropped event, and it does not run while disconnected or backgrounded. - Seat enrichment is a lookup. It scanned the full remote list once per occupied seat — 22 × 300 ≈ 6,600 comparisons per seat rebuild.
- The seat grid stops repainting for changes that do not affect it. The roles map keeps its identity unless a role really changed, so an avatar change or a mic toggle no longer repaints 22 tiles.
- Bursts collapse. 50 people arriving at once notify listeners once, not 50 times.
- 169 hot-path log calls no longer run in release.
debugPrintis not stripped from release builds;utdLogtakes the message as a closure, so the string is never even built outside debug.
Public API unchanged.
3.4.0 #
Makes duplicate delivery diagnosable, and closes a stale-listener hole.
-
dataFrameStream— the same messages asdataStream, plus the transport metadata the decoded payload cannot carry: the per-sendidand the sender's identity.dataStreamdelivers the decoded payload alone, so an app had no way to tell ONE message delivered twice from TWO separate sends of identical content — which is the entire difference between a transport fault and a sender sending twice.dataStreamis unchanged; nothing is injected into the payload map an integration already parses. -
A handler from a released Room can no longer reach the app.
EventsListener.dispose()is async and the teardown does not await it: it cancels its twelve subscriptions one after another, so the data handler (eighth) stops only after seven awaits — and a connect retry builds the next Room immediately, with the previous teardown bounded to two seconds and left to finish in the background. Every handler now checks the Room generation it was created in, so the window is closed by construction rather than by microtask timing. -
utd_media_clientfloor raised to^2.8.5, which carries two correctness fixes this kit depends on: a replaced subscriber data channel no longer keeps delivering (the same duplicate shape this release makes diagnosable), and uplink audio quality is actually measured — loss and round-trip time were read from the wrong stats report and every speaker was reported as a flawless uplink.
3.3.0 #
Invitation windows + stale-snapshot guard. No breaking changes.
- Speaker invitations can expire. An ignored invitation used to stay open
forever.
UTDAudioRoomConfig.invitationTimeout(orexpiresInon a singleinviteToSpeak) sets how long it stays acceptable — a product decision, so the app owns it; the engine clamps it to 10s..10min, refuses a late accept, and tells BOTH sides when the window closes. The built-in dialog closes itself at the deadline instead of offering a button that can only fail, andonSpeakerInvitationExpiredreports it. Default staysnull= no expiry, so upgrading changes nothing until the app opts in. - A room no longer flips to the default layout right after rendering. Seat
snapshots do not arrive in order — the token response renders first, then
the SDK serves the
_seatsmetadata it read at connect, which is older. Every snapshot now carries a monotonic revision and anything older than what is already applied is dropped. Snapshots from an engine that sends no revision still apply.
3.2.0 #
Batch seat locking + invitation-flow repair. No breaking changes.
lockAllSeats()/unlockAllSeats()(controller +UTDSeatApi) — host/admin locks or reopens every seat in ONE atomic server call with one broadcast. The engine owns the skip rules: an occupied seat keeps its speaker, an already-locked seat is not re-locked, the reserved host seat is never touched; unlock-all leaves open seats alone. Returns the number of seats actually changed.- Re-inviting to the mic works. A pending invitation used to answer 409 and permanently block the host from re-inviting anyone who missed the dialog (app backgrounded, message dropped) until that user left the room. The engine now SUPERSEDES the pending invitation — same id, new seat/inviter, the dialog message is re-sent.
- An invitation accept that cannot seat you is no longer silent. The old
flow swallowed every failure, blind-fell-back to
takeSeat, and opened the mic unconditionally. Now: the mic opens only once a seat is actually held, an expired invitation (404) or lost seat (409) surfaces through the newonInvitationFailedcallback (UTDInvitationFailure.expired/.seatUnavailable/.unknown), and the default widget shows a localized snack (invitationExpired/invitationSeatTakenstrings, EN + AR).
3.1.0 #
New moderator-list API + bundled fixes. No breaking changes.
UTDRoomController.roomAdmins— a render-ready list of the moderators currently in the room: host first, then admins, each carrying the app's own published attributes (avatar, frame, level, any custom keys) plusname,role,isHostand anavatarUrlconvenience. Built live from room state — no server call; refresh onroleChangesStream/participantsStream.- The volume button now actually mutes the room. Under the media profile neither platform routes a room to the earpiece, so speaker-off was a no-op with a lying icon. It now silences all remote audio (and keeps silencing newly joining speakers), clears on a room switch, and matches the live kit's long-standing semantic.
- The media audio profile is claimed at controller construction — the
native engine is built once per process by the first thing that touches it,
so the kit now claims the profile at the earliest entry point instead of at
connect. See the new "Audio engine setup" README section: apps should also
call
UtdmClient.initialize(mediaAudioProfile: true)first thing inmain(). - pub.dev now lists the supported platforms (Android, iOS) explicitly.
3.0.3 #
iOS listener audio fix — no breaking changes. Update from 3.0.2 is required on iOS 26.
- An iPhone listener on iOS 26 hears the room again. 3.0.2's listener
recipe asked for a
playbacksession WITHallowBluetoothA2DP+allowAirPlay— options AVAudioSession only accepts onplayAndRecord. iOS 26 rejects the wholesetCategorycall (OSStatus -50), so the session was never configured or activated: audio arrived (device telemetry showed ~40 kbps Opus, zero packet loss) and the device played none of it. The options are now gone — on an output-only category Bluetooth A2DP and AirPlay route implicitly, so nothing is lost. The options set stays explicitly empty so WebRTC's ownplayAndRecord-only defaults cannot leak into the playback session. - New guard test: every recipe's options are checked against what AVAudioSession actually accepts for its category, for every track state — not just the one option that bit us before.
3.0.2 #
iOS audio session fix — no breaking changes.
- An iPhone listener can hear the room again. On iOS the kit forced the
audio session through flutter_webrtc's
setSpeakerphoneOnButPreferBluetooth, which sets WebRTC's own call profile —playAndRecord+voiceChat+setActive— on every join, listeners included, discarding the media session this kit builds.playAndRecordneeds microphone permission, so a listener who never granted it had the session fail to activate and heard NOTHING; going up on the mic made it work, which is exactly how it was reported. - Coming off the mic no longer leaves the room on call audio. The same call
left the session in
voiceChat, the telephony mode: earpiece routing at call volume. The media recipe (playbackfor listeners,playAndRecord+videoChat+defaultToSpeakerwhile publishing) now owns the session on iOS, and Bluetooth comes from its own per-state options. - Android is unchanged: under
MODE_NORMALthat helper is what re-enables device selection, so it still runs there — now behind a single guarded call site so it cannot drift back onto the iOS path. - Joining a room no longer inherits "sound off" from the previous one.
The controller is reused across rooms (a room switch, restore-from-minimize)
and
isAllRemoteAudioMutedsurvived the move. It is re-applied to every newly subscribed remote mic track, so the user joined a new room and heard NOBODY, on any platform, with nothing on screen to explain it. An admin's mute (mutedByAdmin) leaked the same way and kept refusing the user's own unmute in a room its moderator never touched. Both are now cleared when the room actually changes — a reconnect into the same room still keeps what was set there. - The seat sheet no longer offers Lock on a reserved seat. The engine
refuses any lock on a seat with
reserved_forset (403, "Cannot lock a reserved seat"), and the room owner's seat always has it — so an admin tapping Lock there always failed. Measured on production: 145 refused locks in a day across seven projects, all on seat 0. Unlock stays available, since a seat locked before it was reserved still has to be releasable.
3.0.1 #
Seat fixes — no breaking changes.
- Leaving a seat no longer fails when the server already freed it. The
engine answers
POST /seats/leavewith404 Not seatedwhenever the seat is already free — after a reconnect (the participant_left webhook frees it), after the server-side seat reconciler, or on a second tap. The kit reported that as a failure, so the host app showed an error AND kept the stale seat on screen: the user tapped again, failed again, and could not get off the seat. Measured on production before the fix: 224 of 948 leave calls (24%) answered- It is now treated as the goal state, and the grid resyncs.
- Changing a seat no longer fails on a no-op.
409 Already on this seat(a double tap, or a broadcast not yet applied) is likewise treated as success with a resync. The other 409s —Seat is locked,Target seat was taken— still fail, since those are refusals the user needs to see.
3.0.0 #
Admin join fix — admins connect as admin from the first frame — plus
built-in audio quality telemetry.
-
Quality telemetry (new). The kit now samples WebRTC
getStats()every 15s and posts one audio snapshot per interval to the engine (POST /api/v1/quality): bitrate, packet-loss fraction, jitter, and RTT while publishing. This feeds the engine's per-room quality dashboard (SLA/MOS), which had no media-side data source before. Zero configuration, entirely best-effort (a failed report is dropped, never retried), and the payload is a few hundred bytes per interval. -
The admin role is now resolved BEFORE the token is minted. When the kit mints its own token and the best-known role would be
audience, the join awaitsadminIdsResolver(capped at 5s) and mints the token with the resolved role. The engine grants server-side RTC permissions at issuance — no post-connect upgrade, no reconnect. A resolver slower than the cap (or throwing) falls back to anaudiencejoin instead of blocking on a degraded backend. -
Removed the post-connect self-upgrade + silent reconnect. The old path (join as
audience, thenPUT /participants/{self}/roleclaiming the owner as actor, then a full token re-issue + reconnect when that failed) could never succeed under server-signed bearer auth — the engine ignores the client-asserted actor — so every admin join ended in a forced reconnect: an audible audio cut for the admin and a join/leave flicker for the whole room. Measured on production before the fix: ~5,200 forced reconnects per day. -
BREAKING —
UTDRoomController.upgradeSelfRoleis removed. Only breaking if you called it directly; the widget no longer needs it and there is no legitimate client-side path for a participant to change its own role.changeRole(owner-only) is unchanged. -
If your app passes a
tokenProvider(server-signed setups): the resolver is not consulted — your backend decides the role when it mints the token, so make sure it mints admins withrole: 'admin'directly.
2.1.0 #
Seat-layout occupant policy — no breaking changes.
setupSeatsnow acceptsoccupantPolicy("clear" | "retain" | "compact"): control what happens to current speakers when the seat layout or count changes.clear(default, and the behaviour when omitted) takes everyone off the seats;retainkeeps everyone whose seat index still exists and removes only those whose seat disappeared on shrink;compactadditionally slides displaced speakers onto free eligible seats within the new count, removing only those left without a seat. Seat 0 stays reserved for the room owner and is never a slide destination for anyone else.- Requires an engine build from 2026-08-21 or later for the new values; older engines return 422 for them. Omitting the parameter keeps the old behaviour on every engine version.
2.0.2 #
Speaker audio quality fix — no breaking changes.
- Echo cancellation / noise suppression / auto gain control now actually run
for on-seat speakers. The media-mode setup used to flip the engine's
bypassVoiceProcessingswitch, which (besides picking the media session profile) also forced every capture constraint off — so speakers published a raw, unprocessed microphone: echo of the room mix, background noise, no gain levelling. The kit now usesutd_media_client2.8.0'smediaAudioProfileengine mode: the session/routing behaviour is unchanged (media volume, loudspeaker, no OS "in call" state, no OS voice-processing unit) while WebRTC's software AEC/NS/AGC stay enabled on the mic. - Requires
utd_media_client^2.8.0.
2.0.1 #
Battery/network fixes — no breaking changes.
- Background video pause. The app-lifecycle watcher now also disables any remote video publications while the app is backgrounded and re-enables them on resume (a no-op in a pure audio room — it only matters when a host app runs stage/guest video through this kit). Audio keeps playing in the background by design, and Android OS Picture-in-Picture keeps its video.
2.0.0 #
Includes every fix from the 1.11.0–1.14.0 maintenance line, ported onto the new engine:
- Audio rooms no longer put the phone "in a call" — the room runs in the
MEDIA/playback profile (
UTDAudioMode.enableMediaMode(), installed before every connect): media volume, loudspeaker default, no system in-call state, other apps (e.g. WhatsApp voice notes) keep microphone access. Bluetooth routing re-asserts the media config instead of re-arming the call profile. - Self-mute vs admin-mute are now distinct — new
UTDMediaController.mutedByAdminnotifier, set only by a host/admin_force_mute; self-unmute is refused while it holds;applyAdminUnmute()clears it.mutedParticipantsunchanged (still track-derived, for badges). - No more system chat announcements for comment lock/unlock and admin
role changes (they rendered as broken bubbles in custom message widgets).
The
announceRoleChangesflag and the related strings are gone. - Live cosmetic updates — seat avatars/frames repaint mid-session via
registerCosmeticKeys+ reliable_cosmetic_updatefan-out, instead of waiting for a (unreliable) SFU attribute echo. - Android OS Picture-in-Picture is actually armed on connect/reuse
(
pip.armIfEnabled()), swapping to the compactUTDPipViewin PiP.
BREAKING — new media engine generation #
- The kit now runs on
utd_media_client(the UTD media engine client) instead of the previous third-party RTC client. Public media types are re-exported under the new names. Apps on 1.x keep working unchanged — 1.x stays on the old engine path; upgrade to 2.x deliberately, not viapub upgrade.
Added — official server-signed token support #
UTDRoomController.adoptTokenResponse(UTDTokenResponse)— adopts a token minted outside the controller (your backend callingPOST /api/v1/tokenwithX-App-Secret): applies the per-user bearer to every in-room API client (seat/speaker/ban/role/comment) and remembers the RTC edge URL for prewarm — exactly whatgenerateTokendoes as side effects. Idempotent.UTDAudioRoom.tokenProvidernow supports externally-minted tokens. The widget adopts the provider's response on its own controller, so a server-signed token authenticates ALL in-room operations (previously only the media connect worked and moderation calls hit 401). The constructor assert that required the provider to come fromgenerateTokenon the same controller is removed.
1.10.1 #
Bugfix.
Speaking ring #
UTDSpeakingRingno longer shrinks the avatar while the occupant is speaking. The pulsing ring previously insetting the child by its animating border width, so the seat image visibly shrank and pulsed smaller on every open mic. The ring now paints just OUTSIDE the avatar (BorderSide.strokeAlignOutside) and the avatar keeps a constant size. The defaultUTDSeatWidgetoccupied-seatStackis nowClip.noneso the outward ring/glow isn't clipped.
1.10.0 #
Dev-tunable seat sizing, snappier minimized overlays, and a polished pre-connect state. All additive and backward compatible — apps that pass nothing are unaffected.
Seat layout #
- New
UTDSeatLayout(avatarRatio,rowPadding,rowSpacing,seatScale), passed viaUTDAudioRoomConfig.seatLayout. The mounted room publishes it to a shared source so every seat-size consumer (grid, skeleton,computeSeatSizecall sites, and the app-side metrics) reads the same values and can't drift. Defaults reproduce the original look; the 52–120px safety clamp still applies as a hard rail.
Minimized overlay & PiP #
- Speaking state is now event-driven off
activeSpeakersinstead of a 1s pollingTimer— the ring reacts instantly and nothing ticks while the room is silent. - Wave animations run only while someone is speaking, so a silent minimized session holds zero per-frame animation work.
- Overlay bubble snaps to the nearest edge on release (with flick support), clamps clear of system chrome so it can't tuck behind the notch/home indicator, lifts on grab, and adds haptic feedback on drag/restore/close/mic actions.
Connecting state #
- The static pre-connect placeholder is now a gently breathing skeleton driven by a
single shared
AnimationController, wrapped in aRepaintBoundary, torn down the instant the real room paints, and honoring reduce-motion.
1.9.0 #
Room renders at token receipt — occupied seats with names and avatars appear roughly one token round trip after the tap, instead of waiting for the full RTC connection (WSS + ICE/DTLS). On a prefetched token the room is effectively instant.
Rendering #
- The room body (seats, chat, controls) now paints as soon as the token response arrives
(
_tokenReady). The grey skeleton only gates the ban check (token POST 403), not the entire RTC establishment. A connect failure drops back to the skeleton/error view. - Seats are seeded pre-connect via
UTDRoomController.primeSeats: newer engines embed aseatssnapshot in the token response (zero extra round trips); against older engines the kit firesGET /seatsin parallel with the RTC dial. - Seat mutations (take/move) are gated on connection state so a tap during the pre-connect window cannot create ghost occupants.
Avatars #
UTDDefaultAvatarnow usescached_network_image(disk cache) — avatars download once per install, not once per session. Keyed by occupant so a seat that changes hands shows the new person's initials, not the old photo.MediaQuery.devicePixelRatioOfreplaces the fullMediaQuery.ofto avoid rebuilding every avatar on each keyboard-inset animation frame.
Seat updates #
- Seat mutation responses from newer engines carry the synced seat
stateinline; the kit applies it immediately (applyMutationResponse, generation- and room-guarded) so the actor sees changes without waiting for the_seat_updatebroadcast round trip. - Blank occupant name/avatar self-heals from the occupant's live RTC participant attributes
(
_withLiveAttributes+ aparticipantAttributesChangedrepair listener). The per-key merge never un-fills existing attributes. - The preservation guard treats an all-empty-string attribute map (server enrichment failure) as effectively empty, so it no longer blocks the live-attribute fill.
Host join #
audioSetup()(mic capture, Bluetooth routing, setAttributes) now runs unawaited for all joins, including hosts withturnOnMicrophoneWhenJoining. The ordering is internal to the closure; the mic permission dialog now appears over the rendered room instead of behind a skeleton. The_opEpoch/cancelPendingPublishmachinery handles aleave()during setup.- Same-instance reconnect (
connect()re-dial) now drains pending mic publishes before disconnecting, closing theaddTransceivertrack-is-null window. - Device-info collection is bounded at 150 ms; a timeout sends nulls (the engine treats
all device fields as optional).
deviceIdstays fully awaited (single-session enforcement).
Reliability #
- Inter-attempt teardown in the retry loop is bounded at 2 s (was unbounded — the SDK's disconnect can block ~10 s per attempt on a half-dead link).
connectTimeoutraised 15 s → 25 s (deadlock backstop aligned with the SDK's 3 × 7 s internal phase budget). The reconnection handler's force-exit is suspended during a kit-driven connect so it cannot fire mid-retry.
Jank cluster #
- Payload
debugPrints (data messages, seat metadata) gated tokDebugMode. - The seat grid binds
participantRolesNotifier(cached, updated on participant/role changes) instead of theparticipantRolesgetter that jsonDecodes every participant's metadata on every rebuild. MediaQuery.sizeOf/devicePixelRatioOfreplaceMediaQuery.ofin the seat grid, skeleton, seat widget, and avatar — eliminates full-subtree rebuilds on keyboard frames.UTDSpeakingRingkeeps a structure-stable widget tree (AnimatedBuilder → SizedBox → DecoratedBox → Padding → child always), so the avatar subtree is never torn down and re-inflated on speaking transitions.
README #
- New "Fast first join" section documenting
warmUp()and the tap-time token prefetch pattern for apps that want the first entrance to be as fast as every later one.
1.8.0 #
Faster room entry — every serial cost on the join path was removed, overlapped, or cached:
- HTTP transport is now process-shared and survives room exit → re-entry, so rejoins reuse the
warm TLS connection to the engine instead of paying a fresh DNS+TCP+TLS handshake per join
(~60–200ms on mobile).
UTDApiClient.dispose()no longer closes the shared transport. - The token host's TLS connection and the device-id/device-info caches are warmed
fire-and-forget at
initApi()time, off the join's critical path. - New
UTDRoomController.warmUp()(static): apps can call it when a room entry becomes likely (e.g. the lobby screen opens) to pre-open the token-host connection, heat the device caches, and pre-warm DNS/TLS to the RTC edge — making the subsequent join near-handshake-free. - The RTC edge URL from each successful join is remembered (memory + SharedPreferences) and the next join pre-warms DNS/TLS to it in parallel with its token request, so the WSS dial resumes a TLS session instead of running a cold handshake (~30–150ms).
- Device-id and device-info lookups now run concurrently (and package/device platform channels inside the collector too), with in-flight memoization — a cold first join pays one platform hop instead of three.
- On a room switch, the previous room's teardown starts as soon as the new join begins and overlaps the token round trip instead of serializing ahead of the RTC dial (~50–300ms on switches). Note: the old room now starts closing even if the new join later fails.
- Flaky-network joins fail over faster: the SDK's signal phases are bounded at 7s (was 10s default, racing the kit's own 15s outer timeout), and the retry delay dropped 500ms → 200ms.
1.7.0 #
- Internalized the real-time transport layer so it is no longer part of the public API. The
low-level engine handle (
UTDRoomManager) is no longer exported, andUTDRoomController.roomManageris now private. Consumers use the neutral surface —UTDAudioRoom,UTDRoomController, and the seat/media/chat controllers — none of which expose transport-specific types.UTDConnectionStatemoved to its own file but is still exported unchanged. - Breaking (advanced API only): code that reached
controller.roomManageror the raw engine handle must migrate to the controller's public getters (e.g.localIdentity,connectionState,isConnected). The standard widget/controller usage is unaffected.
1.6.1 #
- Distinguish a not-activated service from a ban on the token endpoint. A non-ban
403(e.g.Type 'audio_room' is not enabled for this project) now throws the newUTDServiceNotAvailableExceptioninstead ofUTDBannedException. - The built-in connect-error view shows a distinct "not available" message and hides Retry
for that refusal (retrying can't help). When the host supplies no
onConnectError,UTDAudioRoomnow falls back to this error view instead of an endless connecting skeleton. AddsUTDRoomStrings.serviceNotAvailable(EN + AR).
1.6.0 #
- Auto-collect device facts for the dashboard's per-participant view.
UTDRoomController.generateTokennow populatesdevice_model/os/os_version/app_versionautomatically (viadevice_info_plus+package_info_plus) when the host app doesn't pass them. Explicit arguments still win, collection is cached per process, and it never throws — on an unsupported platform or a plugin failure each field degrades tonullrather than blocking token issuance. Values are capped to the engine's column limits (device_model 100, os 50, os_version/app_version 20). UTDRoomController.generateToken/UTDTokenApi.generateToken: add an optionalimageUrl, sent asimageonPOST /api/v1/tokenand shown as the participant's profile image in the dashboard.- New direct dependencies:
device_info_plus: ^12.0.0andpackage_info_plus: ^8.0.0(the former was already in the tree transitively via the real-time engine). - Minimum SDK raised to Dart
>=3.7.0/ Flutter>=3.29.0, required bydevice_info_plus ^12.0.0. Hosts on older toolchains should stay on1.5.0.
1.5.0 #
- Type-first token request: the kit now sends
type: 'audio_room'onPOST /api/v1/tokeninstead of the legacyservice: 'rooms'. The engine is type-first — oneappId/appKeyserves every product type enabled on the project, and the type is a per-request field, not a credential. The project must haveaudio_roomin its enabled types. Seat behavior is unchanged —audio_roomkeeps the full seat model (take/leave/switch/lock/unlock/kick/mute/swap, apply-to-speak, seat grid); only the token field changed. UTDRoomController.generateToken/UTDTokenApi.generateToken: the requiredserviceparameter is removed and replaced by an optionaltype(default'audio_room'). Drop-in users of theUTDAudioRoomwidget are unaffected — it no longer passesserviceinternally. Direct callers ofgenerateTokenshould dropservice: 'rooms'; the default already targetsaudio_room.- Non-breaking on the engine side: the deployed engine still accepts the legacy
service+kindfields and derives the canonical type, so older builds of this kit keep working against the same engine while apps migrate to this version at their own pace.
1.4.0 #
- No-backend credentials (recommended): pass
UTDAudioRoom(appKey: ...)/UTDRoomController.initApi(appKey: ...)— the project's publishable app key. The kit mints tokens directly from the engine (X-App-KeyonPOST /api/v1/token), and the engine signs the returned per-useruser_tokenwith the projectserver_secretserver-side, so the secret never ships in the app and no integrator backend is required. The kit applies thatuser_tokenas theAuthorization: Bearerfor all in-room/moderation calls (persisted acrossinitApire-inits, so it survives restore-from-minimize). - Removed
tokenProviderand itsUTDTokenProvider/UTDTokenRequest/UTDTokenBundletypes plus theUTDRoomController.usesTokenProvidergetter (added in 1.3.0). The no-backendappKeyflow replaces it — there is no longer a built-in path for integrators who run their own token backend. - Removed
serverSecretentirely (deprecated in 1.3.0).UTDAudioRoom.serverSecret,UTDRoomController.initApi(serverSecret:)/ itsserverSecretgetter, and theUTDApiClient(appSecret:)param /X-App-Secretheader are all gone.appKeyis now the sole, required credential. Migrate anyserverSecret:callsites toappKey:. - A leaked
app_keycannot forge bearers offline or call the server-to-server API, and rotates independently via the engineregenerate-credentialsadmin endpoint.
1.3.0 #
- Secure credentials via
tokenProvider(recommended): a newUTDAudioRoom(tokenProvider: ...)/UTDRoomController.initApi(tokenProvider: ...)callback lets the integrator mint tokens from their own backend, so the projectserverSecretnever ships in the app. The kit calls the provider with aUTDTokenRequest(identity, room, service, room owner, device id) and consumes the returnedUTDTokenBundle(UTDTokenBundle.fromEngineJsonparses the enginePOST /api/v1/tokenresponse verbatim). The per-useruser_tokenfrom the bundle is applied as theAuthorization: Bearerfor all in-room/moderation REST calls, so actions are authenticated as the server-verified user. New exported API:UTDTokenProvider,UTDTokenRequest,UTDTokenBundle, plusUTDRoomController.usesTokenProvider. The role is intentionally not sent from the client in this mode — the integrator backend is the authority on the user's role. serverSecretis now deprecated and optional.UTDAudioRoom.serverSecret/initApi(serverSecret:)still work in legacy/dual mode (the kit keeps sendingX-App-Secret), but embedding the secret in a shipped app lets anyone extract it and mint tokens for any identity/room — migrate totokenProvider.UTDAudioRoomnow asserts that exactly one oftokenProvider(recommended) orserverSecret(legacy) is provided.UTDTokenResponsegains auserTokenfield (engineuser_token; empty on legacy responses) so the per-user bearer is surfaced through the normal token flow as well.- README rewritten around the secure
tokenProviderflow, with a backend-proxy example and an explicit "do not ship the secret" warning; the params table marksappIdas a safe public identifier andserverSecretas deprecated/legacy.
1.2.0 #
- Comment lock: host/admin can now lock room chat so only host/admin may post.
New
UTDCommentApi(exported) wrapping the engine endpointsPOST /api/v1/rooms/{room}/comments/{lock,unlock}, plusUTDRoomController.lockComments()/unlockComments()/setCommentsLocked(), thecommentsLockednotifier and thecanICommentgetter. The lock is driven by the server (the_chat_lockbroadcast + thechat_lockedroom-metadata field), never set optimistically, so it stays consistent across devices and is restored for late joiners on reconnect. Enforcement lives in both the send path (a hidden composer can't be bypassed) and the receive path (chat from non-privileged senders is dropped while locked, as a backstop against a tampered client). The default controls bar gains a host/admin lock toggle and swaps the audience chat button for a lock indicator while locked. - Admin role announcements: a centered, dimmed room-chat system line is posted
when a user gains or loses the
adminrole (" UTDRoomController.stringslets the host app's localizedUTDRoomStringsback controller-emitted system lines; wired automatically fromUTDAudioRoomConfig. New strings (English + Arabic defaults) for the comment-lock UI and the admin/lock announcements; existing directUTDRoomStringscallers are unaffected (the new fields default to English).
1.1.0 #
- Split the API base URL by operation: token generation now uses the edge host
https://udt-stream.comwhile all in-room operations (seats, speakers, bans, roles) use the grey-cloud engine hosthttps://engine.udt-stream.com.UTDApiClient.defaultBaseUrlis now the engine host; the newUTDApiClient.defaultTokenBaseUrlis the token host.initApigained atokenBaseUrlparameter (defaulted) — existing callers need no change. - Security (M2): the client no longer self-writes cosmetic fields (avatar, frame,
color name) into RTC participant metadata. Cosmetics are published only
as participant attributes; the server remains the sole owner of metadata
(
role,_device, …). This removes a client-trust surface where a peer could spoofrole/VIP in broadcast metadata. No public API change — cosmetics still flow throughuserAttributes/setAttributes. Part of a coordinated rollout: the backend may then gatecanUpdateOwnMetadatato privileged roles only.
1.0.1 #
- Update the default API base URL to
https://api.udt-stream.com.
1.0.0 #
- Initial standalone release. Extracted from the Tempo-Live monorepo into its own package repository.
- Real-time audio room: a drop-in prebuilt live-audio-room solution.
- Seat management (take, leave, switch, lock, unlock, kick, mute, swap), built-in seat actions and moderation sheet, apply-to-speak request queue, member list with host actions, mic/speaker controls (Bluetooth-preferring routing).
- Real-time chat over the data channel (batching + dedup), tiered reconnection, minimize / Android OS Picture-in-Picture, 8 layout modes.