tencent cloud

Video on Demand

릴리스 노트 및 공지 사항
릴리스 노트
제품 소개
제품 개요
Product Features
제품 기능
제품 장점
시나리오
솔루션
구매 가이드
과금 개요
과금 방식
구매 가이드
청구서 조회
연장 안내
연체 안내
환불 안내
시작하기
콘솔 가이드
콘솔 소개
서비스 개요
애플리케이션 관리
미디어 관리
리소스 패키지 관리
License Management
사례 튜토리얼
미디어 업로드
VOD 미디어 파일을 스마트 콜드 스토리지하는 방법
비디오 처리
배포 및 재생
이벤트 알림 수신 방법
원본 서버 마이그레이션 방법
라이브 방송 녹화
사용자 지정 Origin-pull을 수행하는 방법
라이브 방송 하이라이트 클리핑을 VOD에 통합하기 위한 가이드
EdgeOne을 사용하여 VOD 콘텐츠 배포하는 방법
개발 가이드
미디어 업로드
미디어 처리
비디오 AI
이벤트 알림
비디오 재생
미디어 파일 다운로드
서브 애플리케이션 시스템
오류 코드
플레이어 SDK 문서
Overview
Basic Concepts
Features
Free Demo
Free Trial License
Purchase Guide
SDK Download
Licenses
Player Guide
Integration (UI Included)
Integration (No UI)
Advanced Features
API Documentation
Player Adapter
Player SDK Policy
FAQs
모바일 재생
요금
비디오 업로드
비디오 배포
비디오 재생
Web 재생
전체 화면 재생
데이터 통계
액세스 관리
미디어 자산 콜드 스토리지
Agreements
Service Level Agreement
VOD 정책
개인 정보 보호 정책
데이터 처리 및 보안 계약
문의하기
용어집

Integration Guide

PDF
포커스 모드
폰트 크기
마지막 업데이트 시간: 2025-09-19 10:14:42
This document describes how to quickly integrate RT-Cube's player SDK into your project. Different versions of the SDK can be integrated in the same way.

Environment Requirements

Android Studio 2.0 or above
Android 4.1 (SDK API level 16) or above

Integrating the SDK (AAR)

You can use Gradle to automatically load the AAR file or manually download the AAR file and import it into your project.

Method 1: automatic loading (AAR)

The player SDK has been released to the mavenCentral repository, and you can configure it in Gradle to download LiteAVSDK_Player_Premium updates automatically. Open your project with Android Studio and modify the build.gradle file as described below to complete the integration.


1. Add the mavenCentral repository to the build.gradle in your project's root directory.
repositories {
mavenCentral()
}
2. Open the build.gradle in the app directory and add the LiteAVSDK_Player dependencies to dependencies.
dependencies {
// This configuration integrates the latest version of `LiteAVSDK_Player_Premium` by default.
implementation 'com.tencent.liteav:LiteAVSDK_Player_Premium:latest.release'
// To integrate an earlier version such as 10.8.0.29000, configure as follows:
// implementation 'com.tencent.liteav:LiteAVSDK_Player_Premium:10.8.0.29000'
}
3. In defaultConfig, specify the CPU architecture to be used by the application. Currently, LiteAVSDK_Player supports armeabi, armeabi-v7a, and arm64-v8a.
defaultConfig {
ndk {
abiFilters "armeabi", "armeabi-v7a", "arm64-v8a"
}
}
4. Click the Sync Now button

to sync the SDK. If you have no problem accessing Maven Central, the SDK will be downloaded and integrated into your project automatically.

Method 2: manual download (AAR)

If you have problem accessing Maven Central, you can manually download the SDK and integrate it into your project.
1. Download LiteAVSDK_Player_Premium and decompress the file.
2. Copy the AAR file in the SDK directory to the app/libs directory of your project.



3. Add flatDir to build.gradle under your project’s root directory to specify the local path for the repository.



4. Add the LiteAVSDK_Player_Premium dependency and then add code that references the AAR file in app/build.gradle.



implementation(name:'LiteAVSDK_Player_Premium_10.9.0.29003', ext:'aar')
5. In defaultConfig of app/build.gradle, specify the CPU architecture to be used by the application. Currently, LiteAVSDK_Player supports armeabi, armeabi-v7a, and arm64-v8a.
defaultConfig {
ndk {
abiFilters "armeabi", "armeabi-v7a", "arm64-v8a"
}
}
6. Click Sync Now to complete the integration of LiteAVSDK.

Integrating the SDK (JAR)

If you do not want to import the AAR library, you can also integrate LiteAVSDK by importing JAR and SO libraries.
1. Download LiteAVSDK_Player_Premium and decompress it. Find LiteAVSDK_Player_Premium_xxx.zip (xxx is the version number) in the SDK directory. After decompression, you can get the libs directory, which contains the JAR file and folders of SO files as listed below:



If you also need the .so file for the armeabi architecture, copy the armeabi-v7a directory and rename it armeabi.
2. Copy the JAR file and armeabi, armeabi-v7a, and arm64-v8a folders to the app/libs directory.



3. Add code that references the JAR library in app/build.gradle.



dependencies {
implementation fileTree(dir:'libs',include:['*.jar'])
}
4. Add flatDir to build.gradle under the project’s root directory to specify the local path for the repository.



5. In app/build.gradle, add code that references the SO libraries.



6. In the defaultConfig of app/build.gradle, specify the CPU architecture to be used by the application (currently, LiteAVSDK supports armeabi, armeabi-v7a, and arm64-v8a).
defaultConfig {
ndk {
abiFilters "armeabi", "armeabi-v7a", "arm64-v8a"
}
}
7. Click Sync Now to complete the integration.

Configuring Permissions

Configure permissions for your application in AndroidManifest.xml. LiteAVSDK needs the following permissions:
<!--network permission-->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<!--storage-->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
Network security configuration allows the app to send HTTP requests
For security reasons, starting from Android P, Google requires that requests from apps use encrypted connections. The player SDK will start a localsever to proxy HTTP requests. If your app's targetSdkVersion is greater than or equal to 28, you can enable sending HTTP requests to 127.0.0.1 through network security configuration. Otherwise, an error 'java.io.IOException: Cleartext HTTP traffic to 127.0.0.1 not permitted' will occur during playback, causing video playback to fail. The configuration steps are as follows:
1. Create a res/xml/network_security_config.xml file in the project and set the network security configuration.
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="true">127.0.0.1</domain>
</domain-config>
</network-security-config>
2. Add the following attribute to the application tag in the AndroidManifest.xml file.
<?xml version="1.0" encoding="utf-8"?>
<manifest ... >
<application android:networkSecurityConfig="@xml/network_security_config"
... >
...
</application>
</manifest>

Configuring Obfuscation Rules

In the proguard-rules.pro file, add LiteAVSDK classes to the "do not obfuscate" list.
-keep class com.tencent.** { *;}

Configuring License

Enter VOD console. to apply for a trial license as instructed in Adding and Renewing a License. If no license is configured, video playback will fail. You will get two strings: a license URL and a decryption key.
After obtaining the License information, you need to initialize and configure the License before calling the relevant interfaces of the SDK. For detailed tutorials, please see Configuring View License.

FAQs

What should I do if a duplicate symbol error occurs because my project integrates multiple editions of LiteAVSDK such as CSS, TRTC, and Player?

If you integrate two or more editions of LiteAVSDK (MLVB, Player, TRTC, UGSV), a library conflict error will occur when you build your project. This is because some symbol files are shared among the underlying libraries of the SDKs. To solve the problem, we recommend you integrate the All-in-One SDK, which includes the features of MLVB, Player, TRTC, and UGSV. For details, see SDK Download.

도움말 및 지원

문제 해결에 도움이 되었나요?

피드백