Skip to main content

titli_video_sdk 0.2.0 copy "titli_video_sdk: ^0.2.0" to clipboard
titli_video_sdk: ^0.2.0 copied to clipboard

Titli Video SDK for Flutter. Metered 1:1 audio and video calls, Live Hosts, live stream viewing and gifts in your app.

Changelog #

0.2.0 #

  • Quick mode: the whole client side with only a publishable App Key, no backend. TitliVideo.init(appKey:, userId:, userName:, apiBase:, deviceId:), TitliVideo.setUser(userId, [userName]), TitliVideo.startCall(type:) (create + join as the payer) and TitliVideo.joinCall(callId, role:), both returning a connected TitliCall. Namespaces TitliVideo.calls, TitliVideo.liveHosts (startCall connects), TitliVideo.liveStreams (watch connects as a viewer), TitliVideo.gifts, and TitliVideo.config(). Requests go to /v1/client/* with the X-Titli-* headers (App Key, user, platform, package name / bundle ID, Android signing certificate, device id, SDK version) and never an Authorization header; on web the browser's Origin replaces X-Titli-App. 429 waits Retry-After, 5xx and no answer back off 1 s / 2 s / 4 s, other 4xx are never repeated.

  • TitliVideoError (errorCode, userCode, userMessage, userMessageHi, userMessageFor, message, httpStatus, retryAfter, docsUrl, details) for every Quick-mode failure, including the new codes APP_KEY_INVALID, QUICK_MODE_OFF, APP_NOT_ALLOWED, QUICK_DAILY_CAP_REACHED, END_USER_DAILY_LIMIT.

  • TitliCallType (audio, video) and TitliRole (user, host).

  • TitliCall.callId, and TitliCall.connect(callId:) to keep your own.

  • The gift sheet works in Quick mode without a send handler: the SDK loads the gift list, sends through /v1/client/live-hosts/calls/{id}/gifts or /v1/client/live-streams/{ref}/gifts with a client_request_id, and reloads the list after gift_unavailable / gift_price_changed.

  • New dependencies: http and web (already used by livekit_client) and package_info_plus (package name / bundle ID and the Android signing certificate for Quick mode).

  • The example runs in Quick mode by default (--dart-define=TITLI_APP_KEY=… TITLI_USER_ID=… [TITLI_API_BASE=…] [TITLI_CALL_ID=…]), keeps Secure mode as a tab, and builds for web.

  • Viewer mode for Live Streamers Pool: TitliCall.connect with a viewer token (or mode: TitliCallMode.viewer) publishes nothing and needs no permission. Live events (onLiveEvent, liveEvents stream, sealed TitliLiveEvent) and notifiers liveHost, liveViewers, liveHostAway, liveChat, liveEnd. Leaves 3 s after ended / kicked.

  • TitliCallScreen shows the viewer layout (host video, watermark, chat, gift toasts, host-away banner, viewer count, leave, end message) with onLiveEvent and liveStrings. Call mode is unchanged.

  • Gifts for Live Hosts calls and Live Streams (2026-11-28). call.gifts (TitliGifts): setCatalog with the gift list your backend relays from GET /v1/gifts, onSendGift (your backend call), send(gift, count:) with a UUID client_request_id that is reused only while the outcome of that send is not known (no answer, 429, a 5xx without refunded, or pending), enabled, canSend, gifts, needsReload. Models TitliGift, TitliGiftCatalog, TitliGiftRequest; typed TitliGiftError / TitliGiftErrorCode with the ready-to-show userMessage (userMessageHi and userMessageFor(languageCode) for Hindi; the gift sheet uses your app's locale).

  • TitliCallScreen shows a gift button and a gift sheet (icon, name, price, count, Send) in calls and lives when a gift list with enabled: true and an onSendGift handler are given (giftCatalog, onSendGift, giftStrings). Nothing shows otherwise.

  • Gifts, after the first review (2026-11-28): send refuses with giftNotInSession once the call or live has ended; an error with refunded: true is final and a pending result keeps its client_request_id (pendingRequest, clearPending(), confirmDelivered(), TitliGifts.isPendingResult); retryable is also true for 5xx / partner_unavailable without refunded. applyBrief / isStale for the short { enabled, version } object, which no longer empties the list in setCatalog. maxCount is read from the list (max_count, 99 without it; the static TitliGifts.maxCount became the instance getter, TitliGifts.defaultMaxCount is 99). TitliGiftErrorCode.partnerUnavailable (serviceUnavailable stays as an alias), TitliGiftError.legacyCode. USD prices show up to 6 decimals, never fewer than 2; INR up to 4.

  • TitliCallScreen: the gift sheet closes when the call or live ends, before onEnded; onGiftsReloadNeeded; the sheet shows the new price after gift_price_changed; its busy state is the controller's; gift props that change on a rebuild are applied after the frame.

  • TitliLiveGift.coins is no longer read from live events: always 0, deprecated.

  • The gift live event now also arrives in 1:1 calls (onLiveEvent, call.liveEvents) for each gift the user sent, so the app can play the animation. TitliLiveGift gains animationUrl, TitliLiveSender gains endUserId.

  • Fixed: live events are read in the form the server sends them (gift_id, icon_url, animation_url, and count on the viewers event). Before, a gift's id and icon and the viewer count stayed empty.

  • Deprecated: TitliLiveGift.coins (always 0 for new gifts; it is not part of the gift model).

0.1.0 #

  • First release: TitliCall.connect, microphone and camera controls, camera switch, end reasons, and the prebuilt TitliCallScreen for audio and video calls.
0
likes
130
points
--
downloads

Documentation

Documentation
API reference

Publisher

unverified uploader

Titli Video SDK for Flutter. Metered 1:1 audio and video calls, Live Hosts, live stream viewing and gifts in your app.

Homepage
Repository (GitHub)
View/report issues

Topics

#video-call #audio-call #webrtc #livestream #voip

License

unknown (license)

Dependencies

flutter, http, livekit_client, package_info_plus, web

More

Packages that depend on titli_video_sdk