tencent cloud

User Generated Short Video SDK

뉴스 및 공지사항
Release Notes
The “startPlay” API of the UGSV SDK Renamed
제품소개
Overview
Features
Use Cases
Concepts
구매 가이드
Pricing Overview
Refund Policy
라이선스 가이드
Adding and Renewing a License
Configuring and Viewing a License
SDK 다운로드
SDK Download
Release Notes (App)
UI 통합 솔루션 포함
UGSV Demo App
Source Code Description (iOS)
Source Code Description (Android)
UI 통합 솔루션 없음
SDK Integration
Capturing and Shoot
Preview, Clipping, and Splicing
Upload and Playback
Tencent Effect SDK
Advanced Features and Special Effects
API 문서
Editing
Shooting
기술적 지원
Error Codes
Feature FAQs
일반적인 문제
Upload
Android Compilation
Android
iOS
License
UGSV 정책
개인 정보 보호 정책
데이터 처리 및 보안 계약

Configuring and Viewing a License

PDF
포커스 모드
폰트 크기
마지막 업데이트 시간: 2024-07-04 17:27:05

UGSV License

Configuration

Before you call the APIs of the media SDKs, follow the steps below to configure the license:
iOS
Add the code below in [AppDelegate application:didFinishLaunchingWithOptions:] :
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
NSString * const licenceURL = @"<The license URL obtained>";
NSString * const licenceKey = @"<The key obtained>";

// `TXUGCBase` is in the header file `TXUGCBase.h`.
[TXUGCBase setLicenceURL:licenceURL key:licenceKey];
NSLog(@"SDK Version = %@", [TXUGCBase getSDKVersionStr]);
return YES;
}
- (void)onLicenceLoaded:(int)result Reason:(NSString *)reason {
NSLog(@"onLicenceLoaded: result:%d reason:%@", result, reason);
}
@end
Android
We recommend adding the following in the application:
public class MApplication extends Application {

@Override
public void onCreate() {
super.onCreate();
String licenceURL = ""; // The license URL obtained
String licenceKey = ""; // The license key obtained
TXUGCBase.getInstance().setLicence(this, licenceURL, licenceKey);
TXUGCBase.setListener(new TXUGCBaseListener() {
@Override
public void onLicenceLoaded(int result, String reason) {
Log.i(TAG, "onLicenceLoaded: result:" + result + ", reason:" + reason);
}
});
}
}
Note:
If a live stream publishing license, a UGSV license, and a video playback license have the same license URL, you only need to configure license information once. You can apply for free trial licenses in the CSS console, or the VOD console, or you can buy an official license.

Viewing license information

After the license is successfully configured, you can call the API below to view the license information. Please note that it may take a while for the configuration to take effect. The exact time needed depends on your network conditions.
iOS:
NSLog(@"%@", [TXUGCBase getLicenceInfo]);
Android:
TXUGCBase.getInstance().getLicenceInfo(context);


도움말 및 지원

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

피드백