Skip to main content
SDK 2.0.0. Flutter only sets beauty parameters. Live frames never enter Dart: call FacebetterPlugin.processTexture on the vendor SDK’s native GL thread, then write the output texture back.

Shared contract

Do not call processFile / processImageBytes / processImageFile / processImageToUiImage on the live engine.
Credentials: Subscription, Auth & License. Native texture rules: Android · Third-party Integration, iOS · Third-party Integration. Do not: push pixels or texture ids from Dart every frame; call processTexture off the GL thread; treat FBEngine as a process-wide singleton.

TRTC (Tencent)

Prerequisites: tencent_trtc_cloud (or native TRTC) and facebetter_flutter: ^2.0.0. When enabling custom preprocess, use Texture2D + Texture buffer, not YUV / PixelBuffer. After creating the engine in Dart, enable custom process (API name may vary by plugin version):

iOS — onProcessVideoFrame

If you use tencent_trtc_cloud’s ITXCustomBeautyProcesser, keep Texture2D / Texture and call the same processTexture in the callback. Register the factory after GeneratedPluginRegistrant.register(with:).

Android — Kotlin

Tear-down


Agora

Same model as native: call FacebetterPlugin.processTexture inside the iOS / Android frame observer / custom preprocess callback; Dart only owns FBEngine parameters.
  1. Dart: FBEngine.create(externalContext: true) and set beauty
  2. Enable custom video processing or register a native observer per the Agora Flutter plugin (APIs vary by agora_rtc_engine version)
  3. On a GL_TEXTURE_2D textureId, call processTexture and write back to the vendor frame
For OES / YUV-only callbacks, convert to Texture2D first, or see Android / iOS (Flutter live path still prefers texture + processTexture). Tear-down: unregister Agora preprocess, then engine.dispose().

LiveKit

Again: Dart sets parameters, native processes textures.
  1. Create an externalContext: true engine in Dart
  2. Obtain texture frames via LiveKit Flutter / a native custom capturer or video processor
  3. Call FacebetterPlugin.processTexture on the GL thread, then feed the output back into the LiveKit track
Hook details vary by livekit_client and platform; texture rules: Android · LiveKit, iOS · LiveKit.