Implementation steps for the draft box
First Recording
1. Start recording.
2. Suspend/end the first recording.
3. Cache video segments to your local system (draft box).
Second Recording
1. Preload video segments from local cache.
Continue recording.
End recording.
//Get the object of the first video recordingrecord = [TXUGCRecord shareInstance];//Start recording[record startRecord];//Pause recording and cache video segments[record pauseRecord:^{NSArray *videoPathList = record.partsManager.getVideoPathList;//Write videoPathList locally}];//Get the object of the second video recordingrecord2 = [TXUGCRecord shareInstance];//Preload local cache fragments[record2.partsManager insertPart:videoPath atIndex:0];//Start recording[record2 startRecord];//End recording. The SDK will synthesize the cached video clips and the currently recording video clips.[record2 stopRecord];
Note
For the specific implementation method, refer to the UGCKitRecordViewController class in video source code.