TRTCFlutterDemo - With TRTC, you can quickly develop cost-effective, low-latency, and high-quality interactive audio/video services

Last update: Feb 10, 2022

This document describes how to quickly run the TRTC demo for Flutter.

Environment Requirements

  • Flutter 2.0 or above
  • Developing for Android:
    • Android Studio 3.5 or above
    • Devices with Android 4.1 or above
  • Developing for iOS:
    • Xcode 11.0 or above
    • OS X 10.11 or above
    • A valid developer signature for your project

Prerequisites

You have signed up for a Tencent Cloud account and completed identity verification.

Directions

Step 1. Create an application

  1. Log in to the TRTC console and select Development Assistance > Demo Quick Run.
  2. Click Create Application and enter the application name such as TestTRTC. If you have already created an application, click Select Existing Application.
  3. Add or edit tags according to your actual business needs and click Create.

?

  • An application name can contain up to 15 characters. Only digits, letters, Chinese characters, and underscores are allowed.
  • Tags are used to identify and organize your Tencent Cloud resources. For example, an enterprise may have multiple business units, each of which has one or more TRTC applications. In this case, the enterprise can tag TRTC applications to mark out the unit information. Tags are optional and can be added or edited according to your actual business needs.

Step 2. Download the SDK and demo source code

  1. Download the SDK and demo source code for your platform.
  2. Click Next.

Step 3. Configure demo project files

  1. In the Modify Configuration step, select the development platform in line with the source package downloaded.
  2. Find and open /example/lib/debug/GenerateTestUserSig.dart.
  3. Set parameters in GenerateTestUserSig.dart as follows.
  • SDKAPPID: a placeholder by default. Set it to the actual `SDKAppID`.
  • `SECRETKEY`: a placeholder by default. Set it to the actual key.

  1. Click Next to complete the creation.
  2. After compilation, click Return to Overview Page.

?

  • The method for generating UserSig described in this document involves configuring SECRETKEY in client code. In this method, SECRETKEY may be easily decompiled and reversed, and if your key is leaked, attackers can steal your Tencent Cloud traffic. Therefore, this method is only suitable for the local execution and debugging of the demo.
  • The correct UserSig distribution method is to integrate the calculation code of UserSig into your server and provide an application-oriented API. When UserSig is needed, your application can send a request to the business server for a dynamic UserSig. For more information, please see How do I calculate UserSig on the server?.

Step 4. Compile and run

  1. Run flutter pub get.
  2. Compile, run, and debug the project.

Android

  1. Run flutter run.
  2. Open the demo project with Android Studio (3.5 or above), and click Run.

iOS

Open the /ios demo project in the source code directory with Xcode (11.0 or above) and compile and run the demo project.

FAQs

How do I view TRTC logs?

TRTC logs are compressed and encrypted by default with the .xlog extension at the following address:

  • iOS: Documents/log in the sandbox.
  • Android:
    • 6.7 or below: /sdcard/log/tencent/liteav.
    • 6.8 or above: /sdcard/Android/data/package name/files/log/tencent/liteav/.

What should I do if videos do not show on iOS but do on Android?

Please check whether io.flutter.embedded_views_preview is YES in your info.plist.

What should I do if Android Studio fails to build my project with the error "Manifest merge failed"?

Open /example/android/app/src/main/AndroidManifest.xml. 1. Add xmlns:tools="http://schemas.android.com/tools" to manifest. 2. Add tools:replace="android:label" to application. Illustration

? For more FAQs, please see Flutter.

GitHub

https://github.com/tencentyun/TRTCFlutterDemo
You might also like...

A super effective dart library delivering performance & ensuring greater build speed.

A super effective dart library delivering performance & ensuring greater build speed.

A super effective Dart and Flutter library for delivering performante app 🌝 & ensuring greater build speed πŸš€ . The package has some cook utilizes wh

Nov 22, 2021

Low-level link (text, URLs, emails) parsing library in Dart

linkify Low-level link (text, URLs, emails) parsing library in Dart. Required Dart =2.12 (has null-safety support). Flutter library. Pub - API Docs -

Dec 11, 2021

Linter rules corresponding to the guidelines in Effective Dart

effective_dart This package is deprecated. Before it was deprecated, it was the way to provide analysis options corresponding to the guidelines in Eff

Apr 7, 2022

A lightweight & effective Todo app made with Flutter

A lightweight & effective Todo app made with Flutter

Blue Diary A lightweight & effective Todo app made with Flutter. Supports English and Korean. Screenshots β€’ Download β€’ Usage β€’ Architecture β€’ Feedback

May 10, 2022

Simple app for both Android and Windows to sync Audio Trip songs from the Audio Trip Choreography Discord

ATCD Choreography Sync Simple app for both Android (Oculus Quest native) and Windows (PCVR) to sync Audio Trip songs from the Audio Trip Choreography

Jun 12, 2022

Draggable Scrollbar - A scrollbar that can be dragged for quickly navigation through a vertical list.

Draggable Scrollbar - A scrollbar that can be dragged for quickly navigation through a vertical list.

A scrollbar that can be dragged for quickly navigation through a vertical list. Additionaly it can show label next to scrollthumb with information about current item, for example date of picture created

Jun 10, 2022

Flutter package to render html as widgets that supports hyperlink, image, audio, video, iframe and many other tags.

Flutter package to render html as widgets that supports hyperlink, image, audio, video, iframe and many other tags.

HtmlWidget monorepo This repo contains the source code for everything HtmlWidget-related. Name Link flutter_widget_from_html_core flutter_widget_from_

Jun 18, 2022

A new flutter package project which contains lots of beautiful alert dialog that will help you lot to create beautiful awesome alert box very quickly and easily.

A new flutter package project which contains lots of beautiful alert dialog that will help you lot to create beautiful awesome alert box very quickly and easily.

A new flutter package project which contains lots of beautiful alert dialog that will help you lot to create beautiful awesome alert box very quickly and easily.

Jan 8, 2022

A Video Player For Vimeo Videos in Flutter. This plugin allows us to play video from Vimeo and it supports Android and iOS platforms.

A Video Player For Vimeo Videos in Flutter. This plugin allows us to play video from Vimeo and it supports Android and iOS platforms.

vimeo_video_player A Video Player For Vimeo Videos in Flutter. This plugin allow us to play video from vimeo and it's supports Android and iOS platfor

Mar 8, 2022

Related

Flutter video compress - Generate a new file by compressed video, and provide metadata. Get video thumbnail from a video path, supports JPEG/GIF. To reduce app size not using FFmpeg in IOS.
Flutter video compress - Generate a new file by compressed video, and provide metadata. Get video thumbnail from a video path, supports JPEG/GIF. To reduce app size not using FFmpeg in IOS.

flutter_video_compress Generate a new path by compressed video, Choose to keep the source video or delete it by a parameter. Get video thumbnail from

May 24, 2022
A Flutter plugin that provides assets abstraction management APIs without UI integration, you can get assets (image/video/audio) on Android, iOS and macOS.
A Flutter plugin that provides assets abstraction management APIs without UI integration, you can get assets (image/video/audio) on Android, iOS and macOS.

photo_manager Photo/Assets management APIs for Flutter without UI integration, you can get assets (image/video/audio) from Android, iOS and macOS. 提供相

Jun 23, 2022
Write iOS&Android Code using Dart. This package liberates you from redundant glue code and low performance of Flutter Channel.
Write iOS&Android Code using Dart. This package liberates you from redundant glue code and low performance of Flutter Channel.

Dart_Native Dart_Native operates as both a code generator tool and a bridge to communicate between Dart and native APIs. Replaces the low-performing F

Jun 28, 2022
A Video and Audio player that can play from local assets, local files and network URLs with the powerful controls
A Video and Audio player that can play from local assets, local files and network URLs with the powerful controls

Video/Audio Player in Flutter with Powerful controls How can we play videos in Flutter? There is a library directly from the Flutter team simply calle

Jan 31, 2022
Readky is a Free Flutter News App Starter Template that can help you develop a News application much faster.
Readky is a Free Flutter News App Starter Template that can help you develop a News application much faster.

Readky. Introduction Readky is a Free Flutter News App Starter Template that can help you develop a News application much faster. You just need to add

Jun 22, 2022
Hungry is a Free Flutter Recipe App Starter Template that can help you develop a Recipe application much faster.
Hungry is a Free Flutter Recipe App Starter Template that can help you develop a Recipe application much faster.

Hungry is a Free Flutter Recipe App Starter Template that can help you develop a Recipe application much faster. You just need to add some adjustment to the frontend and you can create your own backend.

Jun 17, 2022
Software analytics tool that helps developers analyse and improve software quality.
Software analytics tool that helps developers analyse and improve software quality.

Dart Code Metrics Note: you can find the full documentation on the website Configuration | Rules | Metrics | Anti-patterns Dart Code Metrics is a stat

Jun 21, 2022
A flutter plugin to play Youtube Videos without API Key in range of Quality(144p, 240p,360p,480p,720p and 1080p).

Youtube Player Plugin This plugin is discontinued. Please use youtube_player_flutter which is an officially provided way of playing youtube videos, su

Nov 18, 2021
Flutter blue plus - Flutter plugin for connecting and communicationg with Bluetooth Low Energy devices, on Android and iOS
Flutter blue plus - Flutter plugin for connecting and communicationg with Bluetooth Low Energy devices, on Android and iOS

Introduction FlutterBluePlus is a bluetooth plugin for Flutter, a new app SDK to

Jun 20, 2022
Code Snippets of highly interactive Flutter Templates that can be implemented in a Native Flutter App.
Code Snippets of highly interactive Flutter Templates that can be implemented in a Native Flutter App.

Native Frontend Flutter About the Repository We are on a mission to make things easy and convenient for all the users who just want to save their time

May 29, 2022