# TRTC_Flutter **Repository Path**: liteavsdk/TRTC_Flutter ## Basic Information - **Project Name**: TRTC_Flutter - **Description**: High-quality Interactive Audio/Video Flutter SDK - **Primary Language**: Dart - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 2 - **Created**: 2022-03-22 - **Last Updated**: 2026-11-10 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README [简体中文](https://github.com/Tencent-RTC/TRTC_Flutter/blob/master/README-zh_CN.md) | English # **Tencent RTC Flutter SDK** Leveraging Tencent's 21 years of experience in network and audio/video technologies, Tencent Real-Time Communication (TRTC) offers solutions for group audio/video calls and low-latency interactive live streaming. With TRTC, you can quickly develop cost-effective, low-latency, and high-quality interactive audio/video services. ## **Demo quick start** Tencent RTC publishes documentation on two sites. Please use the one that matches your region: | Region | Documentation | | --- | --- | | Outside the Chinese mainland | [Demo Quick Start(Flutter)](https://trtc.io/document/39243?platform=flutter&product=rtcengine&menulabel=sdk) | | Chinese mainland | [Demo Quick Start(Flutter)](https://cloud.tencent.com/document/product/647/51601) | ## **SDK quick integration** | Region | Documentation | | --- | --- | | Outside the Chinese mainland | [Quick integration(Flutter)](https://trtc.io/document/64203?platform=flutter&product=rtcengine&menulabel=sdk) | | Chinese mainland | [Quick integration(Flutter)](https://cloud.tencent.com/document/product/647/116547) | ## **SDK class files** * trtc_cloud-Tencent Cloud TRTC Core Function Interface. * trtc_cloud_video_view-Provides widgets for rendering video `TRTCCloudVideoView`. * tx_audio_effect_manager-Tencent Cloud Audio Effect Management Module. * tx_device_manager-Tencent Cloud Audio Effect Management Module. * trtc_cloud_def-TRTC key class definition Description: definitions of interfaceerated and constant values such as resolution and quality level * trtc_cloud_listener-Tencent Cloud TRTC Event Notification Interface. ## **Sample call** 1.**Initialization** ``` // Create TRTCCloud singleton trtcCloud = await TRTCCloud.sharedInstance(); // Tencent Cloud Audio Effect Management Module txDeviceManager = trtcCloud.getDeviceManager(); // Tencent Cloud Audio Effect Management Module txAudioManager = trtcCloud.getAudioEffectManager(); ``` 2.**Room entry/exit** ``` // Room entry/exit trtcCloud.enterRoom( TRTCParams( sdkAppId: sdkAppId, userId: userId, userSig: userSig, roomId: roomId), TRTCCloudDef.TRTC_APP_SCENE_VIDEOCALL); // Leave a room trtcCloud.exitRoom(); ``` 3.**Listener registration** ``` // Register a listener TRTCCloudListener listener = TRTCCloudListener( onError: (errorCode, errorMessage) { debugPrint("TRTCCloudListener onError errCode:$errCode errMsg: $errMsg"); } …… ) trtcCloud.registerListener(listener); //Remove a listener trtcCloud.unRegisterListener(listener); ``` 4.**Playing local video** ``` // Parameters: // frontCamera: `true`: front camera; `false`: rear camera // viewId: view ID generated by `TRTCCloudVideoView` TRTCCloudVideoView( onViewCreated: (viewId) { trtcCloud.startLocalPreview(true, viewId); }); ``` 5.**Display remote video** ``` // Parameters: // userId: Specifies the userid of the remote user // streamType: Specifies the type of video stream to watch userid: //* HD big picture:TRTCVideoStreamType.big //* Low definition large picture:TRTCVideoStreamType.small // viewId: view ID generated by `TRTCCloudVideoView` TRTCCloudVideoView( onViewCreated: (viewId) { trtcCloud.startRemoteView(userId, TRTCVideoStreamType.big, viewId); }); ``` 6.**Enabling/disabling the mic** ``` // Turn the mic on: start local audio capturing and publishing. // quality: audio quality //* Smooth (suitable for voice call): TRTCAudioQuality.speech //* Default: TRTCAudioQuality.defaultMode //* HD (suitable for music): TRTCAudioQuality.music trtcCloud.startLocalAudio(TRTCAudioQuality.defaultMode); // Turn the mic off: stop local audio capturing and publishing. trtcCloud.stopLocalAudio(); ``` ### How do I view TRTC logs? TRTC logs are compressed and encrypted by default with the XLOG extension. You can set setLogCompressEnabled to specify whether to encrypt logs. If a log filename contains C (compressed), the log is compressed and encrypted; if it contains R (raw), the log is in plaintext. * iOS:Documents/log of the application sandbox * Android * 6.7 or below: /sdcard/log/tencent/liteav * 6.8 or above: /sdcard/Android/data/package name/files/log/tencent/liteav/