Protocols

The following protocols are available globally.

  • * A class that defines player’s delegate API_AVAILABLE(3.35.0)

    See more

    Declaration

    Objective-C

    @protocol AliyunAETemplatePlayerDelegate <NSObject>
  • * A class that defines render’s delegate API_AVAILABLE(3.35.0)

    See more

    Declaration

    Objective-C

    @protocol AliyunAETemplateRenderDelegate <NSObject>
  • * The protocol of animations.

    See more

    Declaration

    Objective-C

    @protocol AliyunActionProtocol <NSObject>
  • * The controller of audio source API_AVAILABLE(3.22.0)

    See more

    Declaration

    Objective-C

    @protocol AliyunAudioRecordController <AliyunRecordController>
  • * The protocol of audio recording callbacks.

    See more

    Declaration

    Objective-C

    @protocol AliyunAudioRecorderDelegate <NSObject>
  • * The controller of camera API_AVAILABLE(3.22.0)

    See more

    Declaration

    Objective-C

    @protocol AliyunCameraRecordController <AliyunVideoRecordController>
  • * The protocol of crop callbacks.

    See more

    Declaration

    Objective-C

    @protocol AliyunCropDelegate <NSObject>
  • Undocumented

    See more

    Declaration

    Objective-C

    @protocol AliyunDraftManagerDelegate <NSObject>
    /****
     The event for draft list did change
     */
    - (void) onAliyunDraftManager:(AliyunDraftManager *)mgr listDidChange:(NSArray<AliyunDraft *> *)list;
    @end
  • Undocumented

    See more

    Declaration

    Objective-C

    @protocol AliyunEditorDelegate <NSObject>
    @optional
    - (void) onEditor:(AliyunEditor *)editor editingDidChange:(BOOL)isEditing;
    - (void) onEditor:(AliyunEditor *)editor loadingDidChange:(BOOL)isLoading;
    - (void) onEditor:(AliyunEditor *)editor loadError:(NSError *)error;
    @end
  • * The Callback for editor content view API_AVAILABLE(3.25.0)

    See more

    Declaration

    Objective-C

    @protocol AliyunEditorRenderWrapperDelegate <NSObject>
  • Undocumented

    See more

    Declaration

    Objective-C

    @protocol AliyunFrameAnimationProtocol <NSObject>
    
    /****
     add frame animation.
     
     @param action @see AliyunAction.
     */
    - (int)addFrameAnimation:(AliyunAction *)action;
    
    
    /****
     remove frame animation.
     
     @param action @see AliyunAction.
     */
    - (int)removeFrameAnimation:(AliyunAction *)action;
    
    @end
  • Undocumented

    See more

    Declaration

    Objective-C

    @protocol AliyunICanvasViewDelegate <NSObject>
    
    /****
     Starts drawing.
     
     @param startPoint The start point.
     */
    - (void)startDrawingWithCurrentPoint:(CGPoint)startPoint;
    
    /****
     Ends drawing.
     
     @param endPoint The end point.
     */
    - (void)endDrawingWithCurrentPoint:(CGPoint)endPoint;
    @end
  • * The protocol of clip constructors.

    See more

    Declaration

    Objective-C

    @protocol AliyunIClipConstructor <NSObject>
  • Undocumented

    See more

    Declaration

    Objective-C

    @protocol AliyunIEffectRecovery <NSObject>
    
    /****
     Initializer. This method is automatically invoked after the effect is restored from the JSON configuration file.
    
     @param dict The initialization parameter.
     @return An effect object.
     */
    - (id)initWithRestore:(NSDictionary *)dict;
    
    /****
     Creates a copy of an object.
    
     @return An object copy.
     */
    - (id)copyAnother;
    
    @end
  • Undocumented

    See more

    Declaration

    Objective-C

    @protocol AliyunIExporter <NSObject>
    /****
     Sets a watermark.
     
     @param waterMark The watermark image.
     @return
     ALIVC_COMMON_RETURN_SUCCESS if the invocation is successful.
     ALIVC_COMMON_INVALID_STATE if the exporter's state is incorrect.
     ALIVC_SVIDEO_EDITOR_FILE_NOT_EXIST if the image file does not exist.
     ALIVC_SVIDEO_EDITOR_VIEW_TYPE_NOT_SUPPORTED if the image type is not supported.
     */
    - (int)setWaterMark:(AliyunEffectImage *)waterMark;
    
    /****
     Sets a watermark to the end of the video.
     
     @param waterMark The watermark image.
     @return
     ALIVC_COMMON_RETURN_SUCCESS if the invocation is successful.
     ALIVC_COMMON_INVALID_STATE if the exporter's state is incorrect.
     ALIVC_SVIDEO_EDITOR_FILE_NOT_EXIST if the image file does not exist.
     ALIVC_FRAMEWORK_RENDER_ERROR_SCENE_INVALID
     ALIVC_FRAMEWORK_RENDER_ERROR_INVALID_OPTION
     */
    - (int)setTailWaterMark:(AliyunEffectImage *)waterMark;
    
    /****
     Sets the encoding mode.
     
     Hardware encoding is required in iOS.
     @param encodeMode The encoding mode. See the codecType in AliyunVideoParam.
     */
    - (void)setEncodeMode:(AliyunVideoCodecType)encodeMode;
    
    /****
     Sets the video output parameter.
     
     @param videoParam The output parameter.
     */
    - (void)setVideoParam:(AliyunVideoParam *)videoParam;
    
    /****
     Sets whether to cancel exporting when the app is set to run in the background.
     
     YES indicates cancel exporting. No indicates pause exporting. Default is NO.
     @param flag
     */
    - (void)setCancelExportInResignActive:(BOOL)flag;
    
    /****
     Starts exporting.
     
     @param outputPath The video output path. 
     @return
     ALIVC_COMMON_RETURN_SUCCESS if the invocation is successful.
     ALIVC_COMMON_INVALID_STATE if the exporter's state is incorrect.
     ALIVC_COMMON_INVALID_PARAM if the parameter setting is incorrect.
     ALIVC_SVIDEO_EDITOR_INIT_FAILED if an error occurred during component initialization.
     ALIVC_FRAMEWORK_AUDIO_PROCESS_CREATE_FAILED
     ALIVC_FRAMEWORK_AUDIO_PROCESS_RE_CREATE
     ALIVC_FRAMEWORK_RENDER_ERROR_SCENE_INVALID
     */
    - (int)startExport:(NSString *)outputPath;
    
    /****
     Pauses exporting.
     
     @return
     ALIVC_COMMON_RETURN_SUCCESS if the invocation is successful.
     ALIVC_COMMON_INVALID_STATE if the exporter's state is incorrect.
     */
    - (int)pauseExport;
    
    /****
     Resumes exporting.
     
     @return
     ALIVC_COMMON_RETURN_SUCCESS if the invocation is successful.
     ALIVC_COMMON_INVALID_STATE if the exporter's state is incorrect.
     */
    - (int)resumeExport;
    
    /****
     Cancels exporting.
     
     @return
     ALIVC_COMMON_RETURN_SUCCESS if the invocation is successful.
     ALIVC_COMMON_INVALID_STATE if the exporter's state is incorrect.
     */
    -(int)cancelExport;
    
    @optional
    /****
     Adds a watermark to the end of the video.
     
     @param image The watermark image.
     @return The watermark id or an error code.
     */
    - (int)setTailWaterMark:(UIImage *)image frame:(CGRect)frame duration:(CGFloat)duration __deprecated_msg("use setWaterMark:(AliyunEffectImage *)waterMark in AliyunEditor");
    @end
  • * The protocol of export callbacks.

    See more

    Declaration

    Objective-C

    @protocol AliyunIExporterCallback <NSObject>
  • * Stream export

    See more

    Declaration

    Objective-C

    @protocol AliyunIStreamExporterCallback <NSObject>
  • * The protocol of stickers.

    See more

    Declaration

    Objective-C

    @protocol AliyunIPasterRender <NSObject>
  • * The protocol of players.

    See more

    Declaration

    Objective-C

    @protocol AliyunIPlayer <NSObject>
  • * The protocol of player callbacks.

    See more

    Declaration

    Objective-C

    @protocol AliyunIPlayerCallback <NSObject>
  • * The protocol of render callbacks.

    See more

    Declaration

    Objective-C

    @protocol AliyunIRenderCallback <NSObject>
  • * The protocol of recording callbacks.

    See more

    Declaration

    Objective-C

    @protocol AliyunIRecorderDelegate <NSObject>
  • Undocumented

    See more

    Declaration

    Objective-C

    @protocol AliyunIStickerRender <NSObject>
    
    
    /****
     Adds a sticker. API_AVAILABLE(3.22.0)
     
     @param sticker AliyunGifSticker/AliyunCaptionSticker
     @return status
     */
    - (int)addSticker:(AliyunSticker *)sticker;
    
    
    /****
     Remove a sticker. API_AVAILABLE(3.22.0)
     
     @param sticker AliyunGifSticker/AliyunCaptionSticker
     @return status
     */
    - (int)removeSticker:(AliyunSticker *)sticker;
    
    
    /****
     update a sticker. API_AVAILABLE(3.22.0)
     
     @param sticker AliyunGifSticker/AliyunCaptionSticker
     @return status
     */
    - (int)updateSticker:(AliyunSticker *)sticker;
    
    @end
  • * The Controller of mic API_AVAILABLE(3.22.0)

    See more

    Declaration

    Objective-C

    @protocol AliyunMicRecordController <AliyunAudioRecordController>
  • Undocumented

    See more

    Declaration

    Objective-C

    @protocol AlivcMixComposerDelegate <NSObject>
    
    - (void)mixComposerOnProgress:(float)progress;
    - (void)mixComposerDidComplete;
    - (void)mixComposerDidError:(int)error;
    
    @end
  • Undocumented

    See more

    Declaration

    Objective-C

    @protocol AliyunMixRecorderDelegate <AliyunIRecorderDelegate>
    
    /****
     The callback when the composition process is started.
     */
    - (void)mixRecorderComposerDidStart;
    
    /****
     The callback that outputs the progress of composition.
    
     @param progress The progress.
     */
    - (void)mixRecorderComposerOnProgress:(CGFloat)progress;
    
    /****
     The callback when the composition process is complete.
     */
    - (void)mixRecorderComposerDidComplete;
    
    /****
     The callback when an error occurs during the composition process.
    
     @param errorCode The error code.
     */
    - (void)mixRecorderComposerDidError:(int)errorCode;
    
    @end
  • Deprecated

    please use AliyunStickerManager

    * deprecated, please use AliyunStickerManager.

    See more

    Declaration

    Objective-C

    @protocol AliyunPasterManagerDelegate <NSObject>
  • * The protocol of sticker callbacks on UI events.

    See more

    Declaration

    Objective-C

    @protocol AliyunPasterUIEventProtocol <NSObject>
  • Deprecated

    please use AliyunAVFileRecordController

    * The Record controller of video player API_AVAILABLE(3.22.0)

    See more

    Declaration

    Objective-C

    @protocol AliyunPlayerRecordController <AliyunVideoBaseRecordController,
                                            AliyunAudioRecordController>
  • * The callback of custom handler record data API_AVAILABLE(3.22.0)

    See more

    Declaration

    Objective-C

    @protocol AliyunRecordControllerCustomSourceHandler <NSObject>
  • * The Controller of record source API_AVAILABLE(3.22.0)

    See more

    Declaration

    Objective-C

    @protocol AliyunRecordController <NSObject>
  • * The Protocol Of Record Source API_AVAILABLE(3.22.0)

    See more

    Declaration

    Objective-C

    @protocol AliyunRecordSource <NSObject>
  • * callback of data stream capture API_AVAILABLE(3.22.0)

    See more

    Declaration

    Objective-C

    @protocol AliyunRecordDataSourceDelegate <NSObject>
  • * Record source of data stream type API_AVAILABLE(3.22.0)

    See more

    Declaration

    Objective-C

    @protocol AliyunRecordDataSource <AliyunRecordSource>
  • * Resource source of file type API_AVAILABLE(3.22.0)

    See more

    Declaration

    Objective-C

    @protocol AliyunRecordFileSource <AliyunRecordSource>
  • * The Project of dynamic fps API_AVAILABLE(3.22.0)

    See more

    Declaration

    Objective-C

    @protocol AliyunRecordSourceFPS <NSObject>
  • * The Callback of recorder event API_AVAILABLE(3.22.0)

    See more

    Declaration

    Objective-C

    @protocol AliyunRecorderDelegate <NSObject>
  • * The callback of custom render API_AVAILABLE(3.22.0)

    See more

    Declaration

    Objective-C

    @protocol AliyunRecorderCustomRender <NSObject>
  • Undocumented

    See more

    Declaration

    Objective-C

    @protocol AliyunRenderBaseControllerEditProtocol <NSObject>
    
    /****
     start edit; be used for merge multi modify API_AVAILABLE(3.22.0)
     */
    - (void) beginEdit;
    /****
     end edit; be used for apply all the modify between begin and end API_AVAILABLE(3.22.0)
     */
    - (void) endEdit;
    /****
     cancel edit; be used for reback the state before call the begin edit API_AVAILABLE(3.22.0)
     */
    - (void) cancelEdit;
    
    @end
  • Undocumented

    See more

    Declaration

    Objective-C

    @protocol AliyunThumbnailParserDelegate <NSObject>
    
    /****
     onError when get pic, call back not in main thread. API_AVAILABLE(3.20.0)
     
     @param code the errorcode.
     */
    - (void)thumbnailParser:(AliyunThumbnailParser *)parser onError:(int)code;
    
    
    /****
     onError when get pic, call back not in main thread. API_AVAILABLE(3.20.0)
     
     @param code the errorcode
     @param time the timestampe of the video to get pic, unit: seconds
     */
    - (void)thumbnailParser:(AliyunThumbnailParser *)parser onPicError:(int)code time:(float)time;
    
    
    /****
     the image get of the time, call back not in main thread. API_AVAILABLE(3.20.0)
     
     @param image the image, noneable, maybe nil
     @param time the timestampe of the video to get pic, unit: seconds
     */
    - (void)thumbnailParser:(AliyunThumbnailParser *)parser onGetPicture:(UIImage *)image time:(float)time;
    
    /****
     compelete all image to get in timelist, call back not in main thread. API_AVAILABLE(3.20.0)
     */
    - (void)thumbnailParserOnCompleted:(AliyunThumbnailParser *)parser;
    
    
    @end
  • * The Event notify of VideoLicense

    See more

    Declaration

    Objective-C

    @protocol AliyunVideoLicenseEventDelegate <NSObject>
  • * The protocol of rotate follow the device orientation API_AVAILABLE(3.22.0)

    See more

    Declaration

    Objective-C

    @protocol AliyunVideoSourceOrientation <NSObject>
  • * The base controller of video source API_AVAILABLE(3.22.0)

    See more

    Declaration

    Objective-C

    @protocol AliyunVideoBaseRecordController <AliyunRecordController>
  • * The full function controller of video API_AVAILABLE(3.22.0)

    See more

    Declaration

    Objective-C

    @protocol AliyunVideoRecordController <AliyunVideoBaseRecordController>
  • * The Controller of view record API_AVAILABLE(3.22.0)

    See more

    Declaration

    Objective-C

    @protocol AliyunViewRecordController <AliyunVideoBaseRecordController>