文档批注

1. 创建文档批注(APP视频)

在你的文档或者图片之上,创建一个视频剪辑(有声音和注释), 然后用户可以分享这个视频。

- (void)recordClipWithView:(UIView*)captureView
      withCaptureQuality:(eRecordClipQualityType)captureQuality
    enableShakeToRecord:(BOOL)shakeToRecord
           withDelegate:(id)delegate
                success:(void(^)())success
                 failure:(void(^)(NSError *error))failure;

参数:

名称 描述
captureView 指定要拍摄的景物,如果为零,整个屏幕将被捕获
captureQuality 指定剪辑的质量
shakeToRecord 指定是否晃动设备时的记录,应启动
delegate 回调接口来处理
success 回调接口,通知上记录成功的开始调用应用程序
failure 回调接口,通知调用应用程序上错误的详细信息

示例代码:

//Create clip on app screen
[[Betalk sharedClient]
        recordClipWithView: nil
        withCaptureQuality: kRecordClipQualityTypeMedium
       enableShakeToRecord: NO
              withDelegate: nil
                   success: ^() {
                        NSLog(@"Start recording successfully");
                 } failure:^(NSError *error) {
                        NSLog(@"Start record clip failed, %@", [NSString stringWithFormat:@"error code [%ld] description: [%@] info [%@]", [error code], [error localizedDescription], [[error userInfo] description]]);
}];

 2. 创建文档标注(文档和图像)

在你的app之上,创建一个捕捉操作的视频剪辑(还有声音和注释), 然后,用户可以分享这个视频。

- (void)recordClipWithLocalFiles:(NSArray*)filePathArray
              withCaptureQuality:(eRecordClipQualityType)captureQuality
                    withDelegate:(id)delegate
                         success:(void(^)(NSString *binderID))success
                         failure:(void(^)(NSError *error))failure;

参数:

名称 描述
filePathArray 指定本地文件路径
captureQuality 指定剪辑的质量
delegate 回调接口来处理的代表
success 回调接口,通知上记录成功的开始调用应用程序
failure 回调接口通知调用应用程序上错误的详细信息

示例代码:

//Create clip using local content (documents, images etc...)
NSString *imageFilePath = [[NSBundle mainBundle] pathForResource:@"sampleImage"ofType:@"png"];
NSString *pdfFilePath = [[NSBundle mainBundle] pathForResource:@"sample_pdf"ofType:@"pdf"];
NSArray *filePathArray = @[imageFilePath, pdfFilePath];

[[Betalk sharedClient]
    recordClipWithLocalFiles:filePathArray
          withCaptureQuality:kRecordClipQualityTypeMedium
                withDelegate:nil
                     success:^(NSString *binderID) {
                        NSLog(@"Start recording successfully with binderId [%@]", binderID);
                   } failure:^(NSError *error) {
                        NSLog(@"Start record clip failed, %@", [NSString stringWithFormat:@"error code [%ld] description: [%@] info [%@]", [error code], [error localizedDescription], [[error userInfo] description]]);
}];