AliyunEditor

@interface AliyunEditor : NSObject

* A class that defines editors.

  • * Initializer.

    Declaration

    Objective-C

    - (instancetype)initWithPath:(NSString *)taskPath preview:(id)preview;

    Parameters

    taskPath

    The path of the taskPath folder.

    preview

    The view for preview.

    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, readonly) UIView *preview
  • * The content of render

    Declaration

    Objective-C

    @property (nonatomic, readonly) AliyunEditorRenderWrapper *renderWrapper;
  • * Update cover image, if nil will auto capture first frame image as cover

    Declaration

    Objective-C

    - (void)updateCover:(UIImage *)coverImage;
  • * Gets the size of the preview window.

    Declaration

    Objective-C

    - (CGSize)getPreviewRenderSize;

    Return Value

    The size of the preview window.

  • * Sets the video display mode.

    Declaration

    Objective-C

    - (int)setScaleMode:(AliyunScaleMode)mode;

    Parameters

    mode

    AliyunScaleModeFit = 0, // Fill mode AliyunScaleModeFill = 1 // Cut mode @return ALIVC_COMMON_RETURN_SUCCESS if the invocation is successful. ALIVC_COMMON_INVALID_STATE if the editor’s state is incorrect. ALIVC_FRAMEWORK_RENDER_ERROR_SCENE_INVALID

  • * Creates resources. @return ALIVC_COMMON_RETURN_SUCCESS if the invocation is successful. ALIVC_COMMON_INVALID_STATE if the editor’s state is incorrect. ALIVC_COMMON_INVALID_PARAM if the parameter setting is incorrect. ALIVC_SVIDEO_EDITOR_INIT_FAILED if an error occurs while initializing components. ALIVC_FRAMEWORK_AUDIO_PROCESS_CREATE_FAILED ALIVC_FRAMEWORK_AUDIO_PROCESS_RE_CREATE ALIVC_FRAMEWORK_RENDER_ERROR_SCENE_INVALID

    Declaration

    Objective-C

    - (int)startEdit;
  • * Releases resources. @return ALIVC_COMMON_RETURN_SUCCESS if the invocation is successful. ALIVC_COMMON_INVALID_STATE if the editor’s state is incorrect.

    Declaration

    Objective-C

    - (int)stopEdit;
  • * The edit callbacks

    Declaration

    Objective-C

    @property (nonatomic, weak) id<AliyunEditorDelegate> editorCallback;
  • * The playback callbacks.

    Declaration

    Objective-C

    @property (nonatomic, weak) id<AliyunIPlayerCallback> playerCallback;
  • * The exporter callback

    Declaration

    Objective-C

    @property (nonatomic, weak) id<AliyunIExporterCallback> exporterCallback;
  • * The stream exporter callback

    Declaration

    Objective-C

    @property (weak) id<AliyunIStreamExporterCallback> streamExporterCallback;
  • * The render callback

    Declaration

    Objective-C

    @property (nonatomic, weak) id<AliyunIRenderCallback> renderCallback;

Draft

Model

Global

  • * Screen capture for current preview

    Declaration

    Objective-C

    - (UIImage *)screenCapture;
  • * Applies a doodle.

    Declaration

    Objective-C

    - (int)applyPaint:(AliyunEffectImage *)paintImage
            linesData:(NSArray<AliyunICanvasLineData *> *)linesData;

    Parameters

    paintImage

    The doodle object to be applied.

    linesData

    The doodle origin data. for restore in draft @return ALIVC_COMMON_RETURN_SUCCESS if the invocation is successful. ALIVC_COMMON_INVALID_STATE if the editor’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 file type is not supported.

  • * Removes a doodle.

    Declaration

    Objective-C

    - (int)removePaint:(AliyunEffectImage *)paintImage;

    Parameters

    paintImage

    The doodle object to be removed. @return ALIVC_COMMON_RETURN_SUCCESS if the invocation is successful. ALIVC_COMMON_INVALID_STATE if the editor’s state is incorrect. ALIVC_FRAMEWORK_RENDER_ERROR_SCENE_INVALID

  • * Adds a watermark.

    Declaration

    Objective-C

    - (int)setWaterMark:(AliyunEffectImage *)waterMark;

    Parameters

    waterMark

    The watermark object to be added. @return ALIVC_COMMON_RETURN_SUCCESS if the invocation is successful. ALIVC_COMMON_INVALID_STATE if the editor’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 file type is not supported.

  • * Adds a watermark to the end of the video.

    The endtime property of the AliyunEffectImage must be specified. This property indicates the time interval between the time when the watermark appears and the end time of the video.

    Declaration

    Objective-C

    - (int)setTailWaterMark:(AliyunEffectImage *)waterMark;

    Parameters

    waterMark

    The watermark object to be added. @return ALIVC_COMMON_RETURN_SUCCESS if the invocation is successful. ALIVC_COMMON_INVALID_STATE if the editor’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

  • * Sets the background color.

    This method only takes effect when the display mode is set to fill.

    Declaration

    Objective-C

    - (int)setRenderBackgroundColor:(id)color;

    Parameters

    color

    The background color. @return ALIVC_COMMON_RETURN_SUCCESS if the invocation is successful. ALIVC_COMMON_INVALID_STATE if the editor’s state is incorrect.

  • * API_AVAILABLE(3.7.0)

    Applies a Gaussian blur effect to the background. Supports multiple time periods. This method only takes effect when the display mode is set to fill and the background color is not set to clearColor. If the background color is set to clearColor, the Gaussian blur effect is used to fill the background by default.

    Declaration

    Objective-C

    - (int)applyBlurBackgroundPlay:(AliyunEffectBlurBackground *)blur;

    Parameters

    blur

    The Gaussian blur effect to be applied. @return ALIVC_COMMON_RETURN_SUCCESS if the invocation is successful. ALIVC_COMMON_INVALID_STATE if the editor’s state is incorrect.

  • * API_AVAILABLE(3.7.0)

    Removes a Gaussian blur effect.

    Declaration

    Objective-C

    - (int)removeBlurBackgroundPlay:(AliyunEffectBlurBackground *)blur;

    Parameters

    blur

    The Gaussian blur effect to be removed. @return ALIVC_COMMON_RETURN_SUCCESS if the invocation is successful. ALIVC_COMMON_INVALID_STATE if the editor’s state is incorrect.

Video

  • * API_AVAILABLE(3.20.0) setting the video augmentation parameter

    See

    AliyunVideoAugmentationType

    Declaration

    Objective-C

    - (int)setVideoAugmentation:(AliyunVideoAugmentationType)videoAugmentationType
                          value:(float)value
                       streamId:(int)streamId;

    Parameters

    streamId

    target stream id

    videoAugmentationType

    augmentation type

    value

    range [0.0, 1.0]

    Return Value

    0 if the invocation is successful or an error code if the invocation fails. *

  • * API_AVAILABLE(3.20.0) reset the video augmentation parameter

    See

    AliyunVideoAugmentationType

    Declaration

    Objective-C

    - (int)resetVideoAugmentation:(AliyunVideoAugmentationType)videoAugmentationType
                         streamId:(int)streamId;

    Parameters

    videoAugmentationType

    augmentation type

    streamId

    target stream id

    Return Value

    0 if the invocation is successful or an error code if the invocation fails. *

  • * API_AVAILABLE(3.31.0) Setting the video horizontal flip or no

    Declaration

    Objective-C

    - (int)setVideoHorizontalFlip:(BOOL)flip streamId:(int)streamId;

    Parameters

    flip

    video flip or no

    streamId

    target stream id

    Return Value

    0 if the invocation is successful or an error code if the invocation fails. *

  • ** API_AVAILABLE(3.7.0)

     Applies a transition effect. Note:
                   ① Do not call this method if there is only one video clip.
                   ② The duration of a transition must not be greater than the duration of the video clips before or after this transition.
                   ③ To invoke this method, [_editor stopEdit] must be invoked first. [_editor startEdit] and [_player play] must be invoked after this method.

    [----Video clip A----] [----Video clip B----] [----Video clip C----]...[----Video clip N----] ^ ^ ^ clipIndex: 0 1 N-1

    Declaration

    Objective-C

    - (int)applyTransition:(AliyunTransitionEffect *)transition
                   atIndex:(int)clipIdx;

    Parameters

    transition

    The transition effect to be applied.

    clipIdx

    The position where the transition effect is inserted. @return ALIVC_COMMON_RETURN_FAILED if the invocation fails. ALIVC_COMMON_RETURN_SUCCESS if the invocation is successful.

  • * API_AVAILABLE(3.7.0)

    update a transition effect. Note:
                  ① Do not call this method if there is only one video clip.
                  ② The duration of a transition must not be greater than the duration of the video clips before or after this transition.
    
    [----Video clip A----] [----Video clip B----] [----Video clip C----]...[----Video clip N----]
                         ^                      ^                      ^
    clipIndex:           0                      1                     N-1
    

    Declaration

    Objective-C

    - (int)updateTransition:(AliyunTransitionEffect *)transition
                    atIndex:(int)clipIdx;

    Parameters

    transition

    The transition effect to be updated.

    clipIdx

    The position where the transition effect is inserted. @return ALIVC_COMMON_RETURN_FAILED if the invocation fails. ALIVC_COMMON_RETURN_SUCCESS if the invocation is successful.

  • * API_AVAILABLE(3.7.0)

    Removes a transition effect. Note: To invoke this method, [_editor stopEdit] must be invoked first. [_editor startEdit] and [_player play] must be invoked after this method.

    Declaration

    Objective-C

    - (int)removeTransitionAtIndex:(int)clipIdx;

    Parameters

    clipIdx

    The position of the transition effect to be removed.

Audio

  • * Mutes or unmutes the video.

    Declaration

    Objective-C

    - (int)setMute:(BOOL)mute;

    Parameters

    mute

    Whether to mute the video. @return ALIVC_COMMON_RETURN_SUCCESS if the invocation is successful. ALIVC_COMMON_INVALID_STATE if the editor’s state is incorrect. ALIVC_FRAMEWORK_AUDIO_PROCESS_CTL_INPUT_ERROR

  • * Sets the volume.

    Declaration

    Objective-C

    - (int)setVolume:(int)volume;

    Parameters

    volume

    Valid values: [0, 200] Default is 100, which is the original volume size. It is recommended to set a value between 0 and 100 to avoid loss of audio quality. @return ALIVC_COMMON_RETURN_SUCCESS if the invocation is successful. ALIVC_COMMON_INVALID_STATE if the editor’s state is incorrect. ALIVC_FRAMEWORK_AUDIO_PROCESS_CTL_INPUT_ERROR

  • * Applies an MV effect.

    Declaration

    Objective-C

    - (int)applyMV:(AliyunEffectMV *)mv;

    Parameters

    mv

    @return ALIVC_COMMON_RETURN_SUCCESS if the invocation is successful. ALIVC_COMMON_INVALID_STATE if the editor’s state is incorrect. ALIVC_SVIDEO_EDITOR_PARSE_RESOURCE_FAILED if an error occurs during image parsing. ALIVC_FRAMEWORK_RENDER_ERROR_SCENE_INVALID ALIVC_FRAMEWORK_AUDIO_PROCESS_FILE_STREAM_LIST_FAILED The player is paused after this method is invoked.

  • * Removes an MV effect. @return ALIVC_COMMON_RETURN_SUCCESS if the invocation is successful. ALIVC_COMMON_INVALID_STATE if the editor’s state is incorrect. The player is paused after this method is invoked.

    Declaration

    Objective-C

    - (int)removeMV;
  • * Removes audio from an MV effect. @return ALIVC_COMMON_RETURN_SUCCESS if the invocation is successful. ALIVC_COMMON_INVALID_STATE if the editor’s state is incorrect. ALIVC_SVIDEO_EDITOR_PARSE_RESOURCE_FAILED if an error occurs during image parsing. ALIVC_FRAMEWORK_RENDER_ERROR_SCENE_INVALID ALIVC_FRAMEWORK_AUDIO_PROCESS_FILE_STREAM_LIST_FAILED The player is paused after this method is invoked.

    Declaration

    Objective-C

    - (int)removeMVMusic;
  • * Applies a music effect.

    Declaration

    Objective-C

    - (int)applyMusic:(AliyunEffectMusic *)music;

    Parameters

    music

    The music effect to be applied. @return ALIVC_COMMON_RETURN_SUCCESS if the invocation is successful. ALIVC_COMMON_INVALID_STATE if the editor’s state is incorrect. ALIVC_FRAMEWORK_AUDIO_PROCESS_FILE_STREAM_LIST_FAILED ALIVC_FRAMEWORK_AUDIO_PROCESS_OPTION_LIST_FAILED The player is paused after this method is invoked.

  • * Removes a music effect.

    Declaration

    Objective-C

    - (int)removeMusic:(AliyunEffectMusic *)music;

    Parameters

    music

    The music effect to be removed. @return ALIVC_COMMON_RETURN_SUCCESS if the invocation is successful. ALIVC_COMMON_INVALID_STATE if the editor’s state is incorrect. The player is paused after this method is invoked.

  • * Removes all music effects. @return ALIVC_COMMON_RETURN_SUCCESS if the invocation is successful. ALIVC_COMMON_INVALID_STATE if the editor’s state is incorrect. ALIVC_FRAMEWORK_RENDER_ERROR_SCENE_INVALID ALIVC_FRAMEWORK_AUDIO_PROCESS_FILE_STREAM_LIST_FAILED ALIVC_FRAMEWORK_AUDIO_PROCESS_OPTION_LIST_FAILED The player is paused after this method is invoked.

    Declaration

    Objective-C

    - (int)removeMusics;
  • * Applies a voiceover effect.

    Declaration

    Objective-C

    - (int)applyDub:(AliyunEffectDub *)dub;

    Parameters

    dub

    The voiceover effect to be applied. Playback speed change is supported. @return ALIVC_COMMON_RETURN_SUCCESS if the invocation is successful. ALIVC_COMMON_INVALID_STATE if the editor’s state is incorrect. ALIVC_FRAMEWORK_AUDIO_PROCESS_FILE_STREAM_LIST_FAILED ALIVC_FRAMEWORK_AUDIO_PROCESS_OPTION_LIST_FAILED The player is paused after this method is invoked.

  • * Removes a voiceover effect.

    Declaration

    Objective-C

    - (int)removeDub:(AliyunEffectDub *)dub;

    Parameters

    dub

    The voiceover effect to be removed. @return ALIVC_COMMON_RETURN_SUCCESS if the invocation is successful. ALIVC_COMMON_INVALID_STATE if the editor’s state is incorrect. The player is paused after this method is invoked.

  • * Removes all voiceover effects.

    Declaration

    Objective-C

    - (int)removeDubs;

    Return Value

    A return value. The player is paused after this method is invoked.

  • * Sets the mixing weights of audio streams.

    • (int)setAudioWeight:(int)weight streamId:(int)streamId;
    • (int)setMainStreamsAudioWeight:(int)weight; @return ALIVC_COMMON_RETURN_SUCCESS if the invocation is successful. ALIVC_COMMON_INVALID_STATE if the editor’s state is incorrect. ALIVC_FRAMEWORK_AUDIO_PROCESS_OPTION_LIST_FAILED

    Declaration

    Objective-C

    - (int)setAudioMixWeight:(int)weight;

    Parameters

    weight

    Valid values: [0, 100] A value of 100 indicates that the weight of the source stream is set to 0. The source stream is muted. A value of 0 indicates that the weights of material streams are all set 0. All material streams are muted. A value of 50 indicates that the weights of the source stream and material streams are all set to 100. Use the following methods to change the volumes of audio streams by id.

  • * Sets the volume of an audio stream.

    Declaration

    Objective-C

    - (int)setAudioWeight:(int)weight streamId:(int)streamId;

    Parameters

    weight

    Valid values: [0, 100] A value of 100 indicates the original volume size.

    streamId

    The stream id. The source stream id: AliyunClip.streamId The material stream id:AliyunEffectMusic.effectVid The MV stream id:AliyunEffectMV.audioEffectVid @return ALIVC_COMMON_INVALID_STATE if the editor’s state is incorrect. ALIVC_FRAMEWORK_AUDIO_PROCESS_OPTION_LIST_FAILED

  • * Sets the volume of the source stream.

    Declaration

    Objective-C

    - (int)setMainStreamsAudioWeight:(int)weight;

    Parameters

    weight

    Valid values: [0, 100] A value of 100 indicates the original volume size. @return ALIVC_COMMON_RETURN_SUCCESS if the invocation is successful. ALIVC_COMMON_INVALID_STATE if the editor’s state is incorrect.

  • * Denoises an audio stream.

    Declaration

    Objective-C

    - (int)setAudioDenoise:(BOOL)denoise streamId:(int)streamId;

    Parameters

    denoise

    Whether to denoise the stream.

    streamId

    The stream id. The material stream id:AliyunEffectMusic.effectVid The MV stream id:AliyunEffectMV.audioEffectVid @return ALIVC_COMMON_INVALID_STATE if the editor’s state is incorrect. ALIVC_FRAMEWORK_AUDIO_PROCESS_OPTION_LIST_FAILED

  • * Denoises an audio stream.

    Declaration

    Objective-C

    - (int)setAudioDenoiseWeight:(int)weight streamId:(int)streamId;

    Parameters

    weight

    [0~100], Closed if 0

    streamId

    The stream id. The material stream id:AliyunEffectMusic.effectVid The MV stream id:AliyunEffectMV.audioEffectVid @return ALIVC_COMMON_INVALID_STATE if the editor’s state is incorrect. ALIVC_FRAMEWORK_AUDIO_PROCESS_OPTION_LIST_FAILED

  • * Denoises the source stream.

    Declaration

    Objective-C

    - (int)setMainStreamsAudioDenoise:(BOOL)denoise;

    Parameters

    denoise

    Whether to denoise the stream. @return ALIVC_COMMON_RETURN_SUCCESS if the invocation is successful. ALIVC_COMMON_INVALID_STATE if the editor’s state is incorrect.

  • * Denoises the source stream.

    Declaration

    Objective-C

    - (int)setMainStreamsAudioDenoiseWeight:(int)weight;

    Parameters

    weight

    [0~100], Closed if 0 @return ALIVC_COMMON_RETURN_SUCCESS if the invocation is successful. ALIVC_COMMON_INVALID_STATE if the editor’s state is incorrect.

  • * Adds a sound effect to an audio stream.

    If there is no audio track in the target stream, the invocation has no effect.

    Declaration

    Objective-C

    - (int)setAudioEffect:(AliyunAudioEffectType)type
                   weight:(int)weight
                 streamId:(int)streamId;

    Parameters

    type

    The effect type.

    weight

    The weight of the effect. Valid values: [0, 100]

    streamId

    The stream id.

    Return Value

    A return value.

  • * Removes a sound effect from an audio stream.

    Declaration

    Objective-C

    - (int)removeAudioEffect:(AliyunAudioEffectType)type streamId:(int)streamId;

    Parameters

    type

    The effect type.

    streamId

    The stream id.

    Return Value

    A return value.

  • * Adds a sound effect to the source stream.

    If there is no audio track in the target stream, the invocation has no effect.

    Declaration

    Objective-C

    - (int)setMainStreamsAudioEffect:(AliyunAudioEffectType)type weight:(int)weight;

    Parameters

    type

    The effect type.

    weight

    The weight of the effect. Valid values: [0, 100]

    Return Value

    A return value.

  • * Removes a sound effect from the source stream.

    Declaration

    Objective-C

    - (int)removeMainStreamsAudioEffect:(AliyunAudioEffectType)typ;

    Parameters

    typ

    The effect type.

    Return Value

    A return value.

  • * API_AVAILABLE(3.20.0) set audio fade in

    Declaration

    Objective-C

    - (int)setAudioFadeInShape:(AliyunAudioFadeShape)shape
                      duration:(float)duration
                      streamId:(int)streamId;

    Parameters

    streamId

    The id of audio stream.

    shape

    the type of fade @AliyunEditorAudioFadeShape

    duration

    effect time in second

    Return Value

    0 if the invocation is successful or an error code if the invocation fails.

  • * Removes a fade in shape from the source stream.

    Declaration

    Objective-C

    - (int)removeAudioFadeInWithStreamId:(int)streamId;

    Parameters

    streamId

    The id of audio stream.

    Return Value

    A return value.

  • * API_AVAILABLE(3.20.0) set audio fade in to main audio stream

    Declaration

    Objective-C

    - (int)setMainStreamsAudioFadeInShape:(AliyunAudioFadeShape)shape
                                 duration:(float)duration;

    Parameters

    shape

    the type of fade @AliyunAudioFadeShape

    duration

    effect time in second

    Return Value

    0 if the invocation is successful or an error code if the invocation fails.

  • * Removes a fade in shape from the source stream.

    Declaration

    Objective-C

    - (int)removeMainStreamsAudioFadeIn;

    Return Value

    A return value.

  • * API_AVAILABLE(3.20.0) set audio fade in

    Declaration

    Objective-C

    - (int)setAudioFadeOutShape:(AliyunAudioFadeShape)shape
                       duration:(float)duration
                       streamId:(int)streamId;

    Parameters

    streamId

    The id of audio stream.

    shape

    the type of fade @AliyunAudioFadeShape

    duration

    effect time in second

    Return Value

    0 if the invocation is successful or an error code if the invocation fails.

  • * Removes a fade out shape from the source stream.

    Declaration

    Objective-C

    - (int)removeAudioFadeOutWithStreamId:(int)streamId;

    Parameters

    streamId

    The id of audio stream.

    Return Value

    A return value.

  • * API_AVAILABLE(3.20.0) set audio fade out to main audio stream

    Declaration

    Objective-C

    - (int)setMainStreamsAudioFadeOutShape:(AliyunAudioFadeShape)shape
                                  duration:(float)duration;

    Parameters

    shape

    the type of fade @AliyunAudioFadeShape

    duration

    effect time in second

    Return Value

    0 if the invocation is successful or an error code if the invocation fails.

  • * Removes a fade out shape from the source stream.

    Declaration

    Objective-C

    - (int)removeMainStreamsAudioFadeOut;

    Return Value

    A return value.

Filter

  • * Applies an animated filter effect.

    Declaration

    Objective-C

    - (int)applyAnimationFilter:(AliyunEffectFilter *)filter;

    Parameters

    filter

    The filter effect to be applied. @return ALIVC_COMMON_INVALID_STATE if the editor’s state is incorrect. ALIVC_FRAMEWORK_RENDER_ERROR_SCENE_INVALID

  • * Updates an animated filter effect.

    Declaration

    Objective-C

    - (int)updateAnimationFilter:(AliyunEffectFilter *)filter;

    Parameters

    filter

    The filter effect to be updated. @return ALIVC_COMMON_RETURN_SUCCESS if the invocation is successful. ALIVC_COMMON_INVALID_STATE if the editor’s state is incorrect. ALIVC_FRAMEWORK_RENDER_ERROR_SCENE_INVALID ALIVC_FRAMEWORK_RENDER_ERROR_INVALID_OPTION

  • * Removes an animated filter effect.

    Declaration

    Objective-C

    - (int)removeAnimationFilter:(AliyunEffectFilter *)filter;

    Parameters

    filter

    The filter effect to be removed. @return ALIVC_COMMON_RETURN_SUCCESS if the invocation is successful. ALIVC_COMMON_INVALID_STATE if the editor’s state is incorrect. ALIVC_FRAMEWORK_RENDER_ERROR_SCENE_INVALID

  • * Applies a timeline effect.

    Declaration

    Objective-C

    - (int)applyTimeFilter:(AliyunEffectTimeFilter *)filter;

    Parameters

    filter

    The timeline effect to be applied. @return ALIVC_COMMON_RETURN_SUCCESS if the invocation is successful. ALIVC_COMMON_INVALID_STATE if the editor’s state is incorrect. ALIVC_COMMON_INVALID_PARAM if the parameter setting is incorrect. ALIVC_SVIDEO_EDITOR_TIME_EFFECT_NOT_SUPPORT if the effect is not supported when there are multiple audio or video streams. ALIVC_FRAMEWORK_RENDER_ERROR_SCENE_INVALID ALIVC_FRAMEWORK_RENDER_ERROR_INVALID_OPTION ALIVC_FRAMEWORK_AUDIO_PROCESS_FILE_STREAM_LIST_FAILED ALIVC_FRAMEWORK_AUDIO_PROCESS_OPTION_LIST_FAILE The player is paused after this method is invoked.

  • * API_AVAILABLE(3.7.0)

    Removes a timeline effect. This method can only remove timeline effects that change playback speeds.

    Declaration

    Objective-C

    - (int)removeTimeFilter:(AliyunEffectTimeFilter *)filter;

    Parameters

    filter

    The timeline effect to be removed. @return ALIVC_COMMON_RETURN_SUCCESS if the invocation is successful. ALIVC_COMMON_INVALID_STATE if the editor’s state is incorrect. The player is paused after this method is invoked.

  • * Removes all timeline effects.

    ALIVC_COMMON_RETURN_SUCCESS if the invocation is successful. ALIVC_COMMON_INVALID_STATE if the editor’s state is incorrect. ALIVC_FRAMEWORK_RENDER_ERROR_SCENE_INVALID ALIVC_FRAMEWORK_AUDIO_PROCESS_FILE_STREAM_LIST_FAILED ALIVC_FRAMEWORK_AUDIO_PROCESS_OPTION_LIST_FAILED] The player is paused after this method is invoked.

    Declaration

    Objective-C

    - (int)removeTimeFilter;
  • * Gets the type of the current timeline effect.

    Declaration

    Objective-C

    - (int)getTimeFilter;

    Return Value

    The type of the current timeline effect. TIME_EFFECT_NONE = 0 No effect, TIME_EFFECT_SPEED = 1 Change the playback speed, TIME_EFFECT_REPEAT = 2 Repeat the playback, TIME_EFFECT_INVERT = 3 Reverse the playback.

Animation

  • * API_AVAILABLE(3.7.0)

    Applies an animation.

    Note: 1. Alpha animations cannot be applied to source streams. 2. This method is not applicable when the reverse playback effect is used.

    Declaration

    Objective-C

    - (int)add:(id<AliyunActionProtocol>)obj
        withFrameAnimation:(AliyunAction *)action;

    Parameters

    obj

    The object that the animation is applied to.

    action

    The animation to be applied. @return ALIVC_COMMON_RETURN_SUCCESS if the invocation is successful. ALIVC_COMMON_RETURN_FAILED if the invocation is failed.

  • * API_AVAILABLE(3.7.0)

    Removes an animation.

    Declaration

    Objective-C

    - (int)remove:(id<AliyunActionProtocol>)obj
        withFrameAnimation:(AliyunAction *)action;

    Parameters

    obj

    The object that the animation is applied to.

    action

    The animation to be removed. @return ALIVC_COMMON_RETURN_SUCCESS if the invocation is successful. ALIVC_COMMON_RETURN_FAILED if the invocation is failed

Deprecated

  • Deprecated

    please use applyPaint:linesData:

    * Applies a doodle.

    Declaration

    Objective-C

    - (int)applyPaint:(AliyunEffectImage *)paintImage;

    Parameters

    paintImage

    The doodle object to be applied. @return ALIVC_COMMON_RETURN_SUCCESS if the invocation is successful. ALIVC_COMMON_INVALID_STATE if the editor’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 file type is not supported.

  • Deprecated

    please use playerCallback/exporterCallback/RenderCallback

    * The playback, export, and rendering callbacks.

    Declaration

    Objective-C

    @property (nonatomic, weak) id<AliyunIPlayerCallback, AliyunIExporterCallback, AliyunIRenderCallback> delegate;
  • Deprecated

    please use getStickerManager, addImage:startTime:duration:

    * Applies an image.

    Declaration

    Objective-C

    - (int)applyStaticImage:(AliyunEffectStaticImage *)staticImage;

    Parameters

    staticImage

    The image object to be applied. @return ALIVC_COMMON_RETURN_SUCCESS if the invocation is successful. ALIVC_COMMON_INVALID_STATE if the editor’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 file type is not supported.

  • Deprecated

    please use getStickerManager, remove:

    * Removes an image.

    Declaration

    Objective-C

    - (int)removeStaticImage:(AliyunEffectStaticImage *)staticImage;

    Parameters

    staticImage

    The image object to be removed. @return ALIVC_COMMON_RETURN_SUCCESS if the invocation is successful. ALIVC_COMMON_INVALID_STATE if the editor’s state is incorrect. ALIVC_FRAMEWORK_RENDER_ERROR_SCENE_INVALID

  • Deprecated

    deprecated, will remove

    * API_AVAILABLE(3.7.0)

    Applies a display mode to a specified object.

    Declaration

    Objective-C

    - (void)applyRunningDisplayMode:(AliyunEffectRunningDisplayMode *)mode;

    Parameters

    mode

    The display mode to be applied.

  • Deprecated

    deprecated, will remove

    * API_AVAILABLE(3.7.0)

    Removes a display mode.

    Declaration

    Objective-C

    - (void)removeRunningDisplayMode:(AliyunEffectRunningDisplayMode *)mode;

    Parameters

    mode

    The display mode to be removed.

  • Deprecated

    deprecated, will remove

    * The request id.

    Declaration

    Objective-C

    - (NSString *)getRequestId;
  • Deprecated

    deprecated, will remove

    * The SKD version.

    Declaration

    Objective-C

    + (NSString *)version;
  • Deprecated

    deprecated, will remove

    * Sets the maximum cache memory size. Default is 250 MB. It recommended to set a value greater than 200 MB. This method must be invoked before startEdit or after stopEdit.

    Declaration

    Objective-C

    - (void)setMaxCacheSize:(int)cacheSize;

    Parameters

    cacheSize

    The cache memory size in bytes.

  • Deprecated

    deprecated, will remove

    * Gets the maximum cache memory size.

    Declaration

    Objective-C

    - (int)getMaxCacheSize;

    Return Value

    The cache memory size.

  • Deprecated

    deprecated, will remove

    * Gets the maximum cache memory size required for video processing. Deprecated. To see if the video can be played backwards, use [AliyunNativeParser getGopSize] to get the GOP size. If the GOP size of a video is greater than 35, it is recommended to transcode the video before calling the reverse playback method.

    Declaration

    Objective-C

    - (int)getMaxEstimatedCacheSize:(NSString *)path;

    Parameters

    path

    The path to the video file.

    Return Value

    The cache memory size.

  • Deprecated

    deprecated, will remove

    * Gets prepared for playback. Predecoding is performed to speed up the playback.

    Declaration

    Objective-C

    - (int)prepare:(AliyunEditorMode)mode;

    Parameters

    mode

    The edit mode. @return ALIVC_COMMON_RETURN_SUCCESS if the invocation is successful. ALIVC_COMMON_INVALID_PARAM if the parameter setting is incorrect. Deprecated.

  • Deprecated

    Use IClipConstructor

    * Adds a video path. The return value is the streamId of the video.

    Declaration

    Objective-C

    - (int)addPath:(NSString *)path
           startTime:(float)startTime
            duration:(float)duration
        fadeDuration:(float)fadeDuration
          inDuration:(float)inDuration
         outDruation:(float)outDuration
                mode:(int)mode;

    Parameters

    path

    The path of the video file. Deprecated. It is recommended to use getClipConstructor instead.

  • Deprecated

    Use IClipConstructor

    * Adds an image path. The return value is the streamId of the image.

    Declaration

    Objective-C

    - (int)addImagePath:(NSString *)path
                  duration:(float)duration
              fadeDuration:(float)fadeDuration
         inAnimateDuration:(float)inDuration
        outAnimateDuration:(float)outDuration
                      mode:(int)mode;

    Parameters

    path

    The path of the image file. Deprecated. It is recommended to use getClipConstructor to get IClipConstructor for management.

  • Deprecated

    Use IClipConstructor

    * Gets the paths of all video files that are played.

    Declaration

    Objective-C

    - (NSArray *)getVideoUrls;

    Return Value

    The paths in an array. Deprecated. It is recommended to use getClipConstructor to get IClipConstructor for management.

  • Deprecated

    Use IClipConstructor

    * Gets all media clips.

    Declaration

    Objective-C

    - (NSArray *)getMediaClips;

    Return Value

    The media clips in an array. Deprecated. It is recommended to use getClipConstructor to get IClipConstructor for management.

  • Deprecated

    Use IClipConstructor

    * Sets the transition duration.

    Declaration

    Objective-C

    - (int)setClipFadeDuration:(CGFloat)fadeDuration
                    inDuration:(CGFloat)inDuration
                   outDuration:(CGFloat)outDuration
                       atIndex:(NSInteger)index;

    Parameters

    fadeDuration

    The duration of the transition.

    inDuration

    Invalid parameter.

    outDuration

    Invalid parameter.

    index

    The video index.

    Return Value

    This method is deprecated. The return value is 0. The index cannot be set to indicate the first video clip. The transition duration must not be greater than half the duration of the shortest video clip. Deprecated. It is recommended to use getClipConstructor to get IClipConstructor for management.

  • Deprecated

    use setTailWaterMark:(AliyunEffectImage *)waterMark

    * Adds a watermark to the end of the video.

    Declaration

    Objective-C

    - (int)setTailWaterMark:(UIImage *)image
                      frame:(CGRect)frame
                   duration:(CGFloat)duration;

    Parameters

    image

    The watermark image to be added.

    frame

    duration

    The display duration of the watermark.

    Return Value

    The watermark id or an error code.

  • Deprecated

    use setWaterMark:(AliyunEffectImage *)waterMark

    * Adds a watermark.

    Declaration

    Objective-C

    - (int)setWaterMark:(NSString *)imagePath frame:(CGRect)frame;

    Parameters

    imagePath

    The path of the watermark image to be added.

    frame

    The size of the watermark in the video.

    Return Value

    The watermark id or an error code.

  • Deprecated

    use getStickerManager

    * Gets a sticker manager object.

    Declaration

    Objective-C

    - (AliyunPasterManager *)getPasterManager;

    Return Value

    AliyunPasterManager

  • Deprecated

    use getStickerManager

    * Gets a PasterRender object.

    Declaration

    Objective-C

    - (id<AliyunIPasterRender>)getPasterRender;

    Return Value

    PasterRender

  • Deprecated

    use getFilterManager

    * Applies a filter effect.

    Declaration

    Objective-C

    - (int)applyFilter:(AliyunEffectFilter *)filter;

    Parameters

    filter

    The filter effect to be applied. @return ALIVC_COMMON_RETURN_SUCCESS if the invocation is successful. ALIVC_COMMON_INVALID_STATE if the editor’s state is incorrect. ALIVC_FRAMEWORK_RENDER_ERROR_SCENE_INVALID ALIVC_FRAMEWORK_RENDER_ERROR_INVALID_OPTION

  • Deprecated

    use getFilterManager

    * Removes a filter effect. @return ALIVC_COMMON_RETURN_SUCCESS if the invocation is successful. ALIVC_COMMON_INVALID_STATE if the editor’s state is incorrect. ALIVC_FRAMEWORK_RENDER_ERROR_SCENE_INVALID ALIVC_FRAMEWORK_RENDER_ERROR_INVALID_OPTION

    Declaration

    Objective-C

    - (int)removeFilter;