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

Overview

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.

You might also like...

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

Sep 5, 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

Dec 10, 2022

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 -

Nov 4, 2022

The XOR Encryption algorithm is a effective and easy to implement method of symmetric encryption.

Symmetric XOR cipher library About XOR cipher XOR Encryption is an encryption method used to encrypt data and is hard to crack by brute-force method,

Apr 20, 2022

🎨 An opinionated, effective and correct way to provide multiple themes to your app.

🎨 An opinionated, effective and correct way to provide multiple themes to your app.

theming This is an opinionated and effective way to provide multi-theme choice for your app. theming depends on provider and shared_preference for sta

Nov 28, 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_

Jan 6, 2023

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

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

Dec 9, 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

Dec 6, 2022
Owner
腾讯云
腾讯云的APIs, SDKs, 开源项目以及文档
腾讯云
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

天海るり 179 Dec 8, 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.

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

FlutterCandies 526 Jan 4, 2023
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

Harsh Mistry 12 Jan 31, 2022
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

DartNative 893 Jan 4, 2023
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

Muhammad Rezky Sulihin 54 Nov 26, 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. You just need to add some adjustment to the frontend and you can create your own backend.

Muhammad Rezky Sulihin 48 Dec 20, 2022
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

Dart Code Checker 745 Dec 26, 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

Sarbagya Dhaubanjar 120 Nov 13, 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

atcd 2 Nov 15, 2022
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

null 141 Dec 22, 2022