AliyunClip

@interface AliyunClip : AliyunJSONModel

媒体片段

  • 类型

    Declaration

    Objective-C

    @property (nonatomic) AliyunClipType mediaType;
  • 图片/视频高

    Declaration

    Objective-C

    @property (nonatomic) int mediaHeight;
  • 图片/视频宽

    Declaration

    Objective-C

    @property (nonatomic) int mediaWidth;
  • src

    片段资源本地路径

    Declaration

    Objective-C

    @property (nonatomic, copy) NSString *src;
  • 开始时间

    Declaration

    Objective-C

    @property (nonatomic) CGFloat startTime;
  • 过渡时长

    Declaration

    Objective-C

    @property (nonatomic) CGFloat fadeDuration;
  • 显示模式 0:裁剪 1:填充

    Declaration

    Objective-C

    @property (nonatomic) int displayMode;
  • 旋转角度

    Declaration

    Objective-C

    @property (nonatomic) int rotation;
  • API_AVAILABLE(3.20.0) 亮度值

    Declaration

    Objective-C

    @property (nonatomic) float brightnessValue;
  • API_AVAILABLE(3.20.0) 对比度值

    Declaration

    Objective-C

    @property (nonatomic) float contrastValue;
  • API_AVAILABLE(3.20.0) 饱和度值

    Declaration

    Objective-C

    @property (nonatomic) float saturationValue;
  • API_AVAILABLE(3.20.0) 锐度值

    Declaration

    Objective-C

    @property (nonatomic) float sharpnessValue;
  • API_AVAILABLE(3.20.0) 暗角值

    Declaration

    Objective-C

    @property (nonatomic) float vignetteValue;
  • API_AVAILABLE(3.31.0) 是否水平翻转

    Declaration

    Objective-C

    @property (nonatomic) BOOL horizontalFlip;
  • 持续时长

    Declaration

    Objective-C

    @property (nonatomic) CGFloat duration;
  • 片段id 无需设置,sdk内部产生

    Declaration

    Objective-C

    @property (nonatomic) int streamId;
  • 转场效果 和前一段视频/图片之间的转场效果

    Declaration

    Objective-C

    @property (nonatomic, strong) AliyunTransitionEffect *transitionEffect;
  • 音效列表 只对有音频的视频流生效

    Declaration

    Objective-C

    @property (nonatomic, strong) NSMutableArray<AliyunAudioEffect *> *audioEffects;
  • API_AVAILABLE(3.20.0) 淡入Model

    Declaration

    Objective-C

    @property (nonatomic, strong) AliyunAudioFade *fadeIn;
  • API_AVAILABLE(3.20.0) 淡出Model

    Declaration

    Objective-C

    @property (nonatomic, strong) AliyunAudioFade *fadeOut;
  • 音量大小 0-100

    Declaration

    Objective-C

    @property (nonatomic) NSInteger audioMixWeight;
  • API_AVAILABLE(3.25.0) 降噪权值 [0~100],取0表示关闭,值越大降噪越厉害

    Declaration

    Objective-C

    @property (nonatomic) NSInteger denoiseWeight;
  • Deprecated

    deprecated

    已废弃字段

    Declaration

    Objective-C

    @property (nonatomic) CGFloat audioRecordStartTime;
  • 创建一个图片片段

    Declaration

    Objective-C

    - (instancetype)initWithImagePath:(NSString *)path
                             duration:(CGFloat)duration
                         animDuration:(CGFloat)animDuration;

    Parameters

    path

    图片路径

    duration

    图片时长

    animDuration

    过渡动画时长

    Return Value

    图片片段

  • 创建一个gif片段

    Declaration

    Objective-C

    - (instancetype)initWithGifPath:(NSString *)path;

    Parameters

    path

    gif路径

    Return Value

    gif片段

  • 创建一个gif片段

    Declaration

    Objective-C

    - (instancetype)initWithGifPath:(NSString *)path
                          startTime:(CGFloat)startTime
                           duration:(CGFloat)duration;

    Parameters

    path

    gif路径

    startTime

    指定gif的开始播放时间

    duration

    指定gif的持续播放时间

    Return Value

    gif片段

  • 创建一个视频片段

    Declaration

    Objective-C

    - (instancetype)initWithVideoPath:(NSString *)path
                         animDuration:(CGFloat)animDuration;

    Parameters

    path

    视频路径

    animDuration

    过渡动画时长

    Return Value

    视频片段

  • 创建一个视频片段

    Declaration

    Objective-C

    - (instancetype)initWithVideoPath:(NSString *)path
                            startTime:(CGFloat)startTime
                             duration:(CGFloat)duration
                         animDuration:(CGFloat)animDuration;

    Parameters

    path

    视频路径

    startTime

    相对原视频开始时间

    duration

    视频片段时长

    animDuration

    过渡动画时长

    Return Value

    视频片段

  • API_AVAILABLE(3.7.0)

    添加动画 注意:1.主流不支持alpha帧动画 2.在倒播特效下,不支持此功能

    Declaration

    Objective-C

    - (void)runAction:(AliyunAction *)action;

    Parameters

    action

    动画

  • API_AVAILABLE(3.7.0)

    停止动画

    Declaration

    Objective-C

    - (void)stopAction:(AliyunAction *)action;

    Parameters

    action

    动画

  • API_AVAILABLE(3.7.0)

    获取所有的动画

    Declaration

    Objective-C

    - (NSArray *)allActions;

    Return Value

    动画数组