
Tencent Real-Time Communication Tencent Real-Time Communication Getting Started Product Documentation ©2013-2019 Tencent Cloud. All rights reserved. Page 1 of 83 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 Computing (Beijing) 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 83 Tencent Real-Time Communication Contents Getting Started Demo Quick Start iOS & macOS Android Windows Desktop Browser Electron Flutter Unity SDK Quick Integration iOS Android Mac Windows Desktop Browser Electron Flutter Qt Creator FAQs for Beginners ©2013-2019 Tencent Cloud. All rights reserved. Page 3 of 83 Tencent Real-Time Communication Getting Started Demo Quick Start iOS & macOS Last updated:2021-07-13 15:03:04 This document describes how to quickly run the Tencent Cloud TRTC demo for iOS and macOS. Environment Requirements Xcode 11.0 or above Your project has a valid developer signature. Qt Creator 4.13.3 (macOs) or above 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 Start Now, enter an application name, e.g. TestTRTC , and click Create. Step 2. Download the SDK and demo source code 1. Mouse over the corresponding block to download the SDK and demo source code. iOS ©2013-2019 Tencent Cloud. All rights reserved. Page 4 of 83 Tencent Real-Time Communication iOS: click GitHub to visit GitHub (or click ZIP) macOS: click GitHub to visit GitHub (or click ZIP) 2. After the download, return to the TRTC console and click Downloaded and Next to view your SDKAppID and secret key. ©2013-2019 Tencent Cloud. All rights reserved. Page 5 of 83 Tencent Real-Time Communication Step 3. Configure demo project files. 1. Decompress the source package downloaded in step 2. 2. Find and open the GenerateTestUserSig.h file. Platform Relative Path to File iOS iOS/TRTCScenesDemo/TXLiteAVDemo/Debug/GenerateTestUserSig.h Mac Mac/OCDemo/TRTCDemo/TRTC/GenerateTestUserSig.h 3. Set parameters in the GenerateTestUserSig.h file. SDKAPPID: it is 0 by default. Please replace it with the real `SDKAppID`. SECRETKEY: left empty by default. Set it to the actual secret key. 4. Return to the TRTC console and click Pasted and Next. 5. Click Close Guide and Enter Console to Manage Applications. Note: 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, see How do I calculate UserSig on the server?. Step 4. Compile and run the project. 1. Go to the directory where the TRTCScenesDemo > Podfile file of the source code is located in a terminal window. 2. Run the pod install command to install the TRTC SDK, or run the pod update command to update the local library. 3. Use Xcode (11.0 or above) to open the TXLiteAVDemo.xcworkspace project in the source code directory, and compile and run the project. ©2013-2019 Tencent Cloud. All rights reserved. Page 6 of 83 Tencent Real-Time Communication FAQ 1. 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 secret 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: Switch to the legacy algorithm ECDSA-SHA256: ©2013-2019 Tencent Cloud. All rights reserved. Page 7 of 83 Tencent Real-Time Communication Switch to the new algorithm HMAC-SHA256. 2. 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. 3. What firewall restrictions does the SDK 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 for assistance. ©2013-2019 Tencent Cloud. All rights reserved. Page 8 of 83 Tencent Real-Time Communication Android Last updated:2021-06-17 20:26:23 This document describes how to quickly run the TRTC demo for Android. Environment Requirements Android 4.1 (SDK API level 16) or above (Android 5.0 (SDK API level 21) or above is recommended.) Android Studio 3.5 or above Devices with Android 4.1 or above 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. Enter an application name, e.g. TestTRTC , and click Create. Step 2. Download the SDK and demo source code. 1. Download the SDK and demo source code for your platform. 2. Click Next step. Step 3. Configure demo project files. 1. In the Modify Configuration step, select the platform in line with the source package downloaded. 2. Find and open Android/TRTCScenesDemo/debug/src/main/java/com/tencent/liteav/debug/GenerateTestUserSig.java . 3. Set parameters in GenerateTestUserSig.java as follows. SDKAPPID: `PLACEHOLDER` by default. Set it to the actual `SDKAppID`. SECRETKEY: `PLACEHOLDER` by default. Set it to the actual key. ©2013-2019 Tencent Cloud. All rights reserved. Page 9 of 83 Tencent Real-Time Communication 4. Click Next step to complete the creation. 5. After compilation, click Return to Overview Page. Note: 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, see How do I calculate UserSig on the server?. Step 4. Compile and run the project. Use Android Studio (3.5 or above) to open TRTCScenesDemo and run the project. FAQs 1. Only public and private keys can be obtained when I try to view the key. How do I get a 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 in the left navigation pane, find your 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 10 of 83 Tencent Real-Time Communication Switch to the legacy algorithm ECDSA-SHA256: Switch to the new algorithm HMAC-SHA256: 2. 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. 3. What firewall restrictions does the SDK 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.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages83 Page
-
File Size-