3 Star 0 Fork 0

mirrors_tencentyun / TRTCUnrealEngine

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

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.

Environment Requirements

  • Unreal Engine 4.27.1 or above
  • Developing for Android:
    • Android Studio 4.0 or above
    • Visual Studio 2017 15.6 or above
    • A real device for testing
  • Developing for iOS and macOS:
    • Xcode 11.0 or above
    • OS X 10.11 or above
    • A valid developer signature for your project
  • Developing for Windows:
    • OS: Windows 7 SP1 or above (64-bit based on x86-64)
    • Disk space: at least 1.64 GB of space after the IDE and relevant tools are installed
    • Visual Studio 2019

Prerequisites

You have signed up for a Tencent Cloud account and verified your identity.

Directions

Step 1. Create an application

  1. In the TRTC console, select Development Assistance > Demo Quick Run.
  2. Enter an application name such as TestTRTC. If you have already created an application, click Existing to select it.
  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. If you have any questions, create an issue here.
  2. Click Next.

Step 3. Configure the demo project file

  1. In the Modify Configuration step, select your platform.
  2. Find and open /TRTC_Demo/Source/debug/include/DebugDefs.h.
  3. Set parameters in DebugDefs.h as follows:
  • SDKAPPID: `0` by default. Set it to the actual `SDKAppID`.
  • SECRETKEY: left empty 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, package, and run the project

Open /TRTC_Demo/TRTC_Demo.uproject.Compile, run, and test the project.

macOS

  1. Go to File > Package Project > Mac.
  2. Configure permissions. Right-click the xxx.app file compiled in the previous step and select Show Package Contents.
  3. Go to Contents > Info.plist.
  4. Select Information Property List and add the following two permissions:
<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>
  1. If you use UE4 Editor, add the above permissions to the UE4Editor.app file.

Windows

  1. Go to File > Package Project > Windows > Windows(64-bit).

iOS

  1. The following permissions are required on iOS.
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.

Android

  1. For development and testing, see Android Quick Start.
  2. For packaging, see Packaging Android Projects.

Running the Demo

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 Cross-Platform (C++) APIs

API Documentation (Chinese)

API Documentation (English)

FAQs

How do I view TRTC logs?

TRTC logs are compressed and encrypted by default with the .xlog extension. You can view them via the following paths:

  • iOS: Documents/log of the application 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 UE4 Editor crashes on macOS?

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>

What should I do if the error "Attempt to construct staged filesystem reference from absolute path" occurs on Android?

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.

空文件

简介

取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors_tencentyun/TRTCUnrealEngine.git
git@gitee.com:mirrors_tencentyun/TRTCUnrealEngine.git
mirrors_tencentyun
TRTCUnrealEngine
TRTCUnrealEngine
main

搜索帮助

344bd9b3 5694891 D2dac590 5694891