socrits 0.4.0
socrits: ^0.4.0 copied to clipboard
Socrits SDK for Flutter - video & voice calls, call invitations (ring/accept), and in-app chat. Drop-in prebuilt UI kit plus a low-level core client.
0.4.0 #
- More call-UI customisation — all of it useful across every call type
(telehealth, conferencing, tutoring, support, social…), configured on the same
SocritsCallConfig:- Translate / reword every string (
SocritsCallText). One object holds all user-visible text on the ring + call screens (connecting,incomingVideoCall,accept,decline,end, button captions, hang-up dialog…). Override only what you need, or supply a fully localised set. Also reaches a customringBuilderviaSocritsRingRequest.text. - Custom background (
backgroundBuilder: (ctx, isVideo) => …). Draw branded art, a blurred image, or a gradient behind the call. The avatar, name and controls sit on top; a live remote video covers it. Works on the ring screen and the voice/connecting stage. - On-video controls:
videoFit(covercrop-to-fill vscontainfit-with-letterbox so nothing is cropped),mirrorLocalVideo(mirror the self-view), andshowSelfView(hide your own picture-in-picture). - Video quality preset (
videoQuality:auto/low≈180p /medium≈360p /high≈720p) — trade camera resolution for bandwidth on weak networks. - Session length:
maxCallDurationauto-ends the call when reached (trials, metered sessions, meeting/lesson caps), andonDurationfires every second with the live elapsed time (billing meter, countdown, SLA timer).
- Translate / reword every string (
SocritsCallViewandSocritsRingScreengain matchingtext/backgroundBuilder/ video parameters.- Fully backward compatible — every new field is optional.
0.3.0 #
- Full call-UI customisation (ZEGO
...CallConfigparity). NewSocritsCallConfigpassed toSocritsCallUI.attach(config: ...)— every field optional, override only what you need:- Theme (
SocritsCallTheme):accent,background,ringBackground,endCallColor,acceptCallColor,voiceGradient, control colours, andnameTextStyle/durationTextStyle. The accent now themes the in-call screen too (previously ring-only). - Profile photos:
selfAvatarUrl(forwarded to the callee's ring),avatarUrlResolver(resolve incoming callers by id), per-callavatarUrloncall()/SocritsCallButton, or a fullavatarBuilder. Falls back to the name's initial. The native (offline) ring shows it too. - In-app ringtone (
SocritsRingtone):.system()(default),.asset(...), or.none(), plus a separateoutgoingRingtone. (Addsflutter_ringtone_player.) - Overlay:
foregroundBuilder(ctx, room)draws any widget over the call (coin balance, timer, report button) — the ZEGOconfig.foregroundequivalent. - Controls & behaviour:
showSpeakerButton/showFlipButton/showVideoButton/showMuteButton,showDuration,confirmHangUp, andstartWithMicOn/startWithCameraOn/startWithSpeakerOn. - Full-screen overrides:
ringBuilder(replace the ring screen) andcallBuilder(replace the in-call screen) while keeping the Socrits flow.
- Theme (
SocritsCallViewgainstheme,avatarUrl/avatarBuilder,foregroundBuilder, theshow*flags,showDurationandconfirmHangUp.- Native offline ring is now themeable via
SocritsCallKit.ringtonePath,backgroundColorHex,acceptColorHex, and carries the caller's avatar. - Backward compatible: the old
attach(accent:)shortcut and existingSocritsCallViewparameters still work.
0.2.0 #
- Near-zero-code calling (ZEGO-style). New
SocritsCallUIorchestrates the whole call flow for you — attach it once afterconnect()and incoming calls ring with a prebuilt screen, auto-navigate to the call UI on accept, and tear down on hang-up / decline / timeout. No hand-written call orchestration.SocritsCallUI.instance.attach(client: ..., navigatorKey: ...)— one-time setup.- Start a call with
SocritsCallUI.instance.call(userId: 'bob', mode: CallMode.video)or drop aSocritsCallButton(inviteeUserId: 'bob')widget. - New prebuilt
SocritsRingScreen(incoming + outgoing) with pre-connect Speaker / Mic / Camera toggles; themeable viaaccent. - Native (offline CallKit) Accept/Decline is routed into the same flow.
- Client plumbing for hang-up + synced duration.
Socrits.endCall(callId)sends an explicitcall:end;onCallHungUpfires when the peer hangs up a live call (distinct from a silent network drop);lastStartedAtcarries the server-authoritative start time into the call timer.
0.1.8 #
- Audio calls can no longer be switched to video. New
SocritsCallView(allowVideo: false)hides the camera & flip controls and never starts the camera — use it for voice calls so the Video button isn't shown. Defaults totrue(unchanged behaviour for video calls). - Synchronised call duration across both parties. New
SocritsCallView(startedAt: <epochMs>)anchors the on-screen timer to a single server timestamp (e.g. thestartedAtfrom thecall:acceptedsignalling event) so the caller and callee show the same duration instead of each counting from its own local connect moment. When omitted, falls back to the local timer.
0.1.7 #
- Camera-off now shows the avatar stage, not a frozen frame.
SocritsCallViewdrops muted remote video tracks and listens for track mute/unmute, so when the other side turns their camera off you see the voice-style avatar instead of their last frozen frame. - Pre-connect mic/camera choices are honoured reliably. New
Socrits.startAudioEnabled/startVideoEnabledmake the room JOIN with the wanted mic/camera state (set them from your ring-screen toggles before the call connects) instead of publishing both and muting a frame later — which could leave the camera/mic on even when the user had turned them off._applyInitialnow also sets the exact state as an idempotent backstop.
0.1.6 #
SocritsCallViewgains aninitialSpeakerparameter (alongside the existinginitialMic/initialCam). Lets the ring screen pre-set the audio route — voice calls can start on earpiece, video on loudspeaker — and the choice is now honoured on connect instead of always forcing speakerphone on.
0.1.5 #
SocritsCallViewcontrols are now always visible on both audio and video calls (Speaker / Camera flip / Camera on-off / Mic mute / End). Previously the controls auto-hid after ~4s on video, which looked like an empty call screen.
0.1.4 #
- Add
SocritsCallKit— offline call ringing for the UIKit tier (the Socrits equivalent of ZEGO's zpns-fcm + system calling UI). Turns the control plane'sincoming_callFCM push into a native full-screen / CallKit ring, and routes Accept/Decline back. Bundlesflutter_callkit_incoming. - Add
Socrits.acceptCallById()/rejectCallById()so a call that arrived as an offline push (no prioronIncomingCall) can be answered by itscallId.
0.1.3 #
- Split the low-level media engine into the new
socrits_expresspackage; the UIKit now builds on it (room join delegates toSocritsRoom.join). Lets you take just the media tier (Express) or the full kit (UIKit). - Fix: in-call controls (hang-up / speaker / mic) now stay visible on audio calls instead of auto-hiding with no way to bring them back.
0.1.2 #
- Corrected the maintainer name (SuryaPrakash Malgo).
0.1.1 #
- Renamed internal source files to the
socrits_*namespace. - Cleaned up documentation and the README.
0.1.0 #
Initial release.
- Call invitations (ring / accept / reject / cancel / timeout) over the Socrits signalling socket.
- Audio & video calls on LiveKit media.
SocritsCallView— prebuilt call UI (the UI Kit).Socrits— core client for building your own call UI.- In-app chat: 1:1 and group, typing, read receipts, message history.
- Offline call push registration (CallKit / FCM).
SocritsWhiteboardwidget and video-effect hooks.