AliyunRecorderConfig

@interface AliyunRecorderConfig : NSObject

录制的配置 API_AVAILABLE(3.22.0)

  • 输出MP4的文件路径 API_AVAILABLE(3.22.0)

    Declaration

    Objective-C

    @property (nonatomic, copy) NSString *outuptPath;
  • 录制任务临时路径 API_AVAILABLE(3.22.0)

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSString *taskPath;
  • 是否使用硬件回声消除 API_AVAILABLE(3.27.0)

    Declaration

    Objective-C

    @property (nonatomic, readonly) BOOL isUsingAEC;
  • 输出视频配置 API_AVAILABLE(3.22.0)

    Declaration

    Objective-C

    @property (nonatomic, readonly) AliyunRecorderVideoConfig *videoConfig;
  • 背景信息 API_AVAILABLE(3.22.0)

    Declaration

    Objective-C

    @property (nonatomic, strong) AliyunRecorderBackgroundInfo *bgInfo;
  • 麦克风控制器 API_AVAILABLE(3.22.0)

    Declaration

    Objective-C

    @property (nonatomic, readonly) id<AliyunMicRecordController> microphoneController;
  • 背景音乐控制器 API_AVALIABLE(3.27.0)

    Declaration

    Objective-C

    @property (nonatomic, readonly) id<AliyunAudioRecordController> bgmController;
  • 摄像头控制器 API_AVALIABLE(3.27.0)

    Declaration

    Objective-C

    @property (nonatomic, readonly) id<AliyunCameraRecordController> cameraController;
  • 视图控制器 API_AVALIABLE(3.27.0)

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSArray<id<AliyunViewRecordController>> *viewSourceControllers;
  • 视频控制器 API_AVALIABLE(3.27.0)

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSArray<id<AliyunPlayerRecordController>> *playerSourceControllers;
  • 合拍视频控制器 API_AVALIABLE(3.29.0)

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSArray<id> *avSourceControllers;
  • 初始化 API_AVAILABLE(3.27.0)

    Declaration

    Objective-C

    - (instancetype)initWithVideoConfig:(AliyunRecorderVideoConfig *)videoConfig
                             outputPath:(NSString *)outputPath
                               usingAEC:(BOOL)usingAEC;

    Parameters

    videoConfig

    输出视频配置

    outputPath

    最终输出mp4路径

    usingAEC

    是否使用回声消除

  • 初始化 API_AVAILABLE(3.22.0) 使用回声消除

    Declaration

    Objective-C

    - (instancetype)initWithVideoConfig:(AliyunRecorderVideoConfig *)videoConfig
                             outputPath:(NSString *)outputPath;

    Parameters

    videoConfig

    输出视频配置

    outputPath

    最终输出mp4路径

  • API_AVAILABLE(3.22.0) 添加摄像头源(只能添加一个,多次调用返回同一个控制器)

    Declaration

    Objective-C

    - (id<AliyunCameraRecordController>)addCamera:(id)layout;

    Parameters

    layout

    摄像头源在输出视频的位置布局

  • 移除摄像头源 API_AVAILABLE(3.27.0)

    Declaration

    Objective-C

    - (BOOL)removeCamera;
  • 添加视图源 API_AVAILABLE(3.22.0)

    Declaration

    Objective-C

    - (id<AliyunViewRecordController>)addViewSource:(AliyunViewRecordSource *)source
                                             layout:(id)layout;

    Parameters

    source

    视图源

    layout

    视图源在输出视频的位置布局

  • 移除视图源 API_AVAILABLE(3.27.0)

    Declaration

    Objective-C

    - (BOOL)removeViewSource:(id<AliyunViewRecordController>)sourceController;

    Parameters

    sourceController

    视图源控制器

  • 添加合拍源 API_AVAILABLE(3.29.0)

    Declaration

    Objective-C

    - (id)addAVFileSource:(id)source layout:(id)layout;

    Parameters

    source

    合拍源

    layout

    合拍源在输出视频的位置布局

  • 移除合拍源 API_AVAILABLE(3.29.0)

    Declaration

    Objective-C

    - (BOOL)removeAVFileSource:(id)sourceControler;

    Parameters

    sourceController

    合拍源控制器

  • 添加麦克风源,默认添加 API_AVAILABLE(3.27.0)

    Declaration

    Objective-C

    - (id<AliyunMicRecordController>)addMicrophone;
  • 移除麦克风源 API_AVAILABLE(3.27.0)

    Declaration

    Objective-C

    - (BOOL)removeMicrophone;
  • 设置背景音乐 API_AVAILABLE(3.22.0)

    Declaration

    Objective-C

    - (id<AliyunAudioRecordController>)setBgMusicWithFile:(NSString *)filePath
                                                startTime:(NSTimeInterval)startTime
                                                 duration:(NSTimeInterval)duration;

    Parameters

    filePath

    背景音乐文件

    startTime

    从哪里开始截取背景音乐

    duration

    截取多长的音乐

  • 移除背景音乐 API_AVAILABLE(3.22.0)

    remove background music API_AVAILABLE(3.22.0)

    Declaration

    Objective-C

    - (BOOL)removeBgMusic;
  • 添加水印 API_AVAILABLE(3.22.0)

    Declaration

    Objective-C

    - (void)addWaterMark:(AliyunRecorderImageSticker *)waterMark;

    Parameters

    waterMark

    水印

  • 移除水印 API_AVAILABLE(3.22.0)

    Declaration

    Objective-C

    - (void)removeWaterMark:(int)waterMarkId;

    Parameters

    waterMarkId

    贴纸的ID

Deprecated

  • Deprecated

    please use addAVFileSource:

    添加合拍源 API_AVAILABLE(3.27.0)

    Declaration

    Objective-C

    - (id<AliyunPlayerRecordController>)addPlayerSource:
                                            (AliyunPlayerRecordSource *)source
                                                 layout:(id)layout;

    Parameters

    source

    合拍源

    layout

    合拍源在输出视频的位置布局

  • Deprecated

    please use removeAVFileSource:

    移除合拍源 API_AVAILABLE(3.27.0)

    Declaration

    Objective-C

    - (BOOL)removePlayerSource:(id<AliyunPlayerRecordController>)sourceController;

    Parameters

    sourceController

    合拍源控制器

  • Deprecated

    please use cameraController, playerSourceControllers, viewSourceControllers

    视频控制器 API_AVAILABLE(3.22.0)

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSArray<id<AliyunVideoBaseRecordController>> *videoRecordControllers;
  • Deprecated

    please use removeCamera, removePlayerSource:, removeViewSource:

    删除视频源 API_AVAILABLE(3.22.0)

    Declaration

    Objective-C

    - (BOOL)removeVideo:(int)videoId;

    Parameters

    videoId

    视频源唯一标识,对应controller里的videoId