AliyunRecorder

@interface AliyunRecorder : NSObject

多源录制器

  • 是否正在录制 API_AVAILABLE(3.22.0)

    Declaration

    Objective-C

    @property (nonatomic, readonly) BOOL isRecording;
  • 是否正在预览 API_AVAILABLE(3.22.0)

    Declaration

    Objective-C

    @property (nonatomic, readonly) BOOL isPreviewing;
  • 录制状态 API_AVAILABLE(3.22.0)

    Declaration

    Objective-C

    @property (nonatomic, readonly) AliyunRecorderState state;
  • 录制事件回调 API_AVAILABLE(3.22.0)

    Declaration

    Objective-C

    @property (nonatomic, weak) id<AliyunRecorderDelegate> delegate;
  • 自定义渲染,仅对摄像头采集数据回调 API_AVAILABLE(3.22.0)

    Declaration

    Objective-C

    @property (nonatomic, weak) id<AliyunRecorderCustomRender> customRender;
  • 录制输出配置 API_AVAILABLE(3.22.0)

    Declaration

    Objective-C

    @property (nonatomic, readonly) AliyunRecorderConfig *config;
  • 录制速率 API_AVAILABLE(3.22.0)

    Declaration

    Objective-C

    @property (nonatomic) CGFloat rate;
  • 片段管理器 API_AVAILABLE(3.22.0)

    Declaration

    Objective-C

    @property (nonatomic, readonly) AliyunClipManager *clipManager;
  • 初始化 API_AVAILABLE(3.22.0)

    Declaration

    Objective-C

    - (instancetype)initWithConfig:(AliyunRecorderConfig *)config;

    Parameters

    config

    输出视频配置

  • API_AVAILABLE(3.22.0) 录制准备;一些录制源可能需要在这阶段去做权限申请之类;如果不调用会在开始录制或者开始预览时调用

    Declaration

    Objective-C

    - (BOOL)prepare;

    Return Value

    准备是否成功

  • 开始预览 API_AVAILABLE(3.22.0)

    Declaration

    Objective-C

    - (int)startPreview;
  • 结束预览 API_AVAILABLE(3.22.0)

    Declaration

    Objective-C

    - (void)stopPreview;
  • 开始录制 API_AVAILABLE(3.22.0)

    Declaration

    Objective-C

    - (int)startRecord;
  • 结束录制 API_AVAILABLE(3.22.0)

    Declaration

    Objective-C

    - (void)stopRecord;
  • 结束录制 API_AVAILABLE(3.22.0)

    Declaration

    Objective-C

    - (void)finishRecord:(void (^)(NSString *, NSError *))completion;

    Parameters

    completion

    结束完成的回调;结束录制需要对多段录制进行异步拼接;拼接完成会调用此回调

  • 结束录制,输出给编辑器 API_AVAILABLE(3.23.0)

    Declaration

    Objective-C

    - (void)finishRecordForEdit:(void (^)(NSString *, NSError *))completion;

    Parameters

    completion

    结束完成的回调

  • 取消录制;删除之前录制片段,状态重置为idle API_AVAILABLE(3.22.0)

    Declaration

    Objective-C

    - (void)cancel;