This document describes how to quickly run the TRTC demo for Unreal Engine.
Note:Currently, the demo can be run on Windows, macOS, iOS, and Android.
You have signed up for a Tencent Cloud account.
TestTRTC
. If you have already created an application, select Existing.Note:
- 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.
In the Modify Configuration step, select your platform.
Find and open /TRTC_Demo/Source/debug/include/DebugDefs.h
.
Set parameters in DebugDefs.h
as follows:
Click Next to complete the creation.
After compilation, click Return to Overview Page.
Note:
- The method for generating
UserSig
described in this document involves configuringSECRETKEY
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 ofUserSig
into your server and provide an application-oriented API. WhenUserSig
is needed, your application can send a request to the business server for a dynamicUserSig
. For more information, please see How do I calculate UserSig on the server?.
/TRTC_Demo/TRTC_Demo.uproject
.xxx.app
file compiled in the previous step and select Show Package Contents.<key>NSCameraUsageDescription</key>
<string>Video calls are possible only with camera permission.</string>
<key>NSMicrophoneUsageDescription</key>
<string>Audio calls are possible only with mic access.</string>
The demo offers implementation code for one-to-one video calls, which you can use for testing or as reference for API calls. For more information about APIs, see All Platforms (C++) > Overview.
Note:The UI of the latest version of the demo may look different.
TRTC logs are compressed and encrypted by default with the .xlog
extension. You can view them via the following paths:
Documents/log
of the application sandbox/sdcard/log/tencent/liteav
/sdcard/Android/data/package name/files/log/tencent/liteav/
Make sure you have added the following audio/video permissions to info.plist
of UE4Editor.app.
<key>NSCameraUsageDescription</key>
<string>Video calls are possible only with camera permission.</string>
<key>NSMicrophoneUsageDescription</key>
<string>Audio calls are possible only with mic access.</string>
Close the UE4 project, open Command Prompt, and type the following strings:
adb shell
cd sdcard
ls (you should see the UE4Game directory listed)
rm -r UE4Game
Compile your project again.
Was this page helpful?