utd_live_room_kit 1.2.0 copy "utd_live_room_kit: ^1.2.0" to clipboard
utd_live_room_kit: ^1.2.0 copied to clipboard

LiveKit-based video live room for Flutter: host camera plus up to three guest tiles, go-live requests, host media control, chat, and minimize/PiP.

UTD Live Room Kit #

A Flutter package for building video live-room experiences, powered by LiveKit and the UTD Stream Engine. It puts a host camera on stage with up to 3 guest video tiles, built on the same seat state machine as utd_audio_room_kit — give it the required data and you get a fully interactive live room with no extra UI code.

Features #

  • Drop-in live-room UI — host camera + up to 3 guest video tiles from required data alone.
  • Go-live flow — host invites guests; audience requests to go live; host approves/rejects with a live request queue.
  • Host force-control — host can mute/unmute or stop a guest's camera/mic.
  • Seat management — take, leave, switch, lock, unlock, kick (shared seat state machine with the audio kit).
  • Media controls — microphone & camera with reactive state (Bluetooth-preferring audio routing).
  • Real-time chat — data-channel messages with batching and dedup.
  • Reconnection — tiered: light sync (<15s), full sync (<60s), default force-exit (>60s).
  • Minimize / PiP — minimize to a floating overlay; optional Android OS Picture-in-Picture.
  • Video effects — pairs with utd_video_effects_kit via UTDLiveRoomConfig.buildVideoProcessor (a LiveKit TrackProcessor) for live filters & beauty effects.

Getting started #

Add the dependency:

dependencies:
  utd_live_room_kit: ^1.0.0

Credentials — use a tokenProvider (do NOT ship the secret) #

Security: never put serverSecret in your app — anyone can extract it from a shipped APK/IPA and mint tokens for any user/room in your project. The secret must live on your backend. The kit takes a tokenProvider callback: your backend authenticates the real user and calls the UTD engine POST /api/v1/token with the secret server-side, returning the token bundle. The kit uses the per-user user_token as the Authorization: Bearer for all in-room/moderation calls.

import 'package:utd_live_room_kit/utd_live_room_kit.dart';

UTDLiveRoom(
  appId: '<utd-app-id>',
  userId: 'user123',
  userName: 'Jane',
  roomId: 'room456',
  roomOwnerId: 'owner789',
  tokenProvider: (req) async {
    // Call YOUR backend (holds the secret + authenticates the user); it proxies the engine
    // POST /api/v1/token and returns { url, token, user_token }.
    final json = await myBackend.fetchRoomToken(
      identity: req.identity,
      roomName: req.roomName,
      service: req.service,        // 'rooms'
      roomOwnerId: req.roomOwnerId,
      kind: req.kind,              // 'live'
      deviceId: req.deviceId,
    );
    return UTDTokenBundle.fromEngineJson(json);
  },
  config: const UTDLiveRoomConfig(),
);

Legacy (deprecated): serverSecret: still works while the project is in legacy/dual mode but ships the secret in the app and stops working once the project is set to secure.

See the exported API in lib/utd_live_room_kit.dartUTDLiveRoom, UTDRoomController, SeatController, MediaController, ChatController, and the room/seat/participant models.

Requirements #

  • A LiveKit server + UTD Stream Engine token endpoint.
  • Camera & microphone runtime permissions (handled via permission_handler).
0
likes
0
points
426
downloads

Publisher

unverified uploader

Weekly Downloads

LiveKit-based video live room for Flutter: host camera plus up to three guest tiles, go-live requests, host media control, chat, and minimize/PiP.

Repository (GitHub)
View/report issues

Topics

#livekit #video #live-streaming #webrtc #video-call

License

unknown (license)

Dependencies

audio_session, dartz, dio, equatable, floating, flutter, flutter_bloc, flutter_screenutil, flutter_webrtc, get_it, livekit_client, permission_handler, pretty_dio_logger, shared_preferences

More

Packages that depend on utd_live_room_kit