Moxtra iOS Clip SDK

This quick start guide provides the steps for you to get started quickly with the Moxtra iOS SDK for Chat. The Moxtra Chat module gives you access to a rich messaging service for one on one, group, or topic based conversations.

Create Clip (App View)

Create a video clip capturing the activities on top of your app by adding voice and annotation to it. Let the users share the video clip from your app.

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

Parameters
Name Description
captureView Specify the view to be captured, if nil the whole screen will be captured.
captureQuality Specify the quality of the clip.
shakeToRecord Specify if the recording should be launched when shaking the device.
delegate Callback interface to handle the delegates.
success Callback interface to notify the calling application on successful start of the recording.
failure Callback interface to notify the calling application with details on error.

Sample code:

//Create clip on app screen
[[Moxtra 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]]);
}];

Create Clip (Docs and Images)

Create a video clip on top of the images & documents by adding voice and annotation to it. Let the users share the video clip from your app.

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

Parameters
Name Description
filePathArray Specify the local path to the file.
captureQuality Specify the quality of the clip.
delegate Callback interface to handle the delegates.
success Callback interface to notify the calling application on successful start of the recording.
failure Callback interface to notify the calling application with details on error.

Sample code:

//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];

[[Moxtra 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]]);
}];