功能概览
通过动效相关接口,可以对短视频添加一段动态转场效果,本文提供动效管理功能,包括添加、更新和删除动效,支持设置缩放模式和时间参数等。
相关接口类
接口类名 | 描述 |
TAVEditor | SDK 操作入口类。 |
动效相关方法
添加动效
/// 设置特效/// - Parameters:/// - path: 特效素材路径/// - timeRange: 特效对应的时间区域/// - return:特效id- (int)addMotionEffect:(NSString *)path timeRange:(CMTimeRange)timeRange;
调整动效播放时间
/// 更新特效播放时间/// - Parameters:/// - effectId: 创建特效时生成的id/// - timeRange: 特效展示区间- (void)updateMotionEffect:(int)effectId playRange:(CMTimeRange)timeRange;
删除动效
/// 删除特效/// - Parameter effectId: 创建特效时生成的id- (void)removeMotionEffect:(int)effectId;/// 删除所有特效- (void)removeAllMotion;