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
taskPathThe path of the task folder.
templateTaskPathThe 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
nodeThe node
clipPathThe clip path
clipTypeThe 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
nodeThe node
textThe 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
nodeThe node
Return Value
The plat start time
-
* save to draft
Declaration
Objective-C
- (AliyunDraft *)saveToDraft:(AliyunDraftManager *)draftMgr;Parameters
draftMgrThe draft manager
Return Value
The draft instance
-
* save to draft
Declaration
Objective-C
- (AliyunDraft *)saveToDraft:(AliyunDraftManager *)draftMgr withTitle:(NSString *)title;Parameters
draftMgrThe manager of draft
titleThe Title of draft
Return Value
The draft instance
-
* Create a template editor.
Declaration
Objective-C
+ (AliyunTemplateEditor *)createTemplateEditor:(NSString *)templateTaskPath onTaskPath:(NSString *)taskPath;Parameters
templateTaskPathThe template dir
taskPathThe task path
Return Value
AliyunTemplateEditor
-
* Create a template editor.
Declaration
Objective-C
+ (AliyunTemplateEditor *)openTemplateEditor:(NSString *)taskPath;Parameters
taskPathThe task path
Return Value
AliyunTemplateEditor
AliyunTemplateEditor Class Reference