<<

Real-Time Communication

Tencent Real-Time Communication FAQs

Product Documentation

©2013-2019 Tencent Cloud. All rights reserved. Page 1 of 50 Tencent Real-Time Communication

Copyright Notice

©2013-2019 Tencent Cloud. All rights reserved.

Copyright in this document is exclusively owned by Tencent Cloud. You must not reproduce, modify, copy or distribute in any way, in whole or in part, the contents of this document without Tencent Cloud's the prior written consent.

Trademark Notice

All trademarks associated with Tencent Cloud and its services are owned by Tencent Cloud () Company Limited and its affiliated companies. Trademarks of third parties referred to in this document are owned by their respective proprietors.

Service Statement

This document is intended to provide users with general information about Tencent Cloud's products and services only and does not form part of Tencent Cloud's terms and conditions. Tencent Cloud's products or services are subject to change. Specific products and services and the standards applicable to them are exclusively provided for in Tencent Cloud's applicable terms and conditions.

©2013-2019 Tencent Cloud. All rights reserved. Page 2 of 50 Tencent Real-Time Communication

Contents

FAQs How to Deal with Firewall Restrictions iLiveSDK Upgrade How to Downsize Installation Package UserSig Features Android and iOS Desktop Browser Flutter Other

©2013-2019 Tencent Cloud. All rights reserved. Page 3 of 50 Tencent Real-Time Communication

FAQs How to Deal with Firewall Restrictions

Last updated:2021-06-09 18:09:35

Some customers have restrictions placed on public network access by their own companies, so they need to be added to a firewall allowlist before they can get access. The following describes the related rules:

What ports or domain names do I need to add to the allowlist of native SDK for ?

The firewall ports are as follows:

TRTC SDK (Native) Allowed Items

TCP port 443; 20166

UDP port 8000、8080、16285、9000

Domain name allowlist:

cloud.tim.qq.com gz.file.myqcloud.com avc.qcloud.com yun.tim.qq.com dldir1.qq.com mlvbdc.live.qcloud.com query.tencent-cloud.com

What ports or domain names do I need to add to the allowlist of WebRTC?

The firewall ports are as follows:

WebRTC (H5) Allowed Items

TCP port 8687

UDP port 8000; 8800; 843; 443

Domain name allowlist:

©2013-2019 Tencent Cloud. All rights reserved. Page 4 of 50 Tencent Real-Time Communication

qcloud.rtc.qq.com

What domain names do I need to add to the allowlist of WeChat Mini Program?

domain name allowlist:

://official.opensso.tencent-cloud.com https://yun.tim.qq.com https://cloud.tencent.com https://webim.tim.qq.com https://query.tencent-cloud.com

Tencent Cloud IP addresses are dynamically updated, with no fixed batch of IP addresses, so we cannot provide you with a list of fixed IPs.

©2013-2019 Tencent Cloud. All rights reserved. Page 5 of 50 Tencent Real-Time Communication iLiveSDK Upgrade

Last updated:2021-08-25 16:52:53

What are the differences between TRTC V1 (iLiveSDK) and V2 (LiteAVSDK)?

Item Old (V1) New (V2)

Architecture iLiveSDK LiteAVSDK

IM SDK Built-in Not built-in

API V1 V2

CDN streaming Must be enabled via RESTful API Can be enabled via client

Line V1 V2

How do I upgrade from TRTC V1 (iLiveSDK) to V2 (LiteAVSDK)?

If your project has never integrated the TRTC SDK, we strongly recommend that you use V2 (LiteAVSDK) from the beginning, which outperforms V1 in terms of call quality, , ease of integration, and feature extension.

©2013-2019 Tencent Cloud. All rights reserved. Page 6 of 50 Tencent Real-Time Communication

If your project is running stably without encountering any problems, we recommend that you stick to V1 for the time being as the lines of V1 and V2 are not interconnected currently. If you are in the process of integrating the old version SDK (V1) into your project, we recommend that you switch to V2, which uses brand new and is much faster to integrate than V1. If you are already using V1 and hope to improve your call quality by upgrading to V2, since the lines of V1 and V2 are not interconnected currently, you need to first integrate the new SDK into your project, wait for the new version to cover your user base, and then switch from V1 to V2 lines in the cloud. See below for details: i. Integrate the new SDK into your project and run a test. ii. Add a field that indicates the SDK version number in the room list so that your application can determine whether to use the V1 or V2 SDK based on this field on the server. iii. Release the update to your application and wait for it to cover your user base. iv. Change the field indicating the SDK version number in the room list from V1 to V2 to switch from V1 to V2 lines.

How do I integrate LiteAVSDK and iLiveSDK for Android at the same time?

Both iLiveSDK and LiteAVSDK use Tencent Real-time Audio Engine (TRAE) to process audio, for example, for noise suppression and echo cancellation. LiteAVSDK uses a newer version of TRAE and includes all the APIs of iLiveSDK. Therefore, you only need to configure the TRAE library of LiteAVSDK for your project. Integrate the SDKs as AAR files and, in the build.gradle file of your subproject (the application directory), add code in the android{} closure as described below.

Note: You must reference LiteAVSDK before iLiveSDK.

android{ // 1. Configure packaging options in Gradle packagingOptions { pickFirst 'lib/armeabi-v7a/libTRAECodec.so' pickFirst 'lib/armeabi-v7a/libstlport_shared.so' pickFirst 'lib/armeabi/libTRAECodec.so' pickFirst 'lib/armeabi/libstlport_shared.so' } // 2. Import dependencies implementation(name:'LiteAVSDK_TRTC_6.4.7108', ext:'aar') // Make sure that you import LiteAVSDK before iLiveSDK

©2013-2019 Tencent Cloud. All rights reserved. Page 7 of 50 Tencent Real-Time Communication

implementation 'com.tencent.ilivesdk:ilivesdk:1.9.4.6.4' }

How do I integrate LiteAVSDK, iLiveSDK, and BeautySDK for iOS at the same time?

TRTC V1 uses BeautySDK to implement features including beauty filters and animated effects. These features are built into TRTC V2. As a result, if your project has already integrated iLiveSDK and imported BeautySDK, a file conflict will occur. Below is the solution:

Edition Solution

BeautySDK Basic Add a header search path for BeautySDK in your project and unlink (without BeautySDK. retouching features)

BeautySDK Use LiteAVSDK Enterprise, add a header search path for BeautySDK in your Advanced Xcode project, and unlink BeautySDK (LiteAVSDK Enterprise integrates the (with retouching component, which you can use with the license you have already retouching purchased.) features)

How do I integrate LiteAVSDK and iLiveSDK for Windows at the same time?

Both iLiveSDK and LiteAVSDK for Windows use Tencent Real-time Audio Engine (TRAE) to process audio, for example, for noise suppression and echo cancellation. However, LiteAVSDK uses a newer version of TRAE and differs from iLiveSDK in terms of feature usage. Therefore, you cannot use it to replace the TRAE of iLiveSDK directly. Below is the solution:

Project structure

We recommend the following project structure:

| |- Main application.exe |- Other files main application.exe depends on |- iLiveSDK.dll |- Other files iLiveSDK.dll depends on |- LiteAV | |- liteav.dll | |- Other files liteav.dll depends on

©2013-2019 Tencent Cloud. All rights reserved. Page 8 of 50 Tencent Real-Time Communication

Initialization

You can use iLiveSDK by linking a LIB file into your project or load it dynamically using the code below:

HMODULE hiLive = LoadLibrary("iLiveSDK.dll");

To use LiteAVSDK, load and initialize it using the code below:

typedef ITRTCCloud* (*getTRTCShareInstanceMtd)(); typedef void(*destroyTRTCShareInstanceMtd)();

TCHAR dllPath[MAX_PATH]; GetModuleFileName(nullptr, dllPath, MAX_PATH); PathRemoveFileSpec(dllPath); wcscat(dllPath, L"\\LiteAV\\"); SetDllDirectory(dllPath); HMODULE hLiteAV = LoadLibrary(L"liteav.dll"); if (!hLiteAV) { printf("Failed to load liteav.dll: %d", GetLastError()); return; }

getTRTCShareInstanceMtd pGetTRTCShareInstance = (getTRTCShareInstanceMtd)GetProcAddress(hLiteAV, "getTRTCShareInstance"); if (!pGetTRTCShareInstance) { printf("Failed to load the getTRTCShareInstance function"); return; }

destroyTRTCShareInstanceMtd pDestroyTRTCShareInstance = (destroyTRTCShareInstanceMtd)GetProcAddre ss(hLiteAV, "destroyTRTCShareInstance"); if (!pDestroyTRTCShareInstance) { printf("Failed to load the destroyTRTCShareInstance function"); return; }

ITRTCCloud *pTrtcCloud = m_pGetTRTCShareInstance(); if (!pTrtcCloud) { printf("Failed to create a TRTC instance"); return; } SetDllDirectory(nullptr);

pTrtcCloud->enterRoom(...);

©2013-2019 Tencent Cloud. All rights reserved. Page 9 of 50 Tencent Real-Time Communication

How to Downsize Installation Package

Last updated:2021-01-14 17:09:54

How much will the file increment be after the TRTC SDK is integrated?

The file size increment varies by TRTC SDK version. For more information, please see SDK Download.

How do I reduce the size of an installation package for iOS?

Method 1. Only package the ARM64 architecture (recommended) For iPhone models after 5s, you can just package x64 architecture by setting "Build Active Architecture Only" in "Build Settings" in Xcode to "Yes" and write only arm64 into "Valid Architectures". The single-architecture IPA increment of the TRTC SDK will be 1.9 MB only.

Method 2. Enable Bitcode For iPhone 5s and older models, if all third-party libraries in the project support Bitcode, you can enable Bitcode to reduce the size of the installation package. Toggle on "Enable Bitcode" in "Build Settings" > "Build Options" to enable bitcode.

From 2016 on, Apple started to support Bitcode compilation in the Xcode development environment. After Bitcode is enabled, the compiler will generate the application's intermediate

©2013-2019 Tencent Cloud. All rights reserved. Page 10 of 50 Tencent Real-Time Communication

code instead of the actual assembly code, and users will download and install the machine code generated for the specific mobile CPU architecture from App Store, which greatly reduces the installation package size.

How do I reduce the size of an installation package for Android?

Method 1. Only package certain .so files If your application is used in Mainland only, you can just package the .so files for the armeabi-v7a architecture to reduce the increment in the installation package size to below 5 MB. If you want to offer your application on Play, you can package the .so files for the armeabi- v7a and arm64-v8a architectures. Directions:* add abiFilters "armeabi-v7a" to build.gradle of the current project to specify to package the .so files in a single architecture only or add abiFilters "armeabi-v7a","arm64-v8a" to specify to package .so files in two architectures. If only .so files in armeabi-v7a architecture are packaged (i.e., your application is not offered on Google Play):

If .so files in armeabi-v7a and arm64-v8a architectures are packaged (i.e., your application is offered on Google Play):

©2013-2019 Tencent Cloud. All rights reserved. Page 11 of 50 Tencent Real-Time Communication

Method 2. Only package JAR files (i.e., .so files will be downloaded after installation)

Note:

If you want to offer your application on Google Play, please do not use this method, as it may cause a failure in offering the application.

The size of .so files takes the greatest proportion of the total size of the SDK for Android. If you want to reduce your installation package to below 1 MB, you can use the method of downloading .so files after installation: i. In the folder on GitHub, find and download the package named in the format of LiteAVSDK_TRTC_x.x.xxx.zip , decompress it, and find the .so files for the specified architecture. ii. the .so files downloaded in step 1 to your server (or Tencent Cloud COS) and record the download address such as http://xxx.com/so_files.zip . iii. Before an SDK feature such as video playback is started by the user, use a loading animation to prompt the user that the relevant feature module is being loaded. When the user is waiting, the application can download the .so files from http://xxx.com/so_files.zip and store the files in the application directory (such as the files folder in the application's root directory). To ensure that this process is not affected by ISP DNS hijacking, please verify the integrity of the .so files after download to check whether the zip package has been tampered with the ISP. iv. After all .so files are ready, call the setLibraryPath() API in the TXLiveBase class (the earliest basic module of LiteAVSDK ) to set the target paths of the downloaded .so files to the paths in

©2013-2019 Tencent Cloud. All rights reserved. Page 12 of 50 Tencent Real-Time Communication

the SDK, so that the SDK can load the required .so files at those paths and start the relevant features.

©2013-2019 Tencent Cloud. All rights reserved. Page 13 of 50 Tencent Real-Time Communication

UserSig

Last updated:2021-07-29 19:37:28

What is UserSig?

UserSig is a security signature designed by Tencent Cloud for the purpose of preventing attackers from accessing your Tencent Cloud account. Currently, Tencent Cloud services including TRTC, IM, and MLVB all use this security mechanism. Whenever you want to use these services, you must provide three key pieces of information, i.e. SDKAppID , UserID , and UserSig in the initialization or login function of the corresponding SDK. SDKAppID is used to identify your application, and UserID your user. UserSig is a security signature calculated based on the two parameters using the HMAC SHA256 encryption algorithm. Attackers cannot use your Tencent Cloud traffic without authorization as long as they cannot forge a UserSig . See the figure below for how UserSig is calculated. Basically, it involves hashing crucial information such as SDKAppID , UserID , and ExpireTime .

// `UserSig` calculation formula, in which `secretkey` is the key used to calculate `UserSig`. usersig = hmacsha256(secretkey, (userid + sdkappid + currtime + expire + base64(userid + sdkappid + currtime + expire)))

How do I get a key?

1. Log in to the TRTC console and click Application Management. 2. Find your SDKAppID , click Application Info, and select the Quick Start tab. 3. View the secret key used to calculate UserSig in Step 2: obtain the secret key to issue UserSig.

©2013-2019 Tencent Cloud. All rights reserved. Page 14 of 50 Tencent Real-Time Communication

4. Click Copy Secret Key to copy the key to the .

Only public and private key information can be obtained when I try to view the secret key. How do I get the secret key?

TRTC SDK 6.6 (August 2019) and later versions use the new signature algorithm HMAC-SHA256. If your application was created before August 2019, you need to upgrade the signature algorithm to get a new key. Without upgrading, you can continue to use the old algorithm ECDSA-SHA256. After upgrading, you can switch between the new and old algorithms as needed.

Upgrade/Switch:

1. Log in to the TRTC console. 2. Click Application Management on the left sidebar, find the target application, and click Application Info. 3. Select the Quick Start tab and click Upgrade, Asymmetric Encryption, or HMAC-SHA256 in Step 2: obtain the secret key to issue UserSig. Upgrade:

©2013-2019 Tencent Cloud. All rights reserved. Page 15 of 50 Tencent Real-Time Communication

Switch to the old algorithm ECDSA-SHA256:

Switch to the new algorithm HMAC-SHA256.

How do I calculate UserSig on the client?

We provide an open-source module called GenerateTestUserSig in the TRTC SDK sample code. Set the three member variables of SDKAPPID , EXPIRETIME , and SECRETKEY , and you will be able to call the genTestUserSig() function to obtain the UserSig and get started quickly with the SDK.

File Applicable Source File Relative Path Platform Code Link

iOS [GitHub] iOS/TRTCScenesDemo/TXLiteAVDemo/Debug/GenerateTestUserSig.h

Mac Github Mac/OCDemo/TRTCDemo/TRTC/GenerateTestUserSig.h

Android [GitHub]) Android/TRTCScenesDemo/debug/src/main/java/com/tencent/liteav/debu

©2013-2019 Tencent Cloud. All rights reserved. Page 16 of 50 Tencent Real-Time Communication

File Applicable Source File Relative Path Platform Code Link

Windows GitHub Windows/DuilibDemo/GenerateTestUserSig.h (C++)

Windows GitHub Windows/CSharpDemo/GenerateTestUserSig.cs (C#)

Web Github Web/base-js/js/debug/GenerateTestUserSig.js

Flutter GitHub /lib/debug/GenerateTestUserSig.dart

Note: This method is only applicable for debugging. It’s not recommended for official launch because SECRETKEY of the client code (especially for the web) may be easily decompiled and reversed. If your key is leaked, attackers can steal your Tencent Cloud traffic.

The correct method is to deploy the UserSig calculation code on your project server so that your app can request from your server a UserSig that is calculated whenever one is needed.

How do I calculate UserSig on the server?

©2013-2019 Tencent Cloud. All rights reserved. Page 17 of 50 Tencent Real-Time Communication

Using the server to calculate UserSig offers the utmost protection against key leakage, for it is more difficult to hack a server than it is to reverse engineer an application. See below for the specific method.

1. Before your application calls the SDK initialization function, request UserSig from your server. 2. Your server will calculate a UserSig based on the SDKAppID and UserID . You can find the calculation source code in the first half of this document. 3. The sever returns the UserSig to your application. 4. Your application sends the UserSig to the SDK through a specific API. 5. The SDK submits the SDKAppID + UserID + UserSig to the Tencent Cloud server for verification. 6. Tencent Cloud verifies the validity of the UserSig . 7. If the UserSig is valid, real time audio/video services will be provided to the TRTC SDK.

To simplify your implementation process, we provide UserSig calculation source code in multiple languages.

Language Signature Algorithm Key Function Download Link

Java HMAC-SHA256 genSig GitHub

©2013-2019 Tencent Cloud. All rights reserved. Page 18 of 50 Tencent Real-Time Communication

Language Signature Algorithm Key Function Download Link

GO HMAC-SHA256 GenSig GitHub

PHP HMAC-SHA256 genSig GitHub

Nodejs HMAC-SHA256 genSig GitHub

Python HMAC-SHA256 gen_sig GitHub

C# HMAC-SHA256 GenSig GitHub

How do I calculate UserSig with the old algorithm?

To simplify the signature calculation process and facilitate your use of Tencent Cloud services, on July 19, 2019, TRTC switched from ECDSA-SHA256 to the new signature algorithm HMAC-SHA256. This means that all SDKAppID created on and after July 19, 2019 will use the new HMAC-SHA256 algorithm.

If your SDKAppID was created before July 19, 2019, you can continue to use the old signature algorithm, whose source code can be downloaded in the below .

Language Signature Algorithm Download Link

Java ECDSA-SHA256 GitHub

C++ ECDSA-SHA256 GitHub

GO ECDSA-SHA256 GitHub

PHP ECDSA-SHA256 GitHub

Nodejs ECDSA-SHA256 GitHub

C# ECDSA-SHA256 GitHub

Python ECDSA-SHA256 GitHub

©2013-2019 Tencent Cloud. All rights reserved. Page 19 of 50 Tencent Real-Time Communication

Features

Last updated:2021-07-27 16:21:46

What is a RoomID in TRTC? What is its value range?

A RoomID (room ID) uniquely identifies a room and can range from 1 to 4294967295. You are responsible for maintaining and assigning the Room IDs of your applications.

What is a UserID in TRTC? What is its value range?

A UserID (user ID) uniquely identifies a user in a TRTC application. It can contain letters (case sensitive), digits, and underscores, preferably not longer than 32 bytes.

How long is the lifecycle of a TRTC room?

The first user who enters a room is the owner of the room, but cannot close the room. In the call modes, TRTC closes a room when all users exit the room. In the live streaming modes, if the last user who exits a room is an anchor, TRTC will close the room immediately; if the user is a viewer, TRTC will close the room in 10 minutes. A user will be removed from a room 90 seconds after unexpected disconnection. If all users are unexpectedly disconnected, the room will be closed after 90 seconds. If a user attempts to enter a room that does not exist, TRTC will automatically create a room with the ID entered.

Can users not subscribe to audio/video streams?

To enable instant streaming, TRTC subscribes users to audio/video streams by default upon room entry. You can call the setDefaultStreamRecvMode API to switch to the manual subscription mode.

Can I specify a stream ID for relayed push in TRTC?

Yes. You can specify a streamId via TRTCParams of enterRoom or call the startPublishing API to pass in the streamId .

What roles are supported during live streaming in TRTC? How do they differ from each other?

The live streaming scenarios ( TRTCAppSceneLIVE and TRTCAppSceneVoiceChatRoom ) support two roles: TRTCRoleAnchor (anchor) and TRTCRoleAudience (viewer). An anchor can both send and receive audio/video data, but a viewer can only receive and play back others' data. You can call switchRole() to switch roles.

What is a role in TRTC?

©2013-2019 Tencent Cloud. All rights reserved. Page 20 of 50 Tencent Real-Time Communication

The concept of roles (anchors and viewers) is applicable only in the live streaming scenarios. The anchor role ( TRTCRoleAnchor ), which can be assigned to 30 users at the same time, can both send and receive audio/video, and the viewer role ( TRTCRoleAudience ), which can be assigned to 100,000 users at the same time, can only receive audio/video.

What application scenarios are supported in TRTC rooms?

The following application scenarios are supported:

TRTCAppSceneVideoCall: the video call scenario, which is suitable for one-to-one video calls, video conferences with up to 300 participants, online medical consultation, video chat, and video interviews TRTCAppSceneLIVE: the interactive video live broadcasting scenario, which is suitable for low- latency video live streaming, interactive classroom for up to 100,000 participants, live video competition, video dating, remote training, and conferences TRTCAppSceneAudioCall: the audio call scenario, which is suitable for one-to-one audio calls, audio conferences with up to 300 participants, audio chat, and online Werewolf playing TRTCAppSceneVoiceChatRoom: the interactive audio live broadcasting scenario, which is suitable for low-latency audio live streaming, live audio co-anchoring, audio chat rooms, karaoke, and FM broadcasting

What platforms does TRTC support?

TRTC supports platforms including iOS, Android, Windows (C++), Windows (C#), macOS, desktop browsers, and Electron. For more information, see Supported Platforms.

What are the differences among TRTC Lite, Professional, and Enterprise?

See Differences Among Editions.

Does TRTC support co-anchoring during live streaming?

Yes. For detailed instructions, see:

Live Streaming Mode (iOS and macOS) Live Streaming Mode (Android) Live Streaming Mode (Windows) Live Streaming Mode (Web)

How many rooms can there be in TRTC at the same time?

There can be up to 4,294,967,294 concurrent rooms in TRTC. No limits are set on the number of non- concurrent rooms.

©2013-2019 Tencent Cloud. All rights reserved. Page 21 of 50 Tencent Real-Time Communication

How do I create a room?

A room is automatically created by TRTC when a user enters a room. Therefore, you do not need to manually create a room. Just call the client API for room entry.

iOS and macOS > enterRoom Android > enterRoom Windows (C++) > enterRoom Windows (C#) > enterRoom Electron > enterRoom Desktop Browser > join

What is the upper limit on the bandwidth used for the video service of TRTC?

There isn’t a limit.

Can TRTC be deployed on-premises?

No, it cannot.

How long is the average delay in TRTC?

The average end-to-end delay of TRTC around the globe is less than 300 ms.

Does TRTC support active calling?

You can enable this feature using signaling channels. For example, you can use the custom message feature of IM to enable active calling. For more information, see the scenario-specific demos in the SDK source code.

Can users use earphones when having one-to-one video calls in TRTC?

Yes, they can.

Can TRTC be used outside the Chinese mainland?

Yes, it can.

Does TRTC support screen on PCs?

Yes. For details, see the following documents:

Real-Time (Windows) Real-Time Screen Sharing (macOS) Real-Time Screen Sharing (Desktop Browser)

©2013-2019 Tencent Cloud. All rights reserved. Page 22 of 50 Tencent Real-Time Communication

For information on the screen sharing APIs, see Client APIs > All Platforms (C++), Client APIs > Windows (C#), or Client APIs > Electron.

Can I local video files in TRTC?

Yes. You can achieve this using the Custom Capturing and Rendering feature.

Can I record live streaming videos and store the recording files locally on my phone?

Recording files cannot be stored locally on phones. They are stored in VOD by default. You can download and save them to your phone. For more information, please see On-Cloud Recording and Playback.

Does TRTC support audio-only streams?

Yes, it does.

Can there be more than one screen sharing image in the same room?

Currently, only one screen sharing substream is allowed in a room.

When a specified window is shared ( SourceTypeWindow ), if the window size changes, will the resolution of the video stream change accordingly?

By default, the TRTC SDK automatically adjusts encoding parameters based on the size of the shared window. If you want to fix the resolution, call the setSubStreamEncoderParam API to set the encoding parameters for screen sharing or set the encoding parameters when calling startScreenCapture .

Does TRTC support 1080p videos?

Yes. You can set the resolution through setVideoEncoderParam , the video encoding parameter of the SDK.

Can I customize data capturing in TRTC?

You can on some platforms. For details, see Custom Capture and Rendering.

Is communication between TRTC and the ILVB SDK possible?

No, it's not.

Is communication between TRTC and MLVB possible?

TRTC and MLVB have different backend architectures and therefore cannot communicate with each other. Relayed push from TRTC to CDNs is possible though.

©2013-2019 Tencent Cloud. All rights reserved. Page 23 of 50 Tencent Real-Time Communication

How do different room entry modes ( AppScene ) vary from one another in TRTC?

TRTC has four room entry modes. Video call ( VideoCall ) and audio call (·VoiceCall ) are the call modes, and interactive video live streaming ( Live ) and interactive audio live streaming ( VoiceChatRoom`) are the live streaming modes.

The call modes allow a maximum of 300 users in each TRTC room, and up to 30 of them can speak at the same time. The call modes are suitable for scenarios such as one-to-one video calls, video conferences with up to 300 participants, online medical consultation, video interviews, video customer service, and online Werewolf playing. The live streaming modes allow a maximum of 100,000 concurrent users in each room, with smooth mic connection/disconnection. Co-anchoring latency is kept below 300 ms and watch latency below 1,000 ms. The live streaming modes are suitable for scenarios such as low-latency interactive live streaming, interactive classrooms for up to 100,000 participants, video dating, online education, remote training, and mega conferences.

Can I use the hands-free mode during video calls in TRTC?

Yes. You can enable the hands-free mode by setting audio routes. In a native SDK, use the setAudioRoute API to switch routes.

Does TRTC support volume reminders?

Yes. You can call the enableAudioVolumeEvaluation API to enable volume reminders.

Does TRTC support mirror images?

Yes. You can call the setLocalViewMirror API to set the mirroring mode for the preview image of the local camera or call setVideoEncoderMirror to set the mirroring mode for encoded images.

Can I record the audio of a TRTC call and save the recording file locally?

Yes. You can call startAudioRecording to record all the audio of a call, including that of the local user, remote users and the background , into a single file in the format of PCM, WAV, or AAC.

Can I record the video of a TRTC call into a file?

TRTC supports audio/video recording on a local server. To use this feature, please submit a ticket for the SDK and instructions. You can also use the on-cloud recording and playback feature to record videos.

Does TRTC support floating windows (like those in WeChat) or switching between big and small images?

©2013-2019 Tencent Cloud. All rights reserved. Page 24 of 50 Tencent Real-Time Communication

These features are part of UI design, for which the TRTC SDK sets no restrictions. The official demo provides sample code for image floating and the grid layout and supports floating windows, switching between big and small images, and dragging images. For more information, see the official demo.

How do I make an audio-only call in TRTC?

TRTC does not use separate channels for audio and video. You can make an audio-only call by calling only startLocalAudio but not `startLocalPreview.

How do I enable relayed push and recording for an audio-only call in TRTC?

In TRTC SDK below version 6.9, you need to construct json{\"Str_uc_params\": {\"pure_audio_push_mod\":1}} and pass it in TRTCParams.businessInfo during room entry. 1 means relayed push, and 2 means relayed push and recording. In TRTC SDK 6.9 or above, just set the scene parameter to TRTCAppSceneAudioCall or TRTCAppSceneVoiceChatRoom during room entry.

Can I kick a user out, forbid a user to speak, or mute a user in a TRTC room?

Yes, you can.

To enable the features through simple signaling operations, use sendCustomCmdMsg , the custom signaling API of TRTC, to define your own control signaling, and users who receive the message will perform the action expected. For example, to kick out a user, just define a kick-out signaling, and the user receiving it will exit the room. If you want to implement a more comprehensive operation logic, we recommend that you use to map the TRTC room to an IM group and enable the features via the sending/receiving of custom in the group.

Can TRTC pull and play back RTMP/FLV streams?

Yes. The TRTC SDK has integrated TXLivePlayer. If you need more player features, consider using the all-featured LiteAVSDK_Professional.

How many people can be in the same call in TRTC?

In the call modes, each room can accommodate up to 300 concurrent users, and up to 30 of them can enable their cameras or mics. In the live streaming modes, each room can accommodate up to 100,000 concurrent viewers, and up to 30 of them can be assigned the anchor role and enable their cameras or mics.

How do I start a live streaming session in TRTC?

©2013-2019 Tencent Cloud. All rights reserved. Page 25 of 50 Tencent Real-Time Communication

TRTC offers a dedicated low-latency interactive live streaming solution that allows up to 100,000 participants with co-anchoring latency kept as low as 200 ms and watch latency below 1s. It adapts excellently to poor network conditions and is optimized for the complicated mobile network environments. For detailed directions, please see Live Streaming Mode.

Can I use the custom message sending API of TRTC to implement features such as chat rooms and on-screen comments?

No. Custom message sending is intended for simple and low-frequency signaling scenarios. For details, see Sending Custom Messages > Use Limits.

Can I loop background music in TRTC? Can I adjust the playback progress of background music?

Yes. You can call the playback API again in the completion callback to loop background music, and call setBGMPosition() to set the playback progress.

Note: setBGMPosition() has been replaced with TXAudioEffectManager seekMusicToPosInMS since version 7.3.

Can I listen for the entry/exit of users through callbacks in TRTC? Can I use onUserEnter or onUserExit ?

Yes. You can use onRemoteUserEnterRoom and onRemoteUserLeaveRoom to listen for the entry/exit of users, but callbacks are triggered only for users who can send data.

Note: onUserEnter and onUserExit have been replaced with onRemoteUserEnterRoom and onRemoteUserLeaveRoom since version 6.8.

How do I listen for network disconnection and reconnection in TRTC?

You can listen for the events through the following callbacks:

onConnectionLost : the SDK is disconnected from the server. onTryToReconnect : the SDK tries to reconnect to the server. onConnectionRecovery : the SDK is reconnected to the server.

©2013-2019 Tencent Cloud. All rights reserved. Page 26 of 50 Tencent Real-Time Communication

Is there a callback for first frame rendering? Can I listen for the start of image rendering or audio playback?

Yes. You can use onFirstVideoFrame and onFirstAudioFrame to listen for the events.

Can I take a screenshot of a video in TRTC?

Currently, you can call snapshotVideo() on iOS and Android to take screenshots of local and remote videos.

Why do I fail to connect peripheral devices such as Bluetooth earphones to TRTC?

Currently, TRTC supports mainstream Bluetooth earphones and peripherals, but for some devices, there are still compatibility issues. We recommend that you use our official demos, WeChat, and QQ audio/video calls to test the compatibility of a device.

How do I get information such as the upstream/downstream bitrate, resolution, packet loss rate, and audio sample rate of a TRTC audio/video call?

You can call the onStatistics() API of the SDK to get the statistics.

Does TRTC’s background music API playBGM() support online music?

No. Currently, it supports only local music. You can download an online music file and then call playBGM() to play it back.

Can I set the local audio capturing volume or the playback volume of each remote user?

Yes. You can call setAudioCaptureVolume() to set the audio capturing volume of the SDK and setRemoteAudioVolume() to set the playback volume of a remote user.

What are the differences between stopLocalPreview and muteLocalVideo ?

stopLocalPreview is used to stop local video capturing. If you call this API, both you and other users will not be able to see your image. muteLocalVideo is used to stop the sending of local video images. If you call this API, other users will not see your image, but you can still preview your own image.

What are the differences between stopLocalAudio and muteLocalAudio ?

stopLocalAudio is used to disable the capturing and sending of local audio. When muteLocalAudio is called, TRTC does not stop the sending of audio/video data. It continues to send muted data packets at extremely low bitrate.

©2013-2019 Tencent Cloud. All rights reserved. Page 27 of 50 Tencent Real-Time Communication

What resolutions does the TRTC SDK support?

We recommend that you set the resolution as instructed in Setting Image Quality for better image quality.

How do I set the upstream video bitrate, resolution, and frame rate in the TRTC SDK?

Call the setVideoEncoderParam() API of TRTCCloud and set videoResolution (resolution), videoFps (frame rate), and videoBitrate (bitrate) in TRTCVideoEncParam .

How do I set the rotation degree of an image in the TRTC SDK?

Please see Video Image Rotation and Zooming.

How do I make a video call in the landscape mode?

Please see Video Image Rotation and Zooming.

How do I match the rotation degrees of the local and remote images if they are different?

Please see Video Image Rotation and Zooming.

What image quality-related settings (bitrate, resolution, and frame rate) does TRTC recommend?

See Setting Image Quality > Recommended Configuration.

Can I test my network speed in TRTC? How?

Yes, you can. For details, see Testing Network Speed Before Chat.

Can I control access to a TRTC room to allow only authorized users to enter the room?

Yes. For details, please see Enabling Advanced Permission Control.

Can I pull and play back streams through CDNs?

Yes, you can. For details, please see CDN Relayed Live Streaming.

What formats does TRTC support for custom rendering?

iOS: I420, NV12, and BGRA Android: I420 and Texture2D

What is TRTC?

©2013-2019 Tencent Cloud. All rights reserved. Page 28 of 50 Tencent Real-Time Communication

Tencent Real-Time Communication (TRTC) leverages Tencent's years of experience in network and audio/video technologies to offer group audio/video calls and low-latency interactive live streaming solutions, allowing you to quickly develop cost-effective, low-latency, and high-quality interactive audio/video services. For details, please see Product Introduction > Overview.

How can I try out the TRTC demo?

Please see Free Demo.

How can I get started quickly with TRTC?

TRTC offers demo source code for different platforms to allow you to quickly build your own apps. For details, please see User Tutorial.

How do I enable on-cloud recording and playback in TRTC?

Please see On-Cloud Recording and Playback.

©2013-2019 Tencent Cloud. All rights reserved. Page 29 of 50 Tencent Real-Time Communication

Android and iOS

Last updated:2021-05-07 14:24:06

What system volume types does TRTC support on mobile devices (Android and iOS)?

It supports two system volume types, i.e., call volume and media volume.

Call volume is designed for call scenarios. It uses phones’ built-in acoustic echo cancellation (AEC) technique and offers lower audio quality than media volume does. In the call volume mode, the volume cannot be turned to 0 with the volume buttons, but the mics of Bluetooth earphones can be used for audio capture. Media volume is designed for music scenarios. It offers higher sound quality than call volume does. In the media volume mode, the volume can be turned to 0 with the volume buttons, and if you want to enable the AEC feature, the SDK will use its built-in acoustic processing algorithm to process the audio. With media volume, only the mics on phones can be used to capture audio.

How do I set the resolution for push to 1080p in the SDK on mobile devices?

1080p is defined as 114 in TX_Enum_Type_VideoResolution . Just set the resolution by passing in the enumerated value.

How do I implement the screen sharing feature in TRTC on mobile devices?

Android: version 7.2 and above support screen sharing. For detailed instructions on how to implement the feature, see Real-Time Screen Sharing (Android). iOS: version 7.2 and above support in-app screen sharing, and version 7.6 and above support both system-level and in-app screen sharing. For detailed instructions on how to implement the feature, see Real-Time Screen Sharing (iOS).

Does TRTC support the 64-bit arm64-v8a architecture on Android?

TRTC has supported the arm64-v8a ABI since version 6.3.

Does TRTC support Swift integration on iOS?

Yes. Just integrate the SDK in the same steps as you do a third-party library or by following the steps in Demo Quick Start (iOS & macOS).

Can I run the TRTC SDK in the background on iOS?

Yes, you can. To run the SDK in the background, select the project, set Background Modes under Capabilities to ON, and check Audio, AirPlay and Picture in Picture, as shown below:

©2013-2019 Tencent Cloud. All rights reserved. Page 30 of 50 Tencent Real-Time Communication

Can I listen for room exit by remote users on iOS?

You can use onRemoteUserLeaveRoom to listen for room exit events. With this API, callbacks are triggered only if all users under the VideoCall mode or anchors under the Live mode leave the room.

How do I make a video call with the phone screen locked?

For how to implement features including offline answering, see Real-Time Voice Call (Android) - Answer a call offline

Can Android and web users call each other?

Yes. They just need to use the same SDKAppID and enter the same room. For more information, see the documents below:

Demo Quick Start (Android) Demo Quick Start (Desktop Browser)

Can both anchors and viewers initiate co-anchoring during live streaming?

©2013-2019 Tencent Cloud. All rights reserved. Page 31 of 50 Tencent Real-Time Communication

Yes. Both anchors and viewers can initiate a co-anchoring request using the same logic. For more information, please see Demo Quick Start (Android).

Can I create N TRTC objects and log in to N rooms with N user IDs on the same page?

Yes. It is possible for a user to enter multiple rooms since version 7.6.

The demo is running on two mobile phones, but why can't they display the images of each other?

Please make sure that the two mobile phones use different user IDs when running the demo, as TRTC does not support the use of the same user ID on two devices simultaneously unless different SDKAppIDs are used.

What firewall restrictions does TRTC face?

The SDK uses the UDP protocol for audio/video transmission and therefore cannot be used in office networks that block UDP. If you encounter such a problem, see How to Deal with Firewall Restrictions to troubleshoot the issue.

What should I if the iOS app crashes when I build and run it?

Check if it is caused by the debug mode issue on iOS 14 and above. For details, see this Flutter document.

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

Make sure that in info.plist of your project, the value of io.flutter.embedded_views_preview is YES .

What should I do if an error occurs when I run CocoaPods on iOS after updating to the latest version of the SDK?

1. Delete Podfile.lock in the iOS directory. 2. Run pod repo update . 3. Run pod install . 4. Run CocoaPods again.

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

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

©2013-2019 Tencent Cloud. All rights reserved. Page 32 of 50 Tencent Real-Time Communication

What should I do if an error occurs due to the absence of signatures when I debug my project on a real device?

The error message is as shown in the figure:

1. Purchase an Apple certificate and you will be able to debug on a real device after configuration and signing. 2. Configure in target > signing & capabilities after purchase.

Why can’t I find the corresponding file after deleting/adding content in the swift file of the plugin?

In the directory of your main project, run pod install in the folder of / .

What should I do if the error “Info.plist, error: No value at that key path or invalid key path: NSBonjourServices” occurs when I run my project?

Run flutter clean and run the project again.

What should I do if an error occurs when I run pod install?

©2013-2019 Tencent Cloud. All rights reserved. Page 33 of 50 Tencent Real-Time Communication

The error message is as shown in the figure:

According to the message, the error is caused by the absence of generated.xconfig , and to fix the problem, you need to run flutter pub get.

Note:

This problem occurs after compilation with Flutter. You won’t run into the problem if you have a new project or have run flutter clean .

What should I do if a dependency error occurs when I run my project on iOS?

The error message is as shown in the figure:

The error may occur because the pods target version fails to meet the requirements of the plugin being depended on. You need to change the target in the pods in question to the specified version.

©2013-2019 Tencent Cloud. All rights reserved. Page 34 of 50 Tencent Real-Time Communication

Desktop Browser

Last updated:2021-08-27 16:03:34

What browsers support TRTC SDK for desktop browsers?

TRTC SDK for desktop browsers is well supported by Chrome (desktop), Edge (desktop), and (desktop and mobile), but poorly or not supported by other platforms such as browsers on Android. For more information, please see Supported Platforms. You can visit WebRTC Support Level Test in a browser to test whether the environment fully supports WebRTC.

Can TRTC SDK for desktop browsers communicate with TRTC for PC?

Yes. TRTC supports communication across all platforms.

Native TRTC SDKs have an on-cloud stream mix API, but how can I implement the on-cloud stream mixing feature with TRTC SDK for desktop browsers?

Currently, there isn’t an on-cloud stream mix API for desktop browsers. You can call the CreateCommonMixStream API of CSS to mix streams.

What should I do if the error "RtcError: no valid ice candidate found" occurs when I run TRTC SDK for desktop browsers?

It indicates that the SDK failed to punch holes via Session Traversal Utilities for NAT (STUN). Please check your firewall policy. TRTC SDK for desktop browsers uses the following ports and domain name for data transfer, which should be added to the allowlist of the firewall. After configuration, use the official demo to check whether the configuration has taken effect.

TCP port: 8687 UDP ports: 8000, 8080, 8800, 843, 443, 16285 Domain name: qcloud.rtc.qq.com

What should I do if the client error "RtcError: ICE/DTLS Transport connection failed" or "RtcError: DTLS Transport connection timeout" occurs?

It indicates that TRTC SDK for desktop browsers failed to establish a media transport connection. Please check your firewall policy. The SDK uses the following ports and domain name for data transfer, which should be added to the allowlist of the firewall. After configuration, use the official demo to check whether the configuration has taken effect.

TCP port: 8687 UDP ports: 8000, 8080, 8800, 843, 443, 16285

©2013-2019 Tencent Cloud. All rights reserved. Page 35 of 50 Tencent Real-Time Communication

Domain name: qcloud.rtc.qq.com

How do I implement the screenshot feature in TRTC SDK for desktop browsers?

Please see the Stream.getVideoFrame() API.

What do the errors NotFoundError , NotAllowedError , NotReadableError , OverConstrainedError , and AbortError found in the log of TRTC SDK for desktop browsers mean?

Error Description Suggested Solution

The media (audio, video, or screen sharing) specified by Remind users to check devices such as the request parameter cameras and mics before making a call. If a are not found. user does not have a camera and wants to NotFoundError This error occurs if, for make an audio call, use example, the PC has TRTC.createStream({ audio: true, video: no cameras but the false }) to make the SDK capture audio only. browser is asked to obtain a video stream.

The user has rejected the request of the current browser Remind the user that audio/video calls are NotAllowedError instance to access the not possible without camera/mic access. camera/mic or share screens.

The user has granted Handle the error according to the error access to the message returned, and send this message requested device, but to the user: “The camera/mic cannot be NotReadableError it is still inaccessible accessed. Please make sure that no other due to a hardware, applications are requesting access and try browser, or webpage again.” error.

The Make sure that a valid OverConstrainedError cameraId/microphoneId cameraId/microphoneId value is passed in. value is invalid.

The device cannot be AbortError accessed due to an - unknown reason.

©2013-2019 Tencent Cloud. All rights reserved. Page 36 of 50 Tencent Real-Time Communication

For more information, please see initialize.

Does TRTC SDK for desktop browsers support the dual-channel (big and small images) encoding mode as that enabled by enableSmallVideoStream ?

No, TRTC SDK for desktop browsers does not support the dual-channel encoding mode for now.

How do I remove a camera from the camera list after the camera is disconnected in TRTC SDK for desktop browsers?

You can try calling getCameras to get the new device list. If there is still information of the disconnected camera, it indicates that the browser has not refreshed the list, so TRTC SDK for desktop browsers cannot get the new device list.

How do I record audio-only streams in TRTC SDK for desktop browsers? Why does the recording fail after I enable auto relayed push and auto recording in the console?

You need to set the pureAudioPushMode parameter of createClient.

Can TRTC SDK for desktop browsers get the current volume?

The getAudioLevel method can be used to get the current volume.

Can I change the style of the screen sharing pop-up window in TRTC SDK for desktop browsers?

No, because the style of the pop-up window is determined by the browser and cannot be changed at the webpage level.

In TRTC SDK for desktop browsers, does the resolution set for pushed streams apply to all browsers?

Video resolutions may not match on different devices and browsers. In such cases, the browser will adjust the resolution automatically so that it is close to the value set in setVideoProfile . For more information, see setVideoProfile.

How do I check whether TRTC SDK for desktop browsers can get the device (camera/mic) list?

1. Check whether the browser can access the devices: Open the console with the browser and enter navigator.mediaDevices.enumerateDevices() to see if the device list can be obtained. Normally, a promise containing an array of MediaDeviceInfo objects will be returned, each object corresponding to an available media device.

©2013-2019 Tencent Cloud. All rights reserved. Page 37 of 50 Tencent Real-Time Communication

If the SDK fails to enumerate the devices, a rejected promise will be returned, indicating that the browser fails to detect any devices. You need to check the browser or devices. 2. If the device list can be obtained, enter navigator.mediaDevices.getUserMedia({ audio: true, video: true }) to see if the MediaStream object can be returned. If it is not returned, it indicates that the browser failed to obtain any data. You need to check your browser configuration.

What do I do with echo or noise in TRTC SDK for desktop browsers?

If other users hear echo or noise from a user using TRTC SDK for desktop browsers, it indicates that 3A (AEC, ANS, and AGC) processing is not working. WebRTC provides a set of 3A algorithms, which you can control by enabling or disabling AEC, ANS, and AGC in MediaTrackConstrains . To fix the issues of echo, noise, and low volume, you can enable AEC, ANS, and AGC by setting echoCancellation , noiseSuppression , and autoGainControl to true when calling createStream of localstream in TRTC SDK for desktop browsers. If any of the following occurs, it indicates that the browser is incompatible with the device used. Please check the device or replace it.

The echo issue persists after echoCancellation is set to true . Background noise persists after noiseSuppression is set to true . The volume remains low after autoGainControl is set to true .

For more information, please see MediaTrackConstraints.

How do I capture the audio played back by the shared application on Windows?

You can call the startSystemAudioLoopback API to enable system audio capturing.

How to implement the feature that allows anchors to invite audience to audio/video interaction in the conference mode on Windows?

You need to use another Tencent Cloud product, IM, to enable the feature.

This is how it works: A sends a custom message X (you can determine how the message is displayed) to B, and the calling page is triggered; B receives X and the called page is triggered; B uses enterRoom to enter the room and sends a custom message X1 to A; A receives X1 (you can determine whether to display the message) and uses enterRoom to enter the room. The messages are sent via IM.

How do audience watch the video of co-anchors in a room?

In the live streaming modes, audience enter the room and get the userid of anchors via onUserVideoAvailable in TRTCCloudDelegate (users who are co-anchoring enter the room via

©2013-2019 Tencent Cloud. All rights reserved. Page 38 of 50 Tencent Real-Time Communication

enterRoom and are also anchors for audience). They then call startRemoteView to display the video of the anchors. For more information, please see Live Streaming Mode > Windows.

Can I listen for room exit by remote users on web?

Yes. You can use the client.on('peer-leave') event to receive notifications when a remote user exits the room.

©2013-2019 Tencent Cloud. All rights reserved. Page 39 of 50 Tencent Real-Time Communication

Flutter

Last updated:2021-01-29 10:40:36

The demo is running on two mobile phones, but why can't they display the images of each other?

Make sure that the two mobile phones use different UserIDs. With TRTC, you cannot use the same UserID on two devices simultaneously unless the SDKAppIDs are different.

What firewall restrictions does TRTC face?

The SDK uses the UDP protocol for audio/video transmission and therefore cannot be used in office networks that block UDP. If you encounter such a problem, see How to Deal with Firewall Restrictions to troubleshoot the issue.

What should I do if the iOS app crashes when I build and run it?

Check if it is caused by the debug mode issue on iOS 14 and above. For details, see this Flutter document.

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

Make sure that in info.plist of your project, the value of io.flutter.embedded_views_preview is YES .

What should I do if an error occurs when I run CocoaPods on iOS after updating to the latest version of the SDK?

1. Delete Podfile.lock in the iOS directory. 2. Run pod repo update . 3. Run pod install . 4. Run CocoaPods again.

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

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

©2013-2019 Tencent Cloud. All rights reserved. Page 40 of 50 Tencent Real-Time Communication

What should I do if an error occurs due to the absence of signatures when I debug my project on a real device?

The error message is as shown in the figure:

1. Purchase an Apple certificate and you will be able to debug on a real device after configuration and signing. 2. Configure in target > signing & capabilities after purchase.

Why can’t I find the corresponding file after deleting/adding content in the swift file of the plugin?

In the directory of your main project, run pod install in the folder of /ios .

What should I do if the error “Info.plist, error: No value at that key path or invalid key path: NSBonjourServices” occurs when I run my project?

Run flutter clean and run the project again.

What should I do if an error occurs when I run pod install?

©2013-2019 Tencent Cloud. All rights reserved. Page 41 of 50 Tencent Real-Time Communication

The error message is as shown in the figure:

According to the message, the error is caused by the absence of generated.xconfig , and to fix the problem, you need to run flutter pub get.

Note:

This problem occurs after compilation with Flutter. You won’t run into the problem if you have a new project or have run flutter clean .

What should I do if a dependency error occurs when I run my project on iOS?

The error message is as shown in the figure:

The error may occur because the pods target version fails to meet the requirements of the plugin being depended on. You need to change the target in the pods in question to the specified version.

©2013-2019 Tencent Cloud. All rights reserved. Page 42 of 50 Tencent Real-Time Communication

Other

Last updated:2021-04-12 20:22:32

What are the differences and relationships between LVB, ILVB, TRTC, and relayed live streaming?

LVB (keywords: one-to-many, RTMP/HLS/HTTP-FLV, CDN) LVB consists of the push end, playback end, and LVB cloud service. The LVB cloud service uses CDN to deliver live streams, which are pushed over the universal standard protocol RTMP. After being delivered by CDN, live streams can be watched over protocols such as RTMP, HTTP-FLV, or HLS (for HTML5). ILVB (keywords: co-anchoring, anchor competition) ILVB is a live streaming mode where the anchor and viewers can interact through co-anchoring and different anchors can compete with each other. TRTC (keywords: multi-person interaction, UDP-based proprietary protocol, low-latency) Real-time communication (RTC) is mainly applicable to audio/video interaction and low-latency live streaming. With the aid of a UDP-based proprietary protocol, its latency can be reduced to 100 ms, which is ideal for scenarios such as QQ call, VooV Meeting, and online big classes. Tencent Real- Time Communication (TRTC) supports mainstream platforms including iOS, Android, Windows, Mini Program, and WebRTC and can relay live streams to CDN through on-cloud stream mix. Relayed live streaming (keywords: on-cloud stream mix, RTC relayed live streaming, CDN) The relayed live streaming technology replicates and mixes multiple pushed streams in a low- latency co-anchoring room into one stream in the cloud and then pushes the mixed stream to CDN for delivery and playback.

The demo is running on two devices, but why can't they display the images of each other?

Please make sure that the two devices use different UserID values when running the demo, as TRTC does not support using the same UserID on two devices simultaneously, unless different SDKAppID values are used.

During CDN live watching, there is only one user in the room, but the video image is lagging and blurry. Why?

Please specify the TRTCAppScene parameter in enterRoom as TRTCAppSceneLIVE . The VideoCall mode is optimized for video calls, so when there is only one user in the room, the video image will maintain a low bitrate and frame rate to reduce network traffic usage, which will look lagging and blurry.

©2013-2019 Tencent Cloud. All rights reserved. Page 43 of 50 Tencent Real-Time Communication

Why can't I enter any online room?

This may be because that room permission control has been enabled. Once room permission control is enabled, all rooms under the current SDKAppID can be entered only after privateMapKey is set in TRTCParamEnc , so if your online business is in operation and the relevant logic of privateMapKey has not been added to it, please do not enable this feature. For more information, please see Configuring Permission for Entering Room.

How do I view TRTC logs?

TRTC logs are compressed and encrypted by default in the .xlog extension. You can set setLogCompressEnabled to specify whether to encrypt logs. If the generated log filename contains C (compressed) , the log is compressed and encrypted; if it contains R (raw) , the log is in plaintext.

iOS/macOS: Documents/log of sandbox Android: 6.7 or below: /sdcard/log/tencent/liteav 6.8 or above: /sdcard/Android/data/package name/files/log/tencent/liteav/ Windows: %appdata%/tencent/liteav/log Web: open the browser console or use vConsole to log the printed SDK information Mini Program: enable the debug attribute of the and tags and use vConsole to log the printed information

Note:

You need to download the decryption tool to view a .xlog file. Place the tool in the same directory of the .xlog file in Python 2.7 and directly run python decode_mars_log_file.py to launch the tool. Download address of log decryption tool: dldir1.qq.com/hudongzhibo/log_tool/decode_mars_log_file.py .

What should I do if a 10006 error occurs?

If "Join room failed result: 10006 error: service is suspended,if charge is overdue,renew it" is displayed, please check whether your TRTC application service is available. Log in to the TRTC Console, click the application you created, click Account Info, and you can view

©2013-2019 Tencent Cloud. All rights reserved. Page 44 of 50 Tencent Real-Time Communication

the service status in the account information tab.

Why is error code -100018 returned for room entry?

This error is due to a UserSig verification failure, which may be caused by the following:

The SDKAppID parameter passed in is incorrect. You can log in to the TRTC Console, select Application Management, and view the corresponding SDKAppID . The corresponding verification signature UserSig passed in for the UserID parameter is incorrect. You can log in to the TRTC Console and select Development Assistance > UserSig Generation & Verification to verify the UserSig .

How do I implement cross-room co-anchoring (anchor competition)?

The connectOtherRoom API can be used. After calling connectOtherRoom() , the anchors can get the cross-room competition result through the onConnectOtherRoom callback. All users in the room of anchor A/B will receive the notification of anchor B/A's room entry through the onUserEnter callback.

Why do exceptions such as occupied device camera or mic occur?

When the exitRoom() API is called, the logic related to room exit will be executed, such as releasing resources of audio/video devices and codecs. Release of hardware devices is an async operation. After resources are released, the SDK will use the onExitRoom() callback in TRTCCloudListener to notify the upper layer. If you want to call enterRoom() again or switch to another audio/video SDK, please do so after receiving the onExitRoom() callback.

Is it necessary to call the exitRoom() API?

No matter whether room entry is successful, enterRoom must be used together with exitRoom . If enterRoom is called again before exitRoom is called, an unexpected error will occur.

How do I remove the black bars in the TRTC video image?

You can solve this problem by setting TRTCVideoFillMode_Fill (fill mode). The video rendering modes of TRTC include fill and fit. You can set the rendering mode of the local or remote image through setLocalViewFillMode() or setRemoteViewFillMode , respectively.

©2013-2019 Tencent Cloud. All rights reserved. Page 45 of 50 Tencent Real-Time Communication

TRTCVideoFillMode_Fill: the entire screen will be covered by the image, where parts that exceed the screen will be cropped, so the displayed image may be incomplete. TRTCVideoFillMode_Fit: the long side of the image will fit the screen, while the short side will be proportionally scaled with unmatched areas being filled with black color blocks, but the displayed image is definitely complete.

Why are the local and remote images of TRTC horizontally reversed?

The locally captured image is horizontally reversed by default, which can be set through the setLocalViewMirror API on App. This API changes only the mirroring mode of the preview image of the local camera. You can also use the setVideoEncoderMirror API to set the mirroring mode of the image output by the encoder. This API does not change the preview image of the local camera; instead, it changes the video image viewed by the remote user (and recorded by the server). Moreover, you can set this on web by using createStream API to modify mirror parameter.

Why doesn't the set video encoding output direction take effect in TRTC?

You need to set setGSensorMode() to TRTCGSensorMode_Disable to disable gravity sensing; otherwise, after setVideoEncoderRotation is called, the image viewed by the remote user will not change.

What should I do if a TRTC call uses the TXVodPlayer player for playback together, but the playback volume level is very low?

You can use the setSystemVolumeTyp API to set the system volume type used during the call to TRTCSystemVolumeTypeMedia (media volume mode).

There is normal TRTC upstream data, but relayed pull failed and the video image couldn't be viewed. Why?

Please check whether auto-relay push is enabled in the TRTC Console.

What are the formats of the recording files generated in various relayed recording scenarios?

The recording file formats configured in the TRTC Console shall prevail.

How do I select the media or call volume type?

You can call the setSystemVolumeType API to select the media or call volume type as needed.

TRTCAudioVolumeTypeAuto: call volume type is used when the mic is on and media volume type is used when the mic is off, which is the default value. TRTCAudioVolumeTypeVOIP: call volume type is always used. TRTCAudioVolumeTypeMedia: media volume mode is always used.

©2013-2019 Tencent Cloud. All rights reserved. Page 46 of 50 Tencent Real-Time Communication

How do I know whether the camera is enabled successfully?

If the onCameraDidReady callback is received, the camera is ready.

How do I know whether the mic is enabled successfully?

If the onMicDidReady callback is received, the mic is ready.

How do I know whether the audio/video call stream is successfully pushed?

You can use the onSendFirstLocalVideoFrame callback. The system will start capturing the camera and encode the captured image after successful call of enterRoom and startLocalPreview . This callback event will be returned after the SDK successfully sends the first video frame data to the cloud.

How do I know whether the pure audio call stream is successfully pushed?

You can use the onSendFirstLocalAudioFrame callback. The system will start capturing the mic and encoding the captured audio after successful call of enterRoom and startLocalPreview . This callback event will be returned after the SDK successfully sends the first audio frame data to the cloud.

Can I query all UserID values?

Currently, statistics of all UserID values are not available. After user accounts are successfully signed up on the client, you can write all user information into SQL for management and query.

Can users with the same UserID be in the same room at the same time?

In TRTC, users with the same UserID cannot be in the same room at the same time; otherwise, there will be a conflict.

Why doesn't audio routing (receiver/speaker) configured by calling the setAudioRoute API take effect?

Receiver/Speaker can be switched only in call volume mode, that is, this API will take effect only if it is called when two or more users are co-anchoring.

Does TRTC only support enabling auto-recording in the console? How do I enable manual recording?

You can enable manual recording in TRTC in the following steps:

1. Log in to the TRTC Console, enable auto-relay push, and disable on-cloud recording. 2. After a user enters a room, the streamid corresponding to the UserID will be calculated according to the stream ID generation rule. 3. Use the CreateLiveRecord API of LVB to start the recording task of the streamid .

©2013-2019 Tencent Cloud. All rights reserved. Page 47 of 50 Tencent Real-Time Communication

DomainName: [bizid].livepush.myqcloud.com AppName: trtc_[sdkappid] StreamName: streamid

4. After the recording task is completed, LVB will directly write the file into VOD and send the event notification through the recording callback.

How does TRTC verify the generated UserSig? How do I troubleshoot errors -3319 and -3320 reported during room entry?

You can log in to the TRTC Console and select Development Assistance > UserSig Generation & Verification to verify the UserSig .

How do I view the call duration and usage in TRTC?

You can view the information on the Usage Statistics page in the TRTC Console.

How do I maintain the user list and count the number of viewers in a live room in TRTC?

If IM is integrated into your project, you can directly use the IM group user counting API to count the number of viewers in a room. However, the number counted in this method is not very accurate. If you have a low requirement for online viewer count, you can directly use this method. If you want to count the number of online viewers very accurately, we recommend you implement the following statistics logic on your own:

1. Increase the viewer count (client -> server): when a new viewer enters a room, add 1 to the viewer count of the room. To implement this, you can make the application's viewer client send an increment request to the server during room entry. 2. Decrease the viewer count (client -> server): when a viewer exits a room, subtract 1 from the viewer count of the room. To implement this, you can make the application's viewer client send a decrement request to the server during room exit.

An error -100013 was reported during room entry, and the error message was ERR_SERVER_INFO_SERVICE_SUSPENDED . What should I do?

This error indicates that the service is unavailable. Please check the following:

Whether the remained validity period in minutes in the package is greater than 0. Whether your Tencent Cloud account is in arrears.

How do I monitor the network status and implement the strength display feature in TRTC?

©2013-2019 Tencent Cloud. All rights reserved. Page 48 of 50 Tencent Real-Time Communication

You can use onNetworkQuality() to listen on the current upstream/downstream quality of the network and implement the signal strength display feature as instructed here.

How do I know whether the new MCU stream mix or legacy on-cloud stream mix is used in TRTC?

If the following conditions are met and mcumix = 1 is printed in the client log, the new MCU stream mix is used:

The application is created on or after January 9, 2020. The TRTC SDK is on v6.9 or above.

What should I do if the stream mix API failed to be called and did not take effect in TRTC.?

1. Make sure that auto-relay push is enabled in the TRTC Console. 2. Listen on the onSetMixTranscodingConfig() API and make changes based on the returned error message. 3. If the relayed stream ID is customized through an SDK API, the legacy on-cloud stream mix scheme will fail. 4. If onSetMixTranscodingConfig() returns a success, but the relayed pull through CDN still cannot take effect, it may be caused by the lack of playback domain name. We recommend you check the playback domain name configuration.

TRTC started on-cloud recording but generated no recording files. What should I do?

1. Make sure that auto-relay push and on-cloud recording are enabled in the TRTC Console. 2. TRTC will start recording only if there is a user upstreaming audio/video data normally in the room. 3. A recording file will be generated only if the relayed pull through CDN is normal. 4. If an audio stream is played back at first and then switched to a video stream, based on the recording template, the recording file may be generated for only the audio or video data.

How do I troubleshoot if occurs in TRTC?

You can view the call quality of the corresponding RoomID and UserID on the Monitoring Dashboard page in the TRTC Console:

Check the sender and receiver status on the receiver client. Check whether the packet loss rate is high for the sender and receiver, and if so, the lag is generally caused by unstable network conditions. Check the frame rate and CPU utilization. Either a low frame rate or a high CPU utilization can cause lag.

©2013-2019 Tencent Cloud. All rights reserved. Page 49 of 50 Tencent Real-Time Communication

How do I troubleshoot blurry video image, low image quality, and other problems in TRTC?

The definition is mainly subject to the bitrate. Check whether the bitrate configured in the SDK is low. If the resolution is high, but the bitrate is low, blurs tend to occur. TRTC dynamically adjusts the bitrate and resolution based on the network conditions according to the on-cloud QoS bandwidth limit policy. If the network is poor, the bitrate tends to be reduced, which will cause decreased definition. Check whether the VideoCall or Live mode is used during room entry. As the VideoCall mode is dedicated to call scenarios and features low-latency and smoothness, it tends to reduce the image quality on a weak network in order to ensure the smoothness. Therefore, we recommend you use the Live mode in scenarios with a high requirement for image quality.

How do I give the room number to the co-anchor I invite?

You can add roomid in the custom message for parsing. For more information on how to do this, see Creating a custom message and TIMMsgSendNewMsg.

Can I wait for at least two members join the room before the recording?

Yes. If you want to obtain the mixed audio data, please enable On-Cloud MixTranscoding, specify the output stream ID, and call the CreateRecordTask API.

©2013-2019 Tencent Cloud. All rights reserved. Page 50 of 50