tencent cloud

User Generated Short Video SDK

iOS

ダウンロード
フォーカスモード
フォントサイズ
最終更新日: 2026-05-11 17:46:56

Feature Overview

Template-Based Editing enables one-click video creation. Through the template editing interface, you can load pre-made templates. Users can add videos or images to achieve beat-synced music and stunning transition effects.

Related Interface Classes

Interface Class Name
Description
TAVEditor
SDK operation entry class.

Template Methods

Set Template Path

/// Apply template
/// - Parameter templatePath: Video template asset path
/// - return: 0 = success, -1 = invalid path, -2 = no permission
- (int)setTemplate:(NSString *)templatePath;

Get Template Configuration

/// Get video template slot information
/// - Parameter templatePath: Video template asset path
- (TAVTemplateConfig *)getTemplateConfig:(NSString *)templatePath;

Usage Example

// Set template path
NSString *templateDir = @"/sdcard/templates/project1";
int result = [editor setTemplateDir:templateDir];
if (result == 0) {
// Get template configuration
TAVTemplateConfig *config = [editor getTemplateConfig:templateDir];
// Use configuration info
NSArray<TAVClipPlaceHolder *> *clipPlaceHolders = config.getSlots();
for (NSInteger i = 0; i < clipPlaceHolders.count; i++)
// Process each slot
}
} else {
// Handle error
switch (result) {
case -1:
//"Invalid template path";
break;
case -2:
//"Invalid template authorization";
break;
}
}



ヘルプとサポート

この記事はお役に立ちましたか?

フィードバック