AliyunTemplateEditor
@interface AliyunTemplateEditor : NSObject
* A class that defines the editor for applying the template. API_AVAILABLE(3.27.0)
-
* Initializer, open or create a template project to editor
Declaration
Objective-C
- (instancetype)initWithPath:(NSString *)taskPath templateTaskPath:(NSString *)templateTaskPath;
Parameters
taskPath
The path of the task folder.
templateTaskPath
The path of the template folder. It will try to open a existing template project if nil.
Return Value
Editor
-
* The path of the task folder
Declaration
Objective-C
@property (nonatomic, copy, readonly) NSString *taskPath;
-
* The preview
Declaration
Objective-C
@property(nonatomic, strong) UIView *preview
-
* The current template
Declaration
Objective-C
- (AliyunTemplate *)getCurrentTemplate;
Return Value
AliyunTemplate
-
* The current content render
Declaration
Objective-C
- (AliyunEditorRenderWrapper *)getRenderWrapper;
Return Value
AliyunEditorRenderWrapper
-
* The project model of editor
Declaration
Objective-C
- (AliyunEditorProject *)getEditorProject;
Return Value
AliyunEditorProject
-
* Gets a player object.
Declaration
Objective-C
- (id<AliyunIPlayer>)getPlayer;
Return Value
AliyunIPlayer
-
* The playback callbacks.
Declaration
Objective-C
@property (nonatomic, weak) id<AliyunIPlayerCallback> playerCallback;
-
* Gets an exporter object.
Declaration
Objective-C
- (id<AliyunIExporter>)getExporter;
Return Value
AliyunIExporter
-
* The exporter callback
Declaration
Objective-C
@property (nonatomic, weak) id<AliyunIExporterCallback> exporterCallback;
-
* Load the editor
@return ALIVC_COMMON_RETURN_SUCCESS if the invocation is successful. ALIVC_COMMON_RETURN_FAILED if the invocation is failed.
Declaration
Objective-C
- (int)loadEditor;
-
* Release the editor
@return ALIVC_COMMON_RETURN_SUCCESS if the invocation is successful. ALIVC_COMMON_RETURN_FAILED if the invocation is failed.
Declaration
Objective-C
- (int)releaseEditor;
-
* Start edit, create some resource.
@return ALIVC_COMMON_RETURN_SUCCESS if the invocation is successful. ALIVC_COMMON_RETURN_FAILED if the invocation is failed. Other errors, see the document
Declaration
Objective-C
- (int)startEdit;
-
* Stop edit, destroy some resource.
@return ALIVC_COMMON_RETURN_SUCCESS if the invocation is successful. ALIVC_COMMON_RETURN_FAILED if the invocation is failed. Other errors, see the document
Declaration
Objective-C
- (int)stopEdit;
-
* Get all the nodes of clip
Declaration
Objective-C
- (NSArray<AliyunTemplateClipNode *> *)clipNodes;
Return Value
Array that element’s type is AliyunTemplateClipNode
-
* Get all the nodes of caption
Declaration
Objective-C
- (NSArray<AliyunTemplateCaptionNode *> *)captionNodes;
Return Value
Array that element’s type is AliyunTemplateCaptionNode
-
* Update clip node‘s content
Declaration
Objective-C
- (int)updateClipNode:(AliyunTemplateClipNode *)node clipPath:(NSString *)clipPath clipType:(AliyunClipType)clipType;
Parameters
node
The node
clipPath
The clip path
clipType
The clip type @return ALIVC_COMMON_RETURN_SUCCESS if the invocation is successful. ALIVC_COMMON_RETURN_FAILED if the invocation is failed.
-
* Update caption node’s content
Declaration
Objective-C
- (int)updateCaptionNode:(AliyunTemplateCaptionNode *)node text:(NSString *)text;
Parameters
node
The node
text
The text @return ALIVC_COMMON_RETURN_SUCCESS if the invocation is successful. ALIVC_COMMON_RETURN_FAILED if the invocation is failed.
-
* Get the play start time of the node
Declaration
Objective-C
- (NSTimeInterval)playStartTimeWithNode:(AliyunTemplateNode *)node;
Parameters
node
The node
Return Value
The plat start time
-
* save to draft
Declaration
Objective-C
- (AliyunDraft *)saveToDraft:(AliyunDraftManager *)draftMgr;
Parameters
draftMgr
The draft manager
Return Value
The draft instance
-
* save to draft
Declaration
Objective-C
- (AliyunDraft *)saveToDraft:(AliyunDraftManager *)draftMgr withTitle:(NSString *)title;
Parameters
draftMgr
The manager of draft
title
The Title of draft
Return Value
The draft instance
-
* Create a template editor.
Declaration
Objective-C
+ (AliyunTemplateEditor *)createTemplateEditor:(NSString *)templateTaskPath onTaskPath:(NSString *)taskPath;
Parameters
templateTaskPath
The template dir
taskPath
The task path
Return Value
AliyunTemplateEditor
-
* Create a template editor.
Declaration
Objective-C
+ (AliyunTemplateEditor *)openTemplateEditor:(NSString *)taskPath;
Parameters
taskPath
The task path
Return Value
AliyunTemplateEditor