This document describes how to quickly run the TRTC demo for Unreal Engine.
! Currently, the demo can be run on Windows, macOS, iOS, and Android.
You have signed up for a Tencent Cloud account and verified your identity.
TestTRTC
. If you have already created an application, click Existing to select it.?
- 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.
/TRTC_Demo/Source/debug/include/DebugDefs.h
.DebugDefs.h
as follows:?
- 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?.
Open /TRTC_Demo/TRTC_Demo.uproject
.Compile, run, and test the project.
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>
Privacy - Camera Usage Description
Privacy - Microphone Usage Description
To add the permissions to info.plist
, go to Edit > Project Settings > Platforms: iOS and add
<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>
to Additional Plist Data
.
2. Go to File > Package Project > iOS to package your project.
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.
? 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.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。